Communication method based on all-in-one card, all-in-one card and computer readable storage medium

The all-in-one card solves the problem of limited card slots in terminal devices by electrically connecting the processor to multiple USIM modules and card readers, and achieves flexible communication network selection and a balance between quality and cost.

CN121052272APending Publication Date: 2025-12-02SHENZHEN EXCELSECU DATA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410708990.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

The multi-card slot design in existing terminal equipment leads to increased manufacturing and maintenance costs, limited choice of communication networks, inability to adapt to various situations, and prominent communication quality and cost issues.

Method used

It adopts an all-in-one card, which realizes processor reset response and communication connection negotiation through electrical connection between the processor and multiple USIM modules and card readers, and flexibly selects the communication network.

Benefits of technology

The card reader can flexibly select different communication networks without the need for additional card slots, improving the adaptability of terminal devices to various situations and optimizing the balance between communication quality and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121052272A_ABST
    Figure CN121052272A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of communication, and provides a communication method based on an all-in-one card, the all-in-one card and a computer readable storage medium, and the method comprises the steps: starting to send a processor reset response to a card reader if a reset instruction is detected; in the process of sending a processor reset response to the card reader, establishing a first communication connection relationship with a target USIM module corresponding to the current communication configuration; a processor reset response is sent to the card reader; establishing a second communication connection relationship with the card reader; and realizing communication between the card reader and the target USIM module based on the first communication connection relationship and the second communication connection relationship. According to the application, the card reader can flexibly select different communication networks for communication without increasing the number of card slots, so that the terminal equipment can flexibly select different communication networks for communication, and the adaptability to various conditions is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and in particular relates to a communication method based on a multi-in-one card, the multi-in-one card, and a computer-readable storage medium. Background Technology

[0002] In modern terminal device communications, multi-SIM and multi-SIM slot designs are widely used to achieve communication diversity and flexibility. However, this design also brings about a significant increase in manufacturing and maintenance costs. Each additional SIM slot increases the size and complexity of the terminal device, leading to situations where multi-SIM slot configurations cannot be supported or more slots cannot be added due to size limitations of the terminal device.

[0003] The limited number of card slots restricts the card reader's ability to select communication networks, making it unsuitable for various situations. For example, if a terminal device has only one card slot, it can only insert a single communication card. The card reader can only select the communication network of that single card. When the signal coverage of the selected communication card's operator is poor, the communication quality of the terminal device will be severely affected. Furthermore, if the communication fees of the single communication card's operator are high, it may lead to excessively high communication costs. Summary of the Invention

[0004] In view of this, embodiments of this application provide a communication method based on a multi-in-one card, a multi-in-one card, and a computer-readable storage medium, so as to enable the card reader to more flexibly select different communication networks for communication without increasing the number of card slots, thereby improving adaptability to various situations.

[0005] A first aspect of this application provides a communication method based on a multi-in-one card, the multi-in-one card including a processor and a plurality of USIM modules, the processor being electrically connected to each USIM module and a card reader, the method being applied to the processor, the method comprising:

[0006] If a reset command is detected, a processor reset response is sent to the card reader.

[0007] During the process of sending a processor reset response to the card reader, a first communication connection is established with the target USIM module corresponding to the current communication configuration;

[0008] After establishing a first communication connection with the target USIM module corresponding to the current communication configuration, a processor reset response is sent to the card reader.

[0009] Establish a second communication connection with the card reader;

[0010] Based on the first communication connection relationship and the second communication connection relationship, communication between the card reader and the target USIM module is realized.

[0011] In one implementation of the first aspect, establishing a first communication connection with the target USIM module corresponding to the current communication configuration includes:

[0012] Start the target USIM module corresponding to the current communication configuration, and then reset the target USIM module;

[0013] If a target reset response is received from the target USIM module, a first communication connection is established with the target USIM module.

[0014] In one implementation of the first aspect, establishing a first communication connection with the target USIM module corresponding to the current communication configuration includes:

[0015] Negotiate the first communication protocol parameters with the target USIM module corresponding to the current communication configuration;

[0016] A first communication connection is established with the target USIM module based on the negotiation results of the first communication protocol parameters.

