Movatterモバイル変換


[0]ホーム

URL:


CN109194529B - Interaction method and device for virtual SIM card and server apdu - Google Patents

Interaction method and device for virtual SIM card and server apdu
Download PDF

Info

Publication number
CN109194529B
CN109194529BCN201811296729.2ACN201811296729ACN109194529BCN 109194529 BCN109194529 BCN 109194529BCN 201811296729 ACN201811296729 ACN 201811296729ACN 109194529 BCN109194529 BCN 109194529B
Authority
CN
China
Prior art keywords
command
sim card
virtual sim
server
commands
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
CN201811296729.2A
Other languages
Chinese (zh)
Other versions
CN109194529A (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.)
Suzhou Changtu Network Science & Technology Co ltd
Original Assignee
Suzhou Changtu Network Science & Technology 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 Suzhou Changtu Network Science & Technology Co ltdfiledCriticalSuzhou Changtu Network Science & Technology Co ltd
Priority to CN201811296729.2ApriorityCriticalpatent/CN109194529B/en
Publication of CN109194529ApublicationCriticalpatent/CN109194529A/en
Application grantedgrantedCritical
Publication of CN109194529BpublicationCriticalpatent/CN109194529B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention relates to an interaction method of a virtual SIM card and a server APDU, which comprises the following steps of S1: sequentially inputting and storing commands to be sent in a configuration file, wherein each command comprises a command name, a command type, command content and a command execution type; s2: inputting a command name which needs to be sent to the virtual SIM card on a background management page; s3: reading the configuration file to a server memory, and analyzing the configuration file into a json tree; s4: the server analyzes the relationship among the multiple commands in the json tree according to the command execution type in the configuration file, wherein the relationship comprises a sequence relationship and a causal relationship; s5: if the commands needing to be sent are in a sequential relation, the server sends all the commands to the virtual SIM card together in sequence; and if the command is in a cause-and-effect relationship, the server dynamically generates a next command after receiving a corresponding return result of the virtual SIM card and continuously sends the next command to the virtual SIM card. An interaction device is also included. And the method is isolated from the service code, and is convenient to maintain.

Description

