CN117255316A - Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine - Google Patents

Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine Download PDF

Info

Publication number
CN117255316A
CN117255316A CN202311216776.2A CN202311216776A CN117255316A CN 117255316 A CN117255316 A CN 117255316A CN 202311216776 A CN202311216776 A CN 202311216776A CN 117255316 A CN117255316 A CN 117255316A
Authority
CN
China
Prior art keywords
sim card
card
flag bit
data value
payment type
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.)
Pending
Application number
CN202311216776.2A
Other languages
Chinese (zh)
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.)
Zunyi Jinxun Software Co ltd
Original Assignee
Zunyi Jinxun Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zunyi Jinxun Software Co ltd filed Critical Zunyi Jinxun Software Co ltd
Priority to CN202311216776.2A priority Critical patent/CN117255316A/en
Publication of CN117255316A publication Critical patent/CN117255316A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1453Methods or systems for payment or settlement of the charges for data transmission involving significant interaction with the data transmission network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1453Methods or systems for payment or settlement of the charges for data transmission involving significant interaction with the data transmission network
    • H04L12/1467Methods or systems for payment or settlement of the charges for data transmission involving significant interaction with the data transmission network involving prepayment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention belongs to the technical field of communication, and discloses a method, a device and a device storage medium for distinguishing the payment type of a SIM card of a functional machine, wherein the method comprises the following steps: establishing a data structure for storing the payment type of the SIM card, and setting a flag bit of a corresponding card slot; obtaining the marker bit by using a preset method; based on the flag bit, storing the flag bit into a newly created NV data value, and creating an NV interface; modifying APN parameters based on the flag bit, and performing global updating to obtain a global updating result; if the function machine is restarted, judging whether the current SIM card has the operation of replacing the used card or not; if the card replacement operation exists, the flag bit in the NV data value is directly obtained through the NV interface, the SIM card payment type is judged, and meanwhile, the global updating result is obtained to execute the networking operation; the method and the device can effectively record, manage and judge the payment type of the SIM card, improve the intellectualization and user friendliness of the system, and provide convenient, quick and accurate network connection experience for users.

