CN109840148B - Multi-application smart card operating system and method for updating application priority thereof - Google Patents

Multi-application smart card operating system and method for updating application priority thereof Download PDF

Info

Publication number
CN109840148B
CN109840148B CN201910056194.XA CN201910056194A CN109840148B CN 109840148 B CN109840148 B CN 109840148B CN 201910056194 A CN201910056194 A CN 201910056194A CN 109840148 B CN109840148 B CN 109840148B
Authority
CN
China
Prior art keywords
application
priority
module
list
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910056194.XA
Other languages
Chinese (zh)
Other versions
CN109840148A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201910056194.XA priority Critical patent/CN109840148B/en
Publication of CN109840148A publication Critical patent/CN109840148A/en
Application granted granted Critical
Publication of CN109840148B publication Critical patent/CN109840148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a multi-application smart card operating system and a method for updating application priority thereof, relating to the field of smart cards; when the multi-application smart card operating system receives a priority modification request sent by a requester, the multi-application smart card operating system analyzes the priority modification request to obtain a new priority of a target application and a target application identifier; and acquiring the original priority of the target application according to the target application identifier, comparing the new priority of the target application with the original priority to generate a priority comparison result, executing priority modification operation corresponding to the priority comparison result according to the priority comparison result, and returning a priority modification operation response to the requesting party. The user can conveniently and quickly update the priority of the application on the multi-application smart card operating system under the condition of not deleting or installing the application on the multi-application smart card operating system through the method and the system, so that the time and the labor are saved, and the user experience is improved.

Description

