CN113177202B - Data calling method, system, dual-chip sales terminal and readable storage medium - Google Patents
Data calling method, system, dual-chip sales terminal and readable storage medium Download PDFInfo
- Publication number
- CN113177202B CN113177202B CN202011059272.0A CN202011059272A CN113177202B CN 113177202 B CN113177202 B CN 113177202B CN 202011059272 A CN202011059272 A CN 202011059272A CN 113177202 B CN113177202 B CN 113177202B
- Authority
- CN
- China
- Prior art keywords
- chip
- call
- calling
- data
- function
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/52—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/71—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
- G06F21/77—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in smart cards
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/12—Cash registers electronically operated
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Communication Control (AREA)
- Telephone Function (AREA)
Abstract
The application is applicable to the technical field of sales terminals, and provides a data calling method, which comprises the following steps: the security chip receives a call command sent by the application chip, wherein the call command comprises a function name and parameters of a target call function. Analyzing the call command to obtain the function name included in the call command, performing system call through the target call function to obtain a call result, and feeding back the call result to the application chip. According to the call instruction carrying the function name of the target function, the system call is carried out in the target function, so that the application chip can directly obtain the data call result of the security chip, the inter-chip system call is realized, and the data processing efficiency of the system is improved.
Description
Technical Field
The application belongs to the technical field of sales terminals, and particularly relates to a data calling method, a data calling system, a double-chip sales terminal and a readable storage medium.
Background
In the existing dual-chip selling terminal, since the security chip is an independently operated system, data in the security chip is only processed and transmitted in the security chip, and the application chip cannot acquire the data of the security chip, so that the data transmission between the dual chips is difficult, and the data at two ends are unequal.
Disclosure of Invention
The embodiment of the application provides a data calling method, a device, terminal equipment and a readable storage medium, which can solve the problem that the data at two ends are unequal because the data transmission between the two chips is difficult to carry out in the existing data communication method based on the double-chip selling terminal.
In a first aspect, an embodiment of the present application provides a data calling method, which is applied to a security chip, and includes:
receiving a call command sent by an application chip, wherein the call command comprises a function name and parameters of a target call function;
Analyzing the call command to obtain the function name included in the call command;
and performing system call through the target call function to obtain a call result, and feeding back the call result to the application chip, wherein the call result comprises a function call result and an error code.
In a second aspect, an embodiment of the present application provides a data calling method, applied to an application chip, including:
Sending a calling command to a security chip to enable the security chip to carry out system call according to protocol data, wherein the calling command comprises a function name and parameters of a target calling function;
And receiving and analyzing the calling result returned by the security chip to obtain an analyzed function calling result, wherein the calling result comprises a function calling result and an error code.
In a third aspect, an embodiment of the present application provides a data calling system, applied to a security chip, including:
The receiving module is used for receiving a call command sent by the application chip, wherein the call command comprises a function name and parameters of a target call function;
The first analysis module is used for analyzing the calling command and obtaining the function name included in the calling command;
And the calling module is used for carrying out system calling through the target calling function, obtaining a calling result and feeding the calling result back to the application chip, wherein the calling result comprises a function calling result and an error code.
In a fourth aspect, an embodiment of the present application provides a data calling system, applied to an application chip, including:
the system comprises a first sending module, a second sending module and a second sending module, wherein the first sending module is used for sending a calling command to the security chip so as to enable the security chip to carry out system call according to protocol data, and the calling command comprises a function name and parameters of a target calling function;
and the second analysis module is used for receiving and analyzing the calling result returned by the security chip to obtain an analyzed function calling result, wherein the calling result comprises the function calling result and an error code.
In a fifth aspect, an embodiment of the present application provides a dual-chip vending terminal, including a security chip, an application chip, and a computer program stored and executable on the security chip and the application chip, where the security chip implements the data calling method according to the first aspect when executing the computer program, and the application chip implements the data calling method according to the second aspect when executing the computer program.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a data calling method as described in the first or second aspect above.
In a seventh aspect, an embodiment of the present application provides a computer program product, which when run on a terminal device, causes the terminal device to perform the data invoking method according to the first or second aspect above.
According to the call instruction carrying the function name of the target function, the system call is carried out in the target function, so that the application chip can directly obtain the data call result of the security chip, the inter-chip system call is realized, and the data processing efficiency of the system is improved.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a data calling method according to an embodiment of the present application;
FIG. 2 is a flow chart of a data calling method according to another embodiment of the present application;
FIG. 3 is a schematic diagram of a data transmission software framework between an application chip and a security chip according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a data call system according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a data call system according to another embodiment of the present application;
Fig. 6 is a schematic structural diagram of a dual chip vending terminal according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The data calling method provided by the embodiment of the application can be applied to terminal equipment such as a double-chip sales terminal and the like, and the embodiment of the application does not limit the specific type of the terminal equipment.
Example 1
Fig. 1 shows a schematic flow chart of a data calling method provided by the application, which can be applied to a security chip by way of example and not limitation.
S101, receiving a call command sent by an application chip, wherein the call command comprises a function name and parameters of a target call function;
In a specific application, a call command sent by an application chip (Application processor, AP) is received. The call command is sent by the application chip and is used for controlling the security chip (Security processor, SP) to call the system according to the target call function. The call command should include, but is not limited to, a function name and parameters of the target call function. The function name may be a character string, for example, the function name of the target call function may be rpc _open, rpc_ioctl, rpc_close, or read.
For example, if a call of the data reading function is required, the call command sent by the application chip should include the name read of the data reading function and the parameter of the data reading function.
S102, analyzing the call command to obtain the function name included in the call command;
In a specific application, analyzing the received call command to obtain the function name of the target call function contained in the call command so as to determine the target call function.
S103, performing system call through the target call function to obtain a call result, and feeding back the call result to the application chip, wherein the call result comprises a function call result and an error code.
In a specific application, further analyzing to obtain parameters of a target calling function in a calling command, transmitting the parameters into the target calling function to realize system calling through the target calling function, obtaining a function calling result corresponding to the target calling function, packaging the function calling result and an error code, generating a calling result and transmitting the calling result to an application chip. It is understood that call results include, but are not limited to, function call results and error codes.
For example, if the target calling function is a data reading function (read), the data reading function performs a data reading operation, packages the read data and the error code, generates a calling result, and sends the calling result to the application chip.
Wherein the error code is a code generated when a system call is made through the target call function with errors. It can be appreciated that if the system call is successful by the target call function, the corresponding error code is 0 or null. If the system call fails through the target call function, the corresponding function call result is null.
In one embodiment, before the step S101, the method includes:
and presetting a communication protocol between the application chip and the communication protocol, wherein the communication protocol is used for setting the format of the calling command.
In a specific application, before the system call is performed, a communication protocol between the security chip and the application chip can be preset, and the communication protocol is used for setting a format of the application chip for sending the call command.
In this embodiment, the communication protocol specifies that the call command transmitted from the application chip must include a protocol header, a function name (in the form of a string) of the target call function, and parameters of the target call function. For example, the call command is in the format of a protocol header, a function name, and parameters.
In one embodiment, the communication protocol is also used to format the call results sent by the secure chip. For example, the call result sent by the communication protocol to the security chip must include a protocol header, a function call result and an error code, for example, the call result is in the format of the protocol header, the function call result and the error code. After the system call is performed through the target call function, the security chip needs to package the protocol header, the function call result and the error code to generate the call result.
In one embodiment, before the step S101, the method further includes:
When receiving a registration notification instruction sent by the application chip, completing registration notification according to the registration notification instruction;
when the trigger data is detected, generating a notification according to the trigger data, and sending the notification to the application chip, wherein the notification is used for notifying the application chip that the trigger data is detected at the security chip end.
In a specific application, when a registration notification instruction sent by an application chip is received, registration notification is performed according to the registration passing instruction, and when trigger data is detected, a corresponding notification is generated according to the trigger data and sent to the application chip. The registration notification refers to a mode of generating a corresponding notification according to the trigger data when the trigger data is received, and the notification is used for notifying an application chip that the trigger data is detected at a security chip end. The trigger data may be key information detected at the security chip, data triggering operations of different functions such as IC card insertion or IC card extraction, and the like.
For example, if the security chip detects an IC card insertion, an IC card insertion notification is generated from the data of the IC card insertion, and the IC card insertion notification is sent to the application chip to notify the application chip that the insertion of the IC card is detected at the security chip side. The IC card insertion data may include information such as a time of IC card insertion, an ID of the IC card, and the like.
According to the call instruction carrying the function name of the target function, the system call is carried out in the target function, so that the application chip can directly obtain the data call result of the security chip, the inter-chip system call is realized, and the data processing efficiency of the system is improved.
Example two
Fig. 2 shows another schematic flow chart of the data calling method provided by the present application, which can be applied to an application chip by way of example and not limitation.
S201, sending a calling command to a security chip so that the security chip can carry out system call according to the protocol data, wherein the calling command comprises a function name and parameters of a target calling function;
In a specific application, when an application chip generates a call command, firstly, a preset interface of unified encapsulation in a POS SDK library call library is used for encapsulating a protocol header, a function name and parameters of a target call function through the interface, so as to generate a corresponding call command, and the call command is sent to a security chip, so that the security chip can perform system call of the target call function according to protocol data. The preset interface of the unified package may be specifically set according to actual requirements, for example, the preset interface of the unified package is any one of open interfaces (for example, xxx_open () interface).
S202, receiving and analyzing a calling result returned by the security chip to obtain an analyzed function calling result, wherein the calling result comprises a function calling result and an error code.
In a specific application, a call result returned by the security chip is received, the call result is analyzed, and an analyzed function call result is obtained, wherein the call result comprises, but is not limited to, a function call result and an error code. The error code is a code generated when a system call is made through the target call function with errors. It can be appreciated that if the system call is successful by the target call function, the corresponding error code is 0 or null. If the system call fails through the target call function, the function call result is null.
For example, if the target calling function is a data reading function read, the calling result includes the read data and the error code.
In one embodiment, before the step 201, the method includes:
Sending a registration notification instruction to the security chip so that the security chip carries out registration notification according to the registration notification instruction;
And starting a monitoring mode, and generating a corresponding calling command according to the notification when the notification sent by the security chip is monitored.
In a specific application, a registration notification instruction is sent to the security chip, so that the security chip carries out registration notification according to the registration notification instruction when receiving the registration notification instruction, when the security chip detects trigger data, corresponding notification is generated and fed back, a select monitoring mode is started, and when the notification sent by the security chip is monitored, a corresponding calling command is generated according to the notification.
For example, if the IC card insertion is detected in the security chip, a data read call command (which includes the name read of the data read function and the parameter of the data read function) is generated and sent to the security chip to control the security chip to perform the data read operation according to the data read function (read) included in the data read call command.
In one embodiment, before the step 201, the method further includes:
and creating a socket interface, wherein the socket interface is used for receiving the calling result and the notification.
In a specific application, a socket interface is created in advance, and the socket interface is used for receiving a calling result and a notification sent by the security chip.
As shown in fig. 3, a schematic diagram of a data transmission software framework between an application chip and a security chip is provided.
As shown in fig. 3, an inter-process communication layer based on SOCKET (SOCKET) is added between the POS SDK and the universal asynchronous receiver Transmitter (Universal Asynchronous Receiver/Transmitter, UART) to implement multi-client connection and data transmission.
Before the application chip sends the registration notification, an open function (open) call command can be sent to the security chip, wherein the open interface (for example, xxx_open interface) preset in the POS SDK is called through the application program layer, the open function (open) call command is sent to the security chip through the preset open interface, the security chip executes system call in the open function rpc _open, and after the security chip executes the open function system call, sp_fd is returned to the preset open interface, so that the open function system call is successful, and the open access function is realized.
After the open function system call is successful, the application chip can create a pair of interconnected sockets (the sockets can be nameless sockets, which are convenient for transmitting data), and the sockets comprise a read handle sv [0] and a write handle sv [1]. When the application chip sends a registration notification command to the security chip, a monitoring thread is created, a write handle sv [1] is used as a parameter to be transmitted into the thread, meanwhile, a read-write handle of a select monitoring socket client is called, and a read handle sv [0] is sent to the application program layer, so that the application program layer adds the read handle sv [0] into the select monitoring;
When the application chip side monitors that the socket receives the notification sent by the security chip through the selection, the application chip side reads data in the notification, and writes 1 byte of data in the write handle sv [1] to wake up the selection monitoring of the application program layer. When the application program monitors the notification received by the socket read handle sv [0] through the select, any data read interface (for example, xxx_read) of the POS SDK is called to read the data in the write handle sv [1], a corresponding data read call command is generated according to the data contained in the notification, and the data read call command is sent to the security chip to carry out system call. And meanwhile, the socket service is connected, when the UART receives a call result fed back by the SP, the call result is sent to a corresponding socket client and is sent to the POS SDK, the POS SDK analyzes the call result, and the function call result and the error code obtained after analysis are returned to the application program layer, so that the function of the double-processor compatible single-processor selection is realized, and the data transmission efficiency between the double chips is improved.
According to the call instruction carrying the function name of the target function, the system call is carried out in the target function, so that the application chip can directly obtain the data call result of the security chip, the inter-chip system call is realized, and the data processing efficiency of the system is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Example III
Corresponding to the data calling method described in the first embodiment, fig. 4 shows a block diagram of the data calling system 100 according to the embodiment of the present application, which is applied to a security chip, and for convenience of explanation, only the portions related to the embodiment of the present application are shown.
Referring to fig. 4, the data call system 100 includes:
The receiving module is used for receiving a call command sent by the application chip, wherein the call command comprises a function name and parameters of a target call function;
The first analysis module is used for analyzing the calling command and obtaining the function name included in the calling command;
And the calling module is used for carrying out system calling through the target calling function, obtaining a calling result and feeding the calling result back to the application chip, wherein the calling result comprises a function calling result and an error code.
In one embodiment, the data call system 100 further comprises:
The setting module is used for presetting a communication protocol between the application chip and the communication protocol, and the communication protocol is used for setting the format of the calling command.
In one embodiment, the data call system 100 further comprises:
The registration module is used for completing registration notification according to the registration notification instruction when receiving the registration notification instruction sent by the application chip;
The generation module is used for generating a notification according to the trigger data when the trigger data is detected, and sending the notification to the application chip, wherein the notification is used for notifying the application chip that the trigger data is detected at the security chip end.
According to the call instruction carrying the function name of the target function, the system call is carried out in the target function, so that the application chip can directly obtain the data call result of the security chip, the inter-chip system call is realized, and the data processing efficiency of the system is improved.
Example IV
Corresponding to the data calling method described in the second embodiment, fig. 5 shows a block diagram of the data calling system 200 according to the embodiment of the present application, which is applied to an application chip, and for convenience of explanation, only the relevant parts of the embodiment of the present application are shown.
Referring to fig. 5, the data call system 200 includes:
A first sending module 201, configured to send a call command to a security chip, so that the security chip performs system call according to the protocol data, where the call command includes a function name and a parameter of a target call function;
And the second parsing module 202 is configured to receive and parse the call result returned by the security chip, and obtain a parsed function call result, where the call result includes a function call result and an error code.
In one embodiment, the data calling system 200 further comprises:
The second sending module is used for sending a registration notification instruction to the security chip so that the security chip carries out registration notification according to the registration notification instruction;
And the monitoring module is used for starting a monitoring mode, and generating a corresponding calling command according to the notification when the notification sent by the security chip is monitored.
The data calling system 200 further includes:
the creating module is used for creating a socket interface, and the socket interface is used for receiving the calling result and the notification.
According to the call instruction carrying the function name of the target function, the system call is carried out in the target function, so that the application chip can directly obtain the data call result of the security chip, the inter-chip system call is realized, and the data processing efficiency of the system is improved.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Fig. 6 is a schematic structural diagram Of a dual chip Point Of Sale (POS) terminal according to an embodiment Of the application. As shown in fig. 6, the two-chip sales terminal 6 of this embodiment includes a security chip 60, an application chip 61, a computer program 62 stored and executable in the security chip 60, and a computer program 63 stored and executable in the application chip 61, the security chip 60 executing the computer program 62 implements the steps of the data calling method of the first embodiment described above, and the application chip 61 executing the computer program 63 implements the steps of the data calling method of the second embodiment described above.
The dual chip sales terminal 6 may be a sales terminal or the like. The dual chip vending terminal may include, but is not limited to, a security chip 60 and an application chip 61. It will be appreciated by those skilled in the art that fig. 6 is merely an example of a dual chip sales terminal 6 and is not meant to be limiting as to the dual chip sales terminal 6, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The security chip 60 may be a security chip (Security processor, SP) and the application chip 61 may be an application chip (Application processor, AP).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium can include at least any entity or device capable of carrying computer program code to a camera device/dual chip sales terminal, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing embodiments are merely illustrative of the technical solutions of the present application, and not restrictive, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that modifications may still be made to the technical solutions described in the foregoing embodiments or equivalent substitutions of some technical features thereof, and that such modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (9)
1. A data calling method, applied to a security chip, comprising:
receiving a call command sent by an application chip, wherein the call command comprises a function name and parameters of a target call function;
Analyzing the call command to obtain the function name included in the call command;
Performing system call through the target call function to obtain a call result, and feeding back the call result to the application chip, wherein the call result comprises a function call result and an error code;
Before receiving the call command sent by the application chip, the method further comprises the following steps:
When receiving a registration notification instruction sent by the application chip, finishing registration according to the registration notification instruction;
When trigger data is detected, generating a notification according to the trigger data, and sending the notification to the application chip, wherein the notification is used for notifying the application chip that the trigger data is detected at the safety chip end, and the trigger data is the data which is detected at the safety chip and triggers different functional operations and comprises key information, IC card insertion or IC card extraction.
2. The data calling method of claim 1, wherein before receiving the call command sent by the application chip, the method comprises:
and presetting a communication protocol between the application chip and the communication protocol, wherein the communication protocol is used for setting the format of the calling command.
3. The data calling method is characterized by being applied to an application chip and comprising the following steps of:
Sending a calling command to a security chip to enable the security chip to carry out system call according to protocol data, wherein the calling command comprises a function name and parameters of a target calling function;
Receiving and analyzing a calling result returned by the security chip to obtain an analyzed function calling result, wherein the calling result comprises a function calling result and an error code;
the sending the call command to the security chip, so that before the security chip performs the system call according to the protocol data, includes:
the method comprises the steps of sending a registration notification instruction to a security chip so that the security chip registers according to the registration notification instruction, generating a notification according to trigger data when the security chip detects the trigger data, and sending the notification to an application chip, wherein the notification is used for notifying the application chip that the security chip detects the trigger data, and the trigger data are data which are detected by the security chip and trigger different functional operations and comprise key information, IC card insertion or IC card extraction.
4. The data calling method of claim 3, further comprising initiating a listening mode, when a notification sent by the security chip is listened to, generating a corresponding call command based on the notification.
5. The data calling method of claim 4, wherein before sending a call command to a security chip to cause the security chip to make a system call according to the protocol data, further comprising:
and creating a socket interface, wherein the socket interface is used for receiving the calling result and the notification.
6. A data recall system for use with a secure chip comprising:
The receiving module is used for receiving a call command sent by the application chip, wherein the call command comprises a function name and parameters of a target call function;
The first analysis module is used for analyzing the calling command and obtaining the function name included in the calling command;
The calling module is used for carrying out system call through the target calling function, obtaining a calling result and feeding the calling result back to the application chip, wherein the calling result comprises a function calling result and an error code;
The data calling system further comprises:
The registration module is used for completing registration according to the registration notification instruction when receiving the registration notification instruction sent by the application chip;
The generating module is used for generating a notification according to the trigger data when the trigger data is detected, and sending the notification to the application chip, wherein the notification is used for notifying the application chip that the trigger data is detected at the safety chip end, and the trigger data is the data which is detected at the safety chip and triggers different function operations and comprises key information, IC card insertion or IC card extraction.
7. A data calling system, for application to an application chip, comprising:
the system comprises a first sending module, a second sending module and a second sending module, wherein the first sending module is used for sending a calling command to the security chip so as to enable the security chip to carry out system call according to protocol data, and the calling command comprises a function name and parameters of a target calling function;
the second analysis module is used for receiving and analyzing the calling result returned by the security chip to obtain an analyzed function calling result, wherein the calling result comprises a function calling result and an error code;
The data calling system further comprises:
The system comprises a security chip, a second sending module, a first sending module and a second sending module, wherein the security chip is used for sending a registration notification instruction to the security chip so as to enable the security chip to register according to the registration notification instruction, when the security chip detects trigger data, a notification is generated according to the trigger data and sent to the application chip, the notification is used for notifying the application chip that the security chip detects the trigger data, and the trigger data are data which are detected by the security chip and trigger different functional operations and comprise key information, IC card insertion or IC card extraction.
8. The data calling system of claim 7, wherein the data calling system further comprises:
And the monitoring module is used for starting a monitoring mode, and generating a corresponding calling command according to the notification when the notification sent by the security chip is monitored.
9. A dual chip vending terminal comprising a security chip, an application chip and a computer program stored and executable on said security chip and application chip, wherein said security chip implements the method according to any one of claims 1 to 2 when said computer program is executed, and wherein said application chip implements the method according to any one of claims 3 to 5 when said computer program is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011059272.0A CN113177202B (en) | 2020-09-30 | 2020-09-30 | Data calling method, system, dual-chip sales terminal and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011059272.0A CN113177202B (en) | 2020-09-30 | 2020-09-30 | Data calling method, system, dual-chip sales terminal and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113177202A CN113177202A (en) | 2021-07-27 |
CN113177202B true CN113177202B (en) | 2025-04-15 |
Family
ID=76921529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011059272.0A Active CN113177202B (en) | 2020-09-30 | 2020-09-30 | Data calling method, system, dual-chip sales terminal and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113177202B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114296625B (en) * | 2021-12-28 | 2024-08-13 | 深圳市百富智能新技术有限公司 | Data input method and device, double-chip selling terminal and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109697173A (en) * | 2018-12-11 | 2019-04-30 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of the embedded computer SiP modularity and circuit of Security-Oriented |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10397215B2 (en) * | 2016-09-27 | 2019-08-27 | Visa International Service Assocation | Secure element installation and provisioning |
CN106302544A (en) * | 2016-10-18 | 2017-01-04 | 深圳市金立通信设备有限公司 | A kind of safe verification method and system |
US10952263B2 (en) * | 2016-12-30 | 2021-03-16 | British Telecommunications Public Limited Company | Automatic device pairing |
WO2018164955A1 (en) * | 2017-03-06 | 2018-09-13 | Rivetz Corp. | Device enrollment protocol |
-
2020
- 2020-09-30 CN CN202011059272.0A patent/CN113177202B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109697173A (en) * | 2018-12-11 | 2019-04-30 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of the embedded computer SiP modularity and circuit of Security-Oriented |
Also Published As
Publication number | Publication date |
---|---|
CN113177202A (en) | 2021-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112788128A (en) | Business information pushing method and device, storage medium and electronic device | |
CN110380932B (en) | Test method and device for safety equipment and test system | |
CN110601880A (en) | Cloud platform, service processing method, command interface and computer equipment | |
CN113360301B (en) | Message transmission system and method | |
CN115361327B (en) | Method, device, terminal and medium for automatically testing NCSI command of network card | |
CN113177202B (en) | Data calling method, system, dual-chip sales terminal and readable storage medium | |
CN111953540B (en) | Message generation method and device, electronic equipment and storage medium | |
CN108881320B (en) | Authentication processing method for user login, server and client | |
CN113778774A (en) | A test data transmission method, device, test method and communication module | |
CN118642899A (en) | Radio frequency coupling test method, device, storage medium and electronic device | |
CN101425120B (en) | Card reader and executing method thereof | |
US11570265B2 (en) | Data transmission method and system | |
CN112835836B (en) | Method and device for information interaction between host and smart card | |
CN117408268A (en) | Card reading method of card service system, electronic equipment, card service system and storage medium | |
CN110866240A (en) | Intelligent password key calling method and system | |
CN116170792A (en) | Method, device and storage medium for determining configuration file download failure | |
CN110457221B (en) | A joint debugging test method and device based on payment anomaly | |
CN113992644A (en) | Internet of things gateway system based on non-service technology and data processing method thereof | |
CN116089115B (en) | Data transmission method, device, electronic device, and readable storage medium | |
CN118567503B (en) | A method, system and medium for implementing serial port keyboard based on serio protocol | |
CN111383025B (en) | Method and device for forwarding wind control data and electronic equipment | |
CN112905521A (en) | Dual-system data communication method, device, equipment and medium | |
CN117827680A (en) | Interface testing method, device and server | |
CN117651273A (en) | Smart card communication message processing method, device, equipment and medium | |
CN115640041A (en) | Data processing method, device and equipment of front end and back end 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 |