Network diagnosis method and device for SIM card, equipment and storage medium

By automatically acquiring and comprehensively analyzing the SIM card's life status, public network access status, real-name registration status, and traffic status, diagnostic results are generated, solving the problems of low efficiency and accuracy in the SIM card network diagnostic process and achieving fast and objective diagnostic results.

CN122028103APending Publication Date: 2026-05-12SHANGHAI YOUKA NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI YOUKA NETWORK TECH CO LTD
Filing Date
2026-01-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing SIM card network diagnostic process is cumbersome and relies on the experience of maintenance personnel, resulting in low diagnostic efficiency and accuracy.

Method used

By acquiring the SIM card's life status, public network access status, real-name registration status, and data usage status, the system automatically analyzes these statuses to generate diagnostic results, reducing manual intervention and reliance on experience, and simplifying the diagnostic process.

Benefits of technology

It enables rapid and objective identification of SIM card network problems, improving diagnostic efficiency and accuracy while reducing reliance on manual intervention and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122028103A_ABST
    Figure CN122028103A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a network diagnosis method and device for an SIM card, equipment and a storage medium. Comprising the following steps: in response to a diagnosis instruction for the SIM card, obtaining a life state and a public network on-off state of the SIM card; the diagnosis instruction comprises an SIM card identifier of the SIM card, the life state is used for representing availability and a service attribute state of the SIM card, and the public network switch state is used for representing whether the SIM card is allowed to access a public network data service; when it is determined that the diagnosis result cannot be called from the cache of the SIM card according to the life state, the public network on-off state and the SIM card identifier, the real name state and the flow state of the SIM card are obtained; the traffic state is used for representing the traffic use condition of the SIM card; and determining a diagnosis result of the SIM card according to the real name state, the flow state, the life state and the public network on-off state of the SIM card. According to the embodiment of the invention, manual intervention and experience dependence can be reduced, the diagnosis process is simplified, and the diagnosis efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a network diagnostic method, apparatus, device, and storage medium for a SIM card. Background Technology

[0002] With the continuous expansion of connected vehicle and Internet of Things (IoT) businesses, the number of terminal devices continues to grow, significantly increasing the complexity of SIM card (Subscriber Identity Module) maintenance. Maintenance teams need to quickly and accurately identify the anomaly types of SIM cards among massive numbers of terminals in order to take timely and targeted measures. For example, failure to register with a real name may prevent data activation, poor contact of the SIM card adapter may cause users to be unable to use the service, or network coverage issues may prevent users from using the service.

[0003] Currently, SIM card network diagnostics typically involve maintenance personnel querying various SIM card-related information across multiple business systems, followed by manual analysis and judgment based on the query results to determine the diagnostic outcome. However, this diagnostic process is cumbersome due to the large number of business systems involved, the dispersed nature of the operations, and its heavy reliance on the experience of maintenance personnel. Consequently, the diagnostic efficiency and accuracy are both low. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and storage medium for network diagnostics of SIM cards, which can improve the efficiency of SIM card network diagnostics.

[0005] In a first aspect, this disclosure provides a network diagnostic method for a SIM card, comprising: in response to a diagnostic command for the SIM card, obtaining the SIM card's life status and public network access status; the diagnostic command includes the SIM card identifier, the life status is used to characterize the SIM card's availability and service attribute status, and the public network access status is used to characterize whether the SIM card is allowed to access public network data services; when it is determined, based on the life status, public network access status, and SIM card identifier, that a diagnostic result cannot be retrieved from the SIM card's cache, obtaining the SIM card's real-name status and traffic status; the traffic status is used to characterize the SIM card's traffic usage; and determining the SIM card's diagnostic result based on the SIM card's real-name status, traffic status, life status, and public network access status.

[0006] Secondly, this disclosure provides a network diagnostic device for a SIM card, comprising: an acquisition module, configured to acquire the SIM card's life status and public network access status in response to a diagnostic command for the SIM card; the diagnostic command includes the SIM card identifier, the life status characterizing the SIM card's availability and service attribute status, and the public network access status characterizing whether the SIM card is allowed to access public network data services; a judgment module, configured to acquire the SIM card's real-name status and traffic status when, based on the life status, public network access status, and SIM card identifier, it is determined that diagnostic results cannot be retrieved from the SIM card's cache; the traffic status characterizing the SIM card's traffic usage; and a processing module, configured to determine the SIM card's diagnostic result based on the SIM card's real-name status, traffic status, life status, and public network access status.

[0007] Thirdly, this disclosure provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the network diagnostic method for the SIM card as described in the first aspect.

[0008] Fourthly, this disclosure provides a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the network diagnostic method for a SIM card as described in the first aspect.

[0009] Fifthly, this disclosure provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the SIM card network diagnostic method as described in the first aspect.

[0010] The technical solution provided in this disclosure has the following advantages compared with existing technologies: First, in response to diagnostic commands for the SIM card, the life status and public network access status of the SIM card are obtained. The diagnostic command includes the SIM card identifier, the life status characterizes the availability and service attribute status of the SIM card, and the public network access status characterizes whether the SIM card is allowed to access public network data services. Then, when it is determined, based on the life status, public network access status, and SIM card identifier, that diagnostic results cannot be retrieved from the SIM card's cache, the real-name status and traffic status of the SIM card are obtained. The traffic status characterizes the traffic usage of the SIM card. Finally, based on the real-name status, traffic status, life status, and public network access status of the SIM card, the diagnostic result of the SIM card is determined. Thus, in response to diagnostic commands for the SIM card, the life status, public network access status, real-name status, and traffic status of the SIM card are automatically obtained and comprehensively analyzed. When the cached diagnostic results cannot be directly retrieved, a diagnostic result is automatically generated based on multi-dimensional status information, thereby achieving rapid and objective judgment of SIM card network problems. Compared to related technologies that rely on maintenance personnel to query and manually analyze data across multiple business systems, this method allows for centralized acquisition and unified judgment of key information needed for diagnosis. This reduces manual intervention and reliance on experience, simplifies the diagnostic process, and improves diagnostic efficiency and accuracy. Attached Figure Description