Multi-application smart card operating system and method for updating application priority thereof
Technical Field
The invention relates to the field of smart cards, in particular to a multi-application smart card operating system and a method for updating application priority thereof.
Background
Smart cards are a generic term for plastic cards (usually the size of a credit card) with a microchip embedded therein; a smart card operating System (Ch ip operating i ng System) is installed in the microchip; the smart card operating system is a special system, and is mainly used for receiving and processing various information sent to the smart card by the outside (such as a mobile phone or a card reader), executing various instructions sent by the outside, managing a memory space in the card, returning response information to the outside, and the like.
In the society at present, more and more applications are installed on smart cards; currently, the installation order of applications on a multi-application smart card operating system is the priority order of the applications on the smart card; under the condition of not uninstalling the existing application, the multi-application smart card operating system cannot update the priority of the application; if the priority order of the applications needs to be modified, the multi-application smart card operating system must delete all the applications on the smart card and reinstall the applications according to the required priority order (even more, installation or deletion of some applications must be coordinated by the card issuer) to achieve the purpose of updating the application priority.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a multi-application smart card operating system and a method for updating application priority thereof.
The invention provides a method for updating application priority of a multi-application smart card operating system, which comprises the following steps:
step S1: when a multi-application smart card operating system receives a priority modification request sent by a requester, the multi-application smart card operating system analyzes the priority modification request to obtain a new priority of a target application and a target application identifier; acquiring the original priority of the target application according to the target application identifier, executing the step S2 when the new priority of the target application is higher than the original priority, and executing the step S5 when the new priority of the target application is lower than the original priority;
step S2: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority higher than that of a target application; adding the target application identification to one end of the first list with low priority;
step S3: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, sequentially reduces the original priorities of all applications with the priority higher than the original priority of the current application by one level, and updates the original priority of the current application to the highest priority;
step S4: the multi-application smart card operating system deletes a current application identifier corresponding to a current application in the first list; judging whether the first list has application identification, if so, returning to the step S3, otherwise, returning a response of successfully updating the priority to the requester, and ending;
step S5: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority lower than that of a target application; adding the target application identification to the high-priority end of the first list;
step S6: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, sequentially raises the original priorities of all applications with lower priorities than the original priority of the current application by one level, and updates the original priority of the current application to be the lowest priority;
step S7: the multi-application smart card operating system deletes a current application identifier corresponding to a current application in the first list; and judging whether the first list has the application identifier, if so, returning to the step S6, otherwise, returning a response of successfully updating the priority to the requester, and ending.
The invention also provides a multi-application smart card operating system, which comprises a receiving module, an analysis module, a first acquisition module, a first generation adding module, a first selection module, a first reduction updating module, a first deleting module, a first judgment module, a second generation adding module, a second selection module, a first increase updating module, a second deleting module, a second judgment module and a first returning module;
the receiving module is used for receiving a priority modification request sent by a requester;
the analysis module is used for analyzing the priority modification request received by the receiving module to obtain a new priority of a target application and a target application identifier;
the first obtaining module is used for obtaining the original priority of the target application according to the target application identifier obtained by the analysis of the analyzing module;
the first generation adding module is used for generating a first list according to the application identifiers of all applications which are higher than the new priority of the target application obtained by the analysis of the analysis module when the new priority of the target application obtained by the analysis of the analysis module is higher than the original priority obtained by the first obtaining module; adding the target application identifier obtained by the analysis of the analysis module to one end of the first list with low priority;
the first selecting module is used for selecting the application with the lowest priority from the first list generated by the first generating and adding module as the current application; the first judging module is further configured to select an application with the lowest priority from the first list after the first deleting module deletes the current application identifier as the current application when the first judging module judges that the current application identifier is the current application identifier;
the first reduction updating module is used for sequentially reducing the original priority of all the applications which are higher than the original priority of the current application selected by the first selecting module by one level; updating the original priority of the current application selected by the first selection module to be the highest priority;
the first deleting module is used for deleting the current application identifier corresponding to the current application selected by the first selecting module in the first list;
the first judging module is used for judging whether the first list obtained after the first deleting module deletes the current application identifier has the application identifier;
the second generation and addition module is used for generating a first list according to the application identifiers of all applications with the new priority lower than the new priority of the target application obtained by the analysis of the analysis module when the new priority of the target application obtained by the analysis of the analysis module is smaller than the original priority obtained by the first acquisition module; adding the target application identifier obtained by the analysis of the analysis module to one end of the first list with high priority;
the second selecting module is used for selecting the application with the highest priority from the first list generated by the second generating and adding module as the current application; the second judging module is further configured to select an application with the highest priority from the first list after the second deleting module deletes the current application identifier as the current application when the second judging module judges that the current application identifier is the current application;
the first raising and updating module is used for sequentially raising the original priorities of all applications which are lower than the original priority of the current application selected by the second selecting module by one level, and updating the original priority of the current application selected by the second selecting module to be the lowest priority;
the second deleting module is used for deleting the current application identifier corresponding to the current application selected by the first selecting module in the first list;
the second judging module is used for judging whether the first list obtained after the second deleting module deletes the current application identifier has the application identifier;
the first returning module is used for returning a response of successfully updating the priority to the requester when the first judging module judges that the priority is not updated, and ending; and the second judging module is also used for returning a successful response of updating the priority to the requester and ending when the second judging module judges that the priority is not updated.
Compared with the prior art, the invention has the following advantages: according to the multi-application smart card operating system and the method for updating the application priority thereof, provided by the invention, a user can conveniently and quickly update the application priority on the multi-application smart card operating system under the condition that the application on the multi-application smart card operating system is not deleted or installed again, so that the time and the labor are saved, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of a method for updating application priority by a multi-application smart card operating system according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for updating application priorities by a multi-application smart card operating system according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for updating application priorities by a multi-application smart card operating system according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for updating application priority by a multi-application smart card operating system according to a fourth embodiment of the present invention;
fig. 5 is a flowchart of a method for updating application priorities by a multi-application smart card operating system according to a fifth embodiment of the present invention;
fig. 6 is a structural diagram of an operating system of a multi-application smart card according to a sixth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
An embodiment of the present invention provides a method for updating application priorities by a multi-application smart card operating system, as shown in fig. 1, where the method includes the following steps:
step 101: when the multi-application smart card operating system receives a priority modification request sent by a requester, the multi-application smart card operating system analyzes the priority modification request to obtain a new priority of a target application and a target application identifier; acquiring the original priority of the target application according to the target application identifier, executing step 102 when the new priority of the target application is higher than the original priority, and executing step 105 when the new priority of the target application is lower than the original priority;
optionally, in step 101, before obtaining the original priority of the target application according to the target application identifier, the method further includes step a: the multi-application smart card operating system judges whether the target application is installed or not according to the target application identifier, and if so, the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; otherwise, returning the warning information to the requesting party, and ending.
Further, the step a specifically comprises: the multi-application smart card operating system judges whether a target application identifier exists in an installation application information column of the application information table, and if so, the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; otherwise, returning the warning information to the requesting party, and ending.
Step 102: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority higher than that of the target application; adding the target application identification to one end of the first list with low priority;
step 103: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, sequentially reduces the original priorities of all applications with the priority higher than the original priority of the current application by one level, and updates the original priority of the current application to the highest priority;
optionally, in step 103, after the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, the method further includes the following steps:
step C1: the multi-application smart card operating system acquires the identity type of the current application according to the application identifier of the current application, and when the identity type is a slave application or an independent application, the original priorities of all applications higher than the original priority of the current application are sequentially reduced by one level, and the original priority of the current application is updated to be the highest priority; when the identity type is the primary application, performing step C2;
step C2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
step C3: the multi-application smart card operating system selects the application with the lowest priority from the second list as the current sub-application, sequentially lowers the original priorities of all applications with higher priority than the original priorities of the current sub-applications by one level, and updates the original priorities of the current sub-applications to the highest priorities;
step C4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the second list; and judging whether the second list has application identifications, if so, returning to the step C3, otherwise, executing the step 104.
Step 104: the multi-application smart card operating system deletes a current application identifier corresponding to the current application in the first list; judging whether the first list has application identifiers, if so, returning to the step 103, otherwise, returning a response of successfully updating the priority to the requester, and ending;
step 105: the multi-application smart card operating system generates a first list according to the application identifications of all applications with the new priority lower than the target application; adding the target application identification to the high-priority end of the first list;
step 106: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, sequentially raises the original priorities of all applications with lower priorities than the original priority of the current application by one level, and updates the original priority of the current application to be the lowest priority;
optionally, in step 101, after obtaining the original priority of the target application according to the target application identifier, the method further includes step B: the multi-application smart card operating system compares the new priority of the target application with the original priority, and when the new priority of the target application is equal to the original priority, the multi-application smart card operating system returns warning information to the requester and finishes the process; when the new priority of the target application is higher than the original priority, executing step 102; when the new priority of the target application is less than the original priority, step 105 is performed.
Further, step 102 specifically includes:
the multi-application smart card operating system acquires the original priorities of all installed applications and finds out the installed applications with the priorities higher than the new priorities of the target applications; and generating a first list of application identifications of the installed applications with the new priority higher than that of the target application according to the original priority, and adding the target application identification to one end of the first list with the lowest priority.
Further, step 103 specifically includes:
the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, takes out the application identifier of the current application from the application information table and puts the application identifier into a temporary storage area, sequentially moves the application identifiers of all applications with the priority higher than the original priority of the current application in the application information table to fill the original position of the application identifier of the current application in the application information table, and puts the application identifier of the current application into a newly vacated position in the application information table.
Further, step 105 comprises: the multi-application smart card operating system acquires the original priorities of all installed applications and finds out the installed applications with the priorities lower than the new priorities of the target applications; and generating a first list of application identifications of the installed applications with the new priority lower than that of the target application according to the original priority, and adding the target application identification to one end with the highest priority of the first list.
Further, step 106 specifically includes: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, takes out the application identifier of the current application from the application information table and puts the application identifier into a temporary storage area, sequentially moves the application identifiers of all applications with the lower priority than the original priority of the current application in the application information table to the original positions of the application identifier of the current application in the application information table, and puts the application identifier of the current application into the newly vacated position in the application information table.
Optionally, in step 106, after the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, the method further includes the following steps:
step D1: the multi-application smart card operating system acquires the identity type of the current application according to the application identifier of the current application, and when the identity type is the slave application or the independent application, the original priorities of all applications lower than the original priority of the current application are sequentially increased by one level, and the original priority of the current application is updated to be the highest priority; when the identity type is the main application, executing step D2;
step D2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
step D3: the multi-application smart card operating system selects the application with the highest priority from the second list as the sub current application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the sub current applications by one level, and updates the original priorities of the sub current applications to the lowest priorities;
step D4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the second list; and D, judging whether the second list has application identifications, if so, returning to the step D3, otherwise, executing the step 107.
Step 107: the multi-application smart card operating system deletes a current application identifier corresponding to the current application in the first list; and judging whether the first list has the application identifier, if so, returning to the step 106, otherwise, returning the successful response of updating the priority to the requester, and ending.
Optionally, when the new priority of the target application is the highest priority, steps 102 to 104 are replaced by: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the target application by one level, and updates the original priority of the target application to the highest priority; and returning a response of successfully updating the priority to the requester, and ending.
Further, when the new priority of the target application is the highest priority, the method further comprises the following steps:
step M1: the multi-application smart card operating system acquires the identity type of the target application according to the target application identifier, and when the identity type is a slave application or an independent application, the original priorities of all applications higher than the original priority of the target application are sequentially reduced by one level, and the original priority of the target application is updated to be the highest priority; returning a response of successfully updating the priority to the requester, and ending; when the identity type is the main application, executing step M2;
step M2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
step M3: the multi-application smart card operating system selects the application with the lowest priority from the third list as the current sub-application, sequentially reduces the original priorities of all applications with higher priority than the original priority of the current sub-application by one level, and updates the original priority of the current sub-application to the highest priority;
step M4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the third list; and judging whether the third list has the application identifier, if so, returning to the step M3, otherwise, returning a response of successfully updating the priority to the requester, and ending.
Optionally, when the new priority of the target application is the lowest priority, steps 102 to 104 are replaced by: the multi-application smart card operating system sequentially raises the original priorities of all applications lower than the original priority of the target application by one level, and updates the original priority of the target application to the lowest priority; and returning a response of successfully updating the priority to the requester, and ending.
Further, when the new priority of the target application is the lowest priority, the method further comprises the following steps:
step N1: the multi-application smart card operating system acquires the identity type of the target application according to the target application identifier, and when the identity type is the slave application or the independent application, the original priorities of all applications lower than the original priority of the target application are sequentially increased by one level, and the original priority of the target application is updated to be the lowest priority; returning a response of successfully updating the priority to the requester, and ending; when the identity type is the primary application, performing step N2;
step N2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
step N3: the multi-application smart card operating system selects the application with the highest priority from the third list as the current sub-application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the current sub-applications by one level, and updates the original priorities of the current sub-applications to the lowest priorities;
step N4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the third list; and judging whether the third list has the application identifier, if so, returning to the step N3, otherwise, returning a response of successfully updating the priority to the requester, and ending.
In this embodiment, the multi-application smart card operating system receives a priority modification request sent by a requester, and the priority modification request may be implemented in various ways, for example: a priority modification instruction sent by the card reader or a priority modification interface called by an application installed on the multi-application smart card; when the multi-application smart card operating system finishes processing the priority modification request, the multi-application smart card operating system returns corresponding response data to the requester;
in this embodiment, when the multi-application smart card operating system processes the priority modification request, the requirements of the temporary tables such as the first list, the second list and the third list can be met only by additionally opening up a small space, the temporary tables such as the first list occupy a small memory, the space is saved, the speed of the multi-application smart card operating system for processing the priority modification request is higher, and the time is saved;
optionally, the expression of the application priority level is customized by the multi-application smart card operating system; in this embodiment, the installation information columns of the application information table are in the order of priority of the application from top to bottom, the installation information columns of the application information table may be in the order of priority from high to low from top to bottom, and the installation information columns of the application information table may be in the order of priority from low to high from top to bottom; in addition, the application information table can also have a single unique column of information as the priority of the application, the priority of the application is not arranged from high to low or from low to high in the application information table according to the form of table columns, and the data filled in the column of information is the priority of the corresponding application;
in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may immediately perform the priority modification operation, and return a priority modification response to the requestor in real time; in addition, in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may further record the priority modification request, temporarily do not process the priority modification request, and process the priority modification request after completing the processing of one or more transactions to be processed; the requester can obtain the priority modification result through the priority modification result query request; in this embodiment, the multi-application smart card operating system can selectively process the priority modification request in the gap idle time, does not affect the normal service operation of the multi-application smart card, and is convenient, flexible, fast and good in user experience.
Example two
An embodiment of the present invention provides a method for updating application priorities by a multi-application smart card operating system, in this embodiment, an order of application priorities is updated to be highest or lowest, as shown in fig. 2, where the method includes the following steps:
step 201: when the multi-application smart card operating system receives a priority modification instruction sent by the card reader, the multi-application smart card operating system analyzes the priority modification instruction to obtain a new priority of a target application and a target application identifier;
optionally, the step specifically includes: when the multi-application smart card operating system receives a priority modification instruction sent by a card reader, the multi-application smart card operating system acquires a first parameter and a data field of the priority modification instruction, determines a new priority of a target application according to the first parameter, and marks the data field as a target application identifier;
for example, when the multi-application smart card operating system receives a priority modification command 0x00 EF 80000C A000000151434C 4142010101 sent by a card reader, the multi-application smart card operating system obtains a first parameter of the priority modification command and a data field 0xA 000000151434C 4142010101, and determines a new priority of a target application according to the first parameter; note data field 0xA 000000151434C 4142010101 identifies 0xA 000000151434C 4142010101 for the target application; wherein, the priority modification instruction is in an APDU format;
step 202: the multi-application smart card operating system judges whether the target application is installed or not according to the target application identifier, if so, step 203 is executed; otherwise, returning warning information to the card reader, and ending;
optionally, the step specifically includes: the multi-application smart card operating system judges whether a target application identifier exists in an installation application information column of the application information table according to the target application identifier, if so, step 203 is executed; otherwise, returning warning information to the card reader, and ending;
step 203: the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier, and when the new priority is equal to the original priority, the multi-application smart card operating system returns warning information to the card reader, and the operation is finished; when the new priority is not equal to the original priority, executing step 204;
optionally, the step specifically includes: the multi-application smart card operating system acquires the original priority of the target application from the application information table according to the target application identifier, and when the new priority is equal to the original priority, the multi-application smart card operating system returns warning information to the card reader, and the operation is finished; when the new priority is not equal to the original priority, executing step 204;
step 204: the multi-application smart card operating system judges the adjustment type of the new priority, and executes step 205 when the new priority is the highest priority; when the new priority is the lowest priority, execute step 206;
optionally, the step specifically includes: the multi-application smart card operating system judges the adjustment type of the new priority according to the first parameter, and when the first parameter is first preset data, the new priority of the target application is the highest priority, and step 205 is executed; when the first parameter is the second preset data, the new priority of the target application is the lowest priority, and step 206 is executed;
for example, the multi-application smart card operating system determines the adjustment type of the new priority according to the first parameter, and if the first parameter is the first preset data 0x8100, the adjustment type of the priority of the target application is the highest priority, and step 205 is executed; when the first parameter is the second preset data 0x8000, the priority adjustment type of the target application is the lowest priority, and execute step 206;
step 205: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the target application by one level, and updates the original priority of the target application to the highest priority; returning a response of successfully updating the priority to the card reader, and ending;
optionally, this step is replaced with step 205-1: the multi-application smart card operating system generates a first list according to the target application identifier; acquiring a target application identifier from the first list; sequentially reducing the original priority of all applications higher than the original priority of the target application by one level, and updating the original priority of the target application to be the highest priority; returning a response of successfully updating the priority to the card reader, and ending; in this embodiment, the first list actually includes a target application identifier, so that the first list does not need to be processed circularly, and the process is directly ended after the target application is processed;
optionally, the step specifically includes: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the target application in the application information table by one level, and updates the original priority of the target application in the application information table to be the highest priority; returning a response of successfully updating the priority to the card reader, and ending;
for example, the multi-application smart card operating system sequentially lowers the original priority of all applications in the application information table, which are higher than the original priority of the target application, by one level, and updates the original priority of the target application in the application information table to the highest priority; returning a successful response 0x 9000 of updating the priority to the card reader, and ending;
step 206: the multi-application smart card operating system sequentially raises the original priorities of all applications lower than the original priority of the target application by one level, and updates the original priority of the target application to the lowest priority; returning a response of successfully updating the priority to the card reader, and ending;
optionally, this step is replaced with step 206-1: the multi-application smart card operating system generates a first list according to the target application identifier; acquiring a target application identifier from the first list; sequentially increasing the original priority of all applications lower than the original priority of the target application by one level, and updating the original priority of the target application to be the lowest priority; returning a response of successfully updating the priority to the card reader, and ending; in this embodiment, the first list actually includes a target application identifier, so that the first list does not need to be processed circularly, and the process is directly ended after the target application is processed;
optionally, the step specifically includes: the multi-application smart card operating system sequentially raises the original priority of all applications lower than the original priority of the target application in the application information table by one level, and updates the original priority of the target application in the application information table to be the lowest priority; returning a response of successfully updating the priority to the card reader, and ending;
for example, the multi-application smart card operating system sequentially raises the original priorities of all applications in the application information table, which are lower than the original priority of the target application, by one level, and updates the original priority of the target application in the application information table to the lowest priority; return to 0x 9000 to the reader, end.
In this embodiment, the multi-application smart card operating system receives a priority modification request sent by a requester, and the priority modification request may be implemented in various ways, for example: a priority modification instruction sent by the card reader or a priority modification interface called by an application installed on the multi-application smart card; when the multi-application smart card operating system finishes processing the priority modification request, the multi-application smart card operating system returns corresponding response data to the requester;
in the embodiment, when the multi-application smart card operating system processes the priority modification request, the requirements of the temporary tables such as the first list and the like can be met only by additionally opening up a small space, the temporary tables such as the first list and the like occupy a small memory, so that the space is saved, the speed of the multi-application smart card operating system for processing the priority modification request is higher, and the time is saved;
optionally, the expression of the application priority level is customized by the multi-application smart card operating system; in this embodiment, the installation information columns of the application information table are in the order of priority of the application from top to bottom, the installation information columns of the application information table may be in the order of priority from high to low from top to bottom, and the installation information columns of the application information table may be in the order of priority from low to high from top to bottom; in addition, the application information table can also have a single unique column of information as the priority of the application, the priority of the application is not arranged from high to low or from low to high in the application information table according to the form of table columns, and the data filled in the column of information is the priority of the corresponding application;
in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may immediately perform the priority modification operation, and return a priority modification response to the requestor in real time; in addition, in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may further record the priority modification request, temporarily do not process the priority modification request, and process the priority modification request after completing the processing of one or more transactions to be processed; the requester can obtain the priority modification result through the priority modification result query request; in this embodiment, the multi-application smart card operating system can selectively process the priority modification request in the gap idle time, does not affect the normal service operation of the multi-application smart card, and is convenient, flexible, fast and good in user experience.
According to the multi-application smart card operating system and the method for updating the application priority thereof provided by the embodiment of the invention, a user can conveniently and quickly update the application on the multi-application smart card operating system to the highest priority or the lowest priority without deleting or installing the application on the multi-application smart card operating system again, so that time and labor are saved, and the user experience is improved.
EXAMPLE III
The third embodiment of the present invention provides a method for updating application priorities of a multi-application smart card operating system, where in this embodiment, an order of priority of applications is updated to be highest or lowest, in this embodiment, an identity type of an application on the multi-application smart card operating system is defined on the basis of embodiment 2, and the identity type of the application includes a master application, a slave application, and an independent application; as shown in fig. 3, the method comprises the following steps:
step 301: when the multi-application smart card operating system receives a priority modification instruction sent by the card reader, the multi-application smart card operating system analyzes the priority modification instruction to obtain a new priority of a target application and a target application identifier;
step 302: the multi-application smart card operating system judges whether a target application is installed, if so, step 303 is executed; otherwise, returning warning information to the card reader, and ending;
optionally, the step specifically includes: the multi-application smart card operating system judges whether a target application identifier exists in an installation application information column of the application information table, if so, step 303 is executed; otherwise, returning warning information to the card reader, and ending;
step 303: the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; comparing the new priority of the target application with the original priority, and when the new priority is equal to the original priority, returning warning information to the card reader, and ending; when the new priority is not equal to the original priority, go to step 304;
step 304: the multi-application smart card operating system judges the adjustment type of the new priority, and when the new priority is the highest priority, step 305 is executed; when the new priority is the lowest priority, execute step 310;
step 305: the multi-application smart card operating system acquires the identity type of the target application according to the target application identifier, and executes step 306 when the identity type is a slave application or an independent application; when the identity type is the primary application, executing step 307;
optionally, this step is replaced with 305-1: the multi-application smart card operating system generates a first list according to the target application identifier; acquiring a target application identifier from the first list; acquiring the identity type of the target application according to the target application identifier, and executing step 306 when the identity type is a slave application or an independent application; when the identity type is the primary application, executing step 307;
optionally, the step specifically includes: the multi-application smart card operating system acquires the identity type of the target application from the application information table according to the target application identifier, and executes step 306 when the identity type is a slave application or an independent application; when the identity type is the primary application, executing step 307;
step 306: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the target application by one level, and updates the original priority of the target application to the highest priority; returning a response of successfully updating the priority to the card reader, and ending;
optionally, the step specifically includes: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the target application in the application information table by one level, and updates the original priority of the target application in the application information table to be the highest priority; returning a response of successfully updating the priority to the card reader, and ending;
step 307: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
optionally, the step specifically includes: the multi-application smart card operating system acquires a slave application identifier list from the application information table according to the target application identifier; respectively acquiring the priority of all the slave applications in the slave application identification list from the application information table; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
step 308: the multi-application smart card operating system selects the application with the lowest priority from the third list as the current sub-application, sequentially reduces the original priorities of all applications with higher priority than the original priority of the current sub-application by one level, and updates the original priority of the current sub-application to the highest priority;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the lowest priority from the third list as the current sub-application, sequentially lowers the original priorities of all applications higher than the original priority of the current sub-application in the application information list by one level, and updates the original priority of the current sub-application in the application information list to be the highest priority;
step 309: deleting the current application identifier in the third list by the multi-application smart card operating system; judging whether the third list has application identifiers, if so, returning to the step 308, otherwise, returning to the response of updating the priority to the card reader, and ending;
step 310: the multi-application smart card operating system obtains the identity type of the target application according to the target application identifier, and if the identity type is a slave application or an independent application, step 311 is executed; when the identity type is the primary application, go to step 312;
optionally, this step is replaced with 310-1: the multi-application smart card operating system generates a first list according to the target application identifier; acquiring a target application identifier from the first list; acquiring the identity type of the target application according to the target application identifier, and executing step 311 when the identity type is a slave application or an independent application; when the identity type is the primary application, go to step 312;
step 311: the multi-application smart card operating system sequentially raises the original priorities of all applications lower than the original priority of the target application by one level, and updates the original priority of the target application to the lowest priority; returning a response of successfully updating the priority to the card reader, and ending;
optionally, the step specifically includes: the multi-application smart card operating system sequentially raises the original priority of all applications lower than the original priority of the target application in the application information table by one level, and updates the original priority of the target application in the application information table to be the lowest priority; returning a response of successfully updating the priority to the card reader, and ending;
step 312: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
optionally, the step specifically includes: the multi-application smart card operating system acquires a slave application identifier list from the application information table according to the target application identifier; respectively acquiring the priority of all the slave applications in the slave application identification list from the application information table; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
step 313: the multi-application smart card operating system selects the application with the highest priority from the third list as the current sub-application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the current sub-applications by one level, and updates the original priorities of the current sub-applications to the lowest priorities;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the highest priority from the third list as the current sub-application, sequentially raises the original priorities of all applications with lower original priorities than the current sub-application in the application information list by one level, and updates the original priority of the current sub-application in the application information list to be the lowest priority;
step 314: deleting the current application identifier in the third list by the multi-application smart card operating system; and judging whether the third list has the application identifier, if so, returning to the step 313, otherwise, returning a response of successfully updating the priority to the card reader, and ending.
In this embodiment, the multi-application smart card operating system receives a priority modification request sent by a requester, and the priority modification request may be implemented in various ways, for example: a priority modification instruction sent by the card reader or a priority modification interface called by an application installed on the multi-application smart card; when the multi-application smart card operating system finishes processing the priority modification request, the multi-application smart card operating system returns corresponding response data to the requester;
in this embodiment, when the multi-application smart card operating system processes the priority modification request, the requirements of the temporary tables such as the first list and the third list can be met only by additionally opening up a small space, the temporary tables such as the first list occupy a small memory, so that the space is saved, the speed of the multi-application smart card operating system for processing the priority modification request is higher, and the time is saved;
optionally, the expression of the application priority level is customized by the multi-application smart card operating system; in this embodiment, the installation information columns of the application information table are in the order of priority of the application from top to bottom, the installation information columns of the application information table may be in the order of priority from high to low from top to bottom, and the installation information columns of the application information table may be in the order of priority from low to high from top to bottom; in addition, the application information table can also have a single unique column of information as the priority of the application, the priority of the application is not arranged from high to low or from low to high in the application information table according to the form of table columns, and the data filled in the column of information is the priority of the corresponding application;
in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may immediately perform the priority modification operation, and return a priority modification response to the requestor in real time; in addition, in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may further record the priority modification request, temporarily do not process the priority modification request, and process the priority modification request after completing the processing of one or more transactions to be processed; the requester can obtain the priority modification result through the priority modification result query request; in this embodiment, the multi-application smart card operating system can selectively process the priority modification request in the gap idle time, does not affect the normal service operation of the multi-application smart card, and is convenient, flexible, fast and good in user experience.
Example four
An embodiment of the present invention provides a method for updating application priorities by a multi-application smart card operating system, where in this embodiment, an application priority order may be updated arbitrarily, and as shown in fig. 4, the method includes the following steps:
step 401: when the multi-application smart card operating system receives a priority modification instruction sent by the card reader, the multi-application smart card operating system analyzes the priority modification instruction to obtain a new priority of a target application and a target application identifier;
for example, when the multi-application smart card operating system receives a priority modification command 0x00 EF 00030C A000000151434C 4142010101 sent by the card reader, the multi-application smart card operating system obtains a first parameter of the priority modification command and a data field 0xA 000000151434C 4142010101, and determines a new priority 0x 0003 of the target application according to the first parameter; note data field 0xA 000000151434C 4142010101 identifies 0xA 000000151434C 4142010101 for the target application; wherein, the priority modification instruction is in an APDU format; in this embodiment, the identifier 3 ═ 0xA 000000151434C 4142010101;
step 402: the multi-application smart card operating system judges whether a target application is installed, if so, step 403 is executed; otherwise, returning warning information to the card reader, and ending;
optionally, the step specifically includes: the multi-application smart card operating system judges whether a target application identifier exists in an installation application information column of the application information table, if so, step 403 is executed; otherwise, returning warning information to the card reader, and ending;
for example, the multi-application smart card operating system determines whether the target application identifier 0xA 000000151434C 4142010101 exists in the installation application information column of the application information table, if yes, step 403 is executed; otherwise, returning warning information to the card reader, and ending;
for example, the application information table is shown in table 1:
Figure GDA0002586126060000211
TABLE 1
Step 403: the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; comparing the new priority of the target application with the original priority, and when the new priority is equal to the original priority, returning warning information to the card reader, and ending; when the new priority is higher than the original priority, executing step 404-01; when the new priority is less than the original priority, executing step 405-01;
for example, the multi-application smart card operating system obtains the original priority 0x 0007 of the target application according to 0xA 000000151434C 4142010101; comparing the new priority 0x 0003 and the original priority 0x 0007 of the target application, and when the new priority is equal to the original priority, returning warning information to the card reader, and ending; when the new priority is higher than the original priority, executing step 404-01; when the new priority is less than the original priority, executing step 405-01; wherein, the larger the priority value is, the smaller the priority of the represented application is;
in this embodiment, the multi-application smart card operating system may freely define the presentation modes of the priorities of the applications, and the presentation modes of the priorities may be multiple; for example, the higher the priority value, the higher the priority of the application represented, or the higher the priority value, the lower the priority of the application represented;
step 404-01: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority higher than that of the target application; adding the target application identification to one end of the first list with low priority;
optionally, the step specifically includes: the multi-application smart card operating system generates a first list according to the application identifiers of all applications in the application information table, wherein the application identifiers are higher than the new priority of the target application; adding the target application identification to one end of the first list with low priority;
for example, the multi-application smart card operating system generates a first list from the application identifications (identification 7 and identification 2) of all applications that are higher than the new priority 0x 0003 of the target application; adding the target application identification 3-0 xA 000000151434C 4142010101 to one end of the first list with low priority; wherein, the first list without adding the target application identification is shown in table 2,
identification 7
Identification 2
Table 2, the first list after adding the target application identifier is shown in table 3:
identification 7
Identification 2
Identification 3
TABLE 3
Step 404-02: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, sequentially reduces the original priorities of all applications with the priority higher than the original priority of the current application by one level, and updates the original priority of the current application to the highest priority;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, stores the related data of the current application in the application information table into a temporary storage area, sequentially reduces the original priorities of all applications with higher priority than the original priority of the current application by one level, and updates the original priority of the current application in the application information table to be the highest priority;
for example, the multi-application smart card operating system selects the application identifier 3 with the lowest priority from the first list as the current application, stores the relevant data of the current application identifier 3 in the application information table into the temporary storage area, sequentially lowers the original priorities (0x 0001, 0x0002, 0x 0003, 0x 0004, 0x 0005 and 0x 0006) of all applications (identifier 7, identifier 2, identifier 6, identifier 5, identifier 1 and identifier 4) higher than the original priority 0x 0007 of the current application in the application information table by one level (0x0002, 0x 0003, 0x 0004, 0x 0005 and 0x 0006 and 0x 0007), and updates the original priority 0x 0007 of the current application identifier 3 in the application information table to the highest priority 0x 0001; the data of the temporary storage area is shown in table 4:
identification 3 Data M3 Data N3 Data P3 ……
TABLE 4
After the relevant data of the current application identifier 3 in the application information table is stored in the temporary storage area, the application information table is as shown in table 5:
Figure GDA0002586126060000231
TABLE 5
The application information table in which all applications (0x 0001, 0x0002, 0x 0003, 0x 0004, 0x 0005 and 0x 0006) with higher original priorities (identifier 7, identifier 2, identifier 6, identifier 5, identifier 1 and identifier 4) than the original priority of the current application are sequentially reduced by one level (0x0002, 0x 0003, 0x 0004, 0x 0005 and 0x 0006 and 0x 0007) is shown in table 6:
Figure GDA0002586126060000232
Figure GDA0002586126060000241
TABLE 6
The application information table after updating the original priority 0x 0007 of the current application identifier 3 in the application information table to the highest priority 0x0001 is shown in table 7:
Figure GDA0002586126060000242
TABLE 7
Step 404-03: deleting the current application identifier in the first list by the multi-application smart card operating system; judging whether the first list has application identifiers, if so, returning to the step 404-02, otherwise, returning a response of successfully updating the priority to the card reader, and ending;
for example, the multi-application smart card operating system deletes the current application identifier 3 in the first list; judging whether the first list has application identifiers, if so, returning to the step 404-02, otherwise, returning a response of successfully updating the priority to the card reader, and ending; the first list after deleting the current application identifier 3 in the first list is shown in table 8;
identification 7
Identification 2
TABLE 8
After the data listed in this embodiment is sequentially executed from step 401 to step 404-03, it is determined that the first list includes the application identifier (identifier 7 and identifier 2), then the step 404-02 is returned, and after the step 404-02 is executed, the step 404-03 is sequentially executed, and the current application identifier 2 is deleted; judging that the first list also has an application identifier (identifier 7); then returning to the step 404-02, after the step 404-02 is executed, sequentially executing the step 404-03, deleting the current application identifier 7, judging that no application identifier exists in the first list, returning a response of successfully updating the priority to the card reader, and ending; the finally adjusted application information table is shown in table 9:
Figure GDA0002586126060000251
TABLE 9
Step 405-01: the multi-application smart card operating system generates a first list according to the application identifications of all applications with the new priority lower than the target application; adding the target application identification to the high-priority end of the first list;
optionally, the step specifically includes: the multi-application smart card operating system generates a first list according to application identifiers of all applications with lower new priorities than the target application, which are acquired from the application information table; adding the target application identification to the high-priority end of the first list;
step 405-02: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, sequentially raises the original priorities of all applications with lower priorities than the original priority of the current application by one level, and updates the original priority of the current application to be the lowest priority;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the current applications by one level in the application information list, and updates the original priorities of the current applications in the application information list to the lowest priorities;
step 405-03: deleting the current application identifier in the first list by the multi-application smart card operating system; and judging whether the first list has the application identifier, if so, returning to the step 405-02, otherwise, returning a response of successfully updating the priority to the card reader, and ending.
In this embodiment, the multi-application smart card operating system receives a priority modification request sent by a requester, and the priority modification request may be implemented in various ways, for example: a priority modification instruction sent by the card reader or a priority modification interface called by an application installed on the multi-application smart card; when the multi-application smart card operating system finishes processing the priority modification request, the multi-application smart card operating system returns corresponding response data to the requester;
in the embodiment, when the multi-application smart card operating system processes the priority modification request, the requirements of the temporary tables such as the first list and the like can be met only by additionally opening up a small space, the temporary tables such as the first list and the like occupy a small memory, so that the space is saved, the speed of the multi-application smart card operating system for processing the priority modification request is higher, and the time is saved;
optionally, the expression of the application priority level is customized by the multi-application smart card operating system; in this embodiment, the installation information columns of the application information table are in the order of priority of the application from top to bottom, the installation information columns of the application information table may be in the order of priority from high to low from top to bottom, and the installation information columns of the application information table may be in the order of priority from low to high from top to bottom; in addition, the application information table can also have a single unique column of information as the priority of the application, the priority of the application is not arranged from high to low or from low to high in the application information table according to the form of table columns, and the data filled in the column of information is the priority of the corresponding application;
in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may immediately perform the priority modification operation, and return a priority modification response to the requestor in real time; in addition, in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may further record the priority modification request, temporarily do not process the priority modification request, and process the priority modification request after completing the processing of one or more transactions to be processed; the requester can obtain the priority modification result through the priority modification result query request; in this embodiment, the multi-application smart card operating system can selectively process the priority modification request in the gap idle time, does not affect the normal service operation of the multi-application smart card, and is convenient, flexible, fast and good in user experience.
According to the method for updating the application priority of the multi-application smart card operating system, a user can conveniently and quickly update the application priority of the multi-application smart card operating system under the condition that the application on the multi-application smart card operating system is not deleted or installed again, time and labor are saved, and user experience is improved.
EXAMPLE five
The fifth embodiment of the present invention provides a method for updating application priorities of a multi-application smart card operating system, where the present embodiment defines an identity type of an application on the multi-application smart card operating system on the basis of embodiment 4, where the identity type of the application includes a master application, a slave application, and an independent application; fig. 5 includes the following steps:
step 501: when the multi-application smart card operating system receives a priority modification instruction sent by the card reader, the multi-application smart card operating system analyzes the priority modification instruction to obtain a new priority of a target application and a target application identifier;
step 502: the multi-application smart card operating system judges whether the target application is installed, if so, step 503 is executed; otherwise, returning warning information to the card reader, and ending;
optionally, the step specifically includes: the multi-application smart card operating system judges whether a target application identifier exists in an installation application information column of the application information table, if so, step 503 is executed; otherwise, returning warning information to the card reader, and ending;
step 503: the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; comparing the new priority of the target application with the original priority, and when the new priority is equal to the original priority, returning warning information to the card reader, and ending; when the new priority is greater than the original priority, executing step 504-01; when the new priority is smaller than the original priority, executing step 505-01;
step 504-01: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority higher than that of the target application; adding the target application identification to one end of the first list with low priority;
optionally, the step specifically includes: the multi-application smart card operating system generates a first list according to the application identifiers of all applications in the application information table, wherein the application identifiers are higher than the new priority of the target application; adding the target application identification to one end of the first list with low priority;
step 504-02: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application; acquiring the identity type of the current application according to the current application identifier, and executing step 504-03 when the identity type is a slave application or an independent application; when the identity type is the primary application, executing step 504-05;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application; acquiring the identity type of the current application from the application information table according to the current application identifier, and executing step 504-03 when the identity type is a slave application or an independent application; when the identity type is the primary application, executing step 504-05;
step 504-03: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the current application by one level, and updates the original priority of the current application to the highest priority;
optionally, the step specifically includes: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the current application in the application information table by one level, and updates the original priority of the current application in the application information table to be the highest priority;
step 504-04: deleting the current application identifier in the first list by the multi-application smart card operating system; judging whether the first list has application identifiers, if so, returning to the step 504-02, otherwise, returning to the response of updating the priority to the card reader, and ending;
step 504-05: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
optionally, the step specifically includes: the multi-application smart card operating system acquires a slave application identifier list from the application information table according to the target application identifier; respectively acquiring the priority of all the slave applications in the slave application identification list from the application information table; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
step 504-06: the multi-application smart card operating system selects the application with the lowest priority from the second list as the current sub-application, sequentially lowers the original priorities of all applications with higher priority than the original priorities of the current sub-applications by one level, and updates the original priorities of the current sub-applications to the highest priorities;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the lowest priority from the second list as the sub current application, sequentially lowers the original priorities of all applications higher than the original priority of the sub current application in the application information table by one level, and updates the original priority of the sub current application in the application information table to be the highest priority;
step 504-07: the multi-application smart card operating system deletes the current application identifier in the second list; and judging whether the second list has the application identification, if so, returning to the step 504-06, and otherwise, returning to the step 504-04.
Step 505-01: the multi-application smart card operating system generates a first list according to the application identifications of all applications with the new priority lower than the target application; adding the target application identification to the high-priority end of the first list;
optionally, the step specifically includes: the multi-application smart card operating system generates a first list according to the application identifiers of all applications in the application information table, wherein the application identifiers are lower than the new priority of the target application; adding the target application identification to the high-priority end of the first list;
step 505-02: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application; acquiring the identity type of the current application according to the current application identifier, and executing step 505-03 when the identity type is a slave application or an independent application; when the identity type is the main application, executing step 505-05;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application; acquiring the identity type of the current application from the application information table according to the current application identifier, and executing step 505-03 when the identity type is a slave application or an independent application; when the identity type is the main application, executing step 505-05;
step 505-03: the multi-application smart card operating system sequentially raises the original priorities of all applications lower than the original priority of the current application by one level, and updates the original priority of the current application to the lowest priority;
optionally, the step specifically includes: the multi-application smart card operating system sequentially raises the original priorities of all applications lower than the original priority of the current application in the application information table by one level, and updates the original priority of the current application in the application information table to be the lowest priority;
step 505-04: deleting the current application identifier in the first list by the multi-application smart card operating system; judging whether the first list has application identifiers, if so, returning to the step 505-02, otherwise, returning a response of updating the priority to the card reader successfully, and ending;
step 505-05: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
optionally, the step specifically includes: the multi-application smart card operating system acquires a slave application identifier list from the application information table according to the target application identifier; respectively acquiring the priority of all the slave applications in the slave application identification list from the application information table; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
step 505-06: the multi-application smart card operating system selects the application with the highest priority from the second list as the sub current application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the sub current applications by one level, and updates the original priorities of the sub current applications to the lowest priorities;
optionally, the step specifically includes: the multi-application smart card operating system selects the application with the highest priority from the second list as the sub current application, sequentially raises the original priorities of all applications lower than the original priority of the sub current application by one level in the application information table, and updates the original priority of the sub current application in the application information table to be the lowest priority;
step 505-07: the multi-application smart card operating system deletes the current application identifier in the second list; and judging whether the second list has application identifications, if so, returning to the step 505-06, otherwise, returning to the step 505-04.
Optionally, the warning information may specifically be error reporting information or warning information.
In this embodiment, the multi-application smart card operating system receives a priority modification request sent by a requester, and the priority modification request may be implemented in various ways, for example: a priority modification instruction sent by the card reader or a priority modification interface called by an application installed on the multi-application smart card; when the multi-application smart card operating system finishes processing the priority modification request, the multi-application smart card operating system returns corresponding response data to the requester;
in this embodiment, when the multi-application smart card operating system processes the priority modification request, the requirements of the temporary tables such as the first list and the second list can be met only by additionally opening up a small space, the temporary tables such as the first list occupy a small memory, so that the space is saved, the speed of the multi-application smart card operating system for processing the priority modification request is higher, and the time is saved;
optionally, the expression of the application priority level is customized by the multi-application smart card operating system; in this embodiment, the installation information columns of the application information table are in the order of priority of the application from top to bottom, the installation information columns of the application information table may be in the order of priority from high to low from top to bottom, and the installation information columns of the application information table may be in the order of priority from low to high from top to bottom; in addition, the application information table can also have a single unique column of information as the priority of the application, the priority of the application is not arranged from high to low or from low to high in the application information table according to the form of table columns, and the data filled in the column of information is the priority of the corresponding application;
in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may immediately perform the priority modification operation, and return a priority modification response to the requestor in real time; in addition, in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may further record the priority modification request, temporarily do not process the priority modification request, and process the priority modification request after completing the processing of one or more transactions to be processed; the requester can obtain the priority modification result through the priority modification result query request; in this embodiment, the multi-application smart card operating system can selectively process the priority modification request in the gap idle time, does not affect the normal service operation of the multi-application smart card, and is convenient, flexible, fast and good in user experience.
According to the method for updating the application priority of the multi-application smart card operating system, a user can update the priority sequence of the plurality of applications in a batch mode in a master-slave mode (master application and slave application) without deleting or installing the applications on the multi-application smart card operating system again, time and labor are saved, and user experience is improved.
EXAMPLE six
A sixth embodiment of the present invention provides a multi-application smart card operating system, as shown in fig. 6, including a receiving module 601, an analyzing module 602, a first obtaining module 603, a first generating and adding module 604, a first selecting module 605, a first decreasing and updating module 606, a first deleting module 607, a first determining module 608, a second generating and adding module 609, a second selecting module 610, a first increasing and updating module 611, a second deleting module 612, a second determining module 613, and a first returning module 614;
a receiving module 601, configured to receive a priority modification request sent by a requester;
the analyzing module 602 is configured to analyze the priority modification request received by the receiving module 601 to obtain a new priority of the target application and a target application identifier;
a first obtaining module 603, configured to obtain an original priority of the target application according to the target application identifier obtained through analysis by the analyzing module 602;
a first generating and adding module 604, configured to generate a first list according to application identifiers of all applications that are higher than the new priority of the target application obtained through analysis by the analyzing module 602 when the new priority of the target application obtained through analysis by the analyzing module 602 is higher than the original priority obtained by the first obtaining module 603; adding the target application identifier obtained by the analysis of the analysis module 602 to one end of the first list with low priority;
a first selecting module 605, configured to select an application with the lowest priority from the first list generated by the first generating and adding module 604 as a current application; the first determining module 608 is further configured to select, as the current application, an application with the lowest priority from the first list after the current application identifier is deleted by the first deleting module 607;
a first decreasing and updating module 606, configured to sequentially decrease the original priorities of all applications, which are higher than the original priority of the current application selected by the first selecting module 605, by one level; updating the original priority of the current application selected by the first selection module 605 to the highest priority;
a first deleting module 607, configured to delete the current application identifier corresponding to the current application selected by the first selecting module 605 in the first list;
a first determining module 608, configured to determine whether the first list obtained by deleting the current application identifier by the first deleting module 607 has an application identifier;
a second generating and adding module 609, configured to generate a first list according to application identifiers of all applications that are lower than the new priority of the target application obtained through analysis by the analyzing module 602 when the new priority of the target application obtained through analysis by the analyzing module 602 is smaller than the original priority obtained by the first obtaining module 603; adding the target application identifier obtained by the analysis of the analysis module 602 to the end of the first list with high priority;
a second selecting module 610, configured to select, as the current application, an application with the highest priority from the first list generated by the second generating and adding module 609; the second determining module 613 is further configured to select, as the current application, an application with the highest priority from the first list after the current application identifier is deleted by the second deleting module 612, when the second determining module 613 determines that the current application identifier is the current application;
a first raising and updating module 611, configured to sequentially raise the original priorities of all applications lower than the original priority of the current application selected by the second selecting module 610 by one level, and update the original priority of the current application selected by the second selecting module 610 to the lowest priority;
a second deleting module 612, configured to delete the current application identifier corresponding to the current application selected by the first selecting module 605 in the first list;
a second judging module 613, configured to judge whether there is an application identifier in the first list after the second deleting module 612 deletes the current application identifier;
a first returning module 614, configured to, when the first determining module 608 determines that the request is negative, return a response that the priority is updated successfully to the requestor, and end; and is further configured to, when the second determining module 613 determines that the request is negative, return a response that the priority is updated successfully to the requestor, and end.
Optionally, the multi-application smart card operating system in this implementation further includes a third determining module and a second returning module;
correspondingly, the third determining module is configured to determine whether the target application identifier obtained through analysis by the analyzing module 602 is installed with the target application, and if so, trigger the first obtaining module 603; otherwise, triggering a second return module;
further, the third determining module is specifically configured to determine whether a target application identifier obtained through analysis by the analyzing module 602 exists in an installation application information column of the application information table, and if yes, trigger the first obtaining module 603; otherwise, the second return module is triggered.
Correspondingly, the second returning module is used for returning the warning information to the requesting party and ending.
Optionally, the multi-application smart card operating system in this implementation further includes a first comparing module and a second returning module;
correspondingly, the first comparing module is configured to compare the new priority of the target application obtained through analysis by the analyzing module 602 with the original priority obtained by the first obtaining module 603, and trigger the second returning module when the new priority of the target application is equal to the original priority; when the new priority of the target application is higher than the original priority, triggering a first generation adding module 604; when the new priority of the target application is smaller than the original priority, triggering a second generation and addition module 609;
correspondingly, the second returning module is used for returning the warning information to the requesting party and ending.
Further, the first generating and adding module 604 is specifically configured to obtain original priorities of all installed applications, and find an installed application with a higher new priority than the target application; the application identifier of the installed application with the new priority higher than the new priority of the target application analyzed by the analyzing module 602 is generated into a first list according to the original priority, and the target application identifier analyzed by the analyzing module 602 is added to the end of the first list with the lowest priority.
Further, the first decreasing and updating module 606 is specifically configured to take out the application identifier of the current application selected by the first selecting module 605 from the application information table and place the application identifier into the temporary storage area, sequentially move the application identifiers of all applications in the application information table, which are higher than the original priority of the current application, to the original location of the application identifier of the current application in the application information table, and place the application identifier of the current application selected by the first selecting module 605 into a newly vacated location in the application information table.
Further, the second generating and adding module 609 is specifically configured to obtain the original priorities of all installed applications, and find an installed application with a lower new priority than the target application analyzed by the analyzing module 602; and generating a first list according to the original priority level of the application identifiers of the installed applications with the new priority level lower than the new priority level of the target application analyzed by the analysis module 602, and adding the target application identifier analyzed by the analysis module 602 to the end with the highest priority level of the first list.
Further, the first raising and updating module 611 is configured to take the application identifier of the current application selected by the first selecting module 605 out of the application information table and place the application identifier into the temporary storage area, sequentially move the application identifiers of all applications in the application information table, which are lower than the original priority of the current application, to the original location of the application identifier of the current application in the application information table, and place the application identifier of the current application selected by the first selecting module 605 into a newly vacated location in the application information table.
Optionally, the multi-application smart card operating system in this embodiment further includes a second obtaining module, a first obtaining and generating module, a third selecting module, a second reducing and updating module, a third deleting module, and a fourth judging module;
correspondingly, the second obtaining module is configured to obtain the identity type of the current application according to the application identifier of the current application selected by the first selecting module 605, and trigger the first reduction updating module 606 when the identity type is a slave application or an independent application; when the identity type is the main application, triggering a first acquisition generation module;
correspondingly, the first obtaining and generating module is configured to obtain a slave application identifier list according to the target application identifier obtained through analysis by the analyzing module 602; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identifiers and all the slave application identifiers obtained by the analysis of the analysis module 602 according to the priority order to generate a second list;
correspondingly, the third selecting module is used for selecting the application with the lowest priority from the second list generated by the first acquiring and generating module as the current sub-application; the application with the lowest priority is selected from the second list after the identifier of the current sub-application is deleted by the third deleting module to be used as the current sub-application when the fourth judging module judges that the current sub-application is the current sub-application;
correspondingly, the second reduction updating module is used for sequentially reducing the original priorities of all the applications higher than the original priority of the current sub-application by one level and updating the original priority of the current sub-application to the highest priority;
correspondingly, the third deleting module is used for deleting the sub current application identifier corresponding to the sub current application selected by the third selecting module in the second list;
correspondingly, the fourth judging module is used for judging whether the second list obtained after the third deleting module deletes the sub current application identifier has the application identifier;
correspondingly, the first deleting module 607 is specifically configured to delete the current application identifier selected by the first selecting module 605 in the first list when the fourth determining module determines that the current application identifier is not selected.
Optionally, the multi-application smart card operating system in this embodiment further includes a third obtaining module, a second obtaining and generating module, a fourth selecting module, a third reducing and updating module, a fourth deleting module, and a fifth determining module;
correspondingly, the third obtaining module is configured to obtain the identity type of the current application according to the current application identifier selected by the second selecting module 610, and trigger the first increasing updating module 611 when the identity type is a slave application or an independent application; when the identity type is the main application, triggering a second acquisition generation module;
correspondingly, the second obtaining and generating module is configured to obtain a slave application identifier list according to the target application identifier obtained through analysis by the analyzing module 602; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identifiers and all the slave application identifiers obtained by the analysis of the analysis module 602 according to the priority order to generate a second list;
correspondingly, the fourth selecting module is configured to select an application with the highest priority from the second list generated by the second obtaining and generating module as a sub-current application; the application deleting module is further used for deleting the application with the highest priority from the second list after the sub current application identifier is deleted from the fourth deleting module to be used as the sub current application when the fifth judging module judges that the application is the sub current application;
correspondingly, the third decreasing and updating module is used for sequentially increasing the original priorities of all the applications which are lower than the original priority of the current sub-application selected by the fourth selecting module by one level and updating the original priority of the current sub-application to be the lowest priority;
correspondingly, the fourth deleting module is configured to delete the sub current application identifier corresponding to the sub current application selected by the fourth selecting module in the second list;
correspondingly, the fifth judging module is used for judging whether the fourth deleting module deletes the application identifier in the second list of the sub-current application identifier;
correspondingly, the second deleting module 612 is specifically configured to delete the current application identifier selected by the first selecting module 605 in the first list.
Optionally, the multi-application smart card operating system in this embodiment further includes a fourth update reduction module;
correspondingly, the fourth decreasing and updating module is configured to, when the new priority of the target application obtained through analysis by the analysis module 602 is the highest priority, sequentially decrease the original priorities of all applications higher than the original priority of the target application obtained by the first obtaining module 603 by one level, and update the original priority of the target application obtained by the first obtaining module 603 to the highest priority; and returning a response of successfully updating the priority to the requester, and ending.
Further, the multi-application smart card operating system in this embodiment further includes a fourth obtaining module, a third obtaining and generating module, a fifth selecting module, a fifth reducing and updating module, a fifth deleting module, and a sixth determining module;
correspondingly, the fourth obtaining module is configured to obtain the identity type of the target application according to the target application identifier obtained through analysis by the analyzing module 602, and trigger the fourth reduction updating module when the identity type is a slave application or an independent application; when the identity type is the main application, triggering a third acquisition generation module;
correspondingly, the third obtaining and generating module is configured to obtain a slave application identifier list according to the target application identifier obtained through analysis by the analyzing module 602; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
correspondingly, the fifth selecting module is configured to select an application with the lowest priority from the third list generated by the third obtaining and generating module as a sub-current application; the application module is further used for selecting the application with the lowest priority as the sub current application from the third list after the sub current application identifier is deleted by the fifth deletion module;
correspondingly, the fifth decreasing and updating module is used for sequentially decreasing the original priorities of all the applications which are higher than the original priority of the current sub-application selected by the fifth selecting module by one level, and updating the original priority of the current sub-application selected by the fifth selecting module to be the highest priority;
correspondingly, the fifth deleting module is configured to delete the sub current application identifier corresponding to the sub current application selected by the fifth selecting module in the third list;
correspondingly, the sixth judging module is configured to judge whether the fifth deleting module deletes the application identifier in the third list of the sub-current application identifier;
correspondingly, the first returning module 614 is further configured to, when the sixth determining module determines that the request is negative, return a response that the priority is updated successfully to the requesting party, and end.
Optionally, the multi-application smart card operating system in this embodiment further includes a second upgrade module;
correspondingly, the second raising and updating module is configured to sequentially raise the original priorities of all applications lower than the original priority of the target application obtained through analysis by the analysis module 602 by one level, and update the original priority of the target application obtained through analysis by the analysis module 602 to the lowest priority; and returning a response of successfully updating the priority to the requester, and ending.
Further, the multi-application smart card operating system in this embodiment further includes a fifth obtaining module, a fourth obtaining and generating module, a sixth selecting module, a third increasing and updating module, a sixth deleting module, and a seventh determining module;
correspondingly, the fifth obtaining module is configured to obtain the identity type of the target application according to the target application identifier obtained through analysis by the analyzing module 602, and trigger the second increasing updating module when the identity type is a slave application or an independent application; when the identity type is the main application, triggering a fourth acquisition generation module;
correspondingly, the fourth obtaining and generating module is configured to obtain a slave application identifier list according to the target application identifier obtained through analysis by the analyzing module 602; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identifiers and all the slave application identifiers obtained by the analysis of the analysis module 602 according to the priority order to generate a third list;
correspondingly, the sixth selecting module is configured to select an application with the highest priority from the third list generated by the fourth obtaining and generating module as a sub-current application; the application module is also used for selecting the application with the highest priority as the sub current application from the third list after the sub current application identifier is deleted by the sixth deletion module;
correspondingly, the third raising and updating module is used for sequentially raising the original priorities of all the applications which are lower than the original priority of the current sub-application selected by the sixth selecting module by one level, and updating the original priority of the current sub-application selected by the sixth selecting module to be the lowest priority;
correspondingly, the sixth deleting module is configured to delete the sub current application identifier corresponding to the sub current application selected by the sixth selecting module in the third list;
correspondingly, the seventh judging module is configured to judge whether the third list obtained after the sixth deleting module deletes the sub current application identifier has an application identifier;
the first returning module 614 is further configured to, when the seventh determining module determines that the request is negative, return a response that the priority is updated successfully to the requesting party, and end.
In this embodiment, the multi-application smart card operating system receives a priority modification request sent by a requester, and the priority modification request may be implemented in various ways, for example: a priority modification instruction sent by the card reader or a priority modification interface called by an application installed on the multi-application smart card; when the multi-application smart card operating system finishes processing the priority modification request, the multi-application smart card operating system returns corresponding response data to the requester;
in this embodiment, when the multi-application smart card operating system processes the priority modification request, the requirements of the temporary tables such as the first list, the second list and the third list can be met only by additionally opening up a small space, the temporary tables such as the first list occupy a small memory, the space is saved, the speed of the multi-application smart card operating system for processing the priority modification request is higher, and the time is saved;
optionally, the expression of the application priority level is customized by the multi-application smart card operating system; in this embodiment, the installation information columns of the application information table are in the order of priority of the application from top to bottom, the installation information columns of the application information table may be in the order of priority from high to low from top to bottom, and the installation information columns of the application information table may be in the order of priority from low to high from top to bottom; in addition, the application information table can also have a single unique column of information as the priority of the application, the priority of the application is not arranged from high to low or from low to high in the application information table according to the form of table columns, and the data filled in the column of information is the priority of the corresponding application;
in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may immediately perform the priority modification operation, and return a priority modification response to the requestor in real time; in addition, in this embodiment, when the multi-application smart card operating system receives the priority modification request, the multi-application smart card operating system may further record the priority modification request, temporarily do not process the priority modification request, and process the priority modification request after completing the processing of one or more transactions to be processed; the requester can obtain the priority modification result through the priority modification result query request; in this embodiment, the multi-application smart card operating system can selectively process the priority modification request in the gap idle time, does not affect the normal service operation of the multi-application smart card, and is convenient, flexible, fast and good in user experience.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (28)