Interaction method and device for virtual SIM card and server apdu
Technical Field
The invention belongs to the technical field of communication, and relates to an interaction method and device for a virtual SIM card and a server apdu.
Background
Generally, interaction between a virtual SIM card and a back-end server APDU (Application Protocol Data Unit) is complicated, and sending a command to the virtual SIM card by the back-end server requires manual processing of the cause and effect relationship of multiple commands, for example, the back-end server needs to send two commands a and B to the virtual SIM card, but the command B needs to wait for the command a to return and then can be sent continuously, so that such a logical judgment needs to be written in a service code, which not only pollutes the service code, but also makes it difficult to add a command or modify the service code subsequently.
Disclosure of Invention
In view of this, the present invention provides an interaction method for a virtual SIM card and a server APDU, which handles the causal relationship of multiple commands, is isolated from a service code, and is convenient for maintenance.
In order to achieve the above object, in one aspect, the present invention provides the following technical solutions:
a method for interaction between a virtual SIM card and a server APDU comprises the following steps:
s1: sequentially inputting and storing commands to be sent in a configuration file, wherein each command comprises a command name, a command type, command content and a command execution type;
s2: inputting a command name which needs to be sent to the virtual SIM card on a background management page;
s3: reading the configuration file to a server memory, and analyzing the configuration file into a json tree;
s4: the server analyzes the relationship among the multiple commands in the json tree according to the command execution type in the configuration file, wherein the relationship comprises a sequence relationship and a causal relationship;
s5: if the commands needing to be sent are in a sequential relation, the server sends all the commands to the virtual SIM card together in sequence; and if the command is in a cause-and-effect relationship, the server dynamically generates a next command after receiving a corresponding return result of the virtual SIM card and continuously sends the next command to the virtual SIM card.
Further, one command in the configuration file can include a plurality of parallel instructions, and a sequence relationship or a causal relationship also exists among the instructions.
In another aspect of the present invention, a device for interaction between a virtual SIM card and a server APDU is provided, which includes a server, a management terminal and a virtual SIM card, where the server includes an APDU interaction engine and a communication module, and the APDU interaction engine includes a reading module, a json tree analysis module, a relationship analysis module, a sending module, a receiving module and a command generation module; the management terminal is used for adding or modifying commands in the configuration file, communicating with the server and inputting commands to be sent;
the server is connected with the management terminal and the virtual SIM card through the communication module, the reading module is used for reading the content of the configuration file, the json tree analyzing module is used for analyzing the configuration file into a json tree, the relation analyzing module is used for analyzing the relation of a plurality of commands in the configuration file, the relation comprises a sequence relation and a causal relation, the commands of the sequence relation are directly and simultaneously sent to the virtual SIM card through the sending module in sequence, the receiving module is used for receiving a return result after the virtual SIM card receives the commands, the command generating module is used for generating a next sent command according to the return result of the virtual SIM card, and the commands of the causal relation are dynamically generated by the command generating module after the receiving module receives the return result of the virtual SIM card and then are sent to the virtual SIM card through the sending module.
The system further comprises a database which stores command contents, the database is connected with the server, and the reading module reads the command contents in the database according to the configuration file.
The invention has the beneficial effects that: the invention solves the problem of hard coding, does not need to modify the service codes when the commands need to be added in the later stage of the project, directly configures the sequence and the causal relationship in the configuration file, reduces the pollution to the service codes and is more convenient for subsequent maintenance and modification.
Drawings
In order to make the object, technical scheme and beneficial effect of the invention more clear, the invention provides the following drawings for explanation:
FIG. 1 is a detailed flow chart of an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
A method for interaction between a virtual SIM card and a server APDU comprises the following steps:
s1: sequentially inputting and storing commands to be sent in a configuration file, wherein each command comprises a command name, a command type, command content and a command execution type;
s2: inputting a command name which needs to be sent to the virtual SIM card on a background management page;
s3: reading the configuration file to a server memory, and analyzing the configuration file into a json tree;
s4: the server analyzes the relationship among the multiple commands in the json tree according to the command execution type in the configuration file, wherein the relationship comprises a sequence relationship and a causal relationship;
s5: if the commands needing to be sent are in a sequential relation, the server sends all the commands to the virtual SIM card together in sequence; and if the command is in a cause-and-effect relationship, the server dynamically generates a next command after receiving a corresponding return result of the virtual SIM card and continuously sends the next command to the virtual SIM card.
One command in the configuration file can comprise a plurality of parallel instructions, and sequence relations or causal relations also exist among the instructions.
The invention is illustrated by a specific embodiment.
The method comprises the following steps: entering commands in the configuration file:
Figure GDA0002994762220000031
the method comprises the steps that a cd-mf and a read-2fe2 are names of commands, type is command type, data is command content, is-dynamic is command execution type, and is-dynamic is false, wherein the command is not a dynamic command, does not need to wait for a virtual SIM card to return a result and is dynamically generated through an APDU interactive engine, and is directly sent to the virtual SIM card together with the previous command in sequence; the "is-dynamic" is "true" indicating that the command is a dynamic command, and the previous command needs to be sent first, and waits for the result returned by the virtual SIM card, and then the APDU interaction engine dynamically generates the command according to the result and sends the command to the virtual SIM card.
A device for interaction between a virtual SIM card and a server APDU comprises a server, a management terminal and the virtual SIM card, wherein the server comprises an APDU interaction engine and a communication module, and the APDU interaction engine comprises a reading module, a json tree analysis module, a relation analysis module, a sending module, a receiving module and a command generation module; the management terminal is used for adding or modifying commands in the configuration file, communicating with the server and inputting commands to be sent;
the server is connected with the management terminal and the virtual SIM card through the communication module, the reading module is used for reading the content of the configuration file, the json tree analyzing module is used for analyzing the configuration file into a json tree, the relation analyzing module is used for analyzing the relation of a plurality of commands in the configuration file, the relation comprises a sequence relation and a causal relation, the commands of the sequence relation are directly and simultaneously sent to the virtual SIM card through the sending module in sequence, the receiving module is used for receiving a return result after the virtual SIM card receives the commands, the command generating module is used for generating a next sent command according to the return result of the virtual SIM card, and the commands of the causal relation are dynamically generated by the command generating module after the receiving module receives the return result of the virtual SIM card and then are sent to the virtual SIM card through the sending module.
The system also comprises a database which stores command contents, the database is connected with the server, and the reading module also reads the command contents in the database according to the configuration file.
As shown in fig. 1, when an administrator issues cd-mf and read-2fe2 commands through a management terminal, a reading module sends a configuration file to a memory, a json tree analysis module analyzes the configuration file into a json tree, a relationship analysis module analyzes that a first instruction in a cd-mf command and a read-2fe2 command is an inactive command, namely, a command sent in sequence, a sending module sends the cd-mf command and the first instruction of read-2fe2 to a virtual SIM card in sequence, the sending module waits for a result returned by the virtual SIM card, a receiving module sends the result to a command generation module after receiving the returned result to generate a next complete command, and the command is sent to the virtual SIM card through the sending module.
When the command type is "open", which means that the command content of the command is only a part, the remaining part is stored in the database, and the reading module will also read the remaining part from the database for parsing and sending.
Finally, it is noted that the above-mentioned preferred embodiments illustrate rather than limit the invention, and that, although the invention has been described in detail with reference to the above-mentioned preferred embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the scope of the invention as defined by the appended claims.