[0017] Establishing a second communication connection with the card reader includes:

[0018] Negotiate the second communication protocol parameters with the card reader;

[0019] A second communication connection is established with the card reader based on the negotiation results of the second communication protocol parameters.

[0020] In one implementation, the step of establishing communication between the card reader and the target USIM module based on the first communication connection relationship and the second communication connection relationship includes:

[0021] Application protocol data unit communication between the card reader and the target USIM module is achieved based on the negotiation results of the first communication protocol parameters and the negotiation results of the second communication protocol parameters.

[0022] In one implementation of the first aspect, the step of implementing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes:

[0023] The system receives a preset configuration instruction sent by the card reader, obtains communication configuration information from the preset configuration instruction, and sets the communication configuration information to the current communication configuration if the general configuration information is different from the current communication configuration, so as to receive the reset instruction from the card reader and establish a new communication connection relationship according to the communication configuration information.

[0024] In one implementation of the first aspect, the step of implementing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes:

[0025] Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module;

[0026] Receive process bytes and / or status bytes sent by the target USIM module and forward them to the card reader.

[0027] In one implementation of the first aspect, the step of implementing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes:

[0028] Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module;

[0029] Receive process bytes and / or instruction bytes and / or response data and / or status bytes sent by the target USIM module, and forward them to the card reader.

[0030] In one implementation of the first aspect, the step of implementing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes:

[0031] Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module;

[0032] Receive process bytes and / or instruction bytes sent by the target USIM module and forward them to the card reader;

[0033] Receive the data field of the application protocol data unit sent by the card reader and forward it to the target USIM module;

[0034] Receive process bytes and / or status bytes sent by the target USIM module and forward them to the card reader.

[0035] A second aspect of this application provides a multi-in-one card, including a processor and a plurality of USIM modules. The processor is electrically connected to each of the USIM modules and electrically connected to a card reader. The processor stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps of the communication method based on the multi-in-one card as described in the first aspect.

[0036] A third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the communication method based on an all-in-one card as described in the first aspect.

[0037] The beneficial effect of the first aspect of the embodiments of this application is that, based on a multi-in-one card including a processor and multiple USIM modules, the following communication method is executed: upon detecting a reset command, a processor reset response is sent to the card reader; during the sending of the reset response, a first communication connection is established with the target USIM module corresponding to the current communication configuration; after the first communication connection is established, the processor reset response is sent to the card reader, and then a second communication connection is established with the card reader; finally, communication between the card reader and the target USIM module is realized based on the first and second communication connection relationships. This application enables the card reader to flexibly select different communication networks for communication without increasing the number of card slots, allowing the terminal device to flexibly select different communication networks for communication, thus improving adaptability to various situations.

[0038] It is understood that the beneficial effects of the second and third aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a schematic diagram illustrating the implementation process of the communication method based on multi-card integration provided in the embodiments of this application;

[0041] Figure 2 This is a timing diagram of the first communication method based on multi-card integration provided in the embodiments of this application;

[0042] Figure 3 This is a timing diagram of the second communication method based on multi-card integration provided in the embodiments of this application;

[0043] Figure 4 This is a timing diagram of the third communication method based on multi-card integration provided in the embodiments of this application;

[0044] Figure 5 This is a timing diagram of the fourth communication method based on multi-card integration provided in the embodiments of this application;

[0045] Figure 6 This is a schematic diagram of the all-in-one card provided in the embodiments of this application;

[0046] Figure 7 This is a schematic diagram of the electrical connections of the multi-function card provided in the embodiments of this application. Detailed Implementation

[0047] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0048] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0049] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0050] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0051] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0052] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] This application provides a communication method based on a multi-in-one SIM card. The multi-in-one SIM card includes a processor and multiple USIM modules. The processor is electrically connected to each USIM module and a card reader. The method is applied to the processor to enable the card reader to more flexibly select different communication networks for communication without adding a card slot, thus improving adaptability to various situations. This method, based on the multi-in-one SIM card, establishes a first communication connection with the target USIM module corresponding to the current communication configuration through the processor of the multi-in-one SIM card, and establishes a second communication connection with the card reader. Communication between the card reader and the target USIM module is realized based on the first and second communication connection relationships. This allows the card reader to flexibly select different communication networks for communication without adding a card slot, further enabling the terminal device to flexibly select different communication networks for communication and improving adaptability to various situations.