Description

Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device storage medium for distinguishing a payment type of a SIM card of a functional machine.
Background
With the continuous application and development of mobile phones in life, various operators are responsible for the communication field, plays a vital role in the China communication industry, and comprehensively operates and receives according to own risk management, competition strategy and marketing requirements so as to maximize prepaid and postpaid services; if the payment types are not distinguished at the terminal, the operator can not accurately know the requirements and behavior characteristics of the user, and a targeted operation strategy is lacked.
Therefore, how to provide an efficient and stable method for distinguishing SIM card payment modes on a terminal is a problem to be solved.
Disclosure of Invention
The invention mainly aims to provide a method, a device and a device storage medium for distinguishing SIM card payment types of a functional machine, and aims to solve the technical problem of how to provide an efficient and stable SIM card payment mode distinguishing method on a terminal.
To achieve the above object, a first aspect of the present invention provides a method for distinguishing payment type of a SIM card of a functional machine, the method comprising:
establishing a data structure for storing the payment type of the SIM card, and setting a flag bit corresponding to the card slot;
obtaining the marker bit by using a preset method;
based on the flag bit, storing the flag bit into a newly created NV data value, and creating an NV interface;
modifying APN parameters based on the flag bit, and performing global updating to obtain a global updating result;
if the function machine is restarted, judging whether the current SIM card has the operation of replacing the used card or not;
if the card replacement operation exists, the flag bit in the NV data value is directly obtained through the NV interface, the SIM card payment type is judged, and meanwhile, the global updating result is obtained to execute the networking operation.
Further, the step of obtaining the flag bit by using a preset method includes:
receiving an initialization instruction of a terminal, and identifying the MCC/MNC of the SIM card inserted in the current card slot to obtain an identification result;
inquiring the supplementary service of the SIM card based on the operator and the country or region to which the SIM card belongs to obtain an inquiry result;
determining the payment type of the SIM card based on the identification result and the query result;
and obtaining the zone bit corresponding to the current card slot according to the payment type of the SIM card.
Further, the step of obtaining the flag bit by using a preset method further includes:
receiving an initialization instruction of a terminal, and judging MCC/MNC of the SIM card inserted in the current card slot;
receiving a triggering instruction, and pushing an option tag containing prepayment and postpayment based on an operator and a country or region to which the SIM card in the current card slot belongs;
identifying and determining that the user's selection is prepaid or postpaid;
and obtaining the zone bit corresponding to the current card slot based on the determined payment type.
Further, the step of storing the flag bit into the newly created NV data value and creating the NV interface based on the flag bit includes:
creating an NV data value and a write function based on the flag bit;
performing a read operation of the NV data value for the first time;
initializing the NV data value if the NV data value is not successfully read for the first time;
executing the writing operation of the NV data value, and writing the flag bit into the NV data value;
and creating an NV interface based on the flag bit of the NV data value.
Further, the step of determining whether the current SIM card has a card replacement operation includes:
reading and recording the unique identifier of the SIM card inserted in the current card slot, and comparing the read unique identifier of the SIM card with the unique identifier of the SIM card recorded last time in the current card slot;
and if the unique identifiers are consistent, judging that the operation of replacing the used card exists.
Further, if there is a card replacement operation, directly obtaining a flag bit in an NV data value through an NV interface, determining the payment type of the SIM card, and simultaneously obtaining a global update result to execute a networking operation, including:
if the card replacing operation exists, reading the stored NV data value through an NV interface, and acquiring the value of the flag bit;
judging the payment type according to the acquired flag bit value, and executing corresponding global updating operation;
and executing networking operation according to the global updating result.
Further, the step of establishing a data structure for storing the payment type of the SIM card and setting up a flag bit corresponding to the card slot includes:
defining a data structure for storing the payment type of the SIM card;
initializing the zone bit of the corresponding number of the clamping grooves according to the number of the clamping grooves, and defaulting to a non-card-inserted state;
creating a corresponding card slot state judging function interface for receiving the card slot number as a parameter and setting the corresponding card slot mark position as a card inserted state;
when the SIM card is inserted or removed, the card slot state judging function interface is called, and the corresponding card slot number is transmitted to perform updating operation.
The second aspect of the present application also proposes an apparatus for distinguishing payment type of a SIM card of a functional machine, including:
the data structure creation module is used for creating a data structure for storing the payment type of the SIM card and setting up a flag bit corresponding to the card slot;
the marker bit obtaining module is used for obtaining the marker bit by using a preset method;
the NV interface creation module is used for storing the flag bit into a newly created NV data value based on the flag bit and creating an NV interface;
the global updating module is used for modifying APN parameters based on the flag bit and carrying out global updating to obtain a global updating result;
the card replacement judging module is used for judging whether the current SIM card has the card replacement operation if the functional machine is restarted;
and the zone bit reading module is used for directly obtaining the zone bit in the NV data value through the NV interface and judging the payment type of the SIM card if the card replacing operation is performed, and simultaneously obtaining the global updating result to perform networking operation.
A third aspect of the present application also proposes a computer device comprising a memory and a processor, said memory having stored therein a computer program, said processor implementing the steps of the method of distinguishing between payment types of a functional machine SIM card as defined in any one of the preceding claims when said computer program is executed.
A third aspect of the present application also proposes a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of a method of differentiating between payment types of a functional machine SIM card as described in any of the above.
Advantageous effects
The invention establishes a data structure for storing the payment type of the SIM card, establishes the flag bit which corresponds to the clamping groove and can represent the payment type, stores the flag bit into the newly created NV data value, establishes the NV interface, can realize the record and management of the payment type information, ensures the persistent storage and the safe isolation of data, modifies the APN parameter based on the flag bit and carries out global updating, can ensure the consistency of network setting and the payment type, improves the adaptability and the operation effect of the system, monitors whether the replacement used card operation exists or not when the functional machine is restarted, and directly acquires the flag bit stored in the NV data value through the NV interface to judge the payment type of the SIM card if the replacement used card operation exists, thereby avoiding redundant logic judgment and processing steps and improving the simplicity and the execution efficiency of codes. The method and the system can realize effective recording, management and judgment of the payment type of the SIM card, and can perform corresponding network setting and networking operation according to the payment type, thereby improving the intellectualization and user friendliness of the system and providing more convenient, rapid and accurate network connection experience for users.
Drawings
FIG. 1 is a flow chart of a method for distinguishing SIM card payment type of a functional machine according to an embodiment of the invention;
FIG. 2 is a flow chart of a method for distinguishing between SIM card payment types of a functional machine according to one embodiment of the invention;
FIG. 3 is a schematic block diagram of an apparatus for distinguishing between payment types of a SIM card of a functional machine according to an embodiment of the invention;
FIG. 4 is a block diagram of a computer device according to one embodiment of the invention;
the achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, modules, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any module and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Referring to fig. 1-2, an embodiment of the present invention provides a method for distinguishing payment type of a SIM card of a functional machine, including steps S1-S6:
s1: and establishing a data structure for storing the payment type of the SIM card, and setting up a flag bit corresponding to the card slot.
The main purpose of this step is to create a data structure for storing payment type information of the SIM card, and in the functional machine there are usually a plurality of slots, each of which can be inserted with one SIM card, and for convenience in managing and distinguishing between different SIM cards, a slot flag bit is set to indicate whether the current slot has a SIM card inserted, and when the data structure for storing payment type of the SIM card is created, it can be organized according to the order or index of the slot flag bits. For example, the storage may be performed using a data structure such as an array, a linked list, or a hash table. Each element or node corresponds to a card slot and is used for storing the payment type information of the SIM card in the card slot, and through the data structure, the payment type information of the SIM card in different card slots can be conveniently managed and accessed. When the payment type of the SIM card in a certain card slot needs to be judged, only the zone bit in the corresponding position needs to be checked, and the corresponding payment type information is found by taking the zone bit as an index or an address.
S2: and obtaining the marker bit by using a preset method.
The preset method mainly refers to using automatic judgment or manual judgment to judge the payment type of the current SIM card, and obtaining corresponding zone bits according to the difference of the payment types.
S3: and storing the flag bit into a newly created NV data value based on the flag bit, and creating a NV interface.
And storing the acquired flag bit value into the newly created NV data value, ensuring the durability of the data, and creating an NV interface in the system for managing and operating the NV data value of the payment type. The interface can define operation functions such as reading, writing, updating and the like, and is convenient for calling and processing codes.
S4: and modifying APN parameters based on the flag bit, and performing global updating to obtain a global updating result.
Checking NV data value of the storage flag bit, carrying out corresponding modification on APN parameter according to the value of the flag bit, applying the modified APN parameter to all relevant equipment, modules or components of the system, executing global updating operation, and then confirming whether the global updating is successful or not according to feedback or state information of the system.
S5: if the function machine is restarted, judging whether the current SIM card has the operation of replacing the used card.
If it is detected that the current function is restarted, it is determined whether the current SIM card has a replacement used card operation for reinserting a previously inserted used card, the step is to determine whether the current SIM card is a previously used card by comparing whether the unique identification of the currently inserted SIM card is the same as the unique identification of the previously inserted SIM card, the SIM cards have unique identifiers, typically a number called ICCID (integrated circuit card identification code), the ICCID number of each SIM card is different, the different cards can be distinguished, the step of identifying the replacement used card operation can reduce the flow of distinguishing the payment types, and if the current SIM card is already used, the previous card information can be directly multiplexed.
S6: if the card replacement operation exists, the flag bit in the NV data value is directly obtained through the NV interface, the SIM card payment type is judged, and meanwhile, the global updating result is obtained to execute the networking operation.
If the payment type of the SIM card exists, the value of the flag bit stored in the NV data value is obtained directly through using a reading function provided by an NV interface, the payment type of the SIM card can be determined by directly carrying out corresponding logic judgment according to the value of the flag bit, the payment type of the SIM card is not required to be checked again from the beginning, the global updating operation is executed according to the payment type of the SIM card, the new payment type is enabled to be effective, whether the global updating is successful or not is confirmed according to feedback information or state of the system, and if the global updating is successful, a user can execute the required networking operation.
In an embodiment, the step of obtaining the flag bit by using a preset method includes:
s12: receiving an initialization instruction of a terminal, and identifying the MCC/MNC of the SIM card inserted in the current card slot to obtain an identification result;
s13: inquiring the supplementary service of the SIM card based on the operator and the country or region to which the SIM card belongs to obtain an inquiry result;
s15: determining the payment type of the SIM card based on the identification result and the query result;
s16: and obtaining the zone bit corresponding to the current card slot according to the payment type of the SIM card.
In this embodiment, an initialization instruction of the terminal is received, an MCC/MNC determination is performed on an inserted SIM card, in this step, the MCC (mobile country code) and MNC (mobile network code) of the SIM card need to be acquired, these codes may be used to identify the operator and country or region to which the SIM card belongs, a query instruction is directly triggered when the operator and country or region to which the SIM card belongs are identified, and then the system acquires supplementary service information of the SIM card in the background, thereby determining the payment type of the SIM card, for example, if the operator to which the SIM card belongs is a certain domestic operator a and the query result indicates that it is a prepaid package, it may be determined that the payment type of the SIM card is Prepay, and a corresponding flag bit is obtained based on the payment type, for example, a flag bit value corresponding to the prepaid payment type is defined as a number 0, and a flag bit with a definition value of 0 is applied to the current card slot.
In one embodiment, the step of determining the payment type of the SIM card includes:
s21: receiving an initialization instruction of a terminal, and judging MCC/MNC of the SIM card inserted in the current card slot;
s22: pushing option labels containing prepaid and postpaid based on the operator and country or region to which the SIM card belongs;
s23: the result of identifying and determining the user's selection is prepaid or postpaid.
S24: and obtaining the zone bit corresponding to the current card slot based on the determined payment type.
In this embodiment, an initialization command of the terminal is received, an MCC/MNC determination is performed on the inserted SIM card, in this step, the MCC (mobile country code) and MNC (mobile network code) of the SIM card need to be acquired, these codes can be used to identify the operator and country or region to which the SIM card belongs, after identifying the operator and country or region to which the SIM card belongs, the tag containing prepaid and postpaid options is pushed, which means that the system receives a trigger command, for example, the user clicks a button or selects a menu item, then the system pushes a tag containing prepaid and postpaid options to the user, and then the system identifies whether the user selects prepaid or postpaid options according to the operation or selection of the user, and the system can determine the selection result of the user by detecting the click, selection or by analyzing the user input of the user; through the two steps, the system can receive a selection instruction of a user and judge whether the payment type of the SIM card is prepaid or postpaid, and then obtain a corresponding flag bit based on the payment type, for example, a flag bit value corresponding to the postpaid payment type is defined as a number 1, and the flag bit with the defined value of 1 is applied to the current card slot. Such a determination may provide guidance for subsequent operations, such as setting a corresponding billing mode, displaying corresponding payment information, etc., to meet the needs of the user and provide better service.
In an embodiment, the step of storing the flag bit into the newly created NV data value and creating the NV interface based on the flag bit includes:
s31: creating an NV data value and a write function based on the flag bit;
s32: performing a read operation of the NV data value for the first time;
s33: initializing the NV data value if the NV data value is not successfully read for the first time;
s34: executing the writing operation of the NV data value, and writing the flag bit into the NV data value;
s35: and creating an NV interface based on the flag bit of the NV data value.
In this embodiment, NV data values are created to store flag bits and corresponding write functions are written. The write function is responsible for writing the value of the flag bit into the NV data value, performing the operation of reading the NV data value for the first time, obtaining the previously stored flag bit value by performing the operation of reading the NV data value, if the NV data value is read for the first time, possibly returning an uninitialized value or a default value, if the NV data value read for the first time is not successfully read, performing the initialization operation, initializing the NV data value to the default value or a specific initial state so as to ensure the integrity and consistency of data, performing the writing operation of the NV data value, writing the flag bit into the NV data value, performing the writing operation of the NV data value, writing the previously determined value of the flag bit into the NV data value, and through the steps, storing the value of the flag bit into the NV data value, and creating the NV interface based on the flag bit of the NV data value.
In one embodiment, the step of determining whether the current SIM card has a replacement used card operation includes:
reading and recording the unique identifier of the SIM card inserted in the current card slot, and comparing the read unique identifier of the SIM card with the unique identifier of the SIM card recorded last time in the current card slot;
and if the unique identifiers are consistent, judging that the operation of replacing the used card exists.
In this embodiment, the system reads and records the unique identifier of the currently inserted SIM card, for example, the SIM card serial number (ICCID), the International Mobile Subscriber Identity (IMSI), etc., and records these information for subsequent comparison, if the unique identifiers are consistent, the system compares the read unique identifier of the currently inserted SIM card with the unique identifier of the previously recorded SIM card, if the two are consistent, it determines that there is a card replacement operation, which indicates that the currently inserted SIM card of the user has been used on the present functional machine, the system queries the database for corresponding SIM card information, including payment type information, according to the unique identifier of the currently inserted SIM card, and by acquiring the data in the database, the system can learn the payment type of the currently inserted SIM card for direct multiplexing.
In an embodiment, if there is a card replacement operation, the step of directly obtaining a flag bit in an NV data value through an NV interface and determining the payment type of the SIM card, and simultaneously obtaining a global update result to execute a networking operation includes:
s41: and creating a corresponding storage function interface, and storing the flag bit and the corresponding type information of the current SIM card into a data structure.
S42: and creating a corresponding reading function interface, reading the modification instruction through the reading function interface, and making a judgment response.
In this embodiment, the system creates a function interface for storing the unique identifier of the SIM card and the payment type information corresponding to the unique identifier, and after reading the unique identifier of the SIM card and the payment type information, the system calls the interface to store the data into a specific data structure for encapsulation so as to facilitate subsequent reading and modification operations, creates a corresponding function reading interface, and creates an interface for reading and judging the SIM card information, the interface can read modification instructions externally transmitted, and judges and responds according to the stored unique identifier of the SIM card and the payment type information, through the interface, the system can realize the operation of reading and modifying the SIM card information, thereby meeting the requirements of users; the embodiment provides the storage and reading functions of the SIM card information; the current identification bit of the SIM card and the determined payment type information can be stored in a data structure through a storage function interface for subsequent use, and the system can read and judge the SIM card information through a reading function interface and respond correspondingly according to the operation requirement of a user; the design can more flexibly manage and process the SIM card information, and improves the expandability and user experience of the system; for example, the operator has different internet parameter requirements and SIM card names for prepaid and postpaid cards using different APNs, and after the instruction to be changed is triggered, the access function interface can be used to modify the APNs and the operator names.
In an embodiment, if there is a card replacement operation, the step of directly obtaining a flag bit in an NV data value through an NV interface and determining the payment type of the SIM card, and simultaneously obtaining a global update result to execute a networking operation includes:
s51: if the card replacing operation exists, reading the stored NV data value through an NV interface, and acquiring the value of the flag bit;
s52: judging the payment type according to the acquired flag bit value, and executing corresponding global updating operation;
s53: and executing networking operation according to the global updating result.
In this embodiment, the NV data value is accessed by interacting with the data in the (NV) data structure via the NV interface, and the value of the flag bit associated with the type of payment of the SIM card in the current card slot is retrieved. By reading the NV data, the system can obtain the previously set flag bit value, and further directly judge the payment type of the SIM card. Depending on the payment type, the system may perform different global update operations. For example, if the flag bit indicates that the payment type of the SIM card is prepaid, the system may need to update the APN parameters to accommodate the corresponding prepaid charging rules; if the flag bit indicates that the payment type of the SIM card is post-paid, the system may need to do other operations to coordinate post-payment billing rules. The system then decides whether to establish a network connection based on success or failure of the global update. If the global update is successful, the system may continue to perform subsequent networking operations; if the global update fails, the system may need to take appropriate action, such as displaying an error message to the user or attempting other networking means.
In an embodiment, the step of establishing a data structure for storing the payment type of the SIM card based on the established slot flag bit includes:
s61: defining a data structure for storing the payment type of the SIM card;
s62: initializing the zone bit of the corresponding number of the clamping grooves according to the number of the clamping grooves, and defaulting to a non-card-inserted state;
s63: creating a corresponding card slot state judging function interface for receiving the card slot number as a parameter and setting the corresponding card slot mark position as a card inserted state;
s64: when the SIM card is inserted or removed, the card slot state judging function interface is called, and the corresponding card slot number is transmitted to perform updating operation.
The data structure in this embodiment defines the payment type of the SIM card, and an array or other suitable data structure may be used to store this information; initializing the card slot zone bit according to the number of card slots, creating a corresponding number of card slot zone bits according to the number of card slots supported by the system, setting the zone bits to be in a non-card-inserted state under the default condition, creating a corresponding card slot state judging function interface, receiving the card slot number as a parameter, setting the zone bit of the corresponding card slot to be in a card-inserted state, and calling the function interface to update the state of the card slot when a user inserts or removes the SIM card; in this way, the system can determine the insertion and removal of the SIM card according to the state of the card slot, and effectively store and manage the payment type information, which is helpful for the system to better identify and distinguish the SIM cards in different card slots and provide corresponding services accordingly.
Referring to fig. 3, in an embodiment, an apparatus for distinguishing a payment type of a SIM card of a functional machine is further provided, including:
the data structure creation module 100 is used for creating a data structure for storing the payment type of the SIM card and setting up a flag bit corresponding to the card slot;
the flag bit obtaining module 200 is configured to obtain the flag bit by using a preset method.
And the NV interface creation module 300 is configured to store the flag bit into the newly created NV data value based on the flag bit, and create an NV interface.
The global updating module 400 is configured to modify an APN parameter based on the flag bit, and perform global updating to obtain a global updating result.
The card replacement judging module 500 is configured to judge whether the current SIM card has a card replacement operation if the functional machine is monitored to be restarted.
And the flag bit reading module 600 is configured to obtain a flag bit in the NV data value directly through the NV interface and determine the payment type of the SIM card if there is a card replacement operation, and obtain a global update result to perform a networking operation.
In an embodiment, the above-mentioned flag bit obtaining module 200 includes:
the first judging unit is used for receiving the initializing instruction of the terminal, identifying the MCC/MNC of the SIM card inserted in the current card slot, and obtaining an identification result.
And the supplementary service query unit is used for querying the supplementary service of the SIM card based on the operator and the country or region to which the SIM card belongs to obtain a query result.
And the type determining unit is used for determining the payment type of the SIM card based on the identification result and the query result.
The first zone bit obtaining unit is used for obtaining the zone bit corresponding to the current card slot according to the payment type of the SIM card.
In an embodiment, the above-mentioned obtaining a flag bit module 200 further includes:
and the second judging unit is used for receiving the initializing instruction of the terminal and judging MCC/MNC for the SIM card inserted in the current card slot.
The pushing option unit is used for receiving the triggering instruction and pushing option labels containing prepayment and postpayment based on operators and countries or regions to which the SIM card in the current card slot belongs.
An identification option unit for identifying and determining whether the user's selection result is prepaid or postpaid;
and the second zone bit acquisition unit is used for acquiring the zone bit corresponding to the current clamping groove based on the determined payment type.
In one embodiment, the NV interface creation module 300 includes:
and the data value creation unit is used for creating the NV data value and the write function based on the flag bit.
And the read operation execution unit is used for executing the read operation of the NV data value for the first time.
And the initialization unit is used for initializing the NV data value if the NV data value is not successfully read for the first time.
And the write operation execution unit is used for executing the write operation of the NV data value and writing the flag bit into the NV data value.
And the interface creation unit is used for creating the NV interface based on the zone bit of the NV data value.
In an embodiment, the card replacement determination module 500 includes:
the identification comparison unit is used for reading and recording the unique identification of the currently inserted SIM card and comparing the read unique identification of the SIM card with the previously recorded unique identification of the SIM card.
And the card replacement judging unit is used for judging that the operation of replacing the used card exists if the unique identification is consistent.
In an embodiment, the flag reading module 600 includes:
and the value obtaining unit is used for reading the stored NV data value through the NV interface and obtaining the value of the flag bit if the card replacing operation exists.
And the type judging unit is used for judging the payment type according to the acquired flag bit value and executing corresponding global updating operation.
And the updating networking unit is used for executing networking operation according to the global updating result.
In one embodiment, the data structure creation module 100 includes:
and a structure definition unit for defining a data structure for storing the payment type of the SIM card.
The sign bit initialization unit is used for initializing the corresponding number of the sign bits of the clamping grooves according to the number of the clamping grooves, and defaulting to a state without inserting the clamping grooves.
The interface creation unit is used for creating a corresponding card slot state judging function interface, receiving the card slot number as a parameter and taking the corresponding card slot mark position as the inserted card state.
And the insertion updating unit is used for calling the card slot state judging function interface when the SIM card is inserted or removed, and transmitting the corresponding card slot number to perform updating operation.
Referring to fig. 4, an embodiment of the present invention further provides a computer device, and an internal structure of the computer device may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The nonvolatile storage medium stores an operating device, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing work items and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. Further, the above-mentioned computer apparatus may be further provided with an input device, a display screen, and the like. The method for distinguishing the SIM card payment type of the functional machine by the computer program when being executed by the processor comprises the following steps: establishing a data structure for storing the payment type of the SIM card, and setting a flag bit corresponding to the card slot; obtaining the marker bit by using a preset method; based on the flag bit, storing the flag bit into a newly created NV data value, and creating an NV interface; modifying APN parameters based on the flag bit, and performing global updating to obtain a global updating result; if the function machine is restarted, judging whether the current SIM card has the operation of replacing the used card or not; if the card replacement operation exists, the flag bit in the NV data value is directly obtained through the NV interface, the SIM card payment type is judged, and meanwhile, the global updating result is obtained to execute the networking operation. Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device to which the present application is applied.
An embodiment of the present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for differentiating between payment types of a functional machine SIM card, including the steps of: establishing a data structure for storing the payment type of the SIM card, and setting a flag bit corresponding to the card slot; obtaining the marker bit by using a preset method; based on the flag bit, storing the flag bit into a newly created NV data value, and creating an NV interface; modifying APN parameters based on the flag bit, and performing global updating to obtain a global updating result; if the function machine is restarted, judging whether the current SIM card has the operation of replacing the used card or not; if the card replacement operation exists, the flag bit in the NV data value is directly obtained through the NV interface, the SIM card payment type is judged, and meanwhile, the global updating result is obtained to execute the networking operation. It is understood that the computer readable storage medium in this embodiment may be a volatile readable storage medium or a nonvolatile readable storage medium.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and drawings of the present invention or directly or indirectly applied to other related technical fields are included in the scope of the invention.