1. A method for updating application priority by a multi-application smart card operating system is characterized by comprising the following steps:
step S1: when a multi-application smart card operating system receives a priority modification request sent by a requester, the multi-application smart card operating system analyzes the priority modification request to obtain a new priority of a target application and a target application identifier; acquiring the original priority of the target application according to the target application identifier, executing the step S2 when the new priority of the target application is higher than the original priority, and executing the step S5 when the new priority of the target application is lower than the original priority;
step S2: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority higher than that of a target application; adding the target application identification to one end of the first list with low priority;
step S3: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, sequentially reduces the original priorities of all applications with the priority higher than the original priority of the current application by one level, and updates the original priority of the current application to the highest priority;
step S4: the multi-application smart card operating system deletes a current application identifier corresponding to a current application in the first list; judging whether the first list has application identification, if so, returning to the step S3, otherwise, returning a response of successfully updating the priority to the requester, and ending;
step S5: the multi-application smart card operating system generates a first list according to the application identifications of all applications with a new priority lower than that of a target application; adding the target application identification to the high-priority end of the first list;
step S6: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, sequentially raises the original priorities of all applications with lower priorities than the original priority of the current application by one level, and updates the original priority of the current application to be the lowest priority;
step S7: the multi-application smart card operating system deletes a current application identifier corresponding to a current application in the first list; and judging whether the first list has the application identifier, if so, returning to the step S6, otherwise, returning a response of successfully updating the priority to the requester, and ending.
2. The method as claimed in claim 1, wherein in step S1, before obtaining the original priority of the target application according to the target application identifier, the method further includes step a: the multi-application smart card operating system judges whether a target application is installed or not according to the target application identifier, and if so, the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; otherwise, returning the warning information to the requesting party, and ending.
3. The method according to claim 2, wherein the step a is specifically: the multi-application smart card operating system judges whether a target application identifier exists in an installation application information list of an application information table, and if so, the multi-application smart card operating system acquires the original priority of the target application according to the target application identifier; otherwise, returning the warning information to the requesting party, and ending.
4. The method as claimed in claim 1, wherein in step S1, after obtaining the original priority of the target application according to the target application identifier, the method further includes step B: the multi-application smart card operating system compares the new priority of the target application with the original priority, and when the new priority of the target application is equal to the original priority, the multi-application smart card operating system returns warning information to the requester and finishes the process; when the new priority of the target application is greater than the original priority, executing step S2; when the new priority of the target application is less than the original priority, step S5 is performed.
5. The method according to claim 4, wherein the step S2 is specifically: the multi-application smart card operating system acquires the original priorities of all installed applications and finds out the installed applications with the priorities higher than the new priorities of the target applications; and generating a first list of application identifications of the installed applications with the new priority higher than that of the target application according to the original priority, and adding the target application identification to one end of the first list with the lowest priority.
6. The method according to claim 4, wherein the step S3 is specifically: the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, takes out the application identifier of the current application from the application information table and puts the application identifier into a temporary storage area, sequentially moves the application identifiers of all applications with the priority higher than the original priority of the current application in the application information table to fill the original position of the application identifier of the current application in the application information table, and puts the application identifier of the current application into a newly vacated position in the application information table.
7. The method according to claim 4, wherein the step S5 is specifically: the multi-application smart card operating system acquires the original priorities of all installed applications and finds out the installed applications with the priorities lower than the new priorities of the target applications; and generating a first list of application identifications of the installed applications with the new priority lower than that of the target application according to the original priority, and adding the target application identification to one end with the highest priority of the first list.
8. The method according to claim 4, wherein the step S6 is specifically: the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, takes out the application identifier of the current application from the application information table and puts the application identifier into a temporary storage area, sequentially moves the application identifiers of all applications with the lower priority than the original priority of the current application in the application information table to fill the original position of the application identifier of the current application in the application information table, and puts the application identifier of the current application into a newly vacated position in the application information table.
9. The method of claim 1, wherein after the step S3, the multi-application smart card operating system selects the application with the lowest priority from the first list as the current application, the method further comprises the steps of:
step C1: the multi-application smart card operating system acquires the identity type of the current application according to the application identifier of the current application, and when the identity type is a slave application or an independent application, the original priorities of all applications higher than the original priority of the current application are sequentially reduced by one level, and the original priority of the current application is updated to be the highest priority; when the identity type is the primary application, performing step C2;
step C2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
step C3: the multi-application smart card operating system selects the application with the lowest priority from the second list as the current sub-application, sequentially reduces the original priorities of all applications with higher priority than the original priority of the current sub-application by one level, and updates the original priority of the current sub-application to the highest priority;
step C4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the second list; and judging whether the second list has application identifications, if so, returning to the step C3, and otherwise, executing the step S4.
10. The method of claim 1, wherein after the step S6, the multi-application smart card operating system selects the application with the highest priority from the first list as the current application, the method further comprises the steps of:
step D1: the multi-application smart card operating system acquires the identity type of the current application according to the application identifier of the current application, and when the identity type is a slave application or an independent application, the original priorities of all applications lower than the original priority of the current application are sequentially increased by one level, and the original priority of the current application is updated to be the highest priority; when the identity type is the main application, executing step D2;
step D2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a second list;
step D3: the multi-application smart card operating system selects the application with the highest priority from the second list as the current sub-application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the current sub-applications by one level, and updates the original priorities of the current sub-applications to the lowest priorities;
step D4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the second list; and D, judging whether the second list has application identifications, if so, returning to the step D3, and otherwise, executing the step S7.
11. The method of claim 1, wherein when the new priority of the target application is the highest priority, the steps S2 through S4 are replaced with: the multi-application smart card operating system sequentially reduces the original priority of all applications higher than the original priority of the target application by one level, and updates the original priority of the target application to the highest priority; and returning a response of successfully updating the priority to the requester, and ending.
12. The method of claim 11, wherein when the new priority of the target application is the highest priority, further comprising the steps of:
step M1: the multi-application smart card operating system acquires the identity type of the target application according to the target application identifier, and when the identity type is a slave application or an independent application, the original priorities of all applications higher than the original priority of the target application are sequentially reduced by one level, and the original priority of the target application is updated to be the highest priority; returning a response of successfully updating the priority to the requester, and ending; when the identity type is the main application, executing step M2;
step M2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
step M3: the multi-application smart card operating system selects the application with the lowest priority from the third list as the current sub-application, sequentially reduces the original priorities of all applications with higher priority than the original priority of the current sub-application by one level, and updates the original priority of the current sub-application to the highest priority;
step M4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the third list; and judging whether the third list has the application identifier, if so, returning to the step M3, otherwise, returning a response of successfully updating the priority to the requester, and ending.
13. The method of claim 1, wherein when the new priority of the target application is the lowest priority, the steps S2 through S4 are replaced with: the multi-application smart card operating system sequentially raises the original priorities of all applications lower than the original priority of the target application by one level, and updates the original priority of the target application to the lowest priority; and returning a response of successfully updating the priority to the requester, and ending.
14. The method of claim 13, wherein when the new priority of the target application is the lowest priority, further comprising the steps of:
step N1: the multi-application smart card operating system acquires the identity type of the target application according to the target application identifier, and when the identity type is the slave application or the independent application, the original priorities of all applications lower than the original priority of the target application are sequentially increased by one level, and the original priority of the target application is updated to be the lowest priority; returning a response of successfully updating the priority to the requester, and ending; when the identity type is the primary application, performing step N2;
step N2: the multi-application smart card operating system acquires a slave application identifier list according to the target application identifier; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
step N3: the multi-application smart card operating system selects the application with the highest priority from the third list as the current sub-application, sequentially raises the original priorities of all applications with lower priorities than the original priorities of the current sub-applications by one level, and updates the original priorities of the current sub-applications to the lowest priorities;
step N4: the multi-application smart card operating system deletes the sub current application identification corresponding to the sub current application in the third list; and judging whether the third list has the application identifier, if so, returning to the step N3, otherwise, returning a response of successfully updating the priority to the requester, and ending.
15. A multi-application smart card operating system is characterized by comprising a receiving module, an analysis module, a first acquisition module, a first generation adding module, a first selection module, a first reduction updating module, a first deleting module, a first judgment module, a second generation adding module, a second selection module, a first increase updating module, a second deleting module, a second judgment module and a first returning module;
the receiving module is used for receiving a priority modification request sent by a requester;
the analysis module is used for analyzing the priority modification request received by the receiving module to obtain a new priority of a target application and a target application identifier;
the first obtaining module is used for obtaining the original priority of the target application according to the target application identifier obtained by the analysis of the analyzing module;
the first generation adding module is used for generating a first list according to the application identifiers of all applications which are higher than the new priority of the target application obtained by the analysis of the analysis module when the new priority of the target application obtained by the analysis of the analysis module is higher than the original priority obtained by the first obtaining module; adding the target application identifier obtained by the analysis of the analysis module to one end of the first list with low priority;
the first selecting module is used for selecting the application with the lowest priority from the first list generated by the first generating and adding module as the current application; the first judging module is further configured to select an application with the lowest priority from the first list after the first deleting module deletes the current application identifier as the current application when the first judging module judges that the current application identifier is the current application identifier;
the first reduction updating module is used for sequentially reducing the original priority of all the applications which are higher than the original priority of the current application selected by the first selecting module by one level; updating the original priority of the current application selected by the first selection module to be the highest priority;
the first deleting module is used for deleting the current application identifier corresponding to the current application selected by the first selecting module in the first list;
the first judging module is used for judging whether the first list obtained after the first deleting module deletes the current application identifier has the application identifier;
the second generation and addition module is used for generating a first list according to the application identifiers of all applications with the new priority lower than the new priority of the target application obtained by the analysis of the analysis module when the new priority of the target application obtained by the analysis of the analysis module is smaller than the original priority obtained by the first acquisition module; adding the target application identifier obtained by the analysis of the analysis module to one end of the first list with high priority;
the second selecting module is used for selecting the application with the highest priority from the first list generated by the second generating and adding module as the current application; the second judging module is further configured to select an application with the highest priority from the first list after the second deleting module deletes the current application identifier as the current application when the second judging module judges that the current application identifier is the current application;
the first raising and updating module is used for sequentially raising the original priorities of all applications which are lower than the original priority of the current application selected by the second selecting module by one level, and updating the original priority of the current application selected by the second selecting module to be the lowest priority;
the second deleting module is used for deleting the current application identifier corresponding to the current application selected by the first selecting module in the first list;
the second judging module is used for judging whether the first list obtained after the second deleting module deletes the current application identifier has the application identifier;
the first returning module is used for returning a response of successfully updating the priority to the requester when the first judging module judges that the priority is not updated, and ending; and the second judging module is also used for returning a successful response of updating the priority to the requester and ending when the second judging module judges that the priority is not updated.
16. The multi-application smart card operating system of claim 15, further comprising a third determination module and a second return module;
the third judging module is used for judging whether the target application is installed according to the target application identifier obtained by the analysis of the analyzing module, and if so, the first obtaining module is triggered; otherwise, triggering the second returning module;
and the second returning module is used for returning the warning information to the requester and ending.
17. The multi-application smart card operating system according to claim 16, wherein the third determining module is specifically configured to determine whether a target application identifier obtained by analysis by the analyzing module exists in an installation application information column of an application information table, and if so, trigger the first obtaining module; otherwise, triggering the second returning module.
18. The multi-application smart card operating system of claim 15, further comprising a first comparison module and a second return module;
the first comparing module is used for comparing the new priority of the target application obtained by the analysis of the analyzing module with the original priority obtained by the first obtaining module, and when the new priority of the target application is equal to the original priority, the second returning module is triggered; when the new priority of the target application is higher than the original priority, triggering the first generation adding module; when the new priority of the target application is smaller than the original priority, triggering the second generation and addition module;
and the second returning module is used for returning the warning information to the requester and ending.
19. The multi-application smart card operating system of claim 18, wherein the first generating and adding module is specifically configured to obtain original priorities of all installed applications, and find an installed application with a higher new priority than the target application; and generating a first list according to the original priority level of the application identifiers of the installed applications with higher new priority levels than the target applications analyzed by the analysis module, and adding the target application identifiers analyzed by the analysis module to one end of the first list with the lowest priority level.
20. The multi-application smart card operating system according to claim 18, wherein the first update-reduction module is specifically configured to take out the application identifier of the current application selected by the first selection module from the application information table and place the application identifier into the temporary storage area, sequentially move the application identifiers of all applications in the application information table, which have a higher priority than the original priority of the current application, to fill the original location of the application identifier of the current application in the application information table, and place the application identifier of the current application selected by the first selection module into a newly vacated location in the application information table.
21. The multi-application smart card operating system according to claim 18, wherein the second generating and adding module is specifically configured to obtain original priorities of all installed applications, and find an installed application with a lower new priority than the target application parsed by the parsing module; and generating a first list according to the original priority level of the application identifiers of the installed applications with the new priority level lower than the new priority level of the target application analyzed by the analysis module, and adding the target application identifier analyzed by the analysis module to the end with the highest priority level of the first list.
22. The multi-application smart card operating system of claim 18, wherein the first ascending update module is configured to take the application identifier of the current application selected by the first selection module from the application information table and place the application identifier into the temporary storage area, sequentially move the application identifiers of all applications in the application information table, which have a lower priority than the original priority of the current application, to fill the original location of the application identifier of the current application in the application information table, and place the application identifier of the current application selected by the first selection module into a newly vacated location in the application information table.
23. The multi-application smart card operating system of claim 15, further comprising a second obtaining module, a first obtaining and generating module, a third selecting module, a second decreasing and updating module, a third deleting module, and a fourth judging module;
the second obtaining module is used for obtaining the identity type of the current application according to the application identifier of the current application selected by the first selecting module, and triggering the first reduction updating module when the identity type is a slave application or an independent application; when the identity type is the main application, triggering the first acquisition generation module;
the first acquisition generation module is used for acquiring a slave application identifier list according to the target application identifier acquired by the analysis of the analysis module; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identifications and all the slave application identifications obtained by analyzing by the analyzing module according to the priority order to generate a second list;
the third selecting module is configured to select an application with the lowest priority from the second list generated by the first obtaining and generating module as a sub-current application; the third deletion module is used for deleting the current sub-application identifier from the second list after the current sub-application identifier is deleted;
the second reduction updating module is used for sequentially reducing the original priorities of all the applications higher than the original priority of the current sub-application by one level and updating the original priority of the current sub-application to the highest priority;
the third deleting module is used for deleting the sub current application identifier corresponding to the sub current application selected by the third selecting module in the second list;
the fourth judging module is configured to judge whether the second list obtained by deleting the sub current application identifier by the third deleting module has an application identifier;
the first deleting module is specifically configured to delete the current application identifier selected by the first selecting module in the first list when the fourth determining module determines that the current application identifier is not selected.
24. The multi-application smart card operating system of claim 15, further comprising a third obtaining module, a second obtaining and generating module, a fourth selecting module, a third decreasing and updating module, a fourth deleting module, and a fifth judging module;
the third obtaining module is configured to obtain an identity type of the current application according to the current application identifier selected by the second selecting module, and trigger the first increasing updating module when the identity type is a slave application or an independent application; when the identity type is the main application, triggering the second acquisition generation module;
the second acquisition generation module is used for acquiring a slave application identifier list according to the target application identifier acquired by the analysis of the analysis module; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identifications and all the slave application identifications obtained by analyzing by the analyzing module according to the priority order to generate a second list;
the fourth selecting module is configured to select an application with the highest priority from the second list generated by the second obtaining and generating module as a sub-current application; the fourth deletion module is further configured to, when the fifth judgment module judges that the current application identifier is the current application identifier, select an application with the highest priority from the second list after the fourth deletion module deletes the current application identifier as the current application;
the third decreasing and updating module is used for sequentially increasing the original priorities of all the applications which are lower than the original priority of the current sub-application selected by the fourth selecting module by one level and updating the original priority of the current sub-application to be the lowest priority;
the fourth deleting module is configured to delete the sub current application identifier corresponding to the sub current application selected by the fourth selecting module in the second list;
the fifth judging module is configured to judge whether the second list of the current application identifier deleted by the fourth deleting module has an application identifier;
the second deleting module is specifically configured to delete the current application identifier selected by the first selecting module in the first list.
25. The multi-application smart card operating system of claim 15, further comprising a fourth reduced update module;
the fourth decreasing and updating module is configured to, when the new priority of the target application obtained through analysis by the analysis module is the highest priority, sequentially decrease the original priorities of all applications higher than the original priority of the target application obtained by the first obtaining module by one level, and update the original priority of the target application obtained by the first obtaining module to the highest priority; and returning a response of successfully updating the priority to the requester, and ending.
26. The multi-application smart card operating system of claim 25, further comprising a fourth obtaining module, a third obtaining and generating module, a fifth selecting module, a fifth reducing and updating module, a fifth deleting module, and a sixth judging module;
the fourth obtaining module is configured to obtain an identity type of the target application according to the target application identifier obtained through analysis by the analyzing module, and trigger the fourth reduction updating module when the identity type is a slave application or an independent application; when the identity type is the main application, triggering the third acquisition generation module;
the third obtaining and generating module is used for obtaining a slave application identifier list according to the target application identifier obtained by the analysis of the analyzing module; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identification and all the slave application identifications according to the priority order to generate a third list;
the fifth selecting module is configured to select an application with the lowest priority from the third list generated by the third obtaining and generating module as a sub-current application; the application module is further configured to select an application with the lowest priority from a third list after the identifier of the current sub-application is deleted by the fifth deletion module as the current sub-application;
the fifth reducing and updating module is used for sequentially reducing the original priorities of all the applications which are higher than the original priority of the current sub-application selected by the fifth selecting module by one level, and updating the original priority of the current sub-application selected by the fifth selecting module to be the highest priority;
the fifth deleting module is configured to delete the sub current application identifier corresponding to the sub current application selected by the fifth selecting module in the third list;
the sixth judging module is configured to judge whether the application identifier exists in the third list of the current application identifier deleted by the fifth deleting module;
and the first returning module is further configured to, when the sixth determining module determines that the request is not received, return a response that the priority is updated successfully to the requesting party, and end the process.
27. The multi-application smart card operating system of claim 15, further comprising a second elevated update module;
the second raising and updating module is used for sequentially raising the original priorities of all applications which are lower than the original priority of the target application obtained by analysis of the analysis module by one level, and updating the original priority of the target application obtained by analysis of the analysis module to be the lowest priority; and returning a response of successfully updating the priority to the requester, and ending.
28. The multi-application smart card operating system of claim 27, further comprising a fifth obtaining module, a fourth obtaining and generating module, a sixth selecting module, a third boosting and updating module, a sixth deleting module, and a seventh judging module;
the fifth obtaining module is configured to obtain an identity type of the target application according to the target application identifier obtained through analysis by the analyzing module, and trigger the second increasing updating module when the identity type is a slave application or an independent application; when the identity type is the main application, triggering the fourth acquisition generation module;
the fourth obtaining and generating module is used for obtaining a slave application identifier list according to the target application identifier obtained by the analysis of the analyzing module; respectively acquiring the priority of all slave applications in the slave application identification list; sequencing the target application identifications and all the slave application identifications obtained by analyzing by the analyzing module according to the priority order to generate a third list;
the sixth selecting module is configured to select an application with the highest priority from the third list generated by the fourth obtaining and generating module as a sub-current application; the application module is further configured to select an application with the highest priority as a sub current application from a third list after the sub current application identifier is deleted by the sixth deletion module;
the third raising and updating module is configured to sequentially raise the original priorities of all applications that are lower than the original priority of the currently-applied sub-application selected by the sixth selecting module by one level, and update the original priority of the currently-applied sub-application selected by the sixth selecting module to the lowest priority;
the sixth deleting module is configured to delete the sub current application identifier corresponding to the sub current application selected by the sixth selecting module in the third list;
the seventh judging module is configured to judge whether an application identifier exists in the third list after the sixth deleting module deletes the sub current application identifier;
and the first returning module is further configured to, when the seventh determining module determines that the request is not received, return a response that the priority is updated successfully to the requesting party, and end the process.
CN201910056194.XA 2019-01-22 2019-01-22 Multi-application smart card operating system and method for updating application priority thereof Active CN109840148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910056194.XA CN109840148B (en) 2019-01-22 2019-01-22 Multi-application smart card operating system and method for updating application priority thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910056194.XA CN109840148B (en) 2019-01-22 2019-01-22 Multi-application smart card operating system and method for updating application priority thereof