[0054] In applications, 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. A general-purpose processor can be a microprocessor or any conventional processor.

[0055] This application uses a microcontroller unit (MCU) as an example of a general-purpose processor. An MCU is a chip-level computer that appropriately reduces the frequency and specifications of a central processing unit (CPU) and integrates memory and counters onto a single chip. It can perform different combinations of control for different applications and has the characteristics of high integration, strong specialization and low power consumption.

[0056] like Figure 1 As shown, this application provides a communication method based on a multi-in-one card. The multi-in-one card includes a processor and multiple USIM modules. The processor is electrically connected to each USIM module and a card reader. The method is applied to the processor and includes:

[0057] Step S101: If a reset command is detected, a processor reset response is sent to the card reader.

[0058] In this application, multiple USIM modules are represented by two or more USIM modules belonging to two or more different operators. The card reader is the terminal device's card reader. When the terminal device does not require communication, the processor of the multi-in-one card and each USIM (Universal Subscriber Identity Module) module are powered off to save energy. When the terminal device needs to communicate, it needs to power on the multi-in-one card. First, the card reader powers on the processor and sends a reset command to the processor. If the processor detects the reset command, it resets and begins sending a processor reset response (ATR) to the card reader. The relevant process can be found in [reference needed]. Figure 2 .

[0059] In applications, the processor reset response informs the card reader about information about the processor module, such as the manufacturer, supported transfer rates, communication protocols, and transfer modes. This information is crucial for correctly initializing communication between the card reader and the processor. However, communication between the card reader and the processor is only one part of the communication between the card reader and the USIM module; the other part is communication between the processor and the USIM module. At this point, only the processor is powered on; the individual USIM modules of the multi-in-one card are powered off and cannot obtain basic USIM module information. To ensure compatibility and consistency in communication between the card reader and the USIM module, a processor reset response is sent to the card reader. In applications, this is achieved by sending a fixed initial character TS (...). Figure 2 In ATR[0]), the initial character TS is usually 0x38.

[0060] Step S102: During the process of sending a processor reset response to the card reader, a first communication connection is established with the target USIM module corresponding to the current communication configuration.

[0061] In application, to ensure the compatibility and consistency of the communication link between the card reader and the USIM module, the processor establishes a first communication connection with the target USIM module corresponding to the current communication configuration during the process of sending a processor reset response to the card reader. This allows the processor to obtain information about the target USIM module from among multiple USIM modules, such as application type, manufacturer, supported transmission rate, communication protocol, and transmission mode. After obtaining the target USIM module information, the processor can then send a processor reset response to the card reader based on that information.

[0062] In application, the current communication configuration can be determined based on the default communication configuration, the previous communication configuration, or the manual communication configuration. By flexibly adjusting the current communication configuration, the USIM module can be flexibly selected.

[0063] Before establishing a first communication connection with the target USIM module corresponding to the current communication configuration during the process of sending a control module reset response to the card reader, the process further includes: obtaining the communication quality and data usage cost of each USIM module; and selecting the current communication configuration based on the communication quality and data usage cost of each module. Communication quality includes parameters such as the presence or absence of a service signal. In application, the processor comprehensively considers both communication quality and data usage cost to evaluate each USIM module with a comprehensive score or priority. Modules with better communication quality may receive higher scores. Modules with lower data usage costs may also have an advantage in scores. Based on these scores or priorities, the system selects one or more USIM modules as the preferred or alternative for current communication. This selection process may also consider other factors, such as the usage history of the USIM modules and user preferences.

[0064] By determining the current communication configuration based on the communication quality and traffic costs of each USIM obtained, not only can flexible selection of USIM modules be achieved, but also a balance between communication quality and communication cost can be achieved.

[0065] Step S103: After establishing a first communication connection with the target USIM module corresponding to the current communication configuration, send a processor reset response to the card reader.