Claims (4)

1. An interactive method of virtual SIM card and server APDU is characterized in that: the method comprises the following steps:
s1: sequentially inputting and storing commands to be sent in a configuration file, wherein each command comprises a command name, a command type, command content and a command execution type;
s2: inputting a command name which needs to be sent to the virtual SIM card on a background management page;
s3: reading the configuration file to a server memory, and analyzing the configuration file into a json tree;
s4: the server analyzes the relationship among the multiple commands in the json tree according to the command execution type in the configuration file, wherein the relationship comprises a sequence relationship and a causal relationship;
s5: if the commands needing to be sent are in a sequential relation, the server sends all the commands to the virtual SIM card together in sequence; and if the command is in a cause-and-effect relationship, the server dynamically generates a next command after receiving a corresponding return result of the virtual SIM card and continuously sends the next command to the virtual SIM card.
2. The method of claim 1, wherein the method comprises the following steps: one command in the configuration file can comprise a plurality of parallel instructions, and sequence relations or causal relations also exist among the instructions.
3. An apparatus for virtual SIM card interaction with a server APDU, characterized by: the APDU interactive engine comprises a reading module, a json tree analysis module, a relation analysis module, a sending module, a receiving module and a command generation module; the management terminal is used for adding or modifying commands in the configuration file, communicating with the server and inputting commands to be sent;
the server is connected with the management terminal and the virtual SIM card through the communication module, the reading module is used for reading the content of the configuration file, the json tree analyzing module is used for analyzing the configuration file into a json tree, the relation analyzing module is used for analyzing the relation of a plurality of commands in the configuration file, the relation comprises a sequence relation and a causal relation, the commands of the sequence relation are directly and simultaneously sent to the virtual SIM card through the sending module in sequence, the receiving module is used for receiving a return result after the virtual SIM card receives the commands, the command generating module is used for generating a next sent command according to the return result of the virtual SIM card, and the commands of the causal relation are dynamically generated by the command generating module after the receiving module receives the return result of the virtual SIM card and then are sent to the virtual SIM card through the sending module.
4. An apparatus for virtual SIM card interaction with server APDUs as claimed in claim 3, wherein: the system also comprises a database which stores command contents, the database is connected with the server, and the reading module also reads the command contents in the database according to the configuration file.
CN201811296729.2A2018-11-012018-11-01Interaction method and device for virtual SIM card and server apduActiveCN109194529B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811296729.2ACN109194529B (en)2018-11-012018-11-01Interaction method and device for virtual SIM card and server apdu

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811296729.2ACN109194529B (en)2018-11-012018-11-01Interaction method and device for virtual SIM card and server apdu