[0011] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is one of the flowcharts illustrating a network diagnostic method for a SIM card provided in this embodiment of the present disclosure; Figure 2 This is a second schematic flowchart of a network diagnostic method for a SIM card provided in an embodiment of this disclosure. Figure 3 This is the third flowchart illustrating the network diagnostic method for a SIM card provided in this embodiment of the disclosure. Figure 4 This is the fourth flowchart illustrating the network diagnostic method for a SIM card provided in this embodiment of the disclosure. Figure 5 This is a schematic diagram of the application architecture of a network diagnostic method for a SIM card provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of a network diagnostic device for a SIM card provided in an embodiment of the present disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0014] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0015] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0016] First, the terms used in this disclosure will be explained.

[0017] A SIM card is a smart card used to store user identification information and related keys in a mobile communication network.

[0018] The Integrated Circuit Card Identifier (ICCID) is a unique identifier for a SIM card, used to distinguish different cards in a management system.

[0019] Lifecycle Status, also known as the life status of a SIM card, is used to characterize the availability and service attribute status of a SIM card. Service attribute status refers to whether the SIM card is allowed to activate services, which services it can support, and whether it is subject to service-side restrictions in its current lifecycle status. In other words, lifecycle status is the identifier of the current operational stage of the SIM card on the operator's side.

[0020] The Public Data Switch, also known as the SIM card's public network switch, refers to the ON or OFF signal indicating whether the SIM card's data access capability is enabled or disabled by the operator or management system.

[0021] Real-name status refers to whether the SIM card has completed real-name authentication.

[0022] Flow balance refers to the remaining available data flow within the current billing cycle, usually measured in MB or GB.

[0023] Recent Flow Days refers to a simplified representation of flow usage over the most recent three calendar days, such as a Boolean or categorical enumeration.

[0024] In scenarios such as connected vehicles and the Internet of Things, embedded SIM cards serve as authentication and billing functions for devices accessing mobile communication networks. As the complexity of online services (such as navigation, remote upgrades, and value-added data services) increases, operations and maintenance teams need to quickly determine the type of SIM card anomaly in order to take timely and targeted measures.

[0025] Currently, SIM card network diagnostics typically involve operations and maintenance personnel querying various SIM card-related information across multiple business systems, and then manually analyzing and judging the results to determine the diagnostic outcome. For example, the current SIM card network diagnostic process is as follows: determining the SIM identifier, manually logging into the lifecycle database and querying the stage status, manually logging into the public network access database and querying the on / off status, manually logging into the real-name database and querying the real-name status, manually logging into the balance / billing database and querying the balance, manually logging into the traffic log system and querying recent usage, manually comparing and organizing the raw fields, manually making a comprehensive judgment to determine typical scenarios, manually writing a free text diagnostic draft, manually reviewing and revising, and obtaining the final manual report. It can be seen that the entire process involves multiple business systems, requires a large amount of manual operation, and is highly dependent on the experience of operations and maintenance personnel, making it impossible to guarantee diagnostic efficiency and the accuracy of the diagnostic results.

[0026] To address the aforementioned issues, this disclosure provides a network diagnostic scheme for SIM cards. First, in response to a diagnostic command for the SIM card, the scheme acquires the SIM card's lifespan and public network access status. The diagnostic command includes the SIM card identifier, the lifespan characterizes the SIM card's availability and service attribute status, and the public network access status indicates whether the SIM card is permitted to access public network data services. Then, if, based on the lifespan, public network access status, and SIM card identifier, it is determined that diagnostic results cannot be retrieved from the SIM card's cache, the scheme acquires the SIM card's real-name registration status and traffic status. The traffic status characterizes the SIM card's traffic usage. Finally, based on the SIM card's real-name registration status, traffic status, lifespan, and public network access status, the diagnostic result for the SIM card is determined. This approach, compared to related technologies that rely on maintenance personnel manually querying and analyzing data across multiple business systems, allows for centralized acquisition and unified judgment of key diagnostic information, reducing manual intervention and reliance on experience, simplifying the diagnostic process, and improving diagnostic efficiency and accuracy.

[0027] The SIM card network diagnostic method provided in this disclosure is applicable to SIM card maintenance scenarios. This method can be executed by a SIM card network diagnostic device, which can be either hardware or software. When the SIM card network diagnostic device is hardware, it can be any electronic device capable of performing SIM card network diagnostics, including but not limited to mobile phones, computers, tablets, televisions, smart TVs, laser projectors, monitors, electronic bulletin boards, and electronic tables. When the SIM card network diagnostic device is software, it can be installed in any of the aforementioned electronic devices. It can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are imposed here. Figure 1 This is a flowchart illustrating the network diagnostic method for a SIM card provided in an embodiment of this disclosure, as shown below. Figure 1 As shown, the network diagnostic method for a SIM card may include the following steps: S11. In response to a diagnostic command for the SIM card, obtain the SIM card's life status and public network switch status.

[0028] The diagnostic instructions include the SIM card identifier, used to uniquely identify the SIM card. This identifier can be, for example, the SIM card's ICCID, International Mobile Subscriber Identity (IMSI), or Mobile Station International Subscriber Directory Number (MSISDN). The life status indicates the SIM card's availability and service attributes. For example, the SIM card's life status can be HOLD (inactive and pending), MAINTAIN (maintained), FORRMAL (normal), TEST (tested), EXPIRED, etc. The public network switch status indicates whether the SIM card is allowed to access public network data services, including a public network switch on (allowed access to public network data services) and a public network switch off (disallowed access to public network data services).

[0029] First, users can issue diagnostic commands to the SIM card's network diagnostic device via text or voice. For example, the user can input the SIM card's identifier, and the SIM card's network diagnostic device will recognize this as a diagnostic command. Next, the device retrieves the SIM card's lifespan and public network access status. Specifically, this can be done automatically by calling the databases corresponding to the lifespan and public network access status via interfaces. That is, the lifespan interface calls the lifespan database to query the SIM card's lifespan, and the public network access status interface calls the public network access status database to query the SIM card's public network access status.

[0030] S12. When it is determined that the diagnostic results cannot be retrieved from the SIM card's cache based on the life status, public network switch status, and SIM card identifier, obtain the SIM card's real-name status and traffic status.