[0066] In the application, since the process of sending a processor reset response to the card reader and the process of establishing a first communication connection with the target USIM module corresponding to the current communication configuration are performed synchronously, the processor can complete the process of sending a processor reset response to the card reader after establishing a first communication connection with the target USIM module. Therefore, the process of sending a processor reset response to the card reader can be completed after step S102.

[0067] Step S104: Establish a second communication connection with the card reader.

[0068] In applications, establishing a second communication connection with the card reader occurs after the processor establishes a first communication connection with the target USIM module. This is also to ensure the compatibility and consistency of the communication link between the card reader and the target USIM module.

[0069] Step S105: Based on the first communication connection relationship and the second communication connection relationship, communication between the card reader and the target USIM module is realized.

[0070] In this application, the first communication connection enables communication between the card reader and the processor, while the second connection enables communication between the processor and the target USIM module. Therefore, based on these two connections, the processor can enable communication between the card reader and the target USIM module among multiple USIM modules. It is understandable that the target USIM module's current communication configuration corresponds to the chosen USIM module, allowing for flexible selection of the USIM module without the need for additional card slots. This allows the card reader to more flexibly choose different communication networks for communication.

[0071] In one embodiment, establishing a first communication connection with the target USIM module corresponding to the current communication configuration includes:

[0072] Step S1021: Start the target USIM module corresponding to the current communication configuration and reset the target USIM module.

[0073] In the application, the processor selects the corresponding target USIM module (i.e., ...) based on the current communication configuration. Figure 2 The USIM module (USIMx) is powered on to start the USIM module. After startup, the USIM module is reset in anticipation of receiving the target reset response (i.e., ...) sent by the module. Figure 2 (ATRx in the text).

[0074] Step S1022: If a target reset response is received from the target USIM module, a first communication connection is established with the target USIM module.

[0075] In applications, the target reset response includes information about the target USIM module, such as application type, manufacturer, supported transmission rates, communication protocols, and transmission modes. Based on the target reset response, an initial communication connection can be established with the target USIM module, enabling communication between the controller and the target USIM module.

[0076] In one embodiment, establishing a first communication connection with the target USIM module includes:

[0077] Step S1023: Negotiate the first communication protocol parameters with the target USIM module corresponding to the current communication configuration;

[0078] Step S1024: Establish a first communication connection with the target USIM module according to the negotiation result of the first communication protocol parameters;

[0079] Step S104 includes:

[0080] Step S1041: Negotiate the second communication protocol parameters with the card reader;

[0081] Step S1042: Establish a second communication connection with the card reader based on the negotiation result of the second communication protocol parameters.

[0082] In applications, Protocol and Parameter Selection (PPS) is a crucial step in ensuring smooth data exchange between communicating parties. During PPS negotiation, the two parties agree on matters such as packet segmentation, packet format, data transmission rate, error detection, and correction. The settings of these parameters directly impact communication quality and efficiency. Through effective negotiation, the communication system can adapt to different network environments and device characteristics, providing reliable and efficient data transmission.

