Operator switching method and device based on position information
Through multi-source data fusion and rule engine technology, intelligent operator switching of wireless communication terminals in cross-border areas is realized, solving the high management costs, inconvenient operation and communication interruption problems caused by manual SIM card replacement in existing technologies, and improving the accuracy of location information and equipment management efficiency.
Patent Information
- Application Number
- CN202510649191.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-09-23
AI Technical Summary
In the prior art, wireless communication terminals need to manually replace SIM cards when switching operator networks across borders, resulting in high management costs, inconvenient operation, easy communication interruption and high fees, and SIM cards are easily lost or damaged.
By collecting satellite positioning data, base station signaling data and IP address data, a multi-source location data set is generated, feature extraction and fusion processing are performed to generate structured status data, and the rule engine and business rules are used to make operator switching decisions and automatically complete operator switching.
It realizes intelligent operator switching of wireless communication terminals in cross-border areas, improves the accuracy and reliability of location information, reduces manual intervention, avoids communication interruption and management costs, and reduces the risk of equipment damage and loss.
Smart Images

Figure CN120692618A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network switching technology, and in particular to a method and device for operator switching based on location information. Background Art
[0002] With the rapid development of Internet of Things (IoT) and information technology, wireless communication terminals based on cellular networks have been widely used in various fields such as intelligent manufacturing, logistics and warehousing, agriculture, and industry. These terminal devices are not only used in different regions of China, but are also increasingly entering the international market.
[0003] Currently, wireless communication terminals commonly switch carrier networks between different countries and regions by pre-installing a SIM card from the carrier in the corresponding country, or by manually swapping SIM cards when using the device internationally. For example, for devices used internationally, such as international logistics positioning and monitoring terminals, users need to manually swap SIM cards based on the country in which the device is located to connect to the local carrier's network.
[0004] However, existing practices present numerous problems. First, manually replacing SIM cards is time-consuming and labor-intensive, requiring manual management of SIM cards from multiple operators and a large number of devices, increasing management costs and workload. Second, the SIM cards of some devices are integrated within the product, making replacement extremely inconvenient. Furthermore, manually replacing SIM cards can cause communication interruptions when switching networks, impacting the real-time nature of data transmission and incurring high roaming charges. Furthermore, manual management of SIM cards can easily lead to loss or damage of SIM cards. Therefore, how to achieve intelligent cross-border operator switching based on multi-source location awareness and a dynamic rule engine has become an urgent issue to be addressed.
[0005] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0006] The purpose of this application is to provide a method and device for operator switching based on location information, aiming to solve the technical problem of how to achieve intelligent switching of cross-border operators based on multi-source location perception and a dynamic rule engine.
[0007] To achieve the above objectives, the present application proposes a method for operator switching based on location information, the method comprising:
[0008] Generate a multi-source location data set based on satellite positioning data, base station signaling data and IP address data;
[0009] Performing feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level;
[0010] Writing the structured state data into the working memory of the rule engine, and sorting the business rules in the rule base of the rule engine to obtain a rule execution queue;
[0011] An operator switching instruction is generated according to the structured state data in the working memory and the business rules in the rule execution queue, and the operator switching is completed according to the operator switching instruction.
[0012] In one embodiment, the steps of generating an operator switching instruction based on the structured state data in the working memory and the business rules in the rule execution queue, and completing the operator switching according to the operator switching instruction include: matching the structured state data in the working memory with the rule condition expression in the business rules in the rule execution queue to obtain a matching result; when the matching result is a successful match, generating an operator switching instruction according to the business rules corresponding to the matching result; sending a hardware operation command to the multi-card control module according to the operator switching instruction to activate the target user identity module card and complete the operator switching.
[0013] In one embodiment, the step of matching the structured state data in the working memory with the rule condition expression in the business rules in the rule execution queue to obtain a matching result includes: traversing the business rules in the rule execution queue and parsing the variable identifier of the rule condition expression in the business rule; replacing the variable identifier with the structured state data in the working memory to obtain a target rule condition expression; performing arithmetic operations and Boolean logic operations on the target rule condition expression to obtain a condition determination result; when the condition determination result is true, the matching result is a successful match; when the condition determination result is false, the matching result is a failed match.
[0014] In one embodiment, when the matching result is a successful match, the step of generating an operator switching instruction according to the business rule corresponding to the matching result includes: parsing a switching action expression in the business rule corresponding to the matching result to obtain an action function identifier and a target subscriber identity module card number, wherein the action function identifier corresponds to a hardware operation type; querying a hardware driver mapping table according to the action function identifier to obtain a network access point name and an authentication key associated with the hardware operation type; and encapsulating the target subscriber identity module card number, the network access point name, and the authentication key into an instruction format executable by a multi-card control module to obtain an operator switching instruction.
[0015] In one embodiment, the step of sending a hardware operation command to the multi-card control module according to the operator switching instruction to activate the target user identity module card and complete the operator switching includes: converting the number of the target user identity module card in the operator switching instruction into a logical channel index code recognizable by the multi-card control module according to a preset card number-logical channel index mapping table; generating a hardware reset pulse signal and a power supply circuit activation signal according to the logical channel index code, and initializing the communication protocol stack of the target user identity module card according to the hardware reset pulse signal and the power supply circuit activation signal; sending an attachment request message to the home network of the target user identity module card through the communication protocol stack, so that the home network feeds back user subscription data, and receives the user subscription data to complete the operator switching.
[0016] In one embodiment, the step of generating a hardware reset pulse signal and a power circuit activation signal according to the logical channel index code, and initializing the communication protocol stack of the target subscriber identity module card according to the hardware reset pulse signal and the power circuit activation signal includes: generating a hardware reset pulse signal according to the logical channel index code, and generating a first control command according to timing parameters of the hardware reset pulse signal; sending the first control command to the multi-card control module to disconnect the physical connection or logical channel connection of the current subscriber identity module card; when the physical connection or logical channel connection is disconnected, generating a power circuit activation signal according to the logical channel index code, and generating a second control command according to voltage parameters and power-on timing of the power circuit activation signal; sending the second control command to the multi-card control module to start power supply to the target subscriber identity module card; when the power supply is started, loading operator network configuration parameters bound to the target subscriber identity module card, and generating a third control command according to an access point name, an authentication key, and a public land mobile network identifier in the operator network configuration parameters; and sending the third control command to the multi-card control module to initialize the communication protocol stack of the target subscriber identity module card.
[0017] In one embodiment, the multi-source location data set includes satellite positioning data, base station signaling data and IP address data; the step of performing feature extraction and fusion processing on the multi-source location data set to obtain structured status data containing a country code, an area code and a network service level includes: converting the latitude and longitude coordinates in the satellite positioning data into a country code and an area code through a geocoding service interface; querying the operator service level mapping table according to the mobile country code and mobile network code in the base station signaling data to obtain the network service level; reverse parsing the IP address data to obtain network access location level information; and structurally encapsulating the country code, the area code, the network service level and the network access location level information according to a preset field format to obtain structured status data.
[0018] In one embodiment, the steps of writing the structured state data into the working memory of the rule engine and sorting the business rules in the rule base of the rule engine to obtain a rule execution queue include: writing the structured state data into the working memory of the rule engine; when the writing is completed, loading the priority field of each business rule in the rule base of the rule engine, the smaller the value of the priority field, the higher the priority; and sorting the business rules in ascending order according to the priority field to obtain a rule execution queue.
[0019] In one embodiment, the step of generating a multi-source location data set based on satellite positioning data, base station signaling data and IP address data includes: obtaining satellite positioning data captured by a global navigation satellite system receiver; monitoring base station signaling data in a cellular network cell broadcast channel; obtaining IP address data of the current network connection through an IP protocol stack interface; and aligning the satellite positioning data, the base station signaling data and the IP address data according to timestamps to generate a multi-source location data set.
[0020] In addition, to achieve the above-mentioned purpose, the present application also proposes an operator switching device based on location information, the device comprising:
[0021] Multi-source data acquisition module, used to generate a multi-source location data set based on satellite positioning data, base station signaling data and IP address data;
[0022] A multi-source data fusion module is used to perform feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level;
[0023] A rule engine management module is used to write the structured state data into the working memory of the rule engine and sort the business rules in the rule base of the rule engine to obtain a rule execution queue;
[0024] The switching execution module is configured to generate an operator switching instruction according to the structured state data in the working memory and the business rules in the rule execution queue, and complete the operator switching according to the operator switching instruction.
[0025] In addition, to achieve the above-mentioned purpose, the present application also proposes an operator switching device based on location information, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the operator switching method based on location information as described above.
[0026] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the operator switching method based on location information as described above are implemented.
[0027] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the operator switching method based on location information as described above.
[0028] One or more technical solutions proposed in this application have at least the following technical effects:
[0029] First, a cellular network communication terminal collects satellite positioning data, base station signaling data, and IP address data to generate a multi-source location data set. This process improves the accuracy and reliability of location information by integrating multiple data sources. Even if one data source is unavailable or inaccurate, other sources can be used as a supplement. Next, the terminal extracts and fuses features from this multi-source location data set to generate structured state data containing country code, area code, and network service level. This standardized data facilitates subsequent processing and analysis. This structured state data is then written into the rule engine's working memory. The business rules in the rule base are prioritized and a rule execution queue is generated. This ensures the rule engine has real-time access to the latest data and processes rules in a predefined order, avoiding conflicts and confusion. Finally, the rule engine generates a carrier switching instruction based on the data in the working memory and the business rules in the rule execution queue. The terminal then completes the carrier switch. This entire process enables intelligent cross-border carrier switching based on multi-source location awareness and a dynamic rule engine. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 A flowchart of the first embodiment of the method for switching operators based on location information provided in this application;
[0033] Figure 2 A schematic diagram of a multi-source location information acquisition process provided in the first embodiment of the method for operator switching based on location information of this application;
[0034] Figure 3 A flowchart of the second embodiment of the method for switching operators based on location information provided in this application;
[0035] Figure 4 A schematic diagram of the rule engine reasoning process provided in Example 2 of the operator switching method based on location information of this application;
[0036] Figure 5 This is a schematic diagram of the module structure of the operator switching device based on location information according to an embodiment of the present application;
[0037] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the operator switching method based on location information in an embodiment of the present application.
[0038] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0039] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0040] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0041] With the development of the Internet of Things and information technology, cellular network wireless communication terminals are widely used in various fields. Currently, switching between carrier networks often requires pre-installing or manually replacing SIM cards. However, this method is time-consuming and labor-intensive, complex to manage, inconvenient to replace, and has high latency. It can easily lead to communication interruptions, increase costs, and easily cause SIM card loss or damage.
[0042] The main solution of the embodiment of the present application is to generate a multi-source location data set by collecting satellite positioning data, base station signaling data, and IP address data, integrating multiple data sources to improve the accuracy of location information. Subsequently, feature extraction and fusion processing are performed on this data to obtain structured state data containing country code, area code, and network service level, which is convenient for subsequent processing. Next, the structured state data is written into the working memory of the rule engine, and the business rules are sorted by priority to generate a rule execution queue to ensure that the rules are executed in a predefined order. Finally, an operator switching instruction is generated based on the structured state data and business rules, and the switching is completed.
[0043] It should be noted that the execution subject of the embodiments of the present application may be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of implementing the above functions, a cellular network communication terminal, etc. The following uses a cellular network communication terminal as an example to illustrate this embodiment and the following embodiments.
[0044] Based on this, the embodiment of the present application provides an operator switching method based on location information, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the operator switching method based on location information of this application.
[0045] In this embodiment, the operator switching method based on location information includes steps S10 to S40:
[0046] Step S10: Generate a multi-source location data set based on satellite positioning data, base station signaling data and IP address data.
[0047] It should be noted that satellite positioning data refers to the precise location information of the terminal device obtained through a satellite positioning system (such as GPS), such as latitude and longitude coordinates.
[0048] Base station signaling data refers to the signaling information generated when a terminal device communicates with a base station through a cellular network.
[0049] IP address data refers to the location information of a terminal device derived from its IP address in combination with the IP positioning database.
[0050] A multi-source location data set refers to a comprehensive data set formed by integrating multiple location-aware data such as satellite positioning data, base station signaling data, and IP address data.
[0051] It can be understood that, first, the cellular network communication terminal obtains satellite positioning data from its built-in satellite positioning module. This data can provide the terminal's precise latitude and longitude coordinates; secondly, the terminal collects base station signaling data through communication with nearby base stations. This data reflects the connection status and signal strength between the terminal and the base station, and is used to estimate the approximate position of the terminal within the coverage area of the base station; then, the terminal obtains the IP address data when it connects to the network. The IP address can reflect the geographical location information of the terminal accessing the network; finally, the terminal integrates these three data to generate a multi-source location data set containing satellite positioning coordinates, base station location range and IP address location information. In this way, the terminal's location can be determined more comprehensively, and the accuracy and reliability of positioning can be improved, because different data sources can verify and complement each other, reducing the errors that may be caused by a single data source.
[0052] As an example, the step of generating a multi-source location data set based on satellite positioning data, base station signaling data and IP address data includes: obtaining satellite positioning data captured by a global navigation satellite system receiver; monitoring base station signaling data in a cellular network cell broadcast channel; obtaining IP address data of the current network connection through an IP protocol stack interface; and aligning the satellite positioning data, the base station signaling data and the IP address data according to timestamps to generate a multi-source location data set.
[0053] Cell broadcast channels in cellular networks are communication channels used to broadcast public information to terminal devices. In mobile communication systems, each base station (or cell) uses broadcast channels to send public information to all terminal devices within its coverage area. This information includes base station identification information (such as MCC, MNC, LAC, CID, etc.), system information, and paging information. By monitoring these broadcast channels, terminal devices can obtain information about the currently connected base station and thus determine their location.
[0054] The IP protocol stack interface refers to the interface provided by the operating system for accessing and managing the IP protocol stack. The IP protocol stack is a software module used to process the IP protocol and related protocols (such as TCP, UDP, etc.) in network communications. It is responsible for handling data packet transmission at the network layer.
[0055] First, the cellular network communication terminal activates its built-in Global Navigation Satellite System (GNSS) receiver, receives and analyzes satellite signals to obtain satellite positioning data, and stores this data and its acquired timestamp in a local cache, providing a reliable data foundation for location awareness. Secondly, the terminal device, through its cellular network module, continuously monitors the broadcast channel of the currently connected cellular network cell, extracts base station signaling data from it, records the timestamp of this data, and stores the base station signaling data and its timestamp. This step is intended to leverage the cellular network infrastructure to obtain location information, especially providing backup location data when satellite signals are unavailable or weak. The terminal device then calls the IP protocol stack interface provided by the operating system to query and obtain the IP address data assigned to the current network connection, simultaneously recording the timestamp of this data and storing the IP address data and its timestamp. By combining the IP address with the IP positioning database, approximate geographic location information can be obtained as an auxiliary means of location awareness. Finally, the terminal device aligns the stored satellite positioning data, base station signaling data, and IP address data by timestamp to ensure the temporal consistency of these data. This data is then integrated to generate a multi-source location data set. By integrating multiple data sources, the accuracy and reliability of location perception can be improved, thereby better supporting intelligent decision-making for operator switching.
[0056] Step S20 , performing feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level.
[0057] It should be noted that the country code refers to the code used to uniquely identify a country, which is usually defined by the International Organization for Standardization or other relevant international organizations.
[0058] An area code is a code used to identify a specific region within a country, such as a province or city. For example, the device's province and city can be determined using the base station's LAC and CID, or more detailed area information can be obtained by combining GPS positioning results with geocoding services.
[0059] Network service level refers to a quantitative assessment of network service quality, typically including indicators such as signal strength, data transmission rate, and network latency. For example, a network with high signal strength, fast data transmission rate, and low network latency would be rated as a high-level network service, while a network with weak signal, slow transmission rate, and high latency would be rated as a low-level network service.
[0060] Structured state data refers to data that is extracted and organized from a multi-source location data set and presented in a standardized and easy-to-process format.
[0061] It can be understood that, first, the satellite positioning data, base station signaling data and IP address data in the multi-source location data set are parsed to extract information related to the country code, area code and network service level, such as extracting the MCC from the base station signaling data to determine the country code, obtaining the area code from the GPS positioning data combined with the geocoding service, and obtaining indicators such as signal strength and data transmission rate from the network status monitoring module to evaluate the network service level. Secondly, these extracted feature information are integrated according to the preset data format to eliminate redundancy and conflict between the data, ensure data consistency and accuracy, and form a standardized structured status data format. Multi-source location feature fusion formula:
[0062]
[0063] Among them, Source i It refers to the original input value (such as country code, MCC / MNC, ASN) of the i-th type of location data source (such as satellite positioning, base station signaling, IP positioning); w i Refers to the data source weight, which is determined by the preset priority rules (for example, the satellite positioning weight w GPS =0.6, base station w Cell =0.3, IP location w IP =0.1); FinalState refers to the final structured state data after arbitration (such as country code CN, network rate level Premium).
[0064] As an example, the multi-source location data set includes satellite positioning data, base station signaling data and IP address data; the step of performing feature extraction and fusion processing on the multi-source location data set to obtain structured status data containing a country code, an area code and a network service level includes: converting the latitude and longitude coordinates in the satellite positioning data into a country code and an area code through a geocoding service interface; querying the operator service level mapping table according to the mobile country code and mobile network code in the base station signaling data to obtain the network service level; reverse parsing the IP address data to obtain network access location level information; and structurally encapsulating the country code, the area code, the network service level and the network access location level information according to a preset field format to obtain structured status data.
[0065] The geocoding service interface is a network service interface that allows terminal devices to convert geographic coordinates (such as longitude and latitude) into specific geographic location information, such as country, province, city, etc., such as the Amap API.
[0066] The Mobile Country Code (MCC) is a three-digit code used to uniquely identify the mobile communication network of a country or region. For example, the MCC for China is 460.
[0067] The Mobile Network Code (MNC) is a two- or three-digit code used to uniquely identify a specific mobile network operator within a country or region. In this embodiment, the MNC field in the base station signaling data is used in conjunction with the MCC to determine the specific operator of the base station to which the terminal device is currently connected.
[0068] The carrier service level mapping table is a pre-defined table used to map the MCC and MNC in base station signaling data to specific network service levels. This mapping table typically includes comprehensive evaluation results of indicators such as signal strength, data rate, and network latency to reflect the quality and availability of different carrier networks.
[0069] Network access location hierarchical information refers to the detailed information of the network access location obtained through reverse resolution of the IP address, usually including hierarchical information such as country, province, and city.
[0070] The preset field format refers to a standardized data structure used to structure and encapsulate the extracted feature information, such as a vector.
[0071] First, the cellular network communication terminal sends its current latitude and longitude coordinates to the geocoding service provider via the geocoding service interface, receiving the returned country code and area code, providing accurate geographic location information for subsequent carrier switching. Second, the terminal parses the MCC and MNC in the base station signaling data and then searches the locally stored carrier service level mapping table for the corresponding network service level. This allows for rapid assessment of the current network's service quality, providing a basis for optimal network selection. The terminal then uses the IP protocol stack interface to obtain the IP address of the current network connection and performs reverse resolution against the IP location database. Specifically, the terminal uses the IP address as input and queries the IP location database to obtain the geographic location information associated with the IP address. This process provides the device with additional location information, particularly useful when satellite positioning and base station signaling data are insufficient. Finally, the terminal encapsulates the obtained country code, area code, network service level, and network access location hierarchy information according to a pre-defined field format to form structured status data, providing accurate and comprehensive information support for subsequent carrier switching decisions.
[0072] Step S30: writing the structured state data into the working memory of the rule engine, and sorting the business rules in the rule base of the rule engine to obtain a rule execution queue.
[0073] It should be noted that the rule engine is a rule-based reasoning system used to reason about data and make decisions based on predefined business rules. In this embodiment, the rule engine is one of the core components of the cellular network communication terminal. It consists of a rule base, a reasoning engine, and a working memory. The rule engine parses and matches business rules in the rule base and triggers corresponding actions based on the data in the working memory, thereby implementing business logic such as carrier switching. It supports "forward reasoning" or "backward reasoning" algorithms, capable of flexibly handling complex business rules and data matching logic.
[0074] Working memory is a component of the rule engine that temporarily stores current state data and intermediate results. The data in working memory is dynamically updated, ensuring that the rule engine can reason based on the latest state information.
[0075] The rule base, another component of the rule engine, stores predefined business rules. Rules in the rule base can be updated, synchronized, deleted, or added based on user configuration, allowing for flexible adaptation to different business needs.
[0076] Business rules are specific rules in the rule base, consisting of conditions and actions, defining which actions are triggered under what conditions. For example, a business rule might be defined as "When the country code is 460, switch to SIM card 1." The structure of a business rule typically includes a rule name, a salience, a conditional expression, and an action identifier. The conditional expression is used to match data in the working memory, while the action identifier defines the specific operation to be performed when the condition is met. The business rule structure format is as follows:
[0077]
[0078]
[0079] For example:
[0080]
[0081] The rule begins with the rule keyword, followed by the rule name in double quotes, separated by spaces. The salience keyword indicates the execution priority of the rule and begins with four spaces. The priority value range is 1-255, and the lower the value, the higher the priority, separated by spaces. The when keyword begins with four spaces, followed by the conditional expression, separated by spaces. When the conditional expression is true, the action after then is executed. The conditional expression consists of variables, constants, and operators such as arithmetic operators, relational operators, and logical operators. The operator priority should be followed and string comparison operations can be supported. The then keyword begins with four spaces, followed by the action expression, separated by spaces. The action expression consists of an action identifier (before the brackets) and action parameters (inside the brackets). The inference engine has a corresponding inference method that matches the action identifier. Variables are stored in the working memory and are referenced using the "$" symbol + variable name. Constants can be strings or numbers, and strings are enclosed in double quotes. The end keyword ends.
[0082] The rule execution queue is an ordered queue generated by the rule engine when executing rules, which is used to determine the execution order of the rules.
[0083] Please refer to Figure 2 , Figure 2 The schematic diagram of the multi-source location information acquisition process provided in the first embodiment of the operator switching method based on location information of this application is as follows: first, the terminal obtains a mutex lock to ensure the thread safety of the location information acquisition process, and then clears the location-related data in the working memory to avoid data confusion. Next, the terminal attempts to obtain GPS positioning information, base station positioning information, and IP positioning information in sequence. If the GPS positioning information is successfully obtained, the information is parsed and stored in the working memory; if the GPS information acquisition fails, the terminal attempts to obtain the base station positioning information, and after success, the information is also parsed and stored; if the base station positioning information acquisition also fails, the IP positioning information is obtained and parsed and stored. After successfully parsing and storing any positioning information, the terminal releases the mutex lock and delays for 10 seconds to wait for possible location information updates. After that, the process ends, providing accurate location information support for subsequent operator switching decisions.
[0084] As an example, the steps of writing the structured state data into the working memory of the rule engine and sorting the business rules in the rule base of the rule engine to obtain a rule execution queue include: writing the structured state data into the working memory of the rule engine; when the writing is completed, loading the priority field of each business rule in the rule base of the rule engine, the smaller the value of the priority field, the higher the priority; and sorting the business rules in ascending order according to the priority field to obtain a rule execution queue.
[0085] The priority field refers to the attribute field in each business rule in the rule base of the rule engine that is used to identify the priority of the rule. It is expressed in numerical form. The smaller the numerical value, the higher the priority of the rule.
[0086] First, each field value of the structured state data is written one by one to the corresponding location in the working memory of the rule engine so that the state data can be directly read during subsequent rule inference. Secondly, after the data is written, the priority field value of each business rule is read from the rule library. All business rules are sorted in ascending order according to the value of the priority field, that is, the rules with higher priority are placed in front and the rules with lower priority are placed in the back, thus generating an ordered rule execution queue. This is done so that during the rule inference process, the rules can be processed sequentially according to the predefined priority order, ensuring the correctness of the logic and the accuracy of the decision.
[0087] Step S40: Generate an operator switching instruction according to the structured state data in the working memory and the business rules in the rule execution queue, and complete the operator switching according to the operator switching instruction.
[0088] It should be noted that the operator switching instruction refers to a specific operation instruction generated based on the reasoning results of the rule engine, which is used to instruct the terminal device to switch from the current operator network to another operator network, and contains the target operator information (such as SIM card number, network parameters, etc.).
[0089] It can be understood that, first, the cellular network communication terminal reads the written structured state data from the working memory of the rule engine to determine whether the current network environment requires switching operators. Secondly, the terminal matches the read structured state data with the business rules in the queue in the order of the rule execution queue. Once a business rule that meets the conditions is matched, the terminal generates an operator switching instruction based on the action identifier and parameters of the rule and performs specific switching operations, such as switching SIM cards and reconnecting to the network, thereby completing the operator switch and ensuring that the device can operate in the optimal network environment.
[0090] This embodiment provides a method for operator switching based on location information. First, a cellular network communication terminal collects satellite positioning data, base station signaling data, and IP address data to generate a multi-source location data set. This process improves the accuracy and reliability of location information by integrating multiple data sources. Even if one data source is unavailable or inaccurate, other data sources can be used as a supplement. Next, the terminal extracts and fuses features from the multi-source location data set to obtain structured state data containing the country code, area code, and network service level. This data standardization facilitates subsequent processing and analysis. The structured state data is then written into the working memory of the rule engine. The business rules in the rule base are prioritized and a rule execution queue is generated. This ensures that the rule engine has real-time access to the latest data and processes rules in a predefined order, avoiding conflicts and confusion. Finally, the rule engine generates an operator switching instruction based on the data in the working memory and the business rules in the rule execution queue. The terminal device then completes the operator switch accordingly. This entire process enables intelligent cross-border operator switching based on multi-source location awareness and a dynamic rule engine.
[0091] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 , Figure 3 This is a flow chart of the second embodiment of the operator switching method based on location information of the present application. Step S40 of the operator switching method based on location information includes steps S41 to S43:
[0092] Step S41 : Match the structured state data in the working memory with the rule condition expressions in the business rules in the rule execution queue to obtain a matching result.
[0093] It's important to note that a rule conditional expression refers to the conditional portion defined within a rule engine's business rules, specifying the circumstances under which corresponding actions are triggered. It consists of variables, constants, and logical operators (such as &&, ||, ==, and !=), and is used to conditionally evaluate data in the working memory. For example, a rule conditional expression might be ($country == "China" &&$network service level == "High"), indicating that the rule condition is met when the country is "China" and the network service level is "High."
[0094] The matching result is the result obtained by the rule engine after comparing the structured state data in the working memory with the rule condition expression.
[0095] As an example, the step of matching the structured state data in the working memory with the rule condition expression in the business rules in the rule execution queue to obtain a matching result includes: traversing the business rules in the rule execution queue and parsing the variable identifier of the rule condition expression in the business rule; replacing the variable identifier with the structured state data in the working memory to obtain a target rule condition expression; performing arithmetic operations and Boolean logic operations on the target rule condition expression to obtain a condition judgment result; when the condition judgment result is true, the matching result is a successful match; when the condition judgment result is false, the matching result is a failed match.
[0096] Variable identifiers are placeholders used in rule conditional expressions to reference data in the working memory. They typically begin with a specific symbol followed by the variable name. For example, `$country` and `$network service level` represent actual values that need to be retrieved from the working memory in rule conditional expressions.
[0097] The target rule condition expression is the expression obtained by replacing the variable identifiers in the rule condition expression with the actual structured state data in the working memory. For example, if the original rule condition expression is `($country == "China" && $network service level == "High")`, and the structured state data in the working memory is `country = "China"` and `network service level = "High"`, the replaced target rule condition expression becomes `("China" == "China" && "High" == "High")`. This expression can be directly subjected to arithmetic and Boolean logic operations to determine its true or false value.
[0098] The conditional judgment result refers to the result obtained after performing arithmetic operations and Boolean logic operations on the target rule condition expression, which is usually a Boolean value (true or false).
[0099] Rule engine condition matching formula:
[0100]
[0101] Among them, Fact k refers to the factual parameters in the working memory (such as country code = US, signal strength = -85dBm); θ k Refers to logical operators (such as >, ==, ∈) used to compare facts with thresholds; Threshold k Refers to the rule condition threshold (such as rate level ≤ 3, signal strength ≥ -90dBm); RuleMatch refers to the rule matching result (True or False).
[0102] First, the cellular network communication terminal starts the rule engine, reads each business rule in sequence according to the rule execution queue, parses the variable identifiers in the rule condition expression, and determines which data needs to be obtained from the working memory. Secondly, the terminal accesses the working memory, searches for the structured state data corresponding to the variable identifier, and replaces these data values one by one to the corresponding positions in the rule condition expression, constructing a complete target rule condition expression to ensure that the expression can be directly logically judged. Then, the terminal performs arithmetic operations and Boolean logic operations on the target rule condition expression, calculates the condition judgment result, and determines whether the expression is true or false. Finally, based on the condition judgment result, if it is true, it is determined that the business rule matches the current state data successfully; if it is false, it is determined that the match fails. This process ensures that the terminal can accurately make decisions based on the preset rules.
[0103] Step S42: When the matching result is successful, an operator switching instruction is generated according to the business rule corresponding to the matching result.
[0104] As an example, when the matching result is a successful match, the step of generating an operator switching instruction according to the business rule corresponding to the matching result includes: parsing the switching action expression in the business rule corresponding to the matching result to obtain an action function identifier and a target user identity module card number, wherein the action function identifier corresponds to a hardware operation type; querying a hardware driver mapping table according to the action function identifier to obtain a network access point name and an authentication key associated with the hardware operation type; and encapsulating the target user identity module card number, the network access point name, and the authentication key into an instruction format executable by a multi-card control module to obtain an operator switching instruction.
[0105] The switch action expression refers to the specific action description defined in the business rule, which indicates the operation to be performed when the rule conditions are met. For example, switch_card(2) means switching to SIM card number 2.
[0106] The action function identifier is a key component of a switch action expression, used to identify the specific hardware operation type. For example, the switch_card identifier represents the SIM card switch operation. It is a string used to call the corresponding hardware operation function in the rule engine.
[0107] The target subscriber identity module card refers to the target SIM card specified in the switching action. Each SIM card has a unique number, such as SIM card 1 and SIM card 2.
[0108] Hardware operation type refers to a specific hardware operation action, such as switching SIM cards, connecting to a network, etc.
[0109] The hardware driver mapping table is a preset data table used to map action function identifiers to specific hardware operation parameters. By querying the mapping table, the terminal device can obtain the specific parameters required to perform the hardware operation.
[0110] The network access point name (APN) refers to the access point name used to connect to a specific network. It is used to specify the network access point that the terminal device needs to connect to after switching to the target SIM card. It is a string, usually provided by the operator, used to identify and connect to the correct network.
[0111] The authentication key is used to verify the identity of the terminal device and is used for authentication when connecting to the network after switching to the target SIM card. It is a security credential that ensures that the terminal device can legally connect to the designated network.
[0112] The multi-SIM control module is a hardware or software module within a cellular network communication terminal that manages and controls the operation of multiple SIM cards. In this embodiment, the multi-SIM control module is responsible for executing operator switching instructions, including switching SIM cards and connecting to the network. It receives and interprets operator switching instructions and executes the corresponding hardware operations.
[0113] First, the terminal's rule engine performs a grammatical analysis on the switching action expression in the successfully matched business rule, identifies and extracts the action function identifier and the target SIM card number, and specifies the specific hardware operation type to be performed and the target object of the operation. Secondly, using the extracted action function identifier as an index, the corresponding record is searched in the preset hardware driver mapping table to obtain the network access point name and authentication key associated with the hardware operation type. This step is to obtain the network connection parameters and security authentication information required to perform the hardware operation. Finally, the target SIM card number, the queried APN and the authentication key are encapsulated in accordance with the instruction format specified by the multi-card control module to generate a complete operator switching instruction. This is done to ensure that the multi-card control module can correctly understand and execute the instruction, thereby completing the operator switching operation. For example, the current SIM card is SIM card 1, the target SIM card is SIM card 2, the country code is 460 (China), the network service level is high, and the successfully matched business rule is rule "switch abroad" when ($country == "China" && $network service level == "high") then switch_card(2) end. Assuming that the instruction format of the multi-card control module is JSON format, the generated operator switching instruction is as follows:
[0114] {
[0115] "action":"switch_card",
[0116] "sim_card_id":2,
[0117] "apn":"internet.example.com",
[0118] "auth_key":"auth_key_12345"
[0119] }, where action: specifies the action to be performed, here switch_card, indicating switching SIM cards; sim_card_id: the ID of the target SIM card, here 2, indicating switching to SIM card 2; apn: the network access point name, here internet.example.com, used to connect to the target operator's network; auth_key: the authentication key, here auth_key_12345, used for identity authentication when connecting to the network.
[0120] Please refer to Figure 4 , Figure 4 The rule engine reasoning process diagram provided for the second embodiment of the location information-based operator switching method of this application shows the working mechanism of the rule engine. First, the rule base is read and sorted from high to low according to the rule priority. N is initialized to 1, indicating the sequence number of the rule currently being processed, with a total of M rules. Next, the engine parses the Nth rule and acquires a mutex lock to ensure the consistency and integrity of the variable data required by the conditional expression in the working memory. The reasoning engine then determines whether the rule condition expression is true. If true, it selects the corresponding reasoning method based on the action identifier in the rule expression, and brings the action parameters into the method to execute the corresponding action. After completing the reasoning of a rule, the mutex lock is released (if the conditional expression is false, no action is executed and the mutex lock is directly released). The process increments the value of N and checks whether all rules have been processed (that is, whether N is equal to M). If not, it continues to process the next rule. If completed, it delays for 60 seconds and restarts, forming a loop to continuously monitor and respond to state changes to achieve automated operator switching decisions.
[0121] Step S43: Sending a hardware operation command to the multi-card control module according to the operator switching instruction to activate the target subscriber identity module card to complete the operator switching.
[0122] It should be noted that the hardware operation command refers to a specific instruction generated according to the operator switching instruction, which is used to instruct the multi-card control module to perform actual hardware operation, and may be a specific control signal or command sequence.
[0123] As an example, the step of sending a hardware operation command to the multi-card control module according to the operator switching instruction to activate the target user identity module card and complete the operator switching includes: converting the number of the target user identity module card in the operator switching instruction into a logical channel index code recognizable by the multi-card control module according to a preset card number-logical channel index mapping table; generating a hardware reset pulse signal and a power supply circuit activation signal according to the logical channel index code, and initializing the communication protocol stack of the target user identity module card according to the hardware reset pulse signal and the power supply circuit activation signal; sending an attachment request message to the home network of the target user identity module card through the communication protocol stack, so that the home network can feedback the user contract data, and receive the user contract data to complete the operator switching.
[0124] The preset card number-logical channel index mapping table is a data table used to map the user identity module (USIM) card number to the logical channel index code recognizable by the multi-card control module. This mapping table ensures that the terminal device can correctly identify and operate the target USIM card, regardless of whether it is a physical SIM card or an eSIM (embedded SIM card).
[0125] The logical channel index code is used by the multi-card control module to identify a specific USIM card logical channel. It is an internal identifier that indicates which USIM card logical channel the multi-card control module is operating. For example, logical channel 1 might correspond to the code "0x01" and logical channel 2 to the code "0x02".
[0126] The hardware reset pulse signal is an electrical signal used to perform a hardware reset on the target Subscriber Identity Module (SIM). This signal is typically a short low-level pulse that initializes the USIM card's hardware state to a known starting state, ensuring proper functioning of the card.
[0127] The power circuit activation signal is an electrical signal used to activate the power circuit of the target Subscriber Identity Module (USIM). This signal ensures that the USIM card receives sufficient power to function properly. Typically, this signal turns on the power switch, providing a stable power supply to the USIM card.
[0128] The communication protocol stack refers to the series of protocols and software modules used for communication between the terminal device and the SIM card or eSIM card. It includes the physical layer, data link layer, network layer, etc., and is used to handle communication with the SIM card or eSIM card, including sending and receiving data, managing connections, etc. The communication protocol stack initialization parameter mapping formula is:
[0129]
[0130] Among them, SIMprofile Refers to the target SIM card or eSIM subscription information (such as IMSI, Ki key, APN); Policy local It refers to the network configuration template in the local policy library (such as frequency band priority, PLMN list); ⊕ refers to the parameter merging operator (overwriting conflicting fields and retaining non-conflicting fields); Φ refers to the baseband protocol stack interface function, which writes the merged configuration to the hardware driver.
[0131] The home network refers to the operator network to which the USIM card belongs. Each USIM card is registered on a specific operator network, which is responsible for managing the user data and communication services of the USIM card.
[0132] An Attach Request message is a network protocol message sent by a terminal device through the communication protocol stack to the target USIM card's home network. This message requests the network to allow the terminal device to connect to the network and obtain the necessary network services. This message typically contains the terminal device's identity information and the requested service type.
[0133] User contract data refers to user-related information fed back to the terminal device by the home network. This information usually includes the user's network permissions, service packages, billing information, etc. This data is used to verify the user's identity and ensure that the terminal device can use network services according to the user's contract information.
[0134] First, the cellular network communication terminal maps the target USIM card number specified in the operator switching instruction to a logical channel index code by querying a preset card number-logical channel index mapping table. This code is an internal identifier recognized by the multi-card control module and is used to specify the specific USIM card to be operated. Second, the terminal generates a hardware reset pulse signal based on the obtained logical channel index code. This typically involves generating a brief level change, such as pulling a signal line low for a period of time and then restoring it, to reset the USIM card state. It also generates a power circuit activation signal, which may involve adjusting the power management circuit to ensure that the USIM card receives appropriate voltage and current. The generation of these signals is precisely controlled according to the hardware design and USIM card specifications to initialize the communication protocol stack of the target USIM card and prepare for network connection establishment. Finally, the terminal, using the initialized communication protocol stack, sends an attach request message to the target USIM card's home network, requesting network connection and related services. The home network responds and returns user subscription data. After receiving this data, the terminal uses this information to complete the operator switch, enabling the device to communicate using the new operator's network.
[0135] As an example, the steps of generating a hardware reset pulse signal and a power circuit activation signal according to the logical channel index code, and initializing the communication protocol stack of the target subscriber identity module card according to the hardware reset pulse signal and the power circuit activation signal include: generating a hardware reset pulse signal according to the logical channel index code, and generating a first control command according to timing parameters of the hardware reset pulse signal; sending the first control command to the multi-card control module to disconnect the physical connection or logical channel connection of the current subscriber identity module card; when the physical connection or logical channel connection is disconnected, generating a power circuit activation signal according to the logical channel index code, and generating a second control command according to voltage parameters and power-on timing of the power circuit activation signal; sending the second control command to the multi-card control module to start power supply to the target subscriber identity module card; when the power supply is started, loading operator network configuration parameters bound to the target subscriber identity module card, and generating a third control command according to the access point name, authentication key, and public land mobile network identifier in the operator network configuration parameters; and sending the third control command to the multi-card control module to initialize the communication protocol stack of the target subscriber identity module card.
[0136] Timing parameters are the specific values used to define the timing characteristics of the hardware reset pulse signal, such as pulse duration, interval, and period. These parameters ensure that the reset signal follows a specific timing pattern to meet the hardware reset requirements of the USIM card.
[0137] The first control command is generated based on the timing parameters of the hardware reset pulse signal and is used to instruct the multi-card control module to perform a specific hardware operation. This command typically contains a reset instruction code and timing parameter values, and is used to disconnect the current USIM card's physical connection or logical channel connection.
[0138] The physical connection refers to the actual physical electrical connection between the USIM card and the multi-card control module. This includes the contact points between the USIM card and the card slot and the associated communication lines. Disconnecting the physical connection ensures that the current USIM card does not interfere with the operation of the new card when switching to the target USIM card.
[0139] Logical channel connection refers to the communication connection between the logical instance of the USIM card and the multi-card control module in the case of non-physical cards such as eSIM. This connection is configured and managed by software and is used to switch between multiple logical USIM card instances.
[0140] Voltage parameters refer to the voltage characteristics of the power supply circuit activation signal, including the size and stability of the power supply voltage. These parameters ensure that the target USIM card can obtain a stable power supply and thus work normally.
[0141] The power-on sequence refers to the time sequence of activation signals for the power supply circuit, including the power supply startup time and stabilization time. These parameters ensure that the power supply starts in the correct order and time interval to avoid power surges and instability.
[0142] The second control command is an instruction generated based on the voltage parameters and power-on timing of the power supply circuit activation signal, which is used to control the multi-card control module to start the power supply of the target user identity module card. This command usually contains the power supply instruction code, voltage value and timing information to ensure that the multi-card control module can correctly power the USIM card.
[0143] Operator network configuration parameters refer to the network connection parameters bound to the target Subscriber Identity Module card, including the Access Point Name (APN), authentication key, Public Land Mobile Network Identity (PLMN), etc. These parameters are used to configure the network connection of the USIM card to ensure that it can correctly connect to the home network.
[0144] The Public Land Mobile Network Identifier is a code used to uniquely identify a mobile network. It is usually composed of a Mobile Country Code (MCC) and a Mobile Network Code (MNC). The PLMN is used to determine the operator's network to which the USIM card belongs, ensuring that the USIM card can connect to the correct network.
[0145] The third control command is an instruction generated based on the access point name, authentication key and public land mobile network identifier in the operator network configuration parameters, and is used to initialize the communication protocol stack of the target user identity module card. This command ensures that the USIM card can correctly configure the network connection parameters so that it can communicate with the home network.
[0146] First, the cellular network communication terminal determines the target USIM card to be operated based on the logical channel index code and generates a hardware reset pulse signal. This signal is output through a specific pin of the control module. Timing parameters such as pulse width and interval are precisely set to meet the reset requirements of the USIM card. Then, these timing parameters are used to generate a first control command. This command is constructed in a specific encoding format (which may include a reset instruction code and timing parameter values) to instruct the multi-card control module to disconnect the physical connection or logical channel connection of the current USIM card. This is done to ensure that when switching to the target USIM card, the current USIM card does not interfere with the operation of the new card. Second, after confirming that the physical connection or logical channel connection has been disconnected, the terminal generates a power supply circuit activation signal based on the logical channel index code. This signal is achieved by adjusting the power management circuit. The voltage parameters and power-on timing are precisely set to ensure that the USIM card can safely receive power. Then, based on these parameters, a second control command is generated. This command is constructed in a specific encoding format (including a power supply instruction code, a voltage value, and timing information) to instruct the multi-card control module to start the power supply of the target USIM card, ensuring that the USIM card has a stable power supply. Finally, after the power supply is started, the terminal loads the operator network configuration parameters bound to the target USIM card, including the access point name, authentication key and public land mobile network identifier, and uses this information to generate a third control command. The command is constructed in a specific encoding format (including network connection parameters and security authentication information) and is used to initialize the communication protocol stack of the target USIM card. The command is sent to the multi-card control module to complete the communication settings and operator switching of the USIM card, so that the USIM card can correctly connect to the home network and communicate.
[0147] Assume that the logical channel index code is 0x02, the target USIM card number is 2, and the network configuration parameters of the target operator are as follows: Access Point Name (APN): internet.example.com; Authentication Key: auth_key_12345; Public Land Mobile Network Identifier (PLMN): 46001 (China Mobile). Then the first control command is as follows:
[0148] RESET_SIM:0x02;PULSE_WIDTH:100ms;PERIOD:200ms
[0149] Among them, RESET_SIM:0x02: instructs the multi-card control module to reset the logic channel 0x02; PULSE_WIDTH:100ms: the width of the reset pulse is 100ms; PERIOD:200ms: the period of the reset pulse is 200ms.
[0150] The second control command is as follows:
[0151] POWER_ON_SIM:0x02; VOLTAGE:3.0V; DELAY:50ms; STABLE_TIME:200ms
[0152] Among them, POWER_ON_SIM:0x02: instructs the multi-card control module to power logic channel 0x02; VOLTAGE:3.0V: the power supply voltage is 3.0V; DELAY:50ms: starts power supply after a delay of 50ms; STABLE_TIME:200ms: the power supply stabilization time is 200ms.
[0153] The third control command is as follows:
[0154] INIT_SIM:0x02; APN: internet.example.com; AUTH_KEY: auth_key_12345; PLM N: 46001
[0155] Among them, INIT_SIM:0x02: instructs the multi-card control module to initialize the SIM card of logical channel 0x02; APN:internet.example.com: sets the access point name to internet.example.com; AUTH_KEY:auth_key_12345: sets the authentication key to auth_key_12345; PLMN:46001: sets the public land mobile network identifier to 46001.
[0156] This embodiment first matches the structured state data in the working memory with the business rule conditional expressions in the rule execution queue. This process is automated by the rule engine, reducing manual intervention and improving decision-making efficiency. After a successful match, an operator switching instruction is generated according to the corresponding business rules, precisely controlling the switching operation and ensuring the accuracy and reliability of the instruction. Finally, the terminal sends a hardware operation command to the multi-card control module based on the switching instruction, activating the target SIM card and completing the operator switch. The entire process implements intelligent cross-border operator switching based on multi-source location awareness and a dynamic rule engine, improving the automation and stability of network switching.
[0157] This application also provides a location-based operator switching system. The system consists of a cellular network communication terminal, a cloud platform, and a user application (mobile phone app, host computer, front-end web, or other forms). The cellular network communication terminal and the user application can be integrated together, as described herein. For example, a cellular network communication terminal such as a mobile phone capable of human-computer interaction can be integrated with the user application.
[0158] The cellular network communication terminal (terminal for short) consists of: program and data storage unit (FLASH), logic processing unit (CPU), location information acquisition and analysis module, cloud platform communication module, and rule engine.
[0159] The cloud platform consists of: program and data storage unit (FLASH), logic processing unit (CPU), cellular network communication terminal communication module, and user application communication module.
[0160] User application program composition (APP for short): cloud platform communication module and rule engine configuration module.
[0161] terminal:
[0162] The rule library of the rule engine in the terminal has multiple business rules built in at the factory. The business rules can be configured by the user in the APP. The terminal can update, synchronize, delete or add business rules in the rule library through the cloud platform; the terminal location information acquisition module can obtain location information in a variety of ways, and parse, filter and process the location information, and store it in the working memory of the rule engine in multiple dimensions; the reasoning engine of the rule engine in the terminal uses "forward reasoning" or "backward reasoning" methods to parse rules, match data and trigger actions; the terminal cloud platform communication module will report all status information of the terminal to the cloud platform, and receive commands from the cloud; the reasoning engine has multiple action processing mechanisms built in. The action processing mechanism is fixed, but the parameters of the action can be passed in through the action parameters of the action expression. The action parameters are divided into variables and constants. The variables are stored in the working memory, and the action processing mechanism can also modify the corresponding variables in the working memory.
[0163] Cloud Platform:
[0164] The user application communication module of the cloud platform can establish communication with the cloud platform communication module of the APP, including manual network switching instructions, rule engine rule base update instructions, and cellular network communication terminal communication module status synchronization data; the cellular network communication terminal communication module of the cloud platform can establish communication with the cloud platform communication module of the terminal, including: controlling the terminal manual network switching instructions, synchronizing the terminal rule engine rule base, and terminal status synchronization.
[0165] APP:
[0166] Users can manually switch networks in the APP; users can configure the rule base in the APP; the APP sends the corresponding data and instructions to the terminal through the cloud platform.
[0167] The rule engine can be placed in the terminal or in the cloud platform. The device uploads all data to the cloud platform, where the rule engine parses the rules, matches the data, and triggers actions. When an action is triggered, it sends a command to the terminal, which receives the command, executes the corresponding action, and sends the result back to the cloud platform.
[0168] This application also provides a device for switching operators based on location information. Figure 5 , the operator switching device based on location information includes:
[0169] The multi-source data acquisition module 10 is used to generate a multi-source location data set based on satellite positioning data, base station signaling data and IP address data;
[0170] A multi-source data fusion module 20 is used to perform feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level;
[0171] A rule engine management module 30 is configured to write the structured state data into a working memory of the rule engine and sort the business rules in the rule base of the rule engine to obtain a rule execution queue;
[0172] The switching execution module 40 is configured to generate an operator switching instruction according to the structured state data in the working memory and the business rules in the rule execution queue, and complete the operator switching according to the operator switching instruction.
[0173] In one embodiment, the switching execution module 40 is further used to match the structured state data in the working memory with the rule condition expression in the business rules in the rule execution queue to obtain a matching result; when the matching result is a successful match, an operator switching instruction is generated according to the business rule corresponding to the matching result; a hardware operation command is sent to the multi-card control module according to the operator switching instruction to activate the target user identity module card and complete the operator switching.
[0174] In one embodiment, the switching execution module 40 is further used to traverse the business rules in the rule execution queue and parse the variable identifier of the rule condition expression in the business rule; replace the variable identifier with the structured state data in the working memory to obtain the target rule condition expression; perform arithmetic operations and Boolean logic operations on the target rule condition expression to obtain a condition judgment result; when the condition judgment result is true, the matching result is a successful match; when the condition judgment result is false, the matching result is a failed match.
[0175] In one embodiment, the switching execution module 40 is further configured to parse a switching action expression in a business rule corresponding to the matching result to obtain an action function identifier and a target subscriber identity module card number, wherein the action function identifier corresponds to a hardware operation type; query a hardware driver mapping table based on the action function identifier to obtain a network access point name and an authentication key associated with the hardware operation type; and encapsulate the target subscriber identity module card number, the network access point name, and the authentication key into an instruction format executable by a multi-card control module to obtain an operator switching instruction.
[0176] In one embodiment, the switching execution module 40 is further configured to convert the number of the target user identity module card in the operator switching instruction into a logical channel index code recognizable by the multi-card control module according to a preset card number-logical channel index mapping table; generate a hardware reset pulse signal and a power supply circuit activation signal according to the logical channel index code, and initialize the communication protocol stack of the target user identity module card according to the hardware reset pulse signal and the power supply circuit activation signal; and send an attachment request message to the home network of the target user identity module card through the communication protocol stack, so that the home network feeds back user subscription data, and receives the user subscription data to complete the operator switching.
[0177] In one embodiment, the switching execution module 40 is further configured to generate a hardware reset pulse signal based on the logical channel index code, and generate a first control command based on the timing parameters of the hardware reset pulse signal; send the first control command to the multi-card control module to disconnect the physical connection or logical channel connection of the current subscriber identity module card; when the physical connection or logical channel connection is disconnected, generate a power supply circuit activation signal based on the logical channel index code, and generate a second control command based on the voltage parameters and power-on timing of the power supply circuit activation signal; send the second control command to the multi-card control module to start power supply of the target subscriber identity module card; when the power supply is started, load the operator network configuration parameters bound to the target subscriber identity module card, and generate a third control command based on the access point name, authentication key, and public land mobile network identifier in the operator network configuration parameters; and send the third control command to the multi-card control module to initialize the communication protocol stack of the target subscriber identity module card.
[0178] In one embodiment, the multi-source data fusion module 20 is further used to convert the latitude and longitude coordinates in the satellite positioning data into a country code and an area code through a geocoding service interface; query the operator service level mapping table based on the mobile country code and mobile network code in the base station signaling data to obtain the network service level; reversely parse the IP address data to obtain network access location hierarchy information; and structure the country code, the area code, the network service level, and the network access location hierarchy information in a preset field format to obtain structured status data.
[0179] In one embodiment, the rule engine management module 30 is also used to write the structured state data into the working memory of the rule engine; when the writing is completed, the priority field of each business rule in the rule base of the rule engine is loaded, and the smaller the value of the priority field, the higher the priority; the business rules are sorted in ascending order according to the priority field to obtain a rule execution queue.
[0180] In one embodiment, the multi-source data acquisition module 10 is also used to obtain satellite positioning data captured by a global navigation satellite system receiver; monitor base station signaling data in a cellular network cell broadcast channel; obtain IP address data of the current network connection through an IP protocol stack interface; align the satellite positioning data, the base station signaling data, and the IP address data according to timestamps to generate a multi-source location data set.
[0181] The operator switching device based on location information provided in this application adopts the operator switching method based on location information in the above-mentioned embodiment, which can solve the technical problem of how to achieve intelligent switching of cross-border operators based on multi-source location perception and a dynamic rule engine. Compared with the existing technology, the beneficial effects of the operator switching device based on location information provided in this application are the same as the beneficial effects of the operator switching method based on location information provided in the above-mentioned embodiment, and the other technical features of the operator switching device based on location information are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0182] The present application provides an operator switching device based on location information, and the operator switching device based on location information includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the operator switching method based on location information in the above-mentioned embodiment one.
[0183] Reference below Figure 6, which shows a schematic structural diagram of a location-based operator switching device suitable for implementing an embodiment of the present application. The location-based operator switching device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The operator switching device based on location information shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0184] like Figure 6 As shown, the operator switching device based on location information may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the ROM (Read Only Memory) 1002 or the program loaded from the storage device 1003 to the RAM (Random Access Memory) 1004. Various programs and data required for the operation of the operator switching device based on location information are also stored in the RAM 1004. The processing device 1001, the ROM 1002 and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, an LCD (Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the operator switching device based on location information to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an operator switching device based on location information with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0185] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0186] The operator switching device based on location information provided in this application adopts the operator switching method based on location information in the above-mentioned embodiment, which can solve the technical problem of how to achieve intelligent switching of cross-border operators based on multi-source location perception and a dynamic rule engine. Compared with the existing technology, the beneficial effects of the operator switching device based on location information provided in this application are the same as the beneficial effects of the operator switching method based on location information provided in the above-mentioned embodiment, and the other technical features of the operator switching device based on location information are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0187] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0188] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0189] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the operator switching method based on location information in the above embodiment.
[0190] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash memory), optical fiber, CD-ROM (CD-Read Only Memory, portable compact disk read-only memory), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0191] The computer-readable storage medium may be included in the operator switching device based on location information; or may exist independently without being assembled into the operator switching device based on location information.
[0192] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the operator switching device based on location information, the operator switching device based on location information: generates a multi-source location data set based on satellite positioning data, base station signaling data and IP address data; performs feature extraction and fusion processing on the multi-source location data set to obtain structured status data containing country code, area code and network service level; writes the structured status data into the working memory of the rule engine, and sorts the various business rules in the rule base of the rule engine to obtain a rule execution queue; generates an operator switching instruction based on the structured status data in the working memory and the business rules in the rule execution queue, and completes the operator switching according to the operator switching instruction.
[0193] The computer program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a LAN (Local Area Network) or a WAN (Wide Area Network), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0194] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0195] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0196] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., a computer program) for executing the above-mentioned location information-based operator switching method, and can solve the technical problem of how to achieve cross-border operator intelligent switching based on multi-source location awareness and a dynamic rule engine. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the location information-based operator switching method provided in the above-mentioned embodiment, and will not be repeated here.
[0197] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned operator switching method based on location information when executed by a processor.
[0198] The computer program product provided in this application solves the technical problem of how to implement intelligent cross-border operator switching based on multi-source location awareness and a dynamic rules engine. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the operator switching method based on location information provided in the above embodiment, and will not be elaborated here.
[0199] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for switching operators based on location information, characterized in that: The method comprises: Generate a multi-source location data set based on satellite positioning data, base station signaling data and IP address data; Performing feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level; Writing the structured state data into the working memory of the rule engine, and sorting the business rules in the rule base of the rule engine to obtain a rule execution queue; An operator switching instruction is generated according to the structured state data in the working memory and the business rules in the rule execution queue, and the operator switching is completed according to the operator switching instruction.
2. The method according to claim 1, wherein The step of generating an operator switching instruction according to the structured state data in the working memory and the business rules in the rule execution queue, and completing the operator switching according to the operator switching instruction includes: Matching the structured state data in the working memory with the rule condition expressions in the business rules in the rule execution queue to obtain a matching result; When the matching result is successful, generating an operator switching instruction according to the business rule corresponding to the matching result; According to the operator switching instruction, a hardware operation command is sent to the multi-card control module to activate the target user identity module card to complete the operator switching.
3. The method according to claim 2, wherein The step of matching the structured state data in the working memory with the rule condition expression in the business rule in the rule execution queue to obtain a matching result includes: Traversing the business rules in the rule execution queue and parsing the variable identifiers of the rule condition expressions in the business rules; Replacing the variable identifier with the structured state data in the working memory to obtain a target rule condition expression; Performing arithmetic operations and Boolean logic operations on the target rule conditional expression to obtain a conditional judgment result; When the condition is true, the matching result is obtained as a successful match; When the conditional determination result is false, the matching result is a matching failure.
4. The method according to claim 2, wherein When the matching result is successful, the step of generating an operator switching instruction according to the business rule corresponding to the matching result includes: Parsing the switching action expression in the business rule corresponding to the matching result to obtain an action function identifier and a number of a target user identity module card, wherein the action function identifier corresponds to a hardware operation type; Querying a hardware driver mapping table according to the action function identifier to obtain a network access point name and an authentication key associated with the hardware operation type; The target subscriber identity module card number, the network access point name and the authentication key are encapsulated into an instruction format executable by a multi-card control module to obtain an operator switching instruction.
5. The method according to claim 2, wherein The step of sending a hardware operation command to the multi-card control module according to the operator switching instruction to activate the target subscriber identity module card to complete the operator switching includes: According to a preset card number-logical channel index mapping table, the number of the target user identity module card in the operator switching instruction is converted into a logical channel index code recognizable by the multi-card control module; generating a hardware reset pulse signal and a power supply circuit activation signal according to the logical channel index code, and initializing a communication protocol stack of the target subscriber identity module card according to the hardware reset pulse signal and the power supply circuit activation signal; An attach request message is sent to the home network of the target subscriber identity module card through the communication protocol stack, so that the home network feeds back user subscription data, receives the user subscription data, and completes the operator switching.
6. The method according to claim 5, wherein The step of generating a hardware reset pulse signal and a power supply circuit activation signal according to the logical channel index code, and initializing the communication protocol stack of the target subscriber identity module card according to the hardware reset pulse signal and the power supply circuit activation signal comprises: Generate a hardware reset pulse signal according to the logical channel index code, and generate a first control command according to a timing parameter of the hardware reset pulse signal; Sending the first control command to the multi-card control module to disconnect the physical connection or logical channel connection of the current user identity module card; When the physical connection or the logical channel connection is disconnected, generating a power supply circuit activation signal according to the logical channel index code, and generating a second control command according to the voltage parameters and power-on timing of the power supply circuit activation signal; sending the second control command to the multi-card control module to start the power supply of the target subscriber identity module card; When the power supply is activated, loading the operator network configuration parameters bound to the target subscriber identity module card, and generating a third control command according to the access point name, authentication key and public land mobile network identifier in the operator network configuration parameters; The third control command is sent to the multi-card control module to initialize the communication protocol stack of the target subscriber identity module card.
7. The method according to claim 1, wherein The multi-source location data set includes satellite positioning data, base station signaling data and IP address data; The step of performing feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level includes: Converting the latitude and longitude coordinates in the satellite positioning data into a country code and an area code through a geocoding service interface; According to the mobile country code and mobile network code in the base station signaling data, query the operator service level mapping table to obtain the network service level; Reversely analyze the IP address data to obtain network access location level information; The country code, the area code, the network service level and the network access location level information are structured and encapsulated according to a preset field format to obtain structured status data.
8. The method according to claim 1, wherein The step of writing the structured state data into the working memory of the rule engine and sorting the business rules in the rule base of the rule engine to obtain a rule execution queue includes: Writing the structured state data into the working memory of the rule engine; When writing is completed, the priority field of each business rule in the rule base of the rule engine is loaded, and the smaller the value of the priority field, the higher the priority; The business rules are sorted in ascending order according to the priority field to obtain a rule execution queue.
9. The method according to claim 1, wherein The step of generating a multi-source location data set based on satellite positioning data, base station signaling data, and IP address data includes: Acquisition of satellite positioning data captured by a global navigation satellite system receiver; Monitor base station signaling data in the cellular network cell broadcast channel; Obtain the IP address data of the current network connection through the IP protocol stack interface; The satellite positioning data, the base station signaling data and the IP address data are aligned according to timestamps to generate a multi-source location data set.
10. A device for switching operators based on location information, characterized in that: The device comprises: Multi-source data acquisition module, used to generate a multi-source location data set based on satellite positioning data, base station signaling data and IP address data; A multi-source data fusion module is used to perform feature extraction and fusion processing on the multi-source location data set to obtain structured status data including country code, area code and network service level; A rule engine management module is used to write the structured state data into the working memory of the rule engine and sort the business rules in the rule base of the rule engine to obtain a rule execution queue; The switching execution module is configured to generate an operator switching instruction according to the structured state data in the working memory and the business rules in the rule execution queue, and complete the operator switching according to the operator switching instruction.
Citation Information
Patent Citations
Network switching method based on ESIM card, intelligent terminal and server
CN107484213A
Operator network switching method and mobile terminal
CN108495349A
Operator network switching method and system
CN111866981A
Auxiliary positioning method, device and equipment and readable storage medium
CN118828865A