Publications (2)

Publication Number Publication Date
CN109840148A CN109840148A (en) 2019-06-04
CN109840148B true CN109840148B (en) 2020-10-13

Family

ID=66884100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910056194.XA Active CN109840148B (en) 2019-01-22 2019-01-22 Multi-application smart card operating system and method for updating application priority thereof

Country Status (1)

Country Link
CN (1) CN109840148B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533555A (en) * 2001-05-18 2004-09-29 ��������ķ������ Aplication deployment from a smart card
US20060047955A1 (en) * 2004-08-30 2006-03-02 Axalto Inc. Application code integrity check during virtual machine runtime
CN101540980A (en) * 2009-04-24 2009-09-23 华为技术有限公司 Business priority updating indicating method, business priority updating method and device thereof
US20140095736A1 (en) * 2004-08-09 2014-04-03 Samsung Electronics Co., Ltd. Ic card and ic card system having suspend/resume functions
CN103914713A (en) * 2012-12-30 2014-07-09 北京握奇数据系统有限公司 Method of modifying application type of smart card, smart terminal, service platform and system
CN104407845A (en) * 2014-10-29 2015-03-11 飞天诚信科技股份有限公司 Method and device for negotiating and selecting application of terminal and intelligent card
CN105808302A (en) * 2016-03-10 2016-07-27 北京芯杰科技有限公司 Smart card multi-application processing method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098527B (en) * 2006-06-27 2012-06-13 雅斯拓(北京)智能卡科技有限公司 Thread controller for processing simultaneously data transmission conversation of individual token
KR101295428B1 (en) * 2011-09-09 2013-08-23 주식회사 팬택 Method and Apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533555A (en) * 2001-05-18 2004-09-29 ��������ķ������ Aplication deployment from a smart card
US20140095736A1 (en) * 2004-08-09 2014-04-03 Samsung Electronics Co., Ltd. Ic card and ic card system having suspend/resume functions
US20060047955A1 (en) * 2004-08-30 2006-03-02 Axalto Inc. Application code integrity check during virtual machine runtime
CN101540980A (en) * 2009-04-24 2009-09-23 华为技术有限公司 Business priority updating indicating method, business priority updating method and device thereof
CN103914713A (en) * 2012-12-30 2014-07-09 北京握奇数据系统有限公司 Method of modifying application type of smart card, smart terminal, service platform and system
CN104407845A (en) * 2014-10-29 2015-03-11 飞天诚信科技股份有限公司 Method and device for negotiating and selecting application of terminal and intelligent card
CN105808302A (en) * 2016-03-10 2016-07-27 北京芯杰科技有限公司 Smart card multi-application processing method, device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Smarter cards bring greater risks;Andrew Calafato等;《Royal Holloway Information Security Thesis Series》;20121231;全文 *
智能卡多应用操作系统的发展趋势及研究;柴洪峰;《计算机应用与软件》;20120430;第29卷(第2期);全文 *

Also Published As

Publication number Publication date
CN109840148A (en) 2019-06-04

Similar Documents

Publication Publication Date Title
CN111068328B (en) Game advertisement configuration form generation method, terminal equipment and medium
JP5903822B2 (en) Setting control apparatus, setting control method, and setting control program
CN107368343B (en) Terminal starting method based on android system, terminal and storage medium
CN106790262B (en) Authentication method and device
CN111309785A (en) Spring framework-based database access method and device, computer equipment and medium
CN109977099A (en) Database portion arranging method, user equipment, storage medium and device
CN109145047A (en) Configuration method, data processing equipment and the storage medium of user tag portrait
US9292280B2 (en) Systems and methods for multi-tiered format registration for applications
US20130031062A1 (en) Adjustment apparatus, adjustment method, and recording medium of adjustment program
CN103313229A (en) Method and device for upgrading aerial downloading technology
CN115048177B (en) Dynamic configuration method for completing business scene based on custom container
CN110598107A (en) Management method of query system and computer storage medium
CN111047434B (en) Operation record generation method and device, computer equipment and storage medium
CN104573083B (en) A kind of cache map services automatic update method
CN110389817B (en) Scheduling method, device and computer readable medium of multi-cloud system
CN109840148B (en) Multi-application smart card operating system and method for updating application priority thereof
CN112084021A (en) Interface configuration method, device and equipment of education system and readable storage medium
CN108614868B (en) Automatic database upgrading method
CN109582680B (en) Business processing method based on new product development, electronic device and readable storage medium
CN111984740A (en) Business data table processing method and device, computer equipment and storage medium
US8775873B2 (en) Data processing apparatus that performs test validation and computer-readable storage medium
WO2016169105A1 (en) Application menu processing method and device
CN113778488B (en) Page updating method and device, computer equipment and storage medium
CN112149070A (en) Authority control method and device
CN112465630B (en) Index data processing method, device, equipment and storage medium

Legal Events

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