[0083] In the application, the negotiation of the first communication protocol parameters with the target USIM module corresponding to the current communication configuration includes: the processor sending a first communication protocol parameter negotiation request based on the information about the target USIM module contained in the target reset response. Figure 2 (PPSx req in the target USIM module); Receive the first communication protocol parameter negotiation response sent by the target USIM module ( Figure 2 (PPSx rsp in the context of the first communication protocol parameter negotiation). After the first communication protocol parameter negotiation is completed, the communication between the processor and the target USIM module proceeds according to the second communication protocol parameter negotiation result.

[0084] In the application, the second communication protocol parameter negotiation between the processor and the card reader includes: receiving a second communication protocol parameter negotiation request sent by the card reader based on the information about the target USIM module contained in the processor's reset response and the processor's information. Figure 2 (PPS req in the middle); send the second communication protocol parameter negotiation response ( Figure 2 (PPS rsp in the context of the second communication protocol). After the second communication protocol parameters are negotiated, the communication between the processor and the card reader proceeds according to the negotiation results of the second communication protocol parameters.

[0085] In the application, the negotiation of the second communication protocol parameters, following the negotiation of the first communication protocol parameters, ensures the compatibility and consistency of the communication link between the card reader and the USIM module. In one embodiment, step S105 includes:

[0086] Step S1051: Based on the negotiation results of the first communication protocol parameters and the second communication protocol parameters, the application protocol data unit communication between the card reader and the target USIM module is realized.

[0087] In the application, the processor communicates with the USIM module based on the negotiation result of the first communication protocol parameters, and communicates with the card reader based on the negotiation result of the second communication protocol parameters, thus realizing communication between the card reader and the USIM module. The communication between the card reader and the USIM module is Application Protocol Data Unit (APDU) communication. APDU communication has advantages such as standardization, ease of use, flexibility, security, efficiency, error control, strong adaptability, and universality. It can be compatible with the interoperability between different USIM cards and card readers, supports multiple command types, including read, write, authentication, and authorization, and can meet the needs of various application scenarios.

[0088] In one embodiment, step S1051 includes:

[0089] The system receives a preset configuration instruction sent by the card reader, obtains communication configuration information from the preset configuration instruction, and sets the communication configuration information to the current communication configuration if the communication configuration information is different from the current communication configuration, so as to receive the reset instruction from the card reader and establish a new communication connection relationship according to the communication configuration information.

[0090] In application, establishing a new connection based on the communication configuration information includes:

[0091] Receives a reset command and begins sending a processor reset response to the card reader;

[0092] During the process of sending a processor reset response to the card reader, a first communication connection is established with the target USIM module corresponding to the current communication configuration;

[0093] After establishing a first communication connection with the target USIM module corresponding to the current communication configuration, a processor reset response is sent to the card reader.

[0094] Establish a second communication connection with the card reader;

[0095] Based on the first communication connection relationship and the second communication connection relationship, communication between the card reader and the target USIM module is realized.

[0096] In application, the communication configuration information in the preset configuration command includes the reader's user communication configuration, the terminal device's built-in communication configuration, or the optimal communication configuration determined by the terminal device based on the current environment and communication requirements. If the communication configuration information in the preset configuration command differs from the current communication configuration, the communication configuration information is set to the current communication configuration to receive the reader's reset command. This allows for the establishment of a new communication connection based on the communication configuration information, achieving the optimal communication configuration that meets user or terminal device needs and optimizing the communication process between the processor and the USIM module. It is understood that communication between the processor and the USIM module is a crucial part of communication between the reader and the USIM module, and is key to optimizing terminal device communication via USIM. Therefore, the above method allows the reader to flexibly select different communication networks for communication, improving the communication flexibility of the application device and balancing communication quality and cost.

[0097] In one embodiment, step S1051 includes:

[0098] Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module;

[0099] Receive process bytes and / or status bytes sent by the target USIM module and forward them to the card reader.

[0100] like Figure 3As shown, in the application, the card reader only needs to send the Application Protocol Data Unit Header (APDU Header). The APDU Header includes the Class byte (Class, CLA), the Instruction byte (Instruction, INS), Parameter byte 1 (Parameter 1, P1), Parameter byte 2 (Parameter 2, P2), etc. The processor receives the APDU Header sent by the card reader and forwards it to the target USIM module, enabling the target USIM module to execute specific operations or commands according to certain security requirements based on the bytes contained in the APDU Header, and return status bytes indicating the status information after the command is executed. The status bytes include Status Word 1 (SW1) and Status Word 2 (SW2). In the application, if the target USIM module is busy when it receives the APDU Header, it will first return the process byte Busy (Busy) 0x60, and execute the command after it becomes idle. The processor sequentially receives the process bytes and / or status bytes (SW1SW2) sent by the target USIM module and forwards them to the card reader, completing the communication between the card reader and the target USIM module.

[0101] In one embodiment, step S1051 includes:

[0102] Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module;

[0103] Receive process bytes and / or instruction bytes and / or response data and / or status bytes sent by the target USIM module, and forward them to the card reader.

[0104] like Figure 4As shown, in the application, the card reader only needs to send the Application Protocol Data Unit Header (APDU Header). The APDU Header includes the Class byte (Class, CLA), the Instruction byte (Instruction, INS), Parameter byte 1 (Parameter 1, P1), Parameter byte 2 (Parameter 2, P2), etc. The processor receives the APDU Header sent by the card reader and forwards it to the target USIM module, enabling the target USIM module to execute specific operations or commands according to certain security requirements based on the bytes contained in the APDU Header, and return status bytes indicating the status information after the command is executed. The status bytes include Status Word 1 (SW1) and Status Word 2 (SW2). In the application, if the target USIM module is in a busy state when it receives the APDU Header, it will return the process byte Busy (Busy) 0x60. After this, the target USIM module may also send the Instruction byte (INS). If the instruction executed by the target USIM module requires the return of data, the module will first return the data (Data) and then return the status byte. The processor sequentially receives process bytes and / or instruction bytes and / or response data and / or status bytes (SW1SW2) sent by the target USIM module, and forwards them to the card reader to complete the communication between the card reader and the target USIM module.

[0105] In one embodiment, step S1051 includes:

[0106] Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module;

[0107] Receive process bytes and / or instruction bytes sent by the target USIM module and forward them to the card reader;

[0108] Receive the data field of the application protocol data unit sent by the card reader and forward it to the target USIM module;

[0109] Receive process bytes and / or status bytes sent by the target USIM module and forward them to the card reader.

[0110] like Figure 5As shown, in the application, the card reader sends an Application Protocol Data Unit Header (APDU Header), which includes a Class byte (CLA), an Instruction byte (INS), Parameter 1 byte (P1), and Parameter 2 byte (P2). The processor receives the APDU Header from the card reader and forwards it to the target USIM module. This allows the target USIM module to execute specific operations or commands according to certain security requirements based on the bytes contained in the APDU Header, and return status bytes indicating the status information after command execution. The status bytes include Status Word 1 (SW1) and Status Word 2 (SW2). In the application, if the target USIM module is busy when it receives the APDU Header, it will return the process byte Busy 0x60. The target USIM module may also send an Instruction byte (INS). In the application, the card reader may also send data to the target USIM module, in which case it will send a Data field to the processor. The processor sequentially receives process bytes and / or instruction bytes and / or process byte data and / or status bytes (SW1SW2) sent by the target USIM module, and forwards them to the card reader to complete the communication between the card reader and the target USIM module.

[0111] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0112] This application also provides an all-in-one card suitable for terminal devices that cannot add more card slots. It enables the card reader to have a wider range of communication network options without adding more card slots, thereby improving the flexibility of the terminal device in selecting communication networks.

[0113] Figure 6 This is a schematic diagram of the structure of a multi-function card provided in an embodiment of this application. Figure 6 As shown, the all-in-one card 6 of this embodiment includes: at least one processor 60 ( Figure 6 Only one is shown in the image, but at least two USIM modules are required: USIM module 61 and USIM module 62. Figure 6 (Only two are shown in the diagram) and a computer program 63 stored in the processor 60 and executable on the at least one processor 60, wherein the processor 60 executes the computer program 63 to implement the steps in any of the above embodiments of the communication method based on the three-in-one card.

[0114] The all-in-one card may include, but is not limited to, a processor 60, a USIM module 61, and a USIM module 62. Those skilled in the art will understand that... Figure 6 This is merely an example of the multi-card 6 and does not constitute a limitation on the multi-card 6. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as storage modules, positioning modules, etc.

[0115] The processor 60 may be a Central Processing Unit (CPU), but it can also be 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. A general-purpose processor may be a microcontroller unit (MCU), or it may be any conventional processor.

[0116] The processor 60 has storage space for storing a bootloader, data, and other programs, such as the program code of the computer program. Taking a microprocessor as an example, the computer program can be stored in the on-chip FLASH or on-chip peripheral area of ​​the processor 60. The on-chip FLASH or on-chip peripheral area can also be used to temporarily store data that has been output or will be output.

[0117] It should be noted that the information interaction and execution process between the above-mentioned components are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0118] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0119] This application embodiment also provides a terminal device, wherein the terminal device is provided with the multi-in-one card.

