CN117135618B - Method, equipment and storage medium for setting local number function - Google Patents

Method, equipment and storage medium for setting local number function Download PDF

Info

Publication number
CN117135618B
CN117135618B CN202310310072.5A CN202310310072A CN117135618B CN 117135618 B CN117135618 B CN 117135618B CN 202310310072 A CN202310310072 A CN 202310310072A CN 117135618 B CN117135618 B CN 117135618B
Authority
CN
China
Prior art keywords
network
card
local number
modem
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310310072.5A
Other languages
Chinese (zh)
Other versions
CN117135618A (en
Inventor
陈宏强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310310072.5A priority Critical patent/CN117135618B/en
Publication of CN117135618A publication Critical patent/CN117135618A/en
Application granted granted Critical
Publication of CN117135618B publication Critical patent/CN117135618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the application provides a method, equipment and a storage medium for setting a local number function, and relates to the technical field of terminals. In the scheme of the application: after receiving the operation of closing the flight mode by the user, if the network name of the slave card after the current change is obtained first, the terminal device can add a step of judging whether the network name of the slave card after the current change is not null and the length of the character string is greater than 0 before comparing whether the network name of the slave card after the current change is different from the network name of the slave card after the last change, thereby avoiding triggering the function flow of setting the local number when the user is in the closing mode and the user is not in the network, leading the radio frequency resource not to be preempted by the slave card and the data service activation of the master card not to be blocked.

Description

Method, equipment and storage medium for setting local number function
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method, an apparatus, and a storage medium for setting a local number function.
Background
Generally, terminal apparatuses are classified into single-pass terminals and double-pass terminals. Whether a single-pass terminal or a double-pass terminal, the terminal device can be provided with two subscriber identity module (subscriber identification module, SIM) cards, and the two SIM cards support the function of setting the local number. The difference from the two-way terminal is that the one-way terminal will configure the data service on the main card and the sub-card will not provide the data service.
In some cases, the one-way terminal may trigger the function of setting the local number when the network name does not actually change. For example, when the user closes the flight mode, if the slave card detects the change of the network name under the condition of not residing the network, the local number function service of the slave card is initiated, so that the radio frequency resource is preempted by the slave card, and the master card does not have the radio frequency resource which can be used, thereby blocking the master card to activate the data service, and causing the master card to activate the data service overtime.
Disclosure of Invention
The application provides a method, equipment and a storage medium for setting a local number function, which solve the technical problem that a main card activates data service overtime due to the fact that a secondary card preempts radio frequency resources.
In order to achieve the above purpose, the application adopts the following technical scheme:
In a first aspect, an embodiment of the present application provides a method for setting a local number function. The method can be applied to a single-pass terminal provided with at least two SIM cards. The method comprises the following steps: the method includes the steps of acquiring a first network name, wherein the first network name is acquired when the network state of a first SIM card changes. Executing a first action if the first network name satisfies a first condition; or if the first network name does not satisfy the first condition, not performing the first action.
The first SIM card is any one of at least two SIM cards, for example, the first SIM card is a main card or an auxiliary card. The first condition is that the network name of the SIM card is not null and the length of the string is greater than 0. The first action is to determine whether to trigger a set local number function. The function of the local number is a function of displaying or hiding the local number of the single-pass terminal in the called equipment.
In the above scheme, when the network state of any SIM card changes, by determining whether the network name obtained when the network state changes is not null and the length of the character string is greater than 0, it is possible to avoid triggering the local number setting flow when the network name does not actually change (for example, the sub card detects the network name change under the condition of not residing in the network), and only when the network name actually changes (for example, the main card detects the network name change under the condition of residing in the network). Therefore, even if the secondary card detects the change of the network name under the condition of no network residence, the local number setting flow cannot be triggered, so that the radio frequency resource cannot be preempted by the secondary card, the data service activation of the primary card cannot be blocked, and the user can quickly surf the internet.
In one possible implementation, the single-pass terminal includes a telephony manager of a framework layer, a Radio Interface Layer (RILD) of a hardware abstraction layer, and a modem and wireless fidelity (WIRELESS FIDELITY, wi-Fi) module of the hardware layer. The phone manager is a communication framework built in a framework layer, and provides capability for a developer to operate communication transactions, for example, when the network state of the SIM card is changed, the changed network name is written into a first field, when the first field and a second field are different, a function of setting a local number is triggered, and the content of the first field is written into the second field. RILD is a bridge for modems to communicate with android systems, and is primarily an intermediate channel for data interaction between application processors and baseband processors. The modem is used for processing the actual wireless communication capability, such as sending the local number function setting information to the network side device. The Wi-Fi module user updates the country code of the SIM card registration network.
It should be understood that these modules are configured to perform different functions, and that the function of setting the local number may be implemented using information interaction between the different modules. The following is presented in terms of module interactions.
In one possible implementation, obtaining the first network name includes: when the network state of the first SIM card changes, the modem sends a first network name to the telephone manager; the telephony manager receives a first network name and stores the first network name in a first field.
Illustratively, the first field is a mnewss1.Getoperatornumeric () field.
It will be appreciated that by saving the changed network name of the first SIM card in the first field, the telephony manager can then determine whether to trigger the set local number function by comparing whether the first field and the second field are different.
In one possible implementation, the network state of the first SIM card may change in three scenarios:
In scenario 1, the network state of the first SIM card switches from the parked state to the on-flight mode state. In this case, the first network name that the modem sends to the telephony manager is null.
In scenario 2, the network state of the first SIM card switches from an on-flight mode state to an off-flight mode and no network-resident state. In this case, the first network name that the modem sends to the telephony manager is an empty string.
In scenario 3, the network state of the first SIM card switches from a closed flight mode and a non-network-parked state to a closed flight mode and a network-parked state. In this case, the first network name sent by the modem to the telephony manager is the name of the network to which the first SIM card is currently registered.
It should be appreciated that since different network state changes may occur to the SIM card, by reporting different network names when different network state changes occur, the telephony manager is enabled to determine from these network names whether the network name registered by the SIM card is actually changing.
In one possible implementation, where the first network name satisfies the first condition, performing the first action includes: in the case that the first network name satisfies the first condition, it is determined whether the first network name is different from the second network name. The second network name is a network name acquired when the network state of the first SIM card has changed last time.
It should be understood that, when the first network name is not null and the length of the character string is greater than 0, by comparing whether the network name acquired during the current change is different from the network name acquired during the last change, it can be determined whether the network name registered by the SIM card is actually changed, for example, the SIM card is switched from no service to a service.
In one possible implementation, the first network name is stored in a first field, for example, the first field may be a mnewss1.Getoperatornumeric () field; the second network name is stored in a second field, for example, the second field may be an mss1.Getoperatornumeric () field. Accordingly, determining whether the first network name is different from the second network name includes: it is determined whether the first field is different from the second field.
Illustratively, the mNEWSS. GetOperationNumeric () field is divided into two types:
A mNawSS1. GetOperator Numeric () field for storing the name of the operator of the network to which the sub card is registered this time;
and a mNawSS2. GetOperator Numeric () field for storing the name of the operator of the network to which the master card is registered.
The mss. Getoperatornumeric () field is divided into two types:
An mss1.Getoperatornumeric () field for storing the name of the operator of the network to which the sub card was last registered;
an mss2.Getoperatornumeric () field for holding the name of the operator of the network to which the host card was last registered.
It should be understood that each SIM card corresponds to two fields, one for storing the name of the operator of the network in which the SIM card was registered, and the other for storing the name of the operator of the network in which the SIM card was registered last time. By comparing whether two fields corresponding to one SIM card are different, whether the network name registered by the SIM card is actually changed can be determined.
In one possible implementation, after determining whether the first field and the second field are different, the method may further include: triggering a function of setting a local number under the condition that the first field is different from the second field; or in case the first field is the same as the second field, the set local number function is not triggered.
It should be understood that when two fields corresponding to one SIM card are different, it may be determined that the network name registered by the SIM card is actually changed, and the service is switched from no service to service, and at this time, the function of setting the local number may be triggered. When two fields corresponding to one SIM card are the same, the fact that the network name registered by the SIM card is not really changed can be determined, and the function of setting the local number is not required to be triggered at the moment.
In one possible implementation manner, in a case that the first field is different from the second field, triggering the function of setting the local number includes: in the case that the first field is different from the second field, the telephone manager sends a function instruction for setting the local number to the modem; the modem responds to the instruction of setting the function of the local number and sends the function setting information of the local number of the single-pass terminal to the network side equipment, wherein the function setting information of the local number is used for indicating the display or hiding of the local number of the single-pass terminal in the called equipment.
It should be understood that when a SIM card is switched from no service to having service, by sending an instruction for setting a local number function to the modem, the modem and the network side device may interact with the local number function setting information to notify the network side device of the local number function setting of the SIM card. Thus, when the terminal equipment initiates a calling party, the called party can display or hide the local number of the SIM card according to the notification of the network side equipment.
In one possible implementation, if the first SIM card is a master card, the set local number function instruction is sent when the network state of the master card is in a closed flight mode and the network state is already resident, then after the phone manager sends the set local number function instruction to the modem, the method may further include: the telephone manager sends an instruction for activating the data service to the modem; the modem activates data traffic of the host card in response to the activate data traffic command.
It should be understood that, in the case where the flight mode is turned off and the host card is in the network-resident state, the instruction for setting the local number function may be sent first, and then the data service is triggered and activated, so that the host card provides the data service, and the user may surf the internet, browse the video, and so on.
In one possible implementation, the method may further include: when the network name of the first SIM card meets a first condition and the first field is different from the second field, broadcasting a country code of the current registered network of the first SIM card by the telephone manager; after the Wi-Fi module receives the country code of the current registration network of the first SIM card, the Wi-Fi module updates the country code of the registration network of the first SIM card into the country code of the current registration network of the first SIM card.
It should be appreciated that when a SIM card is switched from out-of-service to in-service, the Wi-Fi module may update the country code of the SIM card registration network in time by broadcasting the country code of the current registration network of the SIM card.
In one possible implementation, the method may further include: and writing the content of the first field into the second field under the condition that the network name of the first SIM card meets the first condition and the first field is different from the second field.
It should be appreciated that when the network name of one SIM card satisfies the first condition and the first field is different from the second field, it may be determined that the SIM card is switched from out-of-service to in-service. The phone manager may not only issue a set local number function instruction to the modem for the host card, but may also write the contents of the first field into the second field. Thus, when the step of judging whether the first field is different from the second field needs to be executed in the next round of judging process, the second field can be normally used.
In one possible implementation, the method may further include: and writing the content of the first field into the second field in the case that the network name of the first SIM card does not meet the first condition.
It will be appreciated that when the network name of a SIM card does not meet the first condition, the phone manager may determine that the step of "determining whether the first field is different from the second field" is not performed, but in order to perform the step of "determining whether the first field is different from the second field" in the next round of determination, the second field can be used normally, and the contents of the first field may also be written into the second field.
In one possible implementation, before acquiring the first network name, the method may further include: responding to the operation of closing the flight mode by a user, searching a network by using information stored in at least two SIM cards by the modem; in the network searching process, if the modem detects that the network state of the first SIM card changes, network change information is sent to the telephone manager; the telephone manager sends a query instruction to the modem; the modem, in response to the query instruction, sends an operation instruction, such as an OPERATOR instruction, to the telephony manager, the operation instruction carrying the first network name.
It should be understood that after the flight mode is turned off, the terminal device searches the network for each SIM card, and if any SIM card finds a network change, the terminal device may notify the phone manager to report the changed network content, such as a network name.
In a second aspect, the application provides an apparatus comprising means for performing the method of the first aspect described above. The apparatus may correspond to the method for performing the function of setting a local number described in the first aspect, and for the description of the unit in the apparatus, reference is made to the description of the first aspect, which is not repeated herein for brevity.
The method for setting the local number function described in the first aspect may be implemented by hardware, or may be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a processing module or unit, a display module or unit, etc.
In a third aspect, the application provides a terminal device, which is a single-pass terminal, comprising a memory and one or more processors. Wherein the memory is for storing computer program code, the computer program code comprising computer instructions. The computer instructions, when executed by a processor, cause a terminal device to perform the method of setting a local number function provided in any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When executed on a terminal device, the computer instructions cause the terminal device to perform a method of setting a local number function as provided by the first aspect and any one of its possible implementations.
In a fifth aspect, the present application provides a computer program product. The computer program product, when run on a computer, causes the computer to perform the method of setting a local number function as provided by the first aspect and any one of its possible implementations.
In a sixth aspect, the present application provides a chip system. The system-on-chip includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a wire. The chip system can be applied to a terminal device comprising a communication module and a memory. The interface circuit is for receiving signals from the memory of the terminal device and transmitting the received signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the terminal device may perform a method of setting a local number function as provided in the first aspect and any one of its possible implementations.
It will be appreciated that the advantages achieved by the apparatus of the second aspect, the terminal device of the third aspect, the computer readable storage medium of the fourth aspect, the computer program product of the fifth aspect and the chip system of the sixth aspect provided above may refer to the advantages as in the first aspect and any possible implementation manners thereof, and are not described herein.
Drawings
Fig. 1 is a schematic diagram of a scenario in which a terminal device sets a local number function according to an embodiment of the present application;
Fig. 2 is a schematic view of a scenario in which a terminal device sets a flight mode according to an embodiment of the present application;
Fig. 3 is a schematic diagram of a hardware structure of a mobile phone according to an embodiment of the present application;
Fig. 4 is a schematic architecture diagram of a terminal device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a local number function setting flow for triggering a primary card and a secondary card according to an embodiment of the present application;
fig. 6 is a flowchart of issuing a local number instruction for setting a sub-card to a modem according to an embodiment of the present application;
Fig. 7 is a flowchart of issuing a local number instruction for setting a main card to a modem according to an embodiment of the present application;
fig. 8 is a schematic diagram of a main card activating a data service overtime caused by a radio frequency resource preempted by a sub-card according to an embodiment of the present application;
fig. 9 is a schematic diagram of a relationship between a local number service of a secondary card and a data service of a primary card according to an embodiment of the present application;
fig. 10 is a flowchart of an optimized method for setting a local number function according to an embodiment of the present application;
FIG. 11 is a block diagram illustrating an optimized method for setting a local number function according to an embodiment of the present application;
fig. 12 is a schematic diagram of a scenario in which a function of setting a local number by using a method before optimization according to an embodiment of the present application;
fig. 13 is a schematic view of a scenario in which the function of setting a local number by using an optimized method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application.
In the description of the present application, "/" means or, unless otherwise indicated, for example, A/B may mean A or B. In the description of the present application, "and/or" is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order of the objects. For example, the first SIM card and the second SIM card are used to distinguish between different SIM cards, and are not used to describe a particular order of SIM cards. In embodiments of the present application, "plurality" refers to two or more.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In order to facilitate understanding of the embodiments of the present application, some terms of the embodiments of the present application are explained below.
1. Number function of local machine
The home number function is a function of displaying/hiding a home number in a called party.
In some embodiments, the user may manually set the local number function. When the user sets the local number function of the calling device to be effective in display, the calling device allows the telephone number of the calling device to be displayed on the called device, and the user using the called device can see the telephone number of the calling device when the two parties call; when the user sets the local number function of the calling device to be hidden and effective, the calling device prohibits the display of the telephone number of the calling device on the called device, and the user using the called device cannot see the telephone number of the calling device when the two parties call.
By way of example, fig. 1 shows a schematic diagram of a scenario in which a local number function is set at a terminal device.
As shown in (a) of fig. 1, the desktop of the terminal device includes icons of a plurality of applications such as a setting, weather, browser, and the like. The user may click on the setting icon, and the terminal device displays a setting interface as shown in (b) of fig. 1 in response to the clicking operation on the setting icon, the setting interface including setting options such as an airplane mode, a phone, a bluetooth, a wireless lan, a phone, information, and an address book. The user can click on the telephone option, and the terminal device displays a telephone setting interface as shown in (c) of fig. 1 in response to the click operation on the telephone option, the telephone setting interface including: the notification option, the incoming call option, the voice prompt on incoming call option and the voice assistant and search option corresponding to allowing the telephone to access, and the reply with information option, the call forwarding option, the call waiting option and the display of the local number option at the called party corresponding to the call. The user may click on the display of the local number option at the called party, and the terminal device displays a local number interface at the called party as shown in (d) of fig. 1 or (e) of fig. 1 in response to a click operation on the display of the local number option at the called party.
As shown in (d) of fig. 1, when the circular control 02 is dragged to the rightmost side of the slider bar 01 by the user, the terminal device turns on the function of displaying the local number at the called party (i.e., turns off the function of displaying the local number at the called Fang Yincang), and in this setting scenario, if the terminal device initiates a caller to the called device, the called device can acquire and display the telephone number of the terminal device.
As shown in fig. 1 (e), when the circular control 02 is dragged to the leftmost side of the slider bar 01 by the user, the terminal device turns off the function of displaying the local number at the called party (i.e., turns on the function of displaying the local number at the called Fang Yincang), and in this setting scenario, if the terminal device initiates a caller to the called device, the called device cannot acquire and display the telephone number of the terminal device.
In this way, the user can manually set the native number function of the terminal device by sliding the circular control 02 to the left or right. The terminal device may store the latest/last home number function setting in a preset storage area in response to the received sliding operation, for example, the latest/last home number function setting is set to allow the home number to be displayed on the called device, or the latest/last home number function setting is set to prohibit the home number from being displayed on the called device. It should be understood that, every time the user performs a sliding operation on the circular control 02, the terminal device updates the function setting of the local number stored last/last time in the preset storage area. Thus, when the terminal equipment is switched from no service to service, the terminal equipment can read the latest/last local number function setting from the preset storage area and interact with the network side equipment according to the setting, so that the local number is displayed or hidden on the called party when the terminal equipment initiates a calling.
In other embodiments, the terminal device further provides a default setting of the local number function, and when the default setting of the local number function is effective, the terminal device may turn on or off the local number function according to the default setting of the local number function. It should be understood that when the default setting of the local number function is valid, the terminal device stores the default setting of the local number function in the preset storage area. Thus, when the terminal equipment is switched from no service to service, the terminal equipment can read the latest/last local number function setting from the preset storage area and interact with the network side equipment according to the setting, so that the local number is displayed or hidden on the called party when the terminal equipment initiates a calling.
2. Flight mode
The flight mode is called aviation mode and aviation mode, and when taking the aircraft, the user cuts off the communication signal of the terminal equipment by starting the own flight mode of the terminal equipment, so that the influence of the transmitted and received signals on the aircraft flight can be avoided. Typically, the wireless communication module of the terminal device is turned off in the flight mode, and the terminal device does not actively send a paging signal to the base station, i.e. the terminal device does not attempt to contact the base station.
By way of example, fig. 2 shows a schematic view of a scenario in which a flight mode is set at a terminal device.
As shown in (a) of fig. 2, the desktop of the terminal device may include not only icons of a plurality of applications such as a setting, weather, browser, etc., but also status bars. The status bar includes two signal strength identifiers 03, and the number of the cells of each signal strength identifier 03 is used to represent the signal strength of one SIM card, for example, when the number of the cells of the signal strength identifier 03 of the main card is full, the signal strength of the main card is the strongest. When the user starts taking an airplane or enters a place such as a gas station, the user can start sliding down a finger from the screen of the terminal device, and the terminal device displays a control panel 04 as shown in (b) of fig. 2 in response to the received sliding down operation, the control panel 04 including a wireless local area network (wireless local area networks, WLAN) option, a bluetooth option, a mobile data option, and a flight mode option 05, etc. As shown in fig. 2 (c), the user may click on the flight mode option 05. Then, the terminal device turns on the flight mode in response to the click operation of the flight mode 05 option, and updates the two signal strength identifications 03 of the status bar to the flight mode identification 06 as shown in (d) of fig. 2, and updates the flight mode option 05 in the control panel 04 to the flight mode option 07 as shown in (d) of fig. 2. During the terminal device is in the flight mode, since the wireless communication module is turned off, the data connection (data connection) of the terminal device is disconnected as shown in (e) of fig. 2, and thus the mobile data internet service cannot be provided. When the user ends taking an airplane or leaves a place such as a gas station, the user can click again on the flight mode option 07 of the control panel as shown in fig. 2 (f) to trigger the terminal device to turn off the flight mode.
The embodiment of the application provides a method for setting a local number function, which can be applied to terminal equipment. The terminal device is provided with at least two SIM cards, such as a main card and a sub card. After receiving the operation of closing the flight mode by the user, the flight mode of the terminal device is switched from the on state to the off state, and the terminal device searches for some information, and the information may trigger the local number function setting flow of the main card and the auxiliary card.
In order to more clearly understand the method for setting the function of the local number provided by the embodiment of the present application, first, the software and hardware structure of the terminal device will be described with reference to fig. 3 and fig. 4.
In some embodiments, the above-mentioned terminal device is also referred to as a terminal (terminal) or a User Equipment (UE). For example, the terminal device may be a personal computer (personal computer, PC), a mobile phone (mobile phone), a smart screen, a smart television, a tablet (Pad), a wearable device, a computer with wireless transceiving function, a Virtual Reality (VR) device, an augmented reality (augmented reality, AR) device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (SMART GRID), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (SMART CITY) or a wireless terminal in smart home (smart home), or the like, or may be other devices or apparatuses.
Take the example that the terminal device is a mobile phone. Fig. 3 is a schematic hardware structure of a mobile phone 100 according to an embodiment of the present application.
As shown in fig. 3, the cellular phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a SIM card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyro 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, and a bone conduction sensor 180M, etc.
It should be understood that the structure illustrated in the embodiments of the present application is not limited to the specific embodiment of the mobile phone 100. In other embodiments, the handset 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor (baseband processor, BP), and/or a neural-network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural center or a command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-INTEGRATED CIRCUIT, I2C) interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a SIM interface, and/or a USB interface, among others.
The wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The structures of the antennas 1 and 2 in fig. 3 are only one example. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modem (modem) associated with at least one SIM card through SIM card interface 195. In some embodiments, the modem may be used to perform a local number function setup procedure, activate the service data of the SIM card, process voice calls to the SIM card (e.g., answer or hang up), read desired data from the SIM card (e.g., number of the SIM card, local number function setup, etc.). The modem includes a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150, baseband processor, or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including WLAN (e.g., wi-Fi network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near Field Communication (NFC), infrared (IR), etc. applied to the mobile phone 100. The wireless communication module 160 may 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, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, the antenna 1 and the mobile communication module 150 of the handset 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the handset 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology may include: global mobile communications (global system for mobile communications, GSM), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), general packet radio service (GENERAL PACKET radio service, GPRS), long term evolution (long term evolution, LTE), LTE frequency division duplexing (frequency division duplex, FDD), LTE time division duplexing (time division duplex, TDD), universal mobile communication system (universal mobile telecommunication system, UMTS), worldwide interoperability for microwave access (worldwide interoperability for microwave access, wiMAX), fifth generation (5th generation,5G), new radio, NR), GNSS, WLAN, NFC, FM, and/or IR techniques. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation SATELLITE SYSTEM, GLONASS), a beidou satellite navigation system (beidou navigation SATELLITE SYSTEM, BDS), a quasi zenith satellite system (quasi-zenith SATELLITE SYSTEM, QZSS) and/or a satellite based augmentation system (SATELLITE BASED AUGMENTATION SYSTEMS, SBAS).
The mobile phone 100 implements display functions through a GPU, a display 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel that may be used to display setup interfaces, turn on or off flight mode interfaces, browser interfaces, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, a file such as a call record or a call video is stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage area may store, among other things, application programs (e.g., dialing applications, telephony applications) required for at least one function of the operating system. The storage data area may store data created during use of the mobile phone 100 (e.g., setting information of the latest home number function). In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the handset 100. The handset 100 may support 1 or N SIM card interfaces, N being an integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to realize functions such as call and data communication.
In an embodiment of the present application, the mobile phone 100 may be inserted with at least two SIM cards, such as a main card and a sub card. It should be noted that, the following embodiments are described by taking the case that the main card and the auxiliary card are simultaneously provided in the calling device as an example, and it should be understood that the method for setting the local number function provided in the embodiments of the present application is applicable to terminal devices provided with three SIM cards and more than three SIM cards.
The number of modems may be one or a plurality of modems. For convenience of description, the following embodiments are exemplified by the case where the main card and the sub card are associated to the same modem, that is, the main card and the sub card transmit and receive data using the same modem, which is not limiting to the present application. It should be understood that in actual implementation, the primary card and the secondary card may also be associated with different modems.
In some embodiments, the primary and secondary cards may be mobile SIM cards, unicom SIM cards, telecommunications SIM cards, or radio SIM cards, as the application is not limited in this regard. It should be understood that SIM cards provided by different communication carriers may support the same network system, or may support different network systems, which is not limited by the embodiment of the present application.
In some embodiments, the primary card and the secondary card may be SIM cards with physical entities, such as an embedded SIM card (i.e. a small card) and a card type SIM card (i.e. a large card), and after the SIM card is inserted into the card slot of the mobile phone 100, the functions of communication, data communication, and the like may be implemented. In other embodiments, the SIM card may also be a SIM card without a physical entity, such as an eSIM card that is embedded on the chip of the handset 100, converting a traditional SIM card into an "electronic version".
Fig. 4 is a schematic architecture diagram of a terminal device according to an embodiment of the present application.
As shown in fig. 4, the terminal device may employ a layered architecture to divide the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the software layers of the software structure are divided sequentially from top to bottom: an Application (APP) layer, an application Framework (FWK) layer, and a Hardware Abstraction Layer (HAL) layer. The software architecture runs above a hardware layer, which may include a modem, a Wi-Fi module, a SIM card 1 (main card), a SIM card 2 (sub card), and so on.
The application layer, abbreviated as the application layer, may include a series of applications such as a dial-up (dialer) application, a telephone (telephone) application, a text message application, and the like. When these application packages are run, the various service modules provided by the application framework layer can be accessed through an application programming interface (application programming interface, API) and the corresponding intelligent services are executed.
An application framework layer (FWK), also known as a framework layer, is used to support the running of individual applications in the application layer. For example, the framework layer may include a telephony manager (telephenyl). The telephone manager is a communication framework built in a framework layer and provides the capability of operating communication transactions for developers. The telephony manager may include, among other things, ril.java, RILJ adaptation layer.
A Hardware Abstraction Layer (HAL) is an interface layer between the operating system kernel and the hardware circuitry that aims at abstracting the hardware, which hides the hardware interface details of a particular platform. For example, the hardware abstraction layer may include a RILD. RILD is a bridge between a modem and an android system, and is mainly an intermediate channel for data interaction between an application processor and a baseband processor, for example, the application processor sends an attention (attention, AT) instruction to the baseband processor through an RIL process, and the baseband processor receives information and then sends the information to the application processor through the RIL process.
Android RILD can be divided into two parts: one part is the RILD for communicating with the framework layer via sockets (sockets) and handling events (events) for the entire RIL; the other part is the vendor RIL. Since modems used by vendors of different terminal devices are different and RILs are closely related to modems, the portions closely related to modems and the common portion are stripped off, and the different vendors can use their own vendor RILs to accommodate the modems.
The hardware layer may include a Wi-Fi module, a primary card, a secondary card, and a modem associated with the primary card and the secondary card. The user may initiate a caller on the primary or secondary card or receive a caller from another device on the primary or secondary card. The modem is responsible for handling the actual wireless communication capabilities.
It should be noted that, in the embodiment of the present application, the AP end may refer to an upper layer application running on the application processor, such as an application program of an application program layer, a phone manager of a frame layer, and other frame modules; the BP side may be referred to as a modem. When the terminal device meets the local number instruction issuing condition, the phone manager AT the AP end sends an AT instruction to the modem through the RIL process, where the AT instruction carries a local number setting function instruction, and the local number setting function instruction is used to instruct the modem to notify the network side device of the local number function setting of the SIM card. The network side device is a base station, a server, a core network device or other network devices, which is not limited in the embodiment of the present application.
Fig. 4 shows layers in the architecture and components included in each layer, and does not constitute a specific limitation on the terminal device. In other embodiments, the terminal device may include more or fewer layers than shown, and more or fewer components may be included in each layer, as the application is not limited.
It may be understood that, in order to implement the method for setting the local number function in the embodiment of the present application, the terminal device includes corresponding hardware and/or software modules for executing each function. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art can implement the described functionality using different approaches for each particular application in conjunction with the embodiments.
The terminal equipment provided by the embodiment of the application at least comprises a main card and a sub card. When a user opens the flight mode of the terminal device or closes the flight mode, a modem at the BP end detects that the service states of the main card and the auxiliary card change, and then a phone manager at the AP end updates a mNEWSS.getOPERATNumeric () field according to the service state change, and compares whether the changed mNEWSS.getOPERNumeric () field is different from a previous mSS.getOPERNumeric () field, wherein the mSS.getOPERNumeric () field is used for storing the name of an operator of the network in which the SIM card was last registered, and the mNEWSS.getOPERNumeric () field is used for storing the name of the operator of the network in which the SIM card is currently registered. In some scenarios, if the two fields are different, the local number function setting flows of the main card and the auxiliary card may be triggered.
Illustratively, fig. 5 shows a schematic diagram of a local number function setting flow that triggers the primary card and the secondary card. As shown in fig. 5, below, an example will be described in which mSS denotes the mss.getoperatornumeric () field of the sub-card, mNewSS denotes the mnewss.getoperatornumeric () field of the sub-card, mSS denotes the mss.getoperatornumeric () field of the main card, and mNewSS denotes the mnewss.getoperatornumeric () field of the main card.
After receiving the operation of opening the flight mode by the user, the terminal equipment opens the flight mode. The modem will inform the telephony manager that the service status of the primary and secondary cards is updated from a network-enabled service to a network-disabled service. The phone manager writes null in mNewSS field and null in mNewSS field.
When the terminal equipment just closes the flight mode, the main card and the auxiliary card start searching the network and are still in the network-not-resident stage. The modem detects a change in the network name of the main card and a change in the network name of the sub card. One possible way is that if the modem detects a change in the network name of the secondary card registration network, the phone manager writes an empty string in mNewSS field, and since the null of mNewSS field and mSS field are different, the phone manager triggers the set local number flow for the secondary card and writes an empty string in mSS field; after that, after the modem detects the network name change of the main card, the phone manager writes the empty string in mNewSS field, triggers the set local number flow for the main card because mNewSS field is different from null of mSS field, and writes the empty string in mSS field. Alternatively, if the modem detects a change in the network name of the host card, the phone manager writes an empty string in mNewSS field, triggers the set local number flow for the host card because the mNewSS field is different from the null of the mSS field, and writes a null string in mSS field; after that, after the modem detects the network name change of the sub-card, the phone manager writes the empty string in mNewSS field, triggers the set local number flow for the sub-card because mNewSS field is different from null of mSS field, and writes the empty string in mSS field.
After the sub-card of the terminal device successfully resides in the network, the sub-card enters the network-resident stage, the modem informs the telephone manager of the operator code of the sub-card registration network, the telephone manager writes the operator code of the sub-card registration network in mNewSS fields, mNewSS fields are different from the empty character strings of mSS fields, and therefore the telephone manager triggers the process of setting the local number for the sub-card and writes the operator code of the sub-card registration network in mSS fields.
In addition, after the main card of the terminal device successfully hosts the network, the main card enters the network-resident stage, the modem informs the telephone manager of the operator code of the main card registration network, the telephone manager writes the operator code of the main card registration network in mNewSS fields, mNewSS fields are different from the blank string of mSS fields, so the telephone manager triggers the process of setting the local number for the main card, and writes the operator code of the main card registration network in mSS fields. It should be noted that, the implementation of the present application is not limited in particular to the sequence of the main card entering the network-resident stage and the sub card entering the network-resident stage.
Whether the main card or the auxiliary card, the telephone manager can issue an instruction for setting the local number to the modem in two scenes:
One scenario is that in the case where the flight mode is turned off and the network is not yet resident, the name of the SIM card registration network is updated to an empty string, and the phone manager issues a command to set the local number to the modem, triggering a process of setting the local number, because the mss.getoperatornumeric () field is different from the mnewss.getoperatornumeric () field. In addition, the telephony manager updates the mss.getoperatornumeric () field according to the mnewss.getoperatornumeric () field.
Another scenario is that, in the case where the flight mode is turned off and the network has been resident, the name of the SIM card registration network is updated to the operator code of the registration network, and the phone manager issues a set local number instruction to the modem, triggering a set local number flow, because the mss.getoperatornumeric () field and the mnewss.getoperatornumeric () field are different. In addition, the telephony manager updates the mss.getoperatornumeric () field according to the mnewss.getoperatornumeric () field.
Illustratively, fig. 6 is a flow chart of issuing a native number instruction to the modem to set the secondary card.
S11, responding to the received operation of opening the flight mode, setting the current network name of the secondary card as null by the telephone manager, and storing the current network name in a mNewSS field.
Where null is an object type, representing an empty object, that can be assigned to any object.
The terminal device illustratively initiates the flight mode upon receipt of a user action to initiate the flight mode. The modem will inform the telephony manager that a service state change has occurred, i.e. the service state of the primary and secondary cards is updated from a network-with-service to a network-less service.
Taking the example that the modem reports the service state of the sub card to the telephone manager. The mSS field is used to hold the operator code of the last registered network of the sub-card. After the telephone manager receives the notification of the service state change of the sub card reported by the modem, the telephone manager sequentially executes the following steps: let mNewSS 1=null, i.e., mNewSS1 field is used to hold the operator code null of the registered network of the latest by-card; then, whether or not the mNewSS field and mSS field are different is compared, and mSS 1= mNewSS1 is caused to save the null saved in mNewSS1 to mSS1 because the mNewSS field (null) and mSS1 field (sub-card registered network operator code) are different.
It should be understood that during the on state of the flight mode, the modem included in the wireless communication module is powered down, and neither the primary card nor the secondary card can transmit and receive data through the modem.
S12, responding to the received operation of closing the flight mode, the modem searches the network by using the information stored in the auxiliary card.
After receiving the operation of closing the flight mode, the terminal device closes the flight mode first, and then searches the network by using the information stored in the main card and the sub card respectively by the modem.
Taking the information search using the sub card as an example. The sub-card stores information such as public land mobile network (public land mobile network, PLMN). When the information of the auxiliary card is used for searching the network, the following stages are successively carried out: frequency scanning, searching for cells, acquiring system information blocks (system information block, SIBs), and cell selection. The terminal device then requests registration, establishes a radio resource control (radio resource control, RRC) connection, and thereby successfully camps on the network. I.e. first go through a phase without network services and then go through a phase with network services. The stage without network service is also called as a sub-card non-network-resident stage, and the stage with network service is also called as a sub-card network-resident stage.
The following S13-S16 describe the flow of the telephone manager issuing the set local number function instruction for the sub-card to the modem in the non-network-resident stage. The following S17-S20 describe the flow of the telephone manager issuing again to the modem the set local number function instruction for the sub-card during the network residence phase.
S13, in the period that the auxiliary card does not reside in the network, the modem reports the changed network name to the telephone manager, for example, the changed network name is an empty character string.
Wherein the empty string is a string of length 0.
Unlike null, the empty string cannot represent an object.
When the terminal device just turns off the flight mode, the sub-card is in the non-network-resident stage, the modem actively informs the telephone manager that the network is changed, and then the telephone manager sends a query command to the modem to query certain information, such as the current network name, network searching mode, circuit Switched (CS) domain network resident condition, packet switched (PACKET SWITCH, PS) domain network resident condition, and the like. In response to the query instruction, the modem reports the queried information to the telephony manager via an OPERATOR instruction (also referred to as an operation instruction). The OPERATOR instruction does not carry a network name since the secondary card is in a not yet resident stage.
In some embodiments, the absence of the network name carried by the OPERATOR instruction means that the OPERATOR instruction is an empty string. Illustratively, < OPERATOR {, }.
S14, the phone manager sets the current network name of the secondary card as an empty string, and stores the empty string in a mNewSS field.
After the phone manager receives the changed network name reported by the modem, mNewSS is made to be an empty string, that is, mNewSS1 is used to save the name of the operator of the network registered by the secondary card.
S15. since mSS is null and mNewSS is an empty string, the telephony manager determines that mSS and mNewSS1 are different.
S16, the phone manager sends a country code (country code) updating instruction for the auxiliary card to the Wi-Fi module, and sends a function instruction for setting the local number for the auxiliary card to the modem.
The country code updating instruction is used for indicating the Wi-Fi module to update the country code. The local number setting function instruction is used for instructing the modem to inform the network side equipment of the local number function setting of the auxiliary card.
After S15, the phone manager may not only execute S16, but also make mSS 1= mNewSS1 to store the empty string stored in mNewSS1 to mSS1.
S17, in the network residence stage of the auxiliary card, the modem reports the changed network name to the telephone manager again, for example, the changed network name is the operator code of the auxiliary card registration network.
Wherein the operator code is a character string with a length other than 0. For example, 46000 is the carrier code of the GSM system of chinese mobile, 46001 is the carrier code of the GSM system of chinese mobile, 46002 is the carrier code of the TD-S system of chinese mobile, 46003 is the carrier code of the CDMA system of chinese telecommunication.
After the sub-card of the terminal equipment successfully resides in the network, the modem enters a stage that the sub-card resides in the network, the modem actively informs the telephone manager of the network change again, and then the telephone manager sends a query instruction to the modem to query certain information, such as the current network name, network searching mode, CS domain network residence condition, PS domain network residence condition and the like. The modem responds to the inquiry command and reports the inquired information to the telephone manager through an OPERATOR command. Since the secondary card is already in the network-resident stage, the OPERATOR instruction carries the OPERATOR code of the secondary card.
Illustratively, < OPERATOR { China Communication, 46001}.
As an example, the operator code in the embodiment of the present application may be an operator code of the network in which the SIM card is currently registered, such as PLMN identification.
S18, the telephone manager sets the current network name of the secondary card as the operator code of the secondary card, and stores the current network name in a mNewSS field.
After the phone manager receives the changed network name reported by the modem, the phone manager makes mNewSS be the operator code of the secondary card registration network, that is, mNewSS1 is used to save the operator name of the secondary card registration network.
S19. since mSS is an empty string, mNewSS is an operator code of the sub card registration network, the telephone manager determines mSS and mNewSS are different.
S20, the phone manager sends a country code updating instruction to the Wi-Fi module again, and issues a function instruction for setting the local number to the modem again.
The country code updating instruction is used for indicating the Wi-Fi module to update the country code of the auxiliary card again. The local number setting function instruction is used for indicating the modem to inform the network side equipment of the local number function setting of the auxiliary card again.
Illustratively, the phone manager may transmit the country code of the current registered network of the sub-card in a broadcast form, so that the Wi-Fi module updates the country code of the registered network of the sub-card to the country code of the current registered network after receiving the country code.
After S19, the phone manager may not only execute S20, but also make mSS 1= mNewSS1 to store the carrier code of the sub-card registration network stored in mNewSS1 to mSS.
It should be appreciated that the phone manager allows the modem to set the local number of the secondary card by issuing a set local number instruction to the modem. For example, the modem may reply to the phone manager that the instruction for setting the local number of the sub-card has been received, wait for the radio frequency resource to be idle, and then send the local number setting information stored in the preset storage area to the network side device depending on the data service channel, so as to notify the network side device of the local number function of the sub-card, thereby enabling the local number of the sub-card to be displayed or hidden at the called party.
Illustratively, fig. 7 is a flow chart of issuing a native number instruction to set a host card to a modem.
S21, responding to the received operation of opening the flight mode, setting the current network name of the main card as null by the telephone manager, and storing the current network name in a mNewSS field.
Where null is an object type, representing an empty object, that can be assigned to any object.
S22, responding to the received operation of closing the flight mode, the modem searches the network by using the information stored in the main card.
The following S23-S26 describe the flow of the telephone manager issuing a set local number instruction to the host card to the modem during the non-network-resident phase. The following S27-S30 describe the flow of the telephone manager issuing again to the modem the set local number instruction for the main card during the network residence phase.
S23, in the stage that the main card does not reside in the network, the modem reports the changed network name to the telephone manager, for example, the changed network name is an empty character string.
Wherein the empty string is a string of length 0.
S24, the phone manager sets the current network name of the main card as an empty string, and stores the empty string in a mNEWSS2.GetOperator Numeric () field.
After the phone manager receives the changed network name reported by the modem, mNewSS is made to be an empty string, that is, mNewSS2 is used to save the operator name of the network registered by the host card.
S25. since mSS is null and mNewSS is an empty string, the telephony manager determines that mSS and mNewSS2 are different.
S26, the phone manager sends a country code updating instruction aiming at the main card to the Wi-Fi module, and sends a function instruction for setting the local number aiming at the main card to the modem.
The country code updating instruction is used for indicating the Wi-Fi module to update the country code of the main card. The local number setting function instruction is used for instructing the modem to inform the network side equipment of the local number function setting of the main card.
After S25, the phone manager may not only execute S26, but also make mSS 2= mNewSS2 to store the empty string stored in mNewSS2 to mSS.
S27, in the network residence stage of the main card, the modem reports the changed network name to the telephone manager again, for example, the changed network name is the operator code of the main card registered network.
S28, the telephone manager sets the current network name of the main card as the operator code of the main card, and stores the current network name in a mNewSS field.
After the phone manager receives the changed network name reported by the modem, the phone manager makes mNewSS register the operator code of the network for the main card, that is, mNewSS2 is used to save the operator name of the network registered by the main card this time.
S29. since mSS is an empty string, mNewSS2 is an operator code of the main card registration network, the telephone manager determines mSS and mNewSS are different.
S30, the phone manager sends a country code updating instruction to the Wi-Fi module again, and issues a function instruction for setting the local number to the modem again.
The country code updating instruction is used for indicating the Wi-Fi module to update the country code of the main card again. The local number setting function instruction is used for indicating the modem to inform the network side equipment of the local number function setting of the main card again.
After S29, the phone manager may not only execute S30, but also make mSS 2= mNewSS2 to store the carrier code of the main card registration network stored in mNewSS2 to mSS.
For the specific implementation of S21-S30, reference may be made to the descriptions of S11-S20 above, and details are not repeated here.
It should be understood that the phone manager issues a local number instruction for setting the main card to the modem, so that the modem can set the local number of the main card, thereby notifying the network side device of the local number function of the main card. For example, the modem may reply to the phone manager that the instruction for setting the local number of the main card has been received, and after the network residence is successful, send the local number setting information stored in the preset storage area to the network side device, so as to notify the network side device of the local number function of the main card, thereby enabling the local number of the main card to be displayed or hidden at the called party.
So far, the description of two scenes for triggering the function flow for setting the local number and the specific triggering flow is completed.
Generally, the dual card terminals are classified into single pass terminals and dual pass terminals. The terminal equipment can be provided with two SIM cards no matter the single-pass terminal or the double-pass terminal, and the two SIM cards support voice service and supplementary service. The single-pass terminal and the double-pass terminal are different in that: two SIM cards of the two-way terminal can communicate at the same time and both support data service; the single-pass terminal only supports single-card communication, and the single-pass terminal can configure the data service on the main card by default, namely, only the main card provides the data service, and the auxiliary card does not provide the data service. Wherein the voice service is a telephone communication service using CS domain, for example, the voice service may be a long term evolution voice bearer (voice over long term evolution, VOLTE); the data service is related to data traffic such as browsing web pages or watching videos; supplementary services are other services than voice services and data services, such as services that set a local number function.
The terminal equipment provided by the embodiment of the application can be a single-pass terminal or a double-pass terminal.
When the terminal equipment is a two-way terminal, the two SIM cards have respective radio frequency resources, and the problem of mutually occupying the radio frequency resources does not exist. The two SIM cards can smoothly execute the flow of setting the local number function no matter in the scene of closing the flight mode and not residing in the network or in the scene of closing the flight mode and residing in the network.
When the terminal equipment is a single-pass terminal, the two SIM cards share one set of radio frequency resource. The two SIM cards may need to use the radio frequency resource at a certain moment, so that they will mutually occupy the radio frequency resource, so that only one SIM card can use the radio frequency resource at the same moment, and the other SIM card cannot use the radio frequency resource. For example, after the terminal device closes the flight mode, if the auxiliary card issues a command for setting the local number before the main card activates the data service, the auxiliary card will trigger the network residence service first because the function for setting the local number of the auxiliary card depends on the data service, and the priority of the network residence service is higher than the priority of the data service, and the priority of the data service is higher than the priority of the supplementary service, so that the radio frequency resource is preempted by the auxiliary card, and the main card has no radio frequency resource which can be used, thereby blocking the activation of the data service of the main card, leading the main card to activate the data service overtime and unable to surf the internet.
The specific flow of the main card activating the data service overtime caused by the preempting of the radio frequency resource by the auxiliary card will be described below.
Illustratively, fig. 8 shows a schematic diagram of a secondary card preempting radio frequency resources resulting in a timeout of the primary card's active data traffic.
S31, responding to the operation of closing the flight mode, the modem searches the network by using the information stored in the main card and the auxiliary card.
S32, if the modem detects the network name change of the auxiliary card in the network searching process (the auxiliary card is out of service at the moment), the telephone manager issues a function instruction for setting the local number of the auxiliary card to the modem.
In addition, the phone manager may send country code update instructions for the secondary card to the Wi-Fi module (not shown in fig. 8).
For the specific implementation of S32, reference may be made to the descriptions of S13-S16 above, and details are not repeated here.
S33, since the local number setting of the auxiliary card depends on the data service of the auxiliary card, the modem waits for an instruction of activating the data service of the auxiliary card, namely, waits for activating the data service of the auxiliary card.
And after receiving the function instruction for setting the local number of the auxiliary card, the modem executes the local number setting of the auxiliary card. In the process of setting the local number of the auxiliary card by the modem, the data service channel of the auxiliary card is needed, and the data service channel of the auxiliary card is not established at the moment. The data service channel of the auxiliary card is triggered and established by the data service activating instruction of the auxiliary card, so that the modem needs to wait for the data service activating instruction of the auxiliary card until the data service channel of the auxiliary card is established according to the data service activating instruction of the auxiliary card, and the local number of the auxiliary card can be continuously set.
S34, in the process that the modem waits for the data service activation instruction of the auxiliary card, if the modem detects the network name change of the main card (the main card is out of service at the moment), the telephone manager issues a function instruction of setting the local number to the main card to the modem.
In addition, the phone manager may send country code update instructions for the host card to the Wi-Fi module (not shown in fig. 8).
For the specific implementation of S34, reference may be made to the descriptions of S23-S26 above, and details are not repeated here.
After receiving the function instruction of setting the local number for the main card, the modem executes the local number setting of the main card.
S35, after the main card successfully resides in the network (the main card has service at the moment), the telephone manager issues a function instruction for setting the local number to the main card to the modem again.
After receiving the function instruction of setting the local number for the main card, the modem executes the local number setting of the main card again.
In addition, the phone manager may send country code update instructions for the host card to the Wi-Fi module (not shown in fig. 8).
For the specific implementation of S35, reference may be made to the descriptions of S27-S30 above, which are not repeated here.
S36, after issuing the function instruction of setting the local number for the main card to the modem, the telephone manager issues the data service activating instruction of the main card to the modem. That is, the network residence of the main card successfully triggers the data activation service of the main card.
The data service activating instruction is used for instructing the modem to activate the data service of the main card.
S37, the modem waits for the local number service of the auxiliary card to be completed so as to activate the data service of the main card.
S38, the modem determines that the local number service of the auxiliary card and the data service of the main card are overtime.
Fig. 9 is a schematic diagram illustrating the relationship between the local number service of the sub card and the data service of the main card. The specific timeout reasons for the local number service of the sub card and the data service of the main card are described below with reference to fig. 9.
Because the terminal equipment is a single-pass terminal, the main card and the auxiliary card share a set of radio frequency resources, if the main card and the auxiliary card occupy the radio frequency resources at the moment, the radio frequency resources are allocated to the high-priority service according to the priority of the service, and the low-priority service needs to wait for the high-priority service to release the radio frequency resources. In the embodiment of the application, the instruction of setting the local number issued by the auxiliary card when the auxiliary card is out of service is earlier than the data service activation instruction issued by the main card when the auxiliary card is in service, and because the function of setting the local number of the auxiliary card depends on the data service, the network resident service is triggered first, the priority of the network resident service is higher than the priority of the data service, and the priority of the data service is higher than the priority of the supplementary service, so that the radio frequency resource is preempted by the auxiliary card, and the data service activation of the main card needs to wait for completing the local number service of the auxiliary card so as to acquire the radio frequency resource released by the auxiliary card.
Because the single-pass terminal will configure the data service on the main card by default, the telephone manager only issues the data service activating instruction of the main card to the modem, but does not issue the data service activating instruction of the sub-card, so that the time of the modem waiting for the data service activating instruction of the sub-card in S33 will be overtime, thereby enabling the local number setting of the sub-card to be overtime, and failing to release the radio frequency resource occupied by the sub-card. When the data service of the main card cannot acquire the radio frequency resource in time, the data service of the main card is blocked, so that the activation time-out is caused, and the problem that a user cannot surf the internet occurs.
Note that fig. 8 does not show the step of the telephone manager issuing the set local number function instruction for the sub-card again to the modem when the sub-card is in service. The priority of the network resident service is higher than the priority of the data service, the priority of the data service is higher than the priority of the supplementary service, so that when the auxiliary card has the service to issue the function instruction of setting the local number for the auxiliary card again, no matter whether the main card has the service or not, the priority of the network resident service of the main card is higher than the supplementary service of the auxiliary card, therefore, the auxiliary card cannot preempt the radio frequency resource of the main card, the current radio frequency resource can be preferentially used for the network resident service of the main card, and the main card can smoothly camp on the network and activate the data service.
In order to solve the problem that the user cannot log on the network all the time due to the overtime of the activation of the data service of the main card, as shown in fig. 8, the embodiment of the present application may further include the following S39 and S40.
S39, if the local number service of the auxiliary card exceeds the first preset duration, the modem builds a data service channel. The data service channel is specially used for the local number service of the auxiliary card.
The modem uses the data service channel to complete the local number service of the sub-card.
S40, if the local number service of the auxiliary card exceeds the second preset time, the telephone manager issues an activating data service instruction of the main card to the modem again.
In some embodiments, the second preset time period is longer than the first preset time period.
For example, the first preset duration is 50 seconds, and the second preset duration is 1 minute.
It should be noted that, in actual implementation, the time when the modem uses the data service channel to complete the local number service of the secondary card may be before the data service activating instruction is sent to the modem again, or may be after the data service activating instruction is sent to the modem again.
In some embodiments, after the modem receives the active data service instruction of the main card issued by the phone manager, the modem may set up a data service channel in response to the active data service instruction, where the data service channel may be used to transmit service data between the terminal device and the network side device, for example, send uplink service data to the network side device through the data service channel, or receive downlink service data from the network side device through the data service channel. It should be noted that, after the modem activates the service data of the main card in response to the activation data service instruction, the modem may also send a response message to the phone manager, where the response message is used to indicate that the service data of the main card has been successfully activated.
It should be understood that after the first preset duration is exceeded, the local number service of the secondary card can be completed through the built data service channel, so that the radio frequency resource occupied by the local number service of the secondary card will be released. After the second preset time length is exceeded, the data service of the main card can be obtained by sending the data service activating instruction of the main card to the modem again, so that the data service activation is realized, and then the setting of the local number of the main card is completed based on the service data channel of the main card. Therefore, the user can surf the internet after waiting for at least a second preset time after closing the flight mode, and experience is poor.
According to the description of the embodiment, the function instruction of setting the local number for the auxiliary card is issued when the auxiliary card is out of service, and then the data service activation instruction for the main card is issued when the main card is in service, so that the radio frequency resource is preempted by the auxiliary card, and the data service activation of the main card is overtime. In order to solve the problem of overtime of data service activation of the main card, the embodiment of the application provides another method for setting the function of the local number.
Illustratively, fig. 10 is a flow chart of an optimized method of setting a local number function.
S1, the telephone manager determines that the network name changes.
According to the above embodiment, the network name may change in the following scenario:
the first scenario is: after the flight mode is turned on, the phone manager determines that the network name of the secondary card changes to null.
The second scenario is: after the flight mode is turned on, the phone manager determines that the network name of the host card changes to null.
The third scenario is: in the period that the auxiliary card does not reside in the network after the flight mode is closed, the modem reports the changed network name to the telephone manager, and the telephone manager determines that the network name of the auxiliary card is changed into an empty character string.
The fourth scenario is: in the network residence stage of the auxiliary card after the flight mode is closed, the modem reports the changed network name to the telephone manager, and the telephone manager determines that the network name of the auxiliary card is changed into the operator code of the auxiliary card.
The fifth scenario is: in the period that the main card does not reside in the network after the flight mode is closed, the modem reports the changed network name to the telephone manager, and the telephone manager determines that the network name of the main card is changed into an empty character string.
The sixth scenario is: in the network residence stage of the main card after the flight mode is closed, the modem reports the changed network name to the telephone manager, and the telephone manager determines that the network name of the main card is changed into the operator code of the main card.
Wherein the fourth scenario occurs after the third scenario and the sixth scenario occurs after the fifth scenario. The third scenario may occur before or after the fifth scenario. Whether the third scenario occurs before the fifth scenario or after the fifth scenario, the following possibilities exist: the method comprises the steps of firstly issuing a function instruction for setting a local number for a secondary card when the secondary card is out of service, and then issuing a data service activation instruction for a primary card when the primary card is in service. Because the function of setting the local number of the auxiliary card depends on the data service, the network-resident service is triggered first, and the priority of the network-resident service is higher than that of the data service, and the priority of the data service is higher than that of the supplementary service, so that the radio frequency resource is preempted by the auxiliary card, and the activation of the data service of the main card is blocked and overtime.
S2, the telephone manager stores the newly obtained network name in a mNEWSS.
The mNEWSS.getOperator Numeric () field is used to save the name of the operator of the registered network of the SIM card.
Illustratively, the mNEWSS. GetOperationNumeric () field is divided into two types:
And a mNawSS1. GetOperator Numeric () field for storing the name of the operator of the network to which the sub card is registered.
And a mNawSS2. GetOperator Numeric () field for storing the name of the operator of the network to which the master card is registered.
In addition, the name of the operator that the SIM card last registered with the network may be held in the mss.getoperatornumeric () field.
Illustratively, the mss.getoperatornumeric () field is divided into two types:
An mss1.Getoperatornumeric () field for holding the name of the operator of the network to which the sub card was last registered.
An mss2.Getoperatornumeric () field for holding the name of the operator of the network to which the host card was last registered.
As shown in fig. 5, when the first scenario described above occurs, the mnewss1.Getoperatornumeric () field is updated to null.
When the above second scenario occurs, the mnewss2.Getoperatornumeric () field is updated to null.
When the above third scenario occurs, the mnewss1.Getoperatornumeric () field is updated to an empty string.
When the fourth scenario described above occurs, the mnewss1.Getoperatornumeric () field is updated to the operator code of the sub-card registration network.
When the fifth scenario described above occurs, the mnewss2.Getoperatornumeric () field is updated to an empty string.
When the above sixth scenario occurs, the mnewss2.Getoperatornumeric () field updates the operator code of the registered network for the host card.
S3, the telephone manager judges whether a mNEWSS.getOperationNumeric () field meets a first condition that the mNEWSS.getOperationNumeric () field is not null and the length of the character string is greater than 0.
When the first condition is satisfied, S4 described below is performed.
When the first condition is not satisfied, it is determined that S4 described below, that is, S6 described below, is not performed.
S4, the telephone manager judges whether the mNEWSS.getOperationNumeric () field meets a second condition that the mNEWSS.getOperationNumeric () field and the mSS.getOperationNumeric () field are different.
When the second condition is satisfied, S5 described below is performed.
When the second condition is not satisfied, S6 described below is performed.
S5, the telephone manager issues a function instruction for setting the local number to the modem.
For the fourth scenario and the sixth scenario described above, since the mnewss.getoperatornumeric () field is an operator code of the SIM card registration network, it can be determined that the first condition is satisfied. In addition, since the mnewss. Getoperatornumeric () field is an operator code of the SIM card registration network, the mss. Getoperatornumeric () field is an empty string (the length of the string is equal to 0), it is determined that the second condition is satisfied, and at this time, the telephone manager issues a set-native number function instruction to the modem.
S6, the telephone manager determines not to issue a function instruction for setting the local number to the modem.
For the first scene and the second scene described above, since the mnewss. Getoperatornumeric () field is null, the first condition is not satisfied. For the third scenario and the fifth scenario described above, since the mnewss. Getoperatornumeric () field is an empty string (the length of the string is equal to 0), the first condition is also not satisfied, at which time the telephone manager does not need to issue a set local number function instruction to the modem.
Other scenarios are possible with embodiments of the present application, such as the mnewss. Getoperatornumeric () field satisfying the first condition but not the second condition. When the mNEWSS.getOperator Numeric () field satisfies the first condition but does not satisfy the second condition, the phone manager does not need to issue a function instruction for setting the local number to the modem because the carrier codes of two times before and after one SIM card are identical.
It should be understood that, before comparing whether the mnewss. Getoperatornumeric () field and the mss. Getoperatornumeric () field are different, by adding a step of determining whether the operator name of the SIM card currently registered network is not null and the length of the character string is greater than 0, it is possible to avoid issuing a set local number function instruction for the sub card to the modem in the sub card non-network resident stage after the flight mode is turned off, and issuing a set local number function for the sub card only when the operator name of the sub card registered network is determined to be changed. So that the data traffic activation of the main card is not blocked.
In order to more clearly understand the above scheme, the specific flow of the optimized method for setting the local number function is described from the interaction angle of the phone manager and the modem by taking the example that the network name of the secondary card changes first and then the network name of the primary card changes.
Illustratively, fig. 11 is a block diagram of an optimized method of setting a local number function.
S41, responding to the operation of closing the flight mode, the modem searches the network by using the information stored in the main card and the auxiliary card.
S42, if the modem detects the network name change of the auxiliary card in the network searching process (the auxiliary card is out of service at the moment), the modem reports the network name change of the auxiliary card to the telephone manager.
After the phone manager receives the changed network name (empty string) reported by the modem, the empty string is saved at mNewSS.
For the specific implementation of S42, reference may be made to the descriptions of S13-S14 above, and details are not repeated here.
S43, the phone manager judges mNewSS whether the first condition is met, wherein the first condition is that mNewSS1 is not null and the length of the character string is larger than 0.
Since mNewSS is an empty string, the first condition is not satisfied, the phone manager can use the following way to not issue the set local number function instruction for the sub-card to the modem.
After determining mNewSS that the first condition is not satisfied, the telephony manager directly determines not to perform the step of "determining mNewSS if the determination is different from mSS" and continues to wait for the next round of determination process to be performed. It should be understood that mNewSS and mSS are different preconditions for "issue a set local number function instruction for a sub-card to the modem", and when the telephone manager determines not to perform the step of "determine mNewSS and mSS are different", the telephone manager does not necessarily issue a set local number function instruction for a sub-card to the modem.
It should be appreciated that by directly cancelling the step of "determining mNewSS and mSS whether they are different", it is possible to implement that the local number setting function instruction is neither issued to the modem nor the country code update instruction for the sub card is sent to the Wi-Fi module in the sub card non-network resident stage. By not issuing the function instruction for setting the local number to the modem, the radio frequency resource of the main card is prevented from being preempted.
It should be noted that, after determining mNewSS that the first condition is not satisfied, the phone manager may determine not to perform the step of "whether or not the judgment mNewSS1 and mSS1 are different", but in order to perform the step of "whether or not the judgment mNewSS1 and mSS1 are different" in the next round of judgment, mSS1 in this step may be used normally, and mSS 1= mNewSS1 may be also caused to store the empty string stored in mNewSS1 to mSS1.
S44, if the modem detects the network name change of the main card in the network searching process (the main card is out of service at the moment), the modem reports the network name change of the main card to the telephone manager.
After the phone manager receives the network name (empty string) after the change of the main card reported by the modem, the empty string is saved in mNewSS.
For the specific implementation of S44, reference may be made to the descriptions of S23-S24 above, and details are not repeated here.
S45, the telephone manager judges mNewSS whether a first condition is met, wherein the first condition is that mNewSS2 is not null and the length of the character string is larger than 0.
Since mNewSS is an empty string, the first condition is not satisfied, the phone manager can use the following way to not issue the set local number function instruction for the host card to the modem.
After determining mNewSS that the first condition is not met, the telephony manager directly determines not to perform the step of "determining mNewSS if the two are different" and mSS, and continues to wait for the next round of determination. It should be understood that mNewSS and mSS are different preconditions for "issue a set local number function instruction for a host card to a modem", and when the telephone manager determines not to perform the step of "determine mNewSS and mSS are different", the telephone manager does not necessarily issue a set local number function instruction for a host card to a modem.
It should be appreciated that by directly cancelling the step of "determining mNewSS and mSS whether or not different", it is possible to implement that the local number setting function instruction is not issued to the modem in the period that the main card is not resident on the network, nor the country code update instruction for the sub card is transmitted to the Wi-Fi module.
It should be noted that, after determining mNewSS that the first condition is not satisfied, the phone manager may determine not to perform the step of "whether or not the judgment mNewSS2 and mSS2 are different", but in order to perform the step of "whether or not the judgment mNewSS2 and mSS2 are different" in the next round of judgment, mSS2 in this step may be used normally, and mSS 2= mNewSS2 may be also made to store the empty string stored in mNewSS2 to mSS2.
In addition, the above-described embodiment is exemplified by executing S45 after S44. In connection with the above description of the embodiment, even if the local number setting function instruction is issued to the modem in the non-network-resident stage of the main card, the main card activation data service timeout is not caused, so that S45 may not be executed after S44, but the above-described S25 to S26 may be continued.
S46, after the main card successfully resides in the network (the main card has service at the moment), the modem reports the network name change of the main card to the telephone manager again.
After the phone manager receives the changed network name reported by the modem, the carrier identifier of the main card registration network, such as 46000, 46001, 46002, etc., is saved in mNewSS.
For the specific implementation of S46, reference may be made to the descriptions of S27-S28 above, and details are not repeated here.
S47, the telephone manager judges mNewSS whether a first condition is met, wherein the first condition is that mNewSS2 is not null and the length of the character string is larger than 0.
Since mNewSS is the carrier identification of the host card registration network, the first condition is satisfied, so the phone manager continues to execute S48 described below.
S48. the telephone manager determines mNewSS and mSS if they are different, i.e., if the second condition is satisfied.
Since mNewSS2 registers the operator code of the network for the main card and mSS is an empty string, it is determined that the second condition is satisfied, at which point the telephone manager continues to execute S49 described below.
S49, the telephone manager issues a function instruction of setting the local number to the main card to the modem. In addition, the phone manager sends a country code update instruction for the main card to the Wi-Fi module.
It should be noted that, after determining mNewSS to satisfy the second condition, the phone manager may issue, to the modem, not only a set local number function instruction for the main card, but also make mSS 2= mNewSS2 to store the empty string saved in mNewSS2 to mSS2. Thus, when the step of "judging mNewSS2 and mSS are different" needs to be performed in the next round of judgment, mSS2 in the step can be normally used.
S50, the telephone manager issues an active data service instruction of the main card to the modem.
The country code updating instruction is used for indicating the Wi-Fi module to update the country code of the main card registration network. The local number setting function instruction is used for instructing the modem to inform the network side equipment of the local number function setting of the main card.
It should be understood that, before comparing whether mNewSS and mSS1 of the sub-cards are different, by adding a step of determining whether the operator name of the current local number function setting flow of the SIM card is not null and the length of the character string is greater than 0, the issue of a local number setting function instruction for the sub-card to the modem in the sub-card non-network-resident stage after the flight mode is turned off can be avoided. On the one hand, the triggering of the function flow for setting the local number when the closing mode does not reside in the network yet is avoided, so that the radio frequency resource cannot be preempted, and the data service activation of the main card cannot be blocked. On the other hand, the function instruction for setting the local number is still issued when the name of the operator is indeed changed, so that the setting of the local number can still be possibly completed.
Note that fig. 11 also does not show the step of the telephone manager issuing the set local number function instruction for the sub-card again to the modem when the sub-card is in service. As described in the above embodiment, because the priority of the resident service is higher than the priority of the data service, and the priority of the data service is higher than the priority of the supplementary service, when the secondary card has the service to issue the instruction for setting the local number function for the secondary card again, the resident service of the primary card has higher priority than the supplementary service of the secondary card no matter whether the primary card has the service, so the secondary card will not preempt the radio frequency resource of the primary card, and the current radio frequency resource will be preferentially used for the resident service of the primary card, so the primary card can smoothly resident the network and activate the data service.
Illustratively, fig. 12 shows a schematic view of a scenario in which the native number function is set using a method before optimization.
As shown in fig. 12 (a), when the user ends taking an airplane or leaving a place such as a gas station, the user can trigger the terminal device to display the control panel and click on the flight mode option 07 of the control panel. The terminal device may turn off the flight mode in response to a click operation on the flight mode option 07 and then search for a network using information stored in the main card and the sub card.
As shown in fig. 12 (b), the flight pattern identification in the status bar is updated to the search signal identification 08 during the network search, and the search signal identification 08 is used to indicate that the main card and the sub card are searching the network.
It is assumed that the sub card detects the network name change and issues a function instruction for setting the local number during the network searching, and then the main card monitors the network name change and issues an instruction for activating the data service. Because the priority of the set local number function instruction is higher than that of the activate data service instruction, the radio frequency resource is preempted by the auxiliary card, so that the data service activation of the main card is overtime. During the data service activation timeout period of the main card, if an operation of opening the browser as shown in (c) of fig. 12 is received, the main card cannot provide the data service since the data service of the main card is not yet activated, so that a prompt interface for failing to access the internet as shown in (d) of fig. 12 may be displayed.
After the terminal equipment determines that the local number service of the auxiliary card exceeds the first preset duration, the local number service of the auxiliary card can be completed through the built data service channel, and then the radio frequency resources occupied by the local number service of the auxiliary card are released. After the second preset time length is exceeded, the data service of the main card can be timely obtained by sending the data service activating instruction of the main card to the modem again, so that the data service activation is realized. After the data service is activated, the terminal device may provide a network access service, and display a network access interface as shown in (e) in fig. 12, where the flight mode option 07 of the status bar is updated to the signal strength identifier 03.
In the above process, the secondary card is preempted by the radio frequency resource of the primary card, so that the primary card still cannot provide data service after reaching the preset duration, and thus the user may feel slow web page opening and poor internet surfing experience.
Illustratively, fig. 13 shows a schematic view of a scenario in which the local number function is set by using the optimized method.
As shown in fig. 13 (a), when the user ends taking an airplane or leaving a place such as a gas station, the user can trigger the terminal device to display the control panel and click on the flight mode option 07 of the control panel. The terminal device may turn off the flight mode in response to a click operation on the flight mode option 07 and then search for a network using information stored in the main card and the sub card.
As shown in (b) of fig. 13, during the network search, the flight pattern identification in the status bar is updated to a search signal identification 08, and the search signal identification 08 is used to indicate that the main card and the sub card are searching the network.
If the secondary card detects the change of the network name in the network searching period, the length of the network name is 0, and the condition that the function instruction for setting the local number is issued is not met, so that the function instruction for setting the local number is not issued, and the radio frequency resource is not preempted. Therefore, when the master card monitors the change of the network name and issues the instruction for activating the data service, the master card can directly acquire the radio frequency resource and rapidly activate the data service. As shown in (c) of fig. 13, the search signal identification 08 in the status bar is updated to the signal strength identification 03. If the user clicks the browser icon at this time as shown in (d) of fig. 13, the terminal device rapidly displays the web page as shown in (e) of fig. 13.
In the process, the function flow of setting the local number is prevented from being triggered when the network is not resident in the closing mode, so that radio frequency resources are not preempted, the data service activation of the main card is not blocked, a user can feel that the webpage is opened rapidly, and the internet surfing experience is good.
The embodiment of the application also provides a terminal device, which comprises a processor, wherein the processor is coupled with the memory, and the processor is used for executing the computer program or the instructions stored in the memory, so that the terminal device realizes the method in each embodiment.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer instructions; the computer readable storage medium, when run on a device for setting a local number function, causes the device for setting a local number function to perform the method as shown above. The computer instructions may 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 may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device including one or more servers, data centers, etc. that can be integrated with the medium. The usable medium may be a magnetic medium (e.g., a floppy disk, hard disk, or magnetic tape), an optical medium, or a semiconductor medium (e.g., solid State Drive (SSD)), or the like.
Embodiments of the present application also provide a computer program product comprising computer program code for causing a computer to perform the method of the embodiments described above when the computer program code is run on a computer.
The embodiment of the application also provides a chip, which is coupled with the memory and is used for reading and executing the computer program or the instructions stored in the memory to execute the method in each embodiment. The chip may be a general-purpose processor or a special-purpose processor. It should be noted that the chip may be implemented using the following circuits or devices: one or more field programmable gate arrays (field programmable GATE ARRAY, FPGA), programmable logic devices (programmable logic device, PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuit or circuits capable of performing the various functions described throughout this application.
The terminal device, the computer readable storage medium, the computer program product and the chip provided by the embodiments of the present application are used for executing the method provided above, so that the beneficial effects achieved by the method provided above can be referred to the beneficial effects corresponding to the method provided above, and are not repeated herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (15)

1. A method for setting a function of a local number, wherein the method is applied to a single-pass terminal provided with at least two subscriber identity modules SIM cards, the method comprising:
Acquiring a first network name, wherein the first network name is acquired when the network state of a first SIM card in at least two SIM cards changes;
Executing a first action if the first network name meets a first condition; or if the first network name does not satisfy the first condition, not performing a first action;
the first action is used for determining whether to trigger a function of setting a local number, wherein the function of the local number is a function of displaying or hiding the local number of the single-pass terminal on called equipment.
2. The method of claim 1, wherein the single pass terminal comprises a telephony manager at a framework layer, and a modem at a hardware layer;
the obtaining the first network name includes:
when the network state of the first SIM card changes, the modem sends the first network name to the telephone manager;
the telephony manager holds the first network name in a first field.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
When the network state of the first SIM card is switched from a resident network state to an open flight mode state, the first network name sent to the telephone manager by the modem is null;
When the network state of the first SIM card is switched from an on-flight mode state to an off-flight mode state and no network resident state is caused, the first network name sent to the telephone manager by the modem is an empty string;
When the network state of the first SIM card is switched from the off-flight mode and the non-resident network state to the off-flight mode and the resident network state, the first network name sent to the telephone manager by the modem is the name of the current registered network of the first SIM card.
4. A method according to any one of claims 1 to 3, wherein the performing a first action comprises:
Judging whether the first network name is different from a second network name, wherein the second network name is obtained when the network state of the first SIM card changes last time.
5. The method of claim 4, wherein the first network name is stored in a first field and the second network name is stored in a second field;
the determining whether the first network name is different from the second network name includes:
and judging whether the first field is different from the second field.
6. The method of claim 5, wherein after said determining whether said first field and said second field are different, said method further comprises:
triggering the function of setting the local number under the condition that the first field is different from the second field;
Or alternatively
And under the condition that the first field is the same as the second field, the function of setting the local number is not triggered.
7. The method of claim 6, wherein the single pass terminal comprises a telephony manager at a framework layer, and a modem at a hardware layer;
The triggering of the setting of the local number function comprises the following steps:
the telephone manager sends a function instruction for setting a local number to the modem;
And the modem responds to the instruction for setting the local number function and sends the local number function setting information of the single-pass terminal to network side equipment, wherein the local number function setting information is used for indicating to display or hide the local number of the single-pass terminal in the called equipment.
8. The method of claim 7, wherein the first SIM card is a master card; the instruction for setting the local number function is sent when the network state of the main card is in a closed flight mode and the main card is in a network resident state;
after the phone manager sends the modem a function instruction for setting a local number, the method further includes:
The telephone manager sends an instruction for activating data service to the modem;
the modem responds to the data service activating instruction to activate the data service of the main card.
9. The method of claim 5, wherein the single pass terminal comprises a telephony manager of a framework layer, and a wireless fidelity module of a hardware layer; the method further comprises the steps of:
In the case that the first field is different from the second field, the phone manager broadcasts a country code of a network in which the first SIM card is currently registered;
The wireless fidelity module updates the country code of the first SIM card registration network to the country code of the first SIM card current registration network.
10. The method of claim 5, wherein the method further comprises:
and writing the content of the first field into the second field when the first field is different from the second field.
11. A method according to any one of claims 1 to 3, wherein the first network name is held in a first field; the method further comprises the steps of:
And writing the content of the first field into a second field under the condition that the network name of the first SIM card does not meet the first condition.
12. The method according to any of claims 1 to 11, wherein the single pass terminal comprises a telephony manager of a framework layer, and a modem of a hardware layer;
Before the first network name is acquired, the method further includes:
responding to the operation of closing the flight mode by a user, and searching the network by using the information stored in the at least two SIM cards by the modem;
In the network searching process, if the modem detects that the network state of the first SIM card changes, network change information is sent to the telephone manager;
The telephone manager sends a query instruction to the modem;
And the modem responds to the inquiry command and sends an operation command to the telephone manager, wherein the operation command carries the first network name.
13. The method according to any one of claims 1 to 7, 9 to 12, wherein the first SIM card is a primary card or a secondary card.
14. A terminal device comprising a processor and a memory coupled to the processor; wherein the memory has instructions stored therein that, when executed by the processor, cause the terminal device to perform the method of setting a local number function as claimed in any one of claims 1to 13.
15. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when run on a terminal device, causes the terminal device to perform the method of setting a local number function as claimed in any one of claims 1 to 13.
CN202310310072.5A 2023-03-21 Method, equipment and storage medium for setting local number function Active CN117135618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310310072.5A CN117135618B (en) 2023-03-21 Method, equipment and storage medium for setting local number function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310310072.5A CN117135618B (en) 2023-03-21 Method, equipment and storage medium for setting local number function

Publications (2)

Publication Number Publication Date
CN117135618A CN117135618A (en) 2023-11-28
CN117135618B true CN117135618B (en) 2024-05-31

Family

ID=

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100079742A (en) * 2008-12-31 2010-07-08 주식회사 케이티 System and method for displaying information set by sender on receiver mobile phone
CN106028308A (en) * 2016-05-20 2016-10-12 深圳市万普拉斯科技有限公司 Hot plug multi-card data control method and system
CN107800848A (en) * 2017-10-09 2018-03-13 惠州Tcl移动通信有限公司 A kind of caller ID display control method, storage device and mobile terminal
CN110383870A (en) * 2017-09-29 2019-10-25 华为技术有限公司 A kind of processing method and terminal of radio frequency resource
CN110460989A (en) * 2018-05-07 2019-11-15 中兴通讯股份有限公司 The setting method of telephone number, apparatus and system
CN111294884A (en) * 2020-02-25 2020-06-16 青岛海信移动通信技术股份有限公司 Communication terminal supporting dual-card dual-standby single-pass and data service switching method
CN114095885A (en) * 2020-07-31 2022-02-25 华为技术有限公司 Call method, system and related device
WO2022242288A1 (en) * 2021-05-20 2022-11-24 荣耀终端有限公司 Frequency band control method for dual-card terminal in abnormal scenario, and terminal device
CN115460642A (en) * 2022-07-29 2022-12-09 荣耀终端有限公司 Network name display test method and equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100079742A (en) * 2008-12-31 2010-07-08 주식회사 케이티 System and method for displaying information set by sender on receiver mobile phone
CN106028308A (en) * 2016-05-20 2016-10-12 深圳市万普拉斯科技有限公司 Hot plug multi-card data control method and system
CN110383870A (en) * 2017-09-29 2019-10-25 华为技术有限公司 A kind of processing method and terminal of radio frequency resource
CN107800848A (en) * 2017-10-09 2018-03-13 惠州Tcl移动通信有限公司 A kind of caller ID display control method, storage device and mobile terminal
CN110460989A (en) * 2018-05-07 2019-11-15 中兴通讯股份有限公司 The setting method of telephone number, apparatus and system
CN111294884A (en) * 2020-02-25 2020-06-16 青岛海信移动通信技术股份有限公司 Communication terminal supporting dual-card dual-standby single-pass and data service switching method
CN114095885A (en) * 2020-07-31 2022-02-25 华为技术有限公司 Call method, system and related device
WO2022242288A1 (en) * 2021-05-20 2022-11-24 荣耀终端有限公司 Frequency band control method for dual-card terminal in abnormal scenario, and terminal device
CN115460642A (en) * 2022-07-29 2022-12-09 荣耀终端有限公司 Network name display test method and equipment

Similar Documents

Publication Publication Date Title
CN113613238B (en) SIM module management method and electronic equipment
US11963043B2 (en) Initial access indication method and device, and storage medium
CN105722059B (en) Mobile terminal and communication method of dual-modem system
JP2021524205A (en) Signal reception method and terminal device
WO2013170529A1 (en) Multimode terminal and service implementation method for multimode terminal
CN112398626B (en) Information transmission method, communication device and system
CN113645608B (en) Data transmission method and data transmission device
US10334553B2 (en) Wireless communications network registration method and terminal
CN115484670A (en) Network icon display method and terminal
JP7433439B2 (en) Methods, terminals, and MIMO systems for adjusting the amount of data streams
CN113395364A (en) Access method of application server and terminal
CN114584966B (en) Sharing method of radio frequency channels and related device
CN117135618B (en) Method, equipment and storage medium for setting local number function
CN105657691A (en) Mobile terminal and data sharing method of double-chip system thereof
CN117135618A (en) Method, equipment and storage medium for setting local number function
CN105744648A (en) Mobile terminal and communication method
CN113709720B (en) SIM dual-mode card abnormity optimization method and electronic equipment
KR20100093701A (en) Mutistandby terminal and method for offering call waiting sound thereof
US11330422B2 (en) Mobile communication devices and methods for managing connections associated with multiple subscriber numbers
US20240015500A1 (en) Information reporting method and apparatus, and storage medium
CN115278825A (en) WiFi connection method and device
CN116158041A (en) SRS transmission method and device for antenna switching configuration and storage medium
WO2023082824A1 (en) Resource allocation method and apparatus
CN117119392B (en) Communication method, processor, electronic equipment and storage medium
CN117177232B (en) Configuration management method of card-following configuration characteristics and electronic equipment

Legal Events

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