[0031] First, based on the patient's vitals status, public network access status, and SIM card identifier, the diagnostic results are retrieved from the SIM card's cache. Specifically, this retrieval can be achieved either by directly matching the corresponding diagnostic results from the cache based on the vitals status and public network access status, or by first constructing query conditions based on these conditions and then searching the cache for results that match those conditions to obtain the diagnostic results. If no matching result is found in the cache, it is determined that the diagnostic results cannot be retrieved from the SIM card's cache.

[0032] Next, the real-name registration status and data usage status of the SIM card are obtained. The data usage status is used to characterize the data usage of the SIM card, which may include whether the data is exhausted (determined based on the data balance) and a data usage array, which is used to characterize the data usage for each time window within a historical period (e.g., data usage markers for the last three days).

[0033] Specifically, the real-name field can be read by calling the real-name adapter corresponding to the real-name status to determine the real-name status of the SIM card. Similarly, the original data balance can be read by the balance adapter corresponding to the data status, and the data array can be read by the recent data adapter corresponding to the data status. Based on the original data balance, it can be determined whether the data is exhausted, thereby obtaining the data status of the SIM card.

[0034] S13. Determine the diagnostic results of the SIM card based on its real-name registration status, data usage status, life status, and public network access status.

[0035] Specifically, the diagnostic results for a SIM card can be determined based on its real-name registration status, data usage status, health status, and public network access status. This can be achieved by directly using these data as the diagnostic results; by analyzing these data using a pre-set model to generate summaries and suggestions; or by matching the corresponding diagnostic results from a pre-set mapping relationship based on these data.

[0036] In the above scheme, firstly, in response to diagnostic commands for the SIM card, the life status and public network access status of the SIM card are obtained. The diagnostic command includes the SIM card identifier, the life status characterizes the availability and service attributes of the SIM card, and the public network access status indicates whether the SIM card is allowed to access public network data services. Then, if it is determined, based on the life status, public network access status, and SIM card identifier, that diagnostic results cannot be retrieved from the SIM card's cache, the real-name registration status and traffic status of the SIM card are obtained. The traffic status characterizes the SIM card's traffic usage. Finally, based on the SIM card's real-name registration status, traffic status, life status, and public network access status, the diagnostic result for the SIM card is determined. In this way, in response to diagnostic commands for the SIM card, the system automatically obtains and comprehensively analyzes the SIM card's life status, public network access status, real-name registration status, and traffic status, and automatically generates a diagnostic result based on multi-dimensional status information when cached diagnostic results cannot be directly retrieved, thereby achieving a rapid and objective determination of SIM card network problems. Compared to related technologies that rely on maintenance personnel to query and manually analyze data across multiple business systems, this method allows for centralized acquisition and unified judgment of key information needed for diagnosis. This reduces manual intervention and reliance on experience, simplifies the diagnostic process, and improves diagnostic efficiency and accuracy.

[0037] In some embodiments, such as Figure 2 As shown, the method of retrieving diagnostic results from the SIM card's cache based on the life status, public network on / off status, and SIM card identifier may include the following steps: S121. Generate the first signature based on the life status and public network switch status.

[0038] Specifically, the life status and public network switch status can be concatenated to generate the first signature; alternatively, the life status and public network switch status can be concatenated first, and then the concatenation result can be mapped to a fixed-length, comparable signature value through a mapping algorithm (such as state signature hash) for quick subsequent judgment.

[0039] S122. Query the target cache data corresponding to the SIM card from the cache according to the SIM card identifier, and if the target cache data corresponding to the SIM card is found, execute step S123; if the target cache data corresponding to the SIM card is not found, execute step S127.

[0040] Specifically, the SIM card identifier can be used as the query key to retrieve the cache record corresponding to the SIM card identifier from the pre-stored SIM card cache. When there is cache data matching the SIM card identifier in the cache, the cache data is used as the target cache data. When there is no cache data matching the SIM card identifier in the cache, it is considered that the target cache data corresponding to the SIM card has not been found.

[0041] S123. Determine whether the target cached data is within its lifespan. If the target cached data is within its lifespan, execute step S124. If the target cached data is not within its lifespan, execute step S125.

[0042] S124. Obtain the second signature of the target cached data.

[0043] Specifically, if the target cache data corresponding to the SIM card is found and the target cache data is within its lifespan, it means that the target cache data is valid. At this time, the second signature of the target cache data is obtained to further ensure data consistency and accuracy.

[0044] S125. Determine whether the second signature is the same as the first signature. If the second signature is the same as the first signature, execute step S126; if the second signature is not the same as the first signature, execute step S127.

[0045] The first signature being identical to the second signature means that the life status and public network switch status in the first signature and the second signature are the same.

[0046] Specifically, the method for determining whether the second signature is the same as the first signature can be to directly compare whether the life status and public network switch status in the second signature and the first signature are the same; or it can be to calculate the life status and public network switch status in the second signature and the first signature as comparable signature values ​​for comparison and judgment. This disclosure does not limit this method.

[0047] S126. Extract the diagnostic results of the SIM card from the target cache data.

[0048] Specifically, if the target cache data corresponding to the SIM card is retrieved from the cache based on the SIM card identifier, and the target cache data is within its lifespan, and the second signature is the same as the first signature, then it can be determined that the diagnostic result can be retrieved from the SIM card's cache.

[0049] S127. It is determined that the diagnostic results cannot be retrieved from the SIM card's cache.

[0050] Specifically, if the target cache data corresponding to the SIM card cannot be found in the cache based on the SIM card identifier, or the target cache data is not within its lifespan, or the second signature is different from the first signature, it is determined that the diagnostic results cannot be retrieved from the SIM card's cache.

[0051] The above scheme, by constructing a signature based on the life status, public network on / off status, and SIM card identifier, and introducing a cache validity check, prioritizes the reuse of existing diagnostic results while ensuring consistency and timeliness. Specifically, a first signature is generated from the life status and public network on / off status, and compared with a second signature corresponding to the target cached data. Diagnostic results are directly extracted only when the signatures match and the cached data is within its lifespan, thus avoiding misuse of historical diagnostic results when the SIM card status changes. In cases of cache miss, cache expiration, or signature inconsistency, it is explicitly determined that diagnostic results cannot be retrieved from the cache, thereby triggering subsequent diagnostic processes. This reduces the overhead and response latency caused by repeated diagnostics, ensures the matching of diagnostic results with the current actual status of the SIM card, and improves the efficiency of the diagnostic process and the accuracy and reliability of the diagnostic results.