[0120] In applications, terminal devices can be mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other terminal devices. This application embodiment does not impose any restrictions on the specific type of terminal device.

[0121] like Figure 7 The diagram shows the electrical connection between the processor, each USIM module, and the reader of the three-in-one card provided in this application embodiment. The processor is exemplarily represented as an MCU, and the number of USIM modules is exemplarily represented as three, labeled as USIM1, USIM2, and USIM3. VCC, VCC1, VCC2, and VCC3 are power supply pins, CLK, CLK1, CLK2, and CLK3 are clock pins, RST, RST1, RST2, and RST3 are reset pins, and I / O, I / O1, I / O2, and I / O3 are input / output pins.

[0122] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0123] This application provides a computer program product that, when run on a processor, enables the processor to execute the steps described in the various method embodiments above.

[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal equipment, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0125] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0126] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0127] In the embodiments provided in this application, it should be understood that the disclosed three-in-one card, terminal device, and communication method based on the three-in-one card can be implemented in other ways. For example, the three-in-one card and terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A communication method based on a multi-functional SIM card, characterized in that, The multi-in-one card includes a processor and multiple USIM modules, the processor being electrically connected to each USIM module and a card reader, and the method being applied to the processor, the method comprising: If a reset command is detected, a processor reset response is sent to the card reader. During the process of sending a processor reset response to the card reader, a first communication connection is established with the target USIM module corresponding to the current communication configuration; After establishing a first communication connection with the target USIM module corresponding to the current communication configuration, a processor reset response is sent to the card reader. Establish a second communication connection with the card reader; Based on the first communication connection relationship and the second communication connection relationship, communication between the card reader and the target USIM module is realized.

