The present invention discloses a method for processing parallel data storage and authentication and a terminal. In this case, the method comprises: a data processing thread of a terminal storing data into a corresponding cache area according to a type of the data, wherein the type of the data comprises authentication type and storage type, data of the authentication type is stored in a first cache area, and data of the storage type is stored in a second cache area; a scheduling processing thread of the terminal reading data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and sending the read data to a smart card of the terminal; and the smart card performing storage or authentication according to the type of the received data. By way of the present invention, the problem that data storage operation is failed when there is data authentication operation is solved, thus achieving the effect of improving terminal performance and user experience satisfaction.
Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A method for processing parallel storage and authentication of data, comprising: a data processing thread of a terminal storing data into a corresponding cache area according to a type of the data, wherein the type of the data comprises authentication type and storage type, data of the authentication type is stored in a first cache area, and data of the storage type is stored in a second cache area; a scheduling processing thread of the terminal reading data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and sending the read data to a smart card of the terminal; and the smart card performing storage or authentication according to the type of the received data.
A method for parallel data storage and authentication on a terminal involves storing data into separate cache areas based on data type. Authentication data goes into a first cache area, and storage data goes into a second cache area. A scheduling thread reads data alternately from the two cache areas according to a reading rule linked to data type and sends this data to the terminal's smart card. The smart card then either stores the data or authenticates it, depending on the data type it receives. This allows simultaneous storage and authentication operations improving terminal performance and user experience.
2. The method according to claim 1 , wherein the reading rule associated with data type is that: a number of times of consecutive reading N 1 corresponding to the data of the authentication type is greater than a number of times of consecutive reading N 2 corresponding to the data of the storage type.
The method for parallel data storage and authentication described previously, where authentication data and storage data are stored in separate caches and processed by a smart card, specifies that the reading rule for the scheduling thread prioritizes authentication data. The number of consecutive reads (N1) from the authentication cache is greater than the number of consecutive reads (N2) from the storage cache. This ensures authentication tasks receive preferential processing compared to storage tasks.
3. The method according to claim 1 , wherein the reading rule associated with data type is that: a priority of the data of the authentication type is higher than that of the data of the storage type, and a number of times of consecutive reading N 1 corresponding to the data with a higher priority is greater than a number of times of consecutive reading N 2 corresponding to the data with a lower priority.
The method for parallel data storage and authentication described previously, where authentication data and storage data are stored in separate caches and processed by a smart card, establishes a priority system for reading data. Authentication data is given a higher priority than storage data. Consequently, the number of consecutive reads (N1) from the higher-priority authentication data cache is greater than the number of consecutive reads (N2) from the lower-priority storage data cache. This prioritizes processing based on assigned importance.
4. The method according to claim 2 , wherein the step of a scheduling processing thread of the terminal reading data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and sending the read data to a smart card of the terminal comprises: the scheduling processing thread of the terminal reading data from the first cache area for N 1 times consecutively, then reading data from the second cache area for N 2 times consecutively, and sending the read data to the smart card of the terminal after reading the data each time; and repeatedly performing this step till the first cache area and/or the second cache area are/is empty.
In the method for parallel data storage and authentication where authentication data and storage data are in separate caches, and the number of consecutive authentication reads (N1) is greater than storage reads (N2), the scheduling thread reads data as follows: It reads data from the authentication cache (first cache area) N1 times consecutively, then reads data from the storage cache (second cache area) N2 times consecutively. After each read, the data is sent to the smart card. This process repeats until either the authentication cache or the storage cache is empty, alternating between authentication and storage data.
5. The method according to claim 2 , wherein the step of a scheduling processing thread of the terminal reading data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and sending the read data to a smart card of the terminal comprises: Step A: the terminal setting a global variable N, wherein an initial value of N is N 1 , when there are data in the first cache area, the scheduling processing thread of the terminal sets N as 0; Step B: the scheduling processing thread reading data from the first cache area, sending the read data to the smart card of the terminal, and adding N with 1; and repeatedly performing the step B till N is equal to N 1 , setting N as 0, and performing step C; and Step C: the scheduling processing thread reading data from the second cache area, sending the read data to the smart card till N is equal to N 2 , setting N as 0, and returning to the step B till the first cache area and/or the second cache area are/is empty.
In the method for parallel data storage and authentication where authentication data and storage data are in separate caches, and the number of consecutive authentication reads (N1) is greater than storage reads (N2), the scheduling thread operates as follows: A global variable N is initialized to N1. When authentication data is available in the first cache, N is reset to 0. The scheduling thread repeatedly reads data from the authentication cache, sends it to the smart card, and increments N until N equals N1, then N resets to 0, and moves to the next step. The thread then reads data from the storage cache until N equals N2, sends it to the smart card. Again, N resets to 0 and returns to the step of reading from the authentication cache. The process continues until both caches are empty.
6. The method according to claim 1 , wherein when the first cache area or the second cache area is empty, the scheduling processing thread continues to read data from a cache area which is not empty in the first cache area and the second cache area, and sending the read data to the smart card.
In the method for parallel data storage and authentication involving two caches, when either the authentication cache or the storage cache becomes empty, the scheduling thread continues reading data from the other non-empty cache and sending it to the smart card. This ensures that data processing continues as long as data is available in at least one of the caches, optimizing throughput.
7. The method according to claim 1 , wherein the step of the smart card performing storage or authentication according to the type of the received data comprises: the smart card performing authentication on the received data when determining that the type of the received data is the authentication type; and the smart card performing storage on the received data when determining that the type of the received data is the storage type.
In the method for parallel data storage and authentication, the smart card receives data and its type. If the data type is authentication, the smart card performs authentication. If the data type is storage, the smart card performs storage. This conditional operation based on data type allows the smart card to handle both storage and authentication tasks seamlessly.
8. A terminal, comprising: a data processing module adapted to store data into a corresponding area according to a type of the data, wherein the type of the data comprises a authentication type and a storage type, data of the authentication type is stored in a first cache area, and data of the storage type is stored in a second cache area; a scheduling processing module, adapted to read data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and send the read data to a smart card module of the terminal; and the smart card module, adapted to perform storage or authentication according to the type of the received data.
A terminal capable of parallel data storage and authentication includes: a data processing module that stores data into either a first cache (for authentication data) or a second cache (for storage data) based on its type; a scheduling processing module that alternately reads data from the two caches according to a reading rule associated with data type and sends the data to a smart card module; and the smart card module which either stores or authenticates the received data depending on its type.
9. The terminal according to claim 8 , wherein the scheduling processing module comprises: a first rule setting unit adapted to set the reading rule associated with data type as that: a number of times of consecutive reading N 1 corresponding to the data of the authentication type is greater than a number of times of consecutive reading N 2 corresponding to the data of the storage type.
The terminal capable of parallel data storage and authentication described previously, comprising of data processing, scheduling and smart card modules, has a scheduling processing module which includes a first rule setting unit. This unit sets the reading rule such that the number of consecutive reads (N1) from the authentication data cache is greater than the number of consecutive reads (N2) from the storage data cache, prioritizing authentication.
10. The terminal according to claim 8 , wherein the scheduling processing module comprises: a second rule setting unit, adapted to set the reading rule associated with data type as that: a priority of the data of the authentication type is higher than that of the data of the storage type, and a number of times of consecutive reading N 1 corresponding to the data with a higher priority is greater than a number of times of consecutive reading N 2 corresponding to the data with a lower priority.
The terminal capable of parallel data storage and authentication described previously, comprising of data processing, scheduling and smart card modules, has a scheduling processing module that includes a second rule setting unit. This unit sets the reading rule such that authentication data has a higher priority than storage data, resulting in the number of consecutive reads (N1) from the higher-priority authentication data cache being greater than the number of consecutive reads (N2) from the lower-priority storage data cache.
11. The terminal according to claim 9 , wherein the scheduling processing module comprises: a first reading unit, adapted to read the data from the first cache area for N 1 times consecutively, and send the read data to the smart card module after reading the data each time; a second reading unit, adapted to read the data from the second cache area for N 2 times consecutively after the first reading unit reads the data for N 1 times consecutively, and send the read data to the smart card module after reading the data each time; and a repeat triggering unit, adapted to trigger the first reading unit to read data after the second reading unit reads data for N 2 times consecutively till the first cache area and/or second cache area are/is empty.
The terminal capable of parallel data storage and authentication, where the scheduling module dictates the number of consecutive reads (N1) from the authentication cache being greater than the number of consecutive reads (N2) from the storage cache, contains these parts in the scheduling processing module: a first reading unit that reads data from the authentication cache N1 times consecutively and sends it to the smart card module after each read; a second reading unit that reads data from the storage cache N2 times consecutively after the first reading unit is done and sends the data to the smart card module after each read; and a repeat triggering unit that triggers the first reading unit to start reading again after the second reading unit completes its N2 reads until both cache areas are empty.
12. The terminal according to claim 8 , wherein the scheduling processing module comprises: a third reading unit, adapted to read data from a cache area which is not empty in the first cache area and the second cache area when the first cache area or the second cache area is empty, and send the read data to the smart card module.
The terminal capable of parallel data storage and authentication includes a scheduling processing module that contains a third reading unit. This unit reads data from whichever cache (authentication or storage) isn't empty when the other cache is empty, and sends the read data to the smart card module. This ensures continuous processing when one type of data is temporarily unavailable.
13. The method according to claim 3 , wherein the step of a scheduling processing thread of the terminal reading data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and sending the read data to a smart card of the terminal comprises: the scheduling processing thread of the terminal reading data from the first cache area for N 1 times consecutively, then reading data from the second cache area for N 2 times consecutively, and sending the read data to the smart card of the terminal after reading the data each time; and repeatedly performing this step till the first cache area and/or the second cache area are/is empty.
In the method for parallel data storage and authentication where authentication data and storage data are in separate caches, authentication data has higher priority and the number of consecutive authentication reads (N1) is greater than storage reads (N2), the scheduling thread reads data as follows: It reads data from the authentication cache (first cache area) N1 times consecutively, then reads data from the storage cache (second cache area) N2 times consecutively. After each read, the data is sent to the smart card. This process repeats until either the authentication cache or the storage cache is empty, alternating between authentication and storage data.
14. The method according to claim 3 , wherein the step of a scheduling processing thread of the terminal reading data from the first cache area and the second cache area alternately according to a reading rule associated with the data type, and sending the read data to a smart card of the terminal comprises: Step A: the terminal setting a global variable N, wherein an initial value of N is N 1 , when there are data in the first cache area, the scheduling processing thread of the terminal sets N as 0; Step B: the scheduling processing thread reading data from the first cache area, sending the read data to the smart card of the terminal, and adding N with 1; and repeatedly performing the step B till N is equal to N 1 , setting N as 0, and performing step C; and Step C: the scheduling processing thread reading data from the second cache area, sending the read data to the smart card till N is equal to N 2 , setting N as 0, and returning to the step B till the first cache area and/or the second cache area are/is empty.
In the method for parallel data storage and authentication where authentication data and storage data are in separate caches, authentication data has higher priority and the number of consecutive authentication reads (N1) is greater than storage reads (N2), the scheduling thread operates as follows: A global variable N is initialized to N1. When authentication data is available in the first cache, N is reset to 0. The scheduling thread repeatedly reads data from the authentication cache, sends it to the smart card, and increments N until N equals N1, then N resets to 0, and moves to the next step. The thread then reads data from the storage cache until N equals N2, sends it to the smart card. Again, N resets to 0 and returns to the step of reading from the authentication cache. The process continues until both caches are empty.
15. The terminal according to claim 10 , wherein the scheduling processing module comprises: a first reading unit, adapted to read the data from the first cache area for N 1 times consecutively, and send the read data to the smart card module after reading the data each time; a second reading unit, adapted to read the data from the second cache area for N 2 times consecutively after the first reading unit reads the data for N 1 times consecutively, and send the read data to the smart card module after reading the data each time; and a repeat triggering unit, adapted to trigger the first reading unit to read data after the second reading unit reads data for N 2 times consecutively till the first cache area and/or second cache area are/is empty.
The terminal capable of parallel data storage and authentication, where authentication data has higher priority and the scheduling module dictates the number of consecutive reads (N1) from the authentication cache being greater than the number of consecutive reads (N2) from the storage cache, contains these parts in the scheduling processing module: a first reading unit that reads data from the authentication cache N1 times consecutively and sends it to the smart card module after each read; a second reading unit that reads data from the storage cache N2 times consecutively after the first reading unit is done and sends the data to the smart card module after each read; and a repeat triggering unit that triggers the first reading unit to start reading again after the second reading unit completes its N2 reads until both cache areas are empty.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
December 7, 2010
July 23, 2013
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.