Claims (10)

1. A method of distinguishing between payment types for a functional machine SIM card, the method comprising:
establishing a data structure for storing the payment type of the SIM card, and setting a flag bit corresponding to the card slot;
obtaining the marker bit by using a preset method;
based on the flag bit, storing the flag bit into a newly created NV data value, and creating an NV interface;
modifying APN parameters based on the flag bit, and performing global updating to obtain a global updating result;
if the function machine is restarted, judging whether the current SIM card has the operation of replacing the used card or not;
if the card replacement operation exists, the flag bit in the NV data value is directly obtained through the NV interface, the SIM card payment type is judged, and meanwhile, the global updating result is obtained to execute the networking operation.
2. The method for distinguishing between payment types of a SIM card of a functional unit according to claim 1, wherein the step of obtaining the flag bit by using a preset method includes:
receiving an initialization instruction of a terminal, and identifying the MCC/MNC of the SIM card inserted in the current card slot to obtain an identification result;
inquiring the supplementary service of the SIM card based on the operator and the country or region to which the SIM card belongs to obtain an inquiry result;
determining the payment type of the SIM card based on the identification result and the query result;
and obtaining the zone bit corresponding to the current card slot according to the payment type of the SIM card.
3. The method for distinguishing between payment types of a SIM card of a functional unit according to claim 1, wherein the step of obtaining the flag bit by using a preset method further includes:
receiving an initialization instruction of a terminal, and judging MCC/MNC of the SIM card inserted in the current card slot;
receiving a triggering instruction, and pushing an option tag containing prepayment and postpayment based on an operator and a country or region to which the SIM card in the current card slot belongs;
identifying and determining that the user's selection is prepaid or postpaid;
and obtaining the zone bit corresponding to the current card slot based on the determined payment type.
4. The method of claim 1, wherein the step of storing the flag bit into a newly created NV data value and creating an NV interface based on the flag bit comprises:
creating an NV data value and a write function based on the flag bit;
performing a read operation of the NV data value for the first time;
initializing the NV data value if the NV data value is not successfully read for the first time;
executing the writing operation of the NV data value, and writing the flag bit into the NV data value;
and creating an NV interface based on the flag bit of the NV data value.
5. The method of claim 1, wherein the step of determining whether the current SIM card has a replacement-used card operation comprises:
reading and recording the unique identifier of the SIM card inserted in the current card slot, and comparing the read unique identifier of the SIM card with the unique identifier of the SIM card recorded last time in the current card slot;
and if the unique identifiers are consistent, judging that the operation of replacing the used card exists.
6. The method for distinguishing between payment types of a SIM card of a functional unit according to claim 1, wherein if there is a replacement used card operation, the steps of obtaining a flag bit in an NV data value and determining the payment type of the SIM card, and obtaining a global update result to perform a networking operation directly through an NV interface, include:
if the card replacing operation exists, reading the stored NV data value through an NV interface, and acquiring the value of the flag bit;
judging the payment type according to the acquired flag bit value, and executing corresponding global updating operation;
and executing networking operation according to the global updating result.
7. The method for distinguishing between payment types of a SIM card of a functional unit according to claim 1, wherein the step of creating a data structure for storing payment types of the SIM card and setting up a flag bit corresponding to a card slot includes:
defining a data structure for storing the payment type of the SIM card;
initializing the zone bit of the corresponding number of the clamping grooves according to the number of the clamping grooves, and defaulting to a non-card-inserted state;
creating a corresponding card slot state judging function interface for receiving the card slot number as a parameter and setting the corresponding card slot mark position as a card inserted state;
when the SIM card is inserted or removed, the card slot state judging function interface is called, and the corresponding card slot number is transmitted to perform updating operation.
8. An apparatus for differentiating between payment types for a SIM card of a functional machine, comprising:
the data structure creation module is used for creating a data structure for storing the payment type of the SIM card and setting up a flag bit corresponding to the card slot;
the marker bit obtaining module is used for obtaining the marker bit by using a preset method;
the NV interface creation module is used for storing the flag bit into a newly created NV data value based on the flag bit and creating an NV interface;
the global updating module is used for modifying APN parameters based on the flag bit and carrying out global updating to obtain a global updating result;
the card replacement judging module is used for judging whether the current SIM card has the card replacement operation if the functional machine is restarted;
and the zone bit reading module is used for directly obtaining the zone bit in the NV data value through the NV interface and judging the payment type of the SIM card if the card replacing operation is performed, and simultaneously obtaining the global updating result to perform networking operation.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, carries out the steps of the method of distinguishing between functional machine SIM card payment types according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of distinguishing between payment types of a functional machine SIM card according to any one of claims 1 to 7.
CN202311216776.2A 2023-09-19 2023-09-19 Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine Pending CN117255316A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311216776.2A CN117255316A (en) 2023-09-19 2023-09-19 Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311216776.2A CN117255316A (en) 2023-09-19 2023-09-19 Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine

Publications (1)

Publication Number Publication Date
CN117255316A true CN117255316A (en) 2023-12-19

Family

ID=89136300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311216776.2A Pending CN117255316A (en) 2023-09-19 2023-09-19 Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine

Country Status (1)

Country Link
CN (1) CN117255316A (en)

Similar Documents

Publication Publication Date Title
CN109151805B (en) eSIM card configuration method and system based on Internet of things
US8798581B2 (en) Terminal and method for binding SIM card
CN108932295A (en) Primary database method for handover control, device, computer equipment and storage medium
EP3023904B1 (en) Implicit File creation in APDU scripts
US20140335831A1 (en) Method of Controlling Access to a Cellular Network
CN109195157B (en) Application management method and device and terminal
CN104581689A (en) Terminal customized starting-up control method and device
CN110475229B (en) Method and device for accessing service data, computer equipment and storage medium
KR100921150B1 (en) Method of application management by using subscriber identification module card in mobile telephone
CN107295503A (en) Determine method, storage medium and the mobile terminal of mobile terminal access way
CN107666664B (en) Method, device, equipment and storage medium for machine-card binding
CN111526500A (en) Code number switching method and system
CN101815268A (en) Method and equipment for processing service command information
CN104363629A (en) System, method and identification card for accessing operator networks
CN117255316A (en) Method, device and equipment storage medium for distinguishing payment type of SIM card of functional machine
CN102272743A (en) Management method for information of universal integrated circuit card and device thereof
CN105578566A (en) Terminal network searching method and terminal
CN101379844A (en) Processing proprietary data transmitted over a radio communication network to a mobile terminal under the control of a smart card
CN104601823B (en) Intelligent terminal double-card dual-standby function decision method and system based on Android system
CN108401252A (en) Terminal standard acquisition methods and smart card
KR102371839B1 (en) Method for administering life cycles of communication profiles
CN111367476B (en) Data reading method and device of SIM card
CN110572285B (en) Device code writing method, device code writing device and readable storage medium
CN106507434A (en) A kind of data processing method and device
CN112188476A (en) Communication method, communication device, mobile terminal and storage medium

Legal Events

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