2. The communication method based on a multi-card as described in claim 1, characterized in that, The establishment of a first communication connection with the target USIM module corresponding to the current communication configuration includes: Start the target USIM module corresponding to the current communication configuration, and then reset the target USIM module; If a target reset response is received from the target USIM module, a first communication connection is established with the target USIM module.

3. The communication method based on a multi-card as described in claim 2, characterized in that, Establishing a first communication connection with the target USIM module includes: Negotiate the first communication protocol parameters with the target USIM module corresponding to the current communication configuration; A first communication connection is established with the target USIM module based on the negotiation result of the first communication protocol parameters. Establishing a second communication connection with the card reader includes: Negotiate the second communication protocol parameters with the card reader; A second communication connection is established with the card reader based on the negotiation results of the second communication protocol parameters.

4. The communication method based on a multi-card as described in claim 3, characterized in that, The step of establishing communication between the card reader and the target USIM module based on the first communication connection relationship and the second communication connection relationship includes: Application protocol data unit communication between the card reader and the target USIM module is achieved based on the negotiation results of the first communication protocol parameters and the negotiation results of the second communication protocol parameters.

5. The communication method based on a multi-card as described in claim 4, characterized in that, The process of establishing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes: The system receives a preset configuration instruction sent by the card reader, obtains communication configuration information from the preset configuration instruction, and sets the communication configuration information to the current communication configuration if the communication configuration information is different from the current communication configuration, so as to receive the reset instruction from the card reader and establish a new communication connection relationship according to the communication configuration information.

6. The communication method based on a multi-card as described in claim 4, characterized in that, The process of establishing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes: Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module; Receive process bytes and / or status bytes sent by the target USIM module and forward them to the card reader.

7. The communication method based on a multi-card as described in claim 4, characterized in that, The process of establishing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes: Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module; Receive process bytes and / or instruction bytes and / or response data and / or status bytes sent by the target USIM module, and forward them to the card reader.

8. The communication method based on a multi-card as described in claim 4, characterized in that, The process of establishing application protocol data unit communication between the card reader and the target USIM module based on the negotiation results of the first and second communication protocol parameters includes: Receive the application protocol data unit header sent by the card reader and forward it to the target USIM module; Receive process bytes and / or instruction bytes sent by the target USIM module and forward them to the card reader; Receive the data field of the application protocol data unit sent by the card reader and forward it to the target USIM module; Receive process bytes and / or status bytes sent by the target USIM module and forward them to the card reader.

9. A multi-function card, characterized in that, The device includes a processor and a plurality of USIM modules, the processor being electrically connected to each of the USIM modules and electrically connected to a card reader, the processor storing a computer program that can run on the processor, and the processor executing the computer program implementing the steps of the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.