Publications (2)

Publication NumberPublication Date
CN109194529A CN109194529A (en)2019-01-11
CN109194529Btrue CN109194529B (en)2021-07-27

Family

ID=64941384

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811296729.2AActiveCN109194529B (en)2018-11-012018-11-01Interaction method and device for virtual SIM card and server apdu

Country Status (1)

CountryLink
CN (1)CN109194529B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8532706B2 (en)*2010-10-302013-09-10Palm, Inc.Techniques to manage a subscriber identity module for a mobile wireless device
US9160624B2 (en)*2012-07-032015-10-13Opera Software Ireland LimitedLinked list scripting engine
CN105677568A (en)*2016-01-112016-06-15上海富欣智能交通控制有限公司Test scene generating method for railway signal computer interlocking system
CN106909435A (en)*2015-12-222017-06-30北京网御星云信息技术有限公司A kind of analysis method and device of Network Security Device order line
CN108399919A (en)*2017-02-062018-08-14中兴通讯股份有限公司A kind of method for recognizing semantics and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8532706B2 (en)*2010-10-302013-09-10Palm, Inc.Techniques to manage a subscriber identity module for a mobile wireless device
US9160624B2 (en)*2012-07-032015-10-13Opera Software Ireland LimitedLinked list scripting engine
CN106909435A (en)*2015-12-222017-06-30北京网御星云信息技术有限公司A kind of analysis method and device of Network Security Device order line
CN105677568A (en)*2016-01-112016-06-15上海富欣智能交通控制有限公司Test scene generating method for railway signal computer interlocking system
CN108399919A (en)*2017-02-062018-08-14中兴通讯股份有限公司A kind of method for recognizing semantics and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Identification cards- Integrated circuit cards";ISO;《ISO/IEC 7816》;20130430;全文*

Also Published As

Publication numberPublication date
CN109194529A (en)2019-01-11

Similar Documents

PublicationPublication DateTitle
CN111026931B (en)Data query method, device, equipment and medium
CN110688828A (en)File processing method and device, file processing system and computer equipment
CN112416964A (en)Data processing method, device and system, computer equipment and computer readable storage medium
CN106970820A (en)Code storage method and code storage
US9418241B2 (en)Unified platform for big data processing
CN103197948A (en)Communication protocol script analyzing method of electricity intelligent equipment
CN110928802A (en)Test method, device, equipment and storage medium based on automatic generation of case
CN113010542A (en)Service data processing method and device, computer equipment and storage medium
CN117093619A (en)Rule engine processing method and device, electronic equipment and storage medium
CN113760242B (en)Data processing method, device, server and medium
CN113887182A (en) Form generation method, device, device and storage medium
CN115564000A (en)Two-dimensional code generation method and device, computer equipment and storage medium
CN112835901A (en)File storage method and device, computer equipment and computer readable storage medium
CN114844792A (en)Dynamic monitoring method, device, equipment and storage medium based on LUA language
CN115964307B (en)Automatic test method, device, equipment and medium for transaction data
CN117171792A (en)Intra-enterprise knowledge question-answering method, device, equipment and medium based on large model
CN109379245A (en)A kind of wifi report form generation method and system
CN105872731A (en)Data processing method and device
CN115225345A (en)Log downloading method, device and medium
CN109992293B (en)Method and device for assembling Android system component version information
CN110502560A (en)A kind of method and server of Database Connection Parameters encapsulation
CN114138850A (en) A list management method, system, device and readable storage medium
CN109194529B (en)Interaction method and device for virtual SIM card and server apdu
CN110881030A (en)Logstack-based method and device for recording operation logs of web service administrator
CN117873486A (en) A method, device, equipment and storage medium for automatic generation of front-end and back-end codes

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp