Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
A Subscriber Identity Module (SIM) card refers to a smart card used by a user terminal, in which user identity identification data, an authentication algorithm, a secret key, and the like are stored, and is used to identify and authenticate the user terminal before the user terminal accesses a communication network. If the user terminal fixedly uses one SIM card, the problems of poor signal, high roaming cost and the like easily occur.
To solve these problems, the cloud SIM card technology has been developed. The cloud SIM card technology is that a large number of SIM cards are stored and managed on a server in a centralized mode, and the SIM cards are shared and used on different devices according to a real-time SIM card allocation method.
However, in the conventional cloud SIM card technology, the SIM card may be called by different devices at a longer distance in a short time, which causes the SIM card normally used to be misjudged as the SIM card abnormally used by the operator, and further causes the SIM card to be disabled, thereby causing a loss to the cloud operator.
For example, one SIM card is just allocated to one user terminal in shenzhen for use, and registers in the shenzhen mobile network; after 1 minute, the card was again assigned to a user terminal in Beijing and registered with the Beijing mobile network. Normally, a user terminal cannot move from shenzhen to beijing within 1 minute, so the operator misjudges the normally used SIM card as an abnormally used SIM card and deactivates the SIM card.
Based on this, the embodiment of the application provides a method, a device, a server and a computer-readable storage medium for allocating an SIM card, which can solve the technical problem that an operator misjudges a normally used SIM card as an abnormally used SIM card, so that the SIM card is deactivated and loss is brought to a cloud card operator.
In order to explain the technical means of the present application, the following description will be given by way of specific examples.
Fig. 1 shows a schematic diagram of interaction between a user terminal and a server provided by an embodiment of the present application. The user terminal 11 may send a SIM card allocation request to the server 13 through the mobile communication network or other network (e.g., WIFI network) 12; after receiving the SIM card allocation request sent by the user terminal 11, the server 13 may allocate an SIM card to the user terminal 11 according to the SIM card allocation method provided in the present application; after the SIM card is successfully assigned, the user terminal 11 may register a network with the operator, and then access the communication network.
Specifically, the user terminal 11 may include a device capable of using a cloud SIM card, and the device may download information of the SIM card allocated by the server and complete authentication of an operator, so as to access the communication network. The server 13 may include a card loading device 131, a database 132, and a SIM card scheduling system 133; the card loading device 131 is a carrier device of a SIM card, and is configured to read information of the SIM card and upload the information of the SIM card to the database 132; the database 132 is used for managing the state of the SIM card, storing basic information of the SIM card, storing package flow charging information, recording historical distribution information of the SIM card, and the like; SIM card scheduling system 133 is used to perform SIM card allocation and scheduling.
Fig. 2 shows a schematic flow chart of an implementation of a SIM card allocation method provided in an embodiment of the present application, where the method is applicable to the server shown in fig. 1, and is executed by an SIM card allocation device configured on the server, and is suitable for solving a situation that a normally used SIM card is erroneously determined by an operator as an abnormally used SIM card, which further causes the SIM card to be deactivated, and causes a loss to a cloud card operator. The SIM card assignment method may include steps 201 to 203.
Step 201, receiving a SIM card allocation request sent by a user terminal.
The SIM card allocation request carries the position information of the user terminal; the location information may include latitude and longitude information of the user terminal or location information of the base station.
Specifically, when the user terminal sends an SIM card allocation request to the server through the base station, if the user terminal supports a Global Positioning System (GPS), the latitude and longitude information of the user terminal may be obtained through the GPS, and the latitude and longitude information of the user terminal is carried in the SIM card allocation request; if the user terminal does not support a Global Positioning System (GPS), the location information of the base station may be obtained during the network searching process of the user terminal, and the location information of the base station is carried in the SIM card allocation request.
The Location information of the base station may include a Public Land Mobile Network (PLMN), a Location Area Code (LAC), and a Cell ID of the base station; the public land Mobile Network of the base station may include a Mobile Network Code (MNC) and a Mobile Country Code (MCC) of the base station.
Step 202, searching the SIM card status information of the first area corresponding to the location information stored in the database of the server according to the location information, and determining whether the server has an idle card corresponding to the first area.
The first area may be an area of the SIM card that is not erroneously determined by the operator as being abnormally used when the SIM card is released and called again by another user terminal in the first area.
For example, the first area may be an area formed by a coverage area of a core network where the user terminal is located when the user terminal sends the SIM card assignment request and a coverage area of another core network adjacent to the core network, or an area smaller than an area formed by a coverage area of a core network where the user terminal is located when the user terminal sends the SIM card assignment request and a coverage area of another core network adjacent to the core network.
Typically, an operator will divide the operator network into a plurality of core networks, such as: the Shenzhen move is a core network, and the Dongguan move is a core network adjacent to the Shenzhen move; when the SIM card is used and released by the user terminal in a certain core network and then called again by the user terminal in the coverage area of the core network or the coverage area of another core network adjacent to the core network, the operator will not misjudge the SIM card as an abnormally used SIM card.
In an embodiment of the present application, each SIM card may have a first zone corresponding to the SIM card, that is, each SIM card may be assigned to a user terminal that sends a SIM card assignment request to a server in the first zone corresponding to the SIM card.
For example, when the first area is divided according to Chinese provinces, the SIM card of the Guangdong can be only distributed to the user terminal which sends the SIM card distribution request to the server in the Guangdong, but not distributed to the user terminal which sends the SIM card distribution request to the server in Jiangsu; and when the SIM card is called by the user terminal sending the SIM card allocation request to the server in Guangdong again many times after being released, the operator does not misjudge that the SIM card is the abnormally used SIM card.
It should be noted that, the database of the server may store SIM card status information, where the SIM card status information indicates a current use state of the SIM card; for example, when a SIM card is assigned to a user terminal and is not released, the SIM card is a non-idle card in a non-idle state; when the SIM card is not assigned to the user terminal, the SIM card is an idle card in an idle state.
Therefore, in some embodiments of the present application, the server may search, according to the location information, SIM card status information of a first area corresponding to the location information, which is stored in a database of the server, determine whether a free card corresponding to the first area exists in the server, and allocate the free card corresponding to the first area to the user terminal.
And 203, if the server has the idle card corresponding to the first area, allocating the idle card corresponding to the first area to the user terminal.
In the embodiment of the application, whether the server has an idle card corresponding to a first area is determined by receiving an SIM card allocation request sent by a user terminal, searching SIM card state information of the first area corresponding to the position information stored in a database of the server according to the position information of the user terminal carried by the SIM card allocation request, then, a free card corresponding to the first area is allocated to the user terminal, so that the object of SIM card allocation is the user terminal located in the first area, and, the first area is an area of the SIM card which is not misjudged as an abnormally used SIM card by the operator when the SIM card is called again by other user terminals in the first area after being released, and therefore, it is possible to avoid the SIM card being called up in a short time by a different device at a greater distance, the problem that the normally used SIM card is judged as the abnormally used SIM card by an operator is solved.
Specifically, as shown in fig. 3, the searching for the SIM card status information of the first area corresponding to the location information stored in the database of the server according to the location information and determining whether the server has a free card corresponding to the first area may include: step 301 to step 302.
Step 301, inquiring first area information corresponding to the position information according to the position information.
In some embodiments of the present application, each piece of location information may have first area information corresponding to the piece of location information, and a plurality of pieces of location information may correspond to the same first area information; and, each of the first area information may have one first area corresponding to the first area information.
The first area information may be area code, area name, or other information for identifying the first area.
For example, the location information of the base station is that a public land mobile network PLMN of the base station is 46001, and a location area code LAC of the base station is 55581, the first region information corresponding to the location information may be a region code CN-01-02, and the region code may correspond to shenzhen city, guangdong province; for another example, the location information of the base station is that the PLMN of the public land mobile network of the base station is 46011, the location area code LAC is 2583, the first region information corresponding to the location information may also be the region code CN-01-02, and the region code may also correspond to shenzhen city, guang province.
Step 302, searching the SIM card status information of the first area corresponding to the first area information stored in the database of the server according to the first area information, and determining whether there is an idle card corresponding to the first area in the server.
In some embodiments of the application, the server may search, according to the location information of the user terminal carried in the SIM card allocation request, first area information corresponding to the location information, determine the first area according to the first area information, further search SIM card state information of the first area stored in a database of the server, and determine whether there is an idle card corresponding to the first area in the server.
For example, the location information of the base station carried in the SIM allocation request acquired by the server is 46001 of the public land mobile network PLMN of the base station and 55581 of the location area code LAC, the first region information corresponding to the location information can be found to be the region code CN-01-02, and then the region code corresponding to guangdong shenzhen city is queried, at this time, the SIM card state information of guangdong shenzhen city stored in the database of the server can be found, it is determined whether the server has an idle card corresponding to guangdong shenzhen city, and the idle card corresponding to guangdong shenzhen city is allocated to the user terminal.
In order to increase the searching speed of the first area information, as shown in fig. 4, in some embodiments of the present application, the querying the first area information corresponding to the location information according to the location information may include: step 401 to step 402.
Step 401, searching whether a mapping relation between the location information and the first area information exists in a database of the server according to the location information.
Step 402, if a mapping relation exists in a database of the server, determining first area information corresponding to the position information according to the mapping relation.
The mapping relationship is used for indicating a corresponding relationship between the position information and the first area information, and the mapping relationship can be obtained according to sample corresponding relationship data of the position information and the first area information stored in a database of the server.
Specifically, the server may periodically analyze N location information stored in a database of the server and first area information corresponding to the N location information, and if cell code cell IDs in the N location information stored in the database of the server are different, but first area information corresponding to x × M location information exists in M location information of a public land mobile network PLMN that is the same as the location area code LAC, a mapping relationship between the location information and the first area information may be generated and stored in the database of the server. Wherein, the value range of x is (0, 1).
For example, the server periodically analyzes 100 pieces of location information stored in the database of the server and first area information corresponding to the 100 pieces of location information, and if the Cell codes Cell IDs are different in the 100 pieces of location information stored in the database of the server, but the first area information corresponding to 90% 10 × 9 pieces of location information is CN-01 in 10 pieces of location information in which the public land mobile network PLMN and the location area code LAC are 46001 and 55581, a mapping relationship between the location information having PLMN 46001 and LAC 55581 and the first area information CN-01 may be generated and stored in the database of the server.
It should be noted that, the server may further receive an update operation of an administrator, and add, delete, or modify the mapping relationship stored in the database according to the update operation, thereby implementing maintenance and configuration of the mapping relationship in the server database.
In some embodiments of the present application, the server may search, according to the location information, whether a mapping relationship between the location information and the first area information exists in a database of the server; if the mapping relation exists in the database of the server, determining first area information corresponding to the position information according to the mapping relation, searching SIM card state information of the first area corresponding to the first area information stored in the database of the server according to the first area information, and allocating the idle card of the first area to the user terminal to realize the allocation of the SIM card.
In some embodiments of the application, as shown in fig. 5, after whether a mapping relationship between location information and first area information exists in the database of the search server according to the location information or not, the method may further include: step 403, if the mapping relationship does not exist in the database of the server, a base station location query interface may be called to determine first area information corresponding to the location information.
For example, if the location information is 46001 for a public land mobile network PLMN of the base station, 55581 for a location area code LAC, 98440373 for a Cell code Cell ID, and there is no mapping relationship between the location information and the first region information in the database of the server, the server may invoke the base station location query interface, obtain the first region information corresponding to the location information as the region code CN-01-02, and further query the first region information corresponding to the region code in shenzhou city, Guangdong province.
In some embodiments of the application, after the base station location query interface is called to determine the first area information corresponding to the location information, the server may generate sample correspondence data according to the location information and the first area information corresponding to the location information, and store the sample correspondence data in a database of the server.
In the embodiment of the application, whether the mapping relation between the position information and the first area information exists in the database of the server or not is searched, and when the mapping relation exists in the database of the server, the first area information corresponding to the position information is determined according to the mapping relation, so that the searching speed of the first area information corresponding to the position information is improved, and when the mapping relation does not exist in the database of the server, the base station position query interface is called to determine the first area information corresponding to the position information, so that the server can accurately search the first area information corresponding to the position information.
Generally, when the server allocates the SIM card, if there is no idle card corresponding to the first area, the server may send a message that no card can be separated to the user terminal; in order to improve the success rate of SIM card allocation, in some embodiments of the present application, if there is no idle card corresponding to the first area, the server may further search whether there is an idle card corresponding to the second area in the server, and allocate the idle card corresponding to the second area to the user terminal; wherein the second region includes the first region.
Specifically, as shown in fig. 6, after the searching for the SIM card status information stored in the database of the server according to the location information and determining whether an idle card exists in the area corresponding to the location information, the method may include: step 601 to step 602.
Step 601, if the server does not have a free card corresponding to the first area, searching the SIM card status information of the second area corresponding to the location information, which is stored in the database of the server, according to the location information, and determining whether the server has a free card corresponding to the second area.
Step 602, if the server has a free card corresponding to the second area, the free card corresponding to the second area is allocated to the user terminal.
For determining whether a server has an idle card corresponding to the second area according to the SIM card status information of the second area corresponding to the location information stored in the database of the server and searched for the location information, reference may be made to the description in fig. 3 and fig. 4, which is not described in detail herein.
The server may determine, based on the location information, that the location information corresponds to the first area information and the second area information at the same time.
For example, if the server does not have a free card corresponding to the first region, the location information of the base station is 46001 for a public land mobile network PLMN of the base station and 12343 for a location area code LAC, the first region information corresponding to the location information may be a region code CN-01-02, and the first region corresponding to the region code may be shenzhen city; and, the second area information corresponding to the location information may be an area code CN-01, and the second area corresponding to the area code may be guangdong province.
In some embodiments of the present application, when the server does not have a free card corresponding to the first area, the server may search, according to the location information, SIM card status information of a second area corresponding to the location information, which is stored in a database of the server, and determine whether the server has a free card corresponding to the second area; and if the server has the idle card corresponding to the second area, allocating the idle card corresponding to the second area to the user terminal.
For example, if the server does not have an idle card corresponding to the china (the first area), the server may search SIM card status information of the china (the second area) stored in the database of the server, and determine whether the server has an idle card corresponding to the china; and if the server has the idle card corresponding to China, distributing the idle card corresponding to China to the user terminal.
It should be noted that, if the server does not have an idle card corresponding to the second area, the server may send information that no card can be split to the user terminal, and the user terminal may send an SIM card allocation request to the server again after receiving the information, or may directly re-query the SIM card state information stored in the database of the server until the server has an idle card corresponding to the second area.
According to the embodiment of the application, when the server does not have the idle card corresponding to the first area, the idle card corresponding to the second area is searched for the user terminal, and the idle card corresponding to the second area is distributed to the user terminal, so that the success rate of SIM card distribution is improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders.
As shown in fig. 7, which is a schematic structural diagram of a SIM card distributing apparatus 700 configured in a server according to an embodiment of the present application, the SIM card distributing apparatus 700 may include: a receiving unit 701, a searching unit 702 and an assigning unit 703.
A receiving unit 701, configured to receive an SIM card allocation request sent by a user terminal; the SIM card allocation request carries the position information of the user terminal;
a searching unit 702, configured to search, according to the location information, SIM card status information of a first area corresponding to the location information, which is stored in a database of the server, and determine whether there is an idle card corresponding to the first area in the server; the first area is an area of the SIM card which cannot be mistakenly judged as abnormally used by an operator when the SIM card is called by other user terminals in the first area again after being released;
An allocating unit 703 is configured to, if there is an idle card corresponding to the first area in the server, allocate the idle card corresponding to the first area to the user terminal.
In some embodiments of the present application, the search unit 702 is further specifically configured to:
searching whether a mapping relation between the position information and first area information corresponding to the position information exists in a database of the server according to the position information;
and if the mapping relation exists in the database of the server, determining first area information corresponding to the position information according to the mapping relation.
In some embodiments of the present application, the search unit 702 is further specifically configured to:
inquiring first area information corresponding to the position information according to the position information;
and searching the SIM card state information of the first area corresponding to the first area information stored in the database of the server according to the first area information, and determining whether an idle card exists in the first area corresponding to the first area information.
In some embodiments of the present application, the search unit 702 is further specifically configured to:
and if the mapping relation does not exist in the database of the server, calling a base station position query interface, and determining first area information corresponding to the position information.
In some embodiments of the present application, the allocating unit 703 is further specifically configured to:
if the server does not have an idle card corresponding to the first area, searching SIM card state information of a second area corresponding to the position information, which is stored in a database of the server, according to the position information, and determining whether the server has an idle card corresponding to the second area; the second region comprises a first region;
and if the server has the idle card corresponding to the second area, allocating the idle card corresponding to the second area to the user terminal.
It should be noted that, for convenience and simplicity of description, the specific working process of the SIM card allocating apparatus 700 described above may refer to the corresponding process of the method described in fig. 1 to fig. 6, and is not described herein again.
Fig. 8 is a schematic diagram of a server according to an embodiment of the present application. The server 8 may include: a processor 80, a memory 81 and a computer program 82, such as a SIM card assignment program, stored in said memory 81 and operable on said processor 80. The processor 80, when executing the computer program 82, implements the steps in the above-described embodiments of the SIM card assignment method, such as the steps 201 to 203 shown in fig. 2. Alternatively, the processor 80, when executing the computer program 82, implements the functions of each module/unit in each device embodiment described above, for example, the functions of the units 701 to 703 shown in fig. 7.
The computer program may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the server. For example, the computer program may be divided into a receiving unit, a searching unit and an allocating unit, and each unit may specifically function as follows: a receiving unit, configured to receive an SIM card allocation request sent by a user terminal; the SIM card allocation request carries the position information of the user terminal; the searching unit is used for searching the SIM card state information of a first area corresponding to the position information, which is stored in a database of the server, according to the position information and determining whether the server has an idle card corresponding to the first area; the first area is an area of the SIM card which cannot be mistakenly judged as abnormally used by an operator when the SIM card is called by other user terminals in the first area again after being released; and the allocation unit is used for allocating the idle card corresponding to the first area to the user terminal if the idle card corresponding to the first area exists in the server.
The server may be a local server or a cloud server. The server may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a server and is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or different components, e.g., the server may also include input-output devices, network access devices, buses, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 81 may be an internal storage unit of the server, such as a hard disk or a memory of the server. The memory 81 may also be an external storage device of the server, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the server. Further, the memory 81 may also include both an internal storage unit of the server and an external storage device. The memory 81 is used for storing the computer programs and other programs and data required by the server. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/server and method may be implemented in other ways. For example, the above-described apparatus/server embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.