[0052] In some embodiments, after determining the diagnostic result of the SIM card, the network diagnostic method for the SIM card further includes generating a target signature based on the life status, public network on / off status, and traffic status, then storing the target signature and diagnostic result in the cache corresponding to the SIM card, and configuring a lifespan for the target signature and diagnostic result.

[0053] The above solution, after determining the SIM card's diagnostic results, generates a target signature based on its lifespan, public network on / off status, and traffic status. This target signature, along with the corresponding diagnostic results, is then cached with a configured lifespan. This effectively solidifies and reuses diagnostic conclusions for SIM cards under specific state combinations. On one hand, the target signature provides a unified representation of multi-dimensional key states, ensuring a clear correspondence between the cached diagnostic results and the actual operating state of the SIM card, preventing misuse of historical conclusions in scenarios of state changes. On the other hand, by setting a lifespan, it ensures that cached data is only accessed within a reasonable timeframe. This allows for direct cache access when the same state triggers a diagnosis again, reducing redundant calculations and system resource consumption, shortening diagnostic response time, and simultaneously ensuring the real-time nature and accuracy of the diagnostic results.

[0054] In some embodiments, the lifecycle states include an inactive and pending state, a maintenance state, a normal usage state, and other states. Here, "other states" refers to any state other than the inactive and pending state, maintenance state, and normal usage state (e.g., testing state, expired state, etc.). Figure 3 As shown, obtaining the real-name registration status of a SIM card can include the following steps: S1221. Determine whether the SIM card's life status is any of the following: inactive and waiting to be occupied, maintenance, or normal use. If yes, proceed to step S1222; otherwise, determine that the SIM card's life status is another status and proceed to step S1224.

[0055] S1222. Determine whether the real-name field corresponding to the SIM card shows that it has been registered. If yes, proceed to step S1223; otherwise, proceed to step S1224.

[0056] S1223. Confirm that the SIM card's real-name registration status is "realized".

[0057] Specifically, when the SIM card's life status is any one of inactive and pending, maintenance, or normal use, and the real-name field corresponding to the SIM card shows that it has been registered with the real name, the SIM card's real-name status is determined to be registered with the real name.

[0058] S1224. Confirm that the SIM card's real-name registration status is unregistered.

[0059] Specifically, if the SIM card's life status is in another state, or if the real-name field corresponding to the SIM card shows "not real-name", then the SIM card's real-name status is determined to be "not real-name".

[0060] The above scheme determines the real-name status of a SIM card by jointly judging its life status and real-name field, enabling accurate and controllable determination of the SIM card's real-name status under different service states. Specifically, only when the SIM card is in a life status with actual business significance, such as inactive and pending use, maintenance, or normal use, is the real-name field used to further determine whether it has been real-name registered. This avoids unreliable real-name determinations for SIM cards in abnormal or unidentifiable states. For other life statuses or when the real-name field does not show real-name registration, it is uniformly determined as unregistered, which helps to form clear and stable determination rules. Therefore, through state classification and condition constraints, the accuracy and consistency of real-name status determination are improved, providing an effective data foundation for the reliable generation of subsequent SIM card network diagnostic results.

[0061] In some embodiments, such as Figure 4As shown, the diagnostic method for a SIM card can be determined based on its real-name registration status, data usage status, lifespan status, and public network access status. This may include the following steps: S131. Determine whether the target result is matched from the preset correspondence based on the SIM card's real-name status, data usage status, life status, and public network switch status. If a match is found, proceed to step S132; otherwise, proceed to step S133.

[0062] The preset mapping relationship is the relationship between real-name status, traffic status, life status, public network switch status, and diagnostic results. The diagnostic results can include diagnostic conclusions and diagnostic suggestions.

[0063] In some embodiments, the real-name status includes real-name and unreal-name, the public network switch status includes on and off, the life status includes inactive and pending, maintenance and normal use, and the traffic status includes whether the traffic is exhausted and a traffic array, which is used to characterize the traffic usage for each time window within a historical period.

[0064] Thus, the preset correspondence can include: (1) If the traffic status is not exhausted, but the life status is not activated and waiting to be occupied or maintenance status, or the public network switch status is closed, the diagnosis result is determined as the first diagnosis result.

[0065] For example, the initial diagnostic result could conclude that the SIM card is currently in an informal lifecycle phase (corresponding to an inactive, pending, or maintenance state) or that public network data capability is not enabled (corresponding to a public network switch status of "off"), and therefore does not yet meet the requirements for normal network connectivity. The diagnostic recommendations for the initial diagnostic result could be: "Complete the lifecycle information," "Enable public network data," etc.

[0066] (2) If the life status is in normal use, but the real name status is not real name, or the public network switch status is closed, the diagnosis result is determined as the second diagnosis result.

[0067] For example, the conclusion of the second diagnostic result could be: the SIM card has entered its formal lifecycle stage, but real-name authentication has not been completed, resulting in limited public network data capabilities. The diagnostic recommendations for the second diagnostic result could be: "Complete real-name authentication," "Enable public network data," etc.

[0068] (3) If the flow status is exhausted or the public network switch status is closed, the diagnosis result is determined as the third diagnosis result.

[0069] For example, the diagnostic conclusion of the third diagnostic result could be: the current SIM card's available data has been exhausted, and public network data capability has been disabled. The diagnostic suggestions of the third diagnostic result could be: recommend "recharge or renew" or "enable public network data", etc.

[0070] (4) When the life status is in normal use and all elements in the flow array are 0, the diagnosis result is determined to be the fourth diagnosis result.

[0071] For example, the conclusion of the fourth diagnostic result could be: the SIM card is in its formal lifecycle stage, but has not been used for a long period of time recently, which may indicate inactivity, abnormal coverage, or physical connection problems. The diagnostic recommendations for the fourth diagnostic result could be: "Check physical connection," "Manually review coverage," etc.

[0072] The above solution, by finely combining real-name registration status, public network on / off status, life status, and traffic status including historical time window traffic usage, and establishing a one-to-one correspondence with different diagnostic results, can accurately distinguish the causes of SIM card anomalies in various typical business scenarios. Specifically, by setting different diagnostic results for inactive or maintenance status, unregistered status, traffic exhaustion status, and long-term no traffic usage, the diagnostic conclusions can directly point to the key factors causing network anomalies, avoiding the mixed judgment of multiple anomaly scenarios. Simultaneously, introducing a traffic array to judge historical traffic behavior helps identify hidden problems where the surface status appears normal but no data service is actually occurring. Therefore, the granularity and interpretability of SIM card network diagnostics are improved, making the diagnostic results more closely aligned with actual business conditions, thereby enhancing the accuracy of problem location and the practical value of the diagnostic conclusions.

[0073] S132. The target result is determined as the diagnostic result of the SIM card.

[0074] For example, when a first diagnostic result (i.e., the target result) is matched from a preset correspondence based on the SIM card's real-name registration status, data usage status, life status, and public network access status, the first diagnostic result is determined as the SIM card's diagnostic result. Similarly, if a second, third, or fourth diagnostic result is matched, then the second, third, or fourth diagnostic result is determined as the SIM card's diagnostic result.

[0075] S133. Generate diagnostic results based on real-name status, traffic status, life status, public network switch status, and a pre-trained large language model.

[0076] The pre-trained Large Language Model (LLM) is a general reasoning model that provides natural language understanding and generation capabilities. It does not participate in SIM card status determination or data collection, but rather performs supplementary analysis and expression generation on the normalized minimum contextual information when deterministic rules (such as (1)-(4) above) cannot directly provide conclusions. Based on a pre-defined set of input fields and output structure constraints, the LLM is only used to generate structured diagnostic conclusions and suggestions to improve the interpretability and completeness of diagnostic results under complex or atypical state combinations. It is understood that the LLM in this disclosure, as a replaceable reasoning service module, does not constitute a limitation on this disclosure in terms of its specific model type, training method, and deployment form.

[0077] In some embodiments, the diagnostic results generated based on real-name authentication status, traffic status, life status, public network on / off status, and a pre-trained large language model can be generated as follows: First, prompt words and summary text are constructed based on the real-name authentication status, traffic status, life status, and public network on / off status. Then, the prompt words and summary text are input into the pre-trained large language model to obtain the diagnostic results. The diagnostic results include diagnostic suggestions, which may include at least one of the following: complete real-name authentication, enable public network data, recharge or renew subscription, maintain current usage, verify physical connection, complete life status information, and manual review. In this way, by constructing targeted prompt words and summary text based on real-name authentication status, traffic status, life status, and public network on / off status, and inputting them into a pre-trained large language model to generate diagnostic results, comprehensive analysis and intelligent judgment of SIM card network problems can be performed in scenarios where rules are difficult to cover or where state combinations are complex. The diagnostic results further provide diagnostic suggestions including completing real-name authentication, enabling public network data, recharging or renewing subscription, maintaining current usage, verifying physical connection, completing life status information, and manual review, so that the output not only indicates possible causes of anomalies but also clarifies the direction of subsequent handling. Therefore, it enhances the completeness and operability of diagnostic results, reduces the analytical burden on maintenance personnel, and improves the accuracy and practical value of SIM card network diagnostics in complex scenarios.

[0078] The above solution jointly analyzes the SIM card's real-name status, traffic status, life status, and public network on / off status, and prioritizes direct mapping based on preset correspondences to obtain diagnostic results. This enables the rapid output of consistent and interpretable diagnostic conclusions in common, rule-based scenarios, reducing system computational complexity and improving response efficiency. When the target result cannot be matched through preset correspondences, a pre-trained large language model is introduced to generate diagnostic results based on multi-dimensional state information, thus supplementing the judgment for complex, boundary-based, or uncovered abnormal scenarios. Therefore, by combining rule mapping with model generation, the solution ensures stability and determinism in high-frequency diagnostic scenarios while enhancing adaptability to atypical scenarios, improving the coverage, accuracy, and overall intelligence level of SIM card network diagnostic results.

[0079] To more clearly illustrate the network diagnostic method for SIM cards disclosed herein, the application architecture of the SIM card network diagnostic method is described below, in order to further clarify the network diagnostic scheme of this disclosure.

[0080] In some embodiments, Figure 5 This is a schematic diagram of the application architecture of a network diagnostic method for a SIM card provided in this disclosure, including an entry layer and a diagnostic core layer. When executing the network diagnostic method for the SIM card corresponding to this disclosure, the overall process is as follows (1)-(7): (1) Receive diagnostic instructions and initialize.

[0081] Upon receiving the diagnostic command, the system obtains the SIM card identifier (sim_id), generates a trace identifier (trace_id) and a current timestamp (timestamp), establishes a basic context, and initializes the context object as: Context={sim_id, trace_id, timestamp}. Simultaneously, it records the entry into the log as the initialization phase, expressed as a lightweight line: trace_id, stage="INIT".

[0082] (2) Quickly query the life status and public network switch status, generate a new signature and compare it with the cached signature.

[0083] Call the LifecycleAdapter to query the lifecycle database to get the lifecycle status (lifecycle_status) (possibly the original field stage_code) → mapped to HOLD / MAINTAIN / FORMAL); call the PublicSwitchAdapter to query the public switch database to get the public switch status (public_switch) (original field net_flag → ON / OFF).

[0084] Calculate the first signature (new signature, Sign_new) = Hash(lifecycle_status||public_switch||exhausted_flag_placeholder), where exhausted_flag_placeholder is initially set to an undetermined bit, and || indicates concatenation. Check the cache for an entry that has not expired its time-to-live (TTL) based on sim_id; if it exists, take its signature as the second signature (cache signature, Sign_old).

[0085] Compare Sign_new with Sign_old and ensure that the TTL has not expired. If Sign_new and Sign_old are equal, return the report in the cache (cache_hit=true) and jump to (7); if they are not equal or the cache is missing, proceed to (3).

[0086] (3) The scheduling tool adaptation layer obtains a set of standard fields from the distributed database.

[0087] If lifecycle_status is in {FORMAL, MAINTAIN, HOLD} and the policy requires real-name information, then call the RealNameAdapter to get the real-name status (realname_status) = real-named (VERIFIED) / unreal-named (UNVERIFIED); otherwise, set realname_status = do not trigger related rules UNKNOWN.

[0088] The BalanceAdapter is called to obtain the raw flow balance (balance_raw) and standardize its format to obtain the flow balance (flow_balance_mb), such as flow_balance_mb = parse(balance_raw). Simultaneously, a "whether exhausted" flag (exhausted_flag) is generated based on whether the flow balance is zero, such as exhausted_flag = (flow_balance_mb == 0). The RecentFlowAdapter is called to obtain the usage log (raw_usage[]) for the most recent historical time period (e.g., three days), and convert it into a flow array (recent_flow_days[]), such as [1, 0, 1] or [0, 0, 0].

[0089] Update the context object as follows: Context={sim_id, trace_id, timestamp, lifecycle_status, public_switch, cache_hit, realname_status, exhausted_flag, recent_flow_days[]}.

[0090] At the same time, update the final signature to: final signature value (Sign_final) = Hash(lifecycle_status||public_switch||exhausted_flag).

[0091] (4) Evaluate the collected standard fields according to the preset early stop rules.

[0092] First, define the early stop rules, which are (1)-(4) in step S131 above. Then, evaluate the collected standard fields according to the preset early stop rules. If a rule is matched, set the diagnostic result (early_stop_code) to the result corresponding to the rule, and mark the rule direct output flag as true (e.g., rule_direct_output=true), and jump to (6). If no rule is matched, proceed to (5).

[0093] (5) Call the large language model (also known as the large model) to obtain diagnostic results.

[0094] Construct prompt word fragments (such as PromptJSON) with the same format as the large language model, for example: {lifecycle_status, public_switch, realname_status, flow_balance_mb, exhausted_flag, recent_flow_days}. Construct rule summary text for the large model: briefly describe the rules checked and the cases where they were not hit. Set output schema constraints, for example: {final_diagnosis:string, recommendations:[string...]}. Here, final_diagnosis represents the diagnostic conclusion, and recommendations represent diagnostic suggestions. Diagnostic suggestions must be selected from the whitelist set W={"Complete Real-Name Registration", "Enable Public Data", "Recharge or Renew", "Maintain Current Use", "Check Physical Connection", "Complete Lifecycle Information", "Manual Review and Override"}.

[0095] The system calls the large language model service (RPC / HTTP), submitting a prompt, summary, and constraints. If the format and structure of the large language model's output are valid and the fields are not empty, the output is accepted; otherwise, the format is retried until the limit is exceeded or an output is obtained. If the limit is exceeded, the diagnostic conclusion (final_diagnosis) is set to "Unable to generate model completion" and the diagnostic suggestions are empty (recommendations=[]); if an output is obtained, the output is confirmed as the diagnostic result. The large language model service can be a Remote Procedure Call (RPC) service or a Hypertext Transfer Protocol (HTTP) service.

[0096] (6) Assemble the diagnostic results report and write it to the signature cache.

[0097] If an early stopping rule is matched, the diagnostic result is set to the result of the corresponding rule; otherwise, the model is used to complete the result.

[0098] The diagnostic report is assembled as follows: Report = {trace_id, sim_id_masked, path, early_stop_code, final_diagnosis, recommendations, rule_direct_output, cache_hit, failed_tools, timestamp}. Here, early_stop_code identifies whether early stopping was triggered; a result matching a rule is considered early stopping. sim_id_masked represents the masked SIM identifier. final_diagnosis is the diagnostic conclusion, recommendations are diagnostic suggestions, path is the report's storage path, and failed_tools is a list of tools that failed to be invoked when calling various adapters.

[0099] Write Sign_final and Report to the SIM card's cache: Cache[sim_id]={sign:Sign_final, report:Report, ts:now}, where ts:now indicates that the writing time is the current time.

[0100] Record the assembly log: trace_id, stage="REPORT_ASSEMBLED".

[0101] (7) Return the diagnosis results.

[0102] The diagnostic results should include at least the diagnostic conclusion and recommendations, and may also include a diagnostic report. Write a minimal log line: {trace_id, early_stop_code / null, cache_hit, rule_direct_output, failed_tools[]}. End the current diagnostic process and release the context object.

[0103] In this way, this disclosure automatically aggregates SIM card status information scattered across multiple business systems (corresponding to multiple databases), prioritizes the determination based on the minimum context field and deterministic early shutdown rules, and then invokes a controlled large model to complete the process in non-deterministic scenarios, thereby achieving rapid, stable, and structured diagnosis of the network status of a single vehicle-mounted SIM card. Furthermore, by leveraging signature caching and field normalization mechanisms, manual database-by-database comparisons and free text writing are eliminated, significantly reducing investigation time and error rates, ensuring the consistency and scalability of diagnostic results, and avoiding the problems of low efficiency, information omissions, and inconsistent conclusions inherent in traditional manual methods.

[0104] Furthermore, by centralizing the diagnostic process within a single SIM card network diagnostic device, using only a single sim_id as input to uniformly drive the aggregation of all subsequent data, the system eliminates the need for manual logins and comparisons across multiple distributed database interfaces. Due to minimized input and unified field mapping, the SIM card network diagnostic device can quickly extract lifecycle, public network access status, real-name registration status, data balance, and recent usage from a defined set of standard fields, avoiding delays and biases caused by manual repetitive data concatenation and memorizing field semantics. Based on this structured data collection method, predefined early-stop combination judgments are executed immediately after each key node. This ensures that many typical states that can be directly derived from deterministic logic (e.g., unregistered and public network access disabled, data exhausted and switch off, continuous inactivity, etc.) are terminated and reports generated immediately after data normalization, thus preventing further access to unnecessary data sources or calls to large models. Because this logic does not introduce additional complex interaction chains, but instead replaces the traditional full-data query and final manual synthesis process with a clear "whether the combination is satisfied" decision, it significantly reduces average diagnostic time and backend load.

[0105] Meanwhile, a minimal context prompt is constructed only in scenarios where rule-based judgment fails, invoking the large model for completion inference. Since the pre-defined rules have already extracted the most common and decidable exception classes and normal preservation classes, the input scale faced by the large model is constrained to a smaller set of boundaries or complex patterns, reducing unnecessary inference iterations, lowering overall resource consumption, and decreasing the probability of generated content producing illusions. Furthermore, combined with whitelist-based suggestion output constraints and a fixed JSON schema, the large model's degrees of freedom are reasonably narrowed, making its generated results easier for subsequent system auditing and statistical summarization, ensuring the stability and reusability of diagnostic suggestions. Therefore, through this "deterministic priority + generative fallback" collaborative mechanism, high efficiency and low cost can be maintained while ensuring interpretability in complex scenarios.

[0106] This embodiment of the disclosure can divide the network diagnostic device for a SIM card into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0107] like Figure 5 The diagram shown is a schematic diagram of the structure of a network diagnostic device for a SIM card provided in an embodiment of the present disclosure. The network diagnostic device for the SIM card includes an acquisition module 41, a judgment module 42, and a processing module 43.

[0108] The acquisition module 41 is used to acquire the SIM card's life status and public network switch status in response to a diagnostic command for the SIM card. The diagnostic command includes the SIM card identifier, the life status is used to characterize the SIM card's availability and service attribute status, and the public network switch status is used to characterize whether the SIM card is allowed to access public network data services. The judgment module 42 is used to acquire the SIM card's real-name status and traffic status when it is determined, based on the life status, public network switch status, and SIM card identifier, that the diagnostic result cannot be retrieved from the SIM card's cache. The traffic status is used to characterize the SIM card's traffic usage. The processing module 43 is used to determine the diagnostic result of the SIM card based on the SIM card's real-name status, traffic status, life status, and public network switch status.

[0109] In some embodiments, the determination module 42 is specifically configured to: generate a first signature based on the life status and public network switch status; query the target cache data corresponding to the SIM card from the cache based on the SIM card identifier; when the target cache data is found and the target cache data is within its lifespan, obtain a second signature of the target cache data; and when the target cache data of the SIM card is not found from the cache based on the SIM card identifier, or when the second signature is different from the first signature, determine that the diagnostic result cannot be retrieved from the cache of the SIM card.

[0110] In some embodiments, the judgment module 42 is further configured to extract the diagnostic results of the SIM card from the target cache data if the second signature is the same as the first signature.

[0111] In some embodiments, the processing module 43 is further configured to: after determining the diagnostic result of the SIM card, generate a target signature based on the life status, public network switch status, and traffic status; store the target signature and diagnostic result in the cache corresponding to the SIM card, and configure a lifespan for the target signature and diagnostic result.

[0112] In some embodiments, the life status includes an inactive and pending state, a maintenance state, a normal usage state, and other states; the determination module 42 is specifically used to: determine that the real-name status of the SIM card is real-name when the SIM card's life status is any one of the inactive and pending state, the maintenance state, or the normal usage state, and the real-name field corresponding to the SIM card shows that it is real-named; determine that the real-name status of the SIM card is not real-name when the SIM card's life status is any one of the inactive and pending state, the maintenance state, or the normal usage state, but the real-name field corresponding to the SIM card shows that it is not real-named; and determine that the real-name status of the SIM card is not real-name when the SIM card's life status is any other state.

[0113] In some embodiments, the processing module 43 is specifically configured to: when a target result is matched from a preset correspondence based on the SIM card's real-name status, data usage status, life status, and public network switch status, determine the target result as the SIM card's diagnostic result; the preset correspondence is a mapping relationship between the real-name status, data usage status, life status, public network switch status, and diagnostic result; when no target result is matched from the preset correspondence based on the SIM card's real-name status, data usage status, life status, and public network switch status, generate a diagnostic result based on the real-name status, data usage status, life status, public network switch status, and a pre-trained large language model.

[0114] In some embodiments, the real-name status includes real-name and unreal-name, the public network switch status includes on and off, the life status includes inactive and pending, maintenance, and normal use, and the traffic status includes whether the traffic is exhausted and a traffic array, where the traffic array is used to represent the traffic usage for each time window within a historical period. The preset correspondence includes: if the traffic status is not exhausted but the life status is inactive and pending or maintenance, or the public network switch status is off, the diagnosis result is determined as the first diagnosis result; if the life status is normal use but the real-name status is unreal-name, or the public network switch status is off, the diagnosis result is determined as the second diagnosis result; if the traffic status is exhausted, or the public network switch status is off, the diagnosis result is determined as the third diagnosis result; and if the life status is normal use and all elements in the traffic array are 0, the diagnosis result is determined as the fourth diagnosis result.

[0115] In some embodiments, the processing module 43 is specifically used to: construct prompt words and summary text based on real-name status, traffic status, life status, and public network switch status; input the prompt words and summary text into a pre-trained large language model to obtain diagnostic results; the diagnostic results include diagnostic suggestions, which include at least one of the following: complete real-name authentication, enable public network data, recharge or renew, maintain current use, check physical connection, complete life status information, and manual review coverage.

[0116] The SIM card network diagnostic device provided in this embodiment can execute the SIM card network diagnostic method provided in the above method embodiment. Its implementation principle and technical effect are similar to the above method, and will not be repeated here.

[0117] Figure 6 This is an electronic device illustrated according to an exemplary embodiment. The electronic device may include a processor 802, which is used to execute application code to implement the network diagnostic method for the SIM card in this disclosure.

[0118] The processor 802 may be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs according to the present disclosure.

[0119] like Figure 6 As shown, the electronic device may further include a memory 803. The memory 803 stores application code that executes the scheme of this disclosure and is controlled by a processor 802 for execution.

[0120] Memory 803 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 803 may exist independently and be connected to processor 802 via bus 804. Memory 803 may also be integrated with processor 802.

[0121] like Figure 6 As shown, the electronic device may also include a communication interface 801, wherein the communication interface 801, the processor 802, and the memory 803 may be coupled to each other, for example, through a bus 804. The communication interface 801 is used for information interaction with other devices, for example, supporting information interaction between the electronic device and other devices.

[0122] It should be pointed out that, Figure 6 The device structure shown does not constitute a limitation on the electronic device, except... Figure 6 In addition to the components shown, the electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Furthermore, the electronic device provided in this embodiment can execute the SIM card network diagnostic method provided in the above-described method embodiments; its implementation principle and technical effects are similar to the above methods, and will not be repeated here.

[0123] This disclosure provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the SIM card network diagnostic method described in the above method embodiments and achieves the same technical effect. To avoid repetition, further details are omitted here.

[0124] The computer-readable storage medium may be ROM, RAM, magnetic disk, or optical disk, etc.

[0125] This disclosure provides a computer program product that stores a computer program. When the computer program is executed by a processor, it implements the various processes of the SIM card network diagnosis method described in the above method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0126] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media containing computer-usable program code.

[0127] In this disclosure, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0128] In this disclosure, memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0129] In this disclosure, computer-readable media includes both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data and carrier waves.

[0130] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0131] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A network diagnostic method for a SIM card, characterized in that, include: In response to diagnostic commands for the SIM card, the SIM card's life status and public network access status are obtained; The diagnostic command includes the SIM card identifier of the SIM card, the life status is used to characterize the availability and service attribute status of the SIM card, and the public network switch status is used to characterize whether the SIM card is allowed to access public network data services; When it is determined, based on the life status, the public network switch status, and the SIM card identifier, that the diagnostic results cannot be retrieved from the SIM card's cache, the real-name status and data usage status of the SIM card are obtained; the data usage status is used to characterize the data usage of the SIM card. The diagnostic result of the SIM card is determined based on the SIM card's real-name registration status, data usage status, life status, and public network switch status.

2. The network diagnostic method for a SIM card according to claim 1, characterized in that, The step of determining that diagnostic results cannot be retrieved from the SIM card's cache based on the life status, the public network switch status, and the SIM card identifier includes: A first signature is generated based on the life status and the public network switch status; Based on the SIM card identifier, retrieve the target cache data corresponding to the SIM card from the cache; When the target cached data is found and the target cached data is within its lifespan, obtain the second signature of the target cached data; If the target cache data of the SIM card is not found in the cache based on the SIM card identifier, or if the second signature is different from the first signature, it is determined that the diagnostic results cannot be retrieved from the cache of the SIM card.

3. The network diagnostic method for a SIM card according to claim 2, characterized in that, The method further includes: If the second signature is the same as the first signature, the diagnostic results of the SIM card are extracted from the target cache data.

4. The network diagnostic method for a SIM card according to claim 1, characterized in that, After determining the diagnostic result of the SIM card, the method further includes: Generate a target signature based on the life status, the public network switch status, and the traffic status; The target signature and the diagnostic result are stored in the cache corresponding to the SIM card, and a lifespan is configured for the target signature and the diagnostic result.

5. The network diagnostic method for a SIM card according to claim 1, characterized in that, The life status includes inactive and pending state, maintenance state, normal use state, and other states; obtaining the real-name status of the SIM card includes: When the SIM card's life status is any one of inactive and waiting to be occupied, maintenance, or normal use, and the real-name field corresponding to the SIM card shows that it has been registered with the real name, the real-name status of the SIM card is determined to be registered with the real name. If the SIM card's life status is any one of inactive and pending state, maintenance state, or normal use state, but the real-name field corresponding to the SIM card shows "not real-named", then the real-name status of the SIM card is determined to be "not real-named". When the SIM card's life status is in any other state, the SIM card's real-name status is determined to be unregistered.

6. The network diagnostic method for a SIM card according to claim 1, characterized in that, Based on the SIM card's real-name registration status, data usage status, health status, and public network access status, the diagnostic result of the SIM card is determined, including: When a target result is matched from a preset correspondence based on the SIM card's real-name status, data usage status, health status, and public network switch status, the target result is determined as the diagnostic result of the SIM card; the preset correspondence is the mapping relationship between real-name status, data usage status, health status, public network switch status, and diagnostic result; When no target result is found from the preset correspondence based on the SIM card's real-name status, traffic status, life status, and public network switch status, a diagnostic result is generated based on the real-name status, traffic status, life status, public network switch status, and a pre-trained large language model.

7. The network diagnostic method for a SIM card according to claim 6, characterized in that, The real-name status includes real-name and unreal-name, the public network switch status includes on and off, the life status includes inactive and pending, maintenance and normal use, and the traffic status includes whether the traffic is exhausted and the traffic array. The traffic array is used to represent the traffic usage corresponding to each time window within a historical period. The preset correspondence includes: If the traffic status is not exhausted, but the life status is inactive and waiting to be occupied or in maintenance status, or the public network switch status is in the off state, the diagnostic result is determined as the first diagnostic result; If the life status is in normal use, but the real-name status is not real-name, or the public network switch status is off, the diagnostic result is determined to be the second diagnostic result. If the traffic status is exhausted, or the public network switch status is closed, the diagnostic result is determined to be the third diagnostic result; If the life status is in normal use and all elements in the traffic array are 0, the diagnostic result is determined to be the fourth diagnostic result.

8. The network diagnostic method for a SIM card according to claim 6, characterized in that, The diagnostic results are generated based on the real-name status, traffic status, life status, public network on / off status, and a pre-trained large language model, including: Based on the real-name status, traffic status, life status, and public network switch status, construct prompt words and summary text; The prompt words and the summary text are input into a pre-trained large language model to obtain diagnostic results. The diagnostic results include diagnostic suggestions, which include at least one of the following: complete real-name authentication, enable public network data, recharge or renew, maintain current use, check physical connection, supplement life status information, and manual review and coverage.

9. A network diagnostic device for a SIM card, characterized in that, include: The acquisition module is used to acquire the SIM card's life status and public network switch status in response to diagnostic commands for the SIM card; The diagnostic command includes the SIM card identifier of the SIM card, the life status is used to characterize the availability and service attribute status of the SIM card, and the public network switch status is used to characterize whether the SIM card is allowed to access public network data services; The judgment module is used to obtain the real-name status and data usage status of the SIM card when it is determined, based on the life status, the public network switch status, and the SIM card identifier, that the diagnostic results cannot be retrieved from the cache of the SIM card; the data usage status is used to characterize the data usage of the SIM card; The processing module is used to determine the diagnostic result of the SIM card based on the real-name status, data usage status, life status, and public network switch status of the SIM card.

10. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the network diagnostic method for a SIM card as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, include: A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the network diagnostic method for a SIM card as described in any one of claims 1 to 8.