CN110619224A - Data processing method and related device - Google Patents

Data processing method and related device Download PDF

Info

Publication number
CN110619224A
CN110619224A CN201910804128.6A CN201910804128A CN110619224A CN 110619224 A CN110619224 A CN 110619224A CN 201910804128 A CN201910804128 A CN 201910804128A CN 110619224 A CN110619224 A CN 110619224A
Authority
CN
China
Prior art keywords
data
data processing
application
dynamic link
link library
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.)
Granted
Application number
CN201910804128.6A
Other languages
Chinese (zh)
Other versions
CN110619224B (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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201910804128.6A priority Critical patent/CN110619224B/en
Publication of CN110619224A publication Critical patent/CN110619224A/en
Application granted granted Critical
Publication of CN110619224B publication Critical patent/CN110619224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a data processing method and a related device, which are applied to electronic equipment, wherein an encryption chip is arranged in the electronic equipment, and the method comprises the following steps: receiving an application data processing request of an application program; the application data is obtained by compiling by using a first programming language; calling a dynamic link library to compile the application data to obtain first target data in a second programming language format; transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data; and calling the dynamic link library to compile the second target data to obtain target application data. Therefore, by implementing the embodiment of the application, the android system device can directly call the encryption chip to perform data processing operation, and does not need a third-party device to perform conversion, thereby being beneficial to improving the efficiency of data processing and the safety of data transmission.

Description

Data processing method and related device
Technical Field
The present application relates to the field of information technology, and in particular, to a data processing method and related apparatus.
Background
The encryption and decryption of the current data mainly adopt two methods of hardware encryption and decryption and software encryption and decryption, and compared with a software encryption and decryption method, the hardware encryption and decryption method has the advantages of higher safety and capability of effectively preventing data tampering. The encryption chip is one of hardware encryption and decryption devices, and an encryption algorithm of the encryption chip is usually packaged into an interface (software development kit, SDK) to be provided for a peripheral to call. The algorithm code of the encryption chip is written by C language/C + + language, for android system equipment, an interface packaged by the encryption chip cannot be directly called, data encryption and decryption of the android system equipment are difficult to directly realize through the encryption chip, and conversion is required to be carried out through third-party equipment, so that the data encryption and decryption can be realized.
However, the android system device occupies a large market nowadays, and if the encryption chip is implemented by a third-party device to encrypt and decrypt data of the android system device, many problems are faced. Firstly, the introduction of third-party equipment inevitably increases the investment of cost; secondly, the data is converted by a third-party device, which causes low efficiency of data transmission encryption and decryption, and meanwhile, the security of data transmission is difficult to ensure.
Disclosure of Invention
The embodiment of the application provides a data processing method and a related device, application data needing to be processed are compiled by calling a dynamic link library, and are transmitted to an encryption chip to be processed after being generated into a format capable of being processed by the encryption chip, so that android system equipment can directly call the encryption chip to perform data processing operation without conversion of third-party equipment, and the data processing efficiency and the data transmission safety are improved.
In a first aspect, an embodiment of the present application provides a data processing method, which is applied to an electronic device, where an encryption chip is built in the electronic device, and the data processing method includes:
receiving an application data processing request of an application program; the application data is obtained by compiling by using a first programming language;
calling a dynamic link library to compile the application data to obtain first target data in a second programming language format;
transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data;
and calling the dynamic link library to compile the second target data to obtain target application data.
Optionally, before the invoking the dynamic link library to compile the application data, the data processing method further includes:
acquiring a software development kit of the encryption chip;
and packaging the software development kit to generate the dynamic link library.
Optionally, the encapsulating the software development kit to generate the dynamic link library includes:
generating a local header file using the first programming language;
calling a source file of the software development kit in the second programming language format;
and compiling the source file according to the local header file to generate the dynamic link library.
Optionally, before the invoking the dynamic link library to compile the application data, the data processing method further includes:
configuring an operating environment according to the application program;
and adding the dynamic link library into an environment variable path.
In a second aspect, an embodiment of the present application provides a data processing apparatus, which is applied to an electronic device, where an encryption chip is built in the electronic device, and the data processing apparatus includes:
the receiving module is used for receiving an application data processing request of an application program; the application data is obtained by compiling by using a first programming language;
the first calling module is used for calling the dynamic link library to compile the application data to obtain first target data in a second programming language format;
the transmission module is used for transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data;
and the second calling module is used for calling the dynamic link library to compile the second target data to obtain target application data.
Optionally, the data processing apparatus further includes:
the acquisition module is used for acquiring a software development kit of the encryption chip;
and the packaging module is used for packaging the software development kit to generate the dynamic link library.
Optionally, the encapsulation module includes:
the first generation submodule is used for generating a local header file by utilizing the first programming language;
the calling submodule is used for calling the source file of the software development kit in the second programming language format;
and the second generation submodule is used for compiling the source file according to the local header file to generate the dynamic link library.
Optionally, the data processing apparatus further includes:
the configuration module is used for configuring the running environment according to the application program;
and the adding module is used for adding the dynamic link library into the environment variable path.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, a communication interface, and one or more programs, which are stored in the memory and configured to be executed by the processor, and include instructions for executing steps of the method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform some or all of the steps described in the method according to the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps as described in the method of the first aspect of embodiments of the present application, and the computer program product may be a software installation package.
It can be seen that, in the technical solution provided in the embodiment of the present application, an application data processing request of an application program is received; the application data is obtained by compiling by using a first programming language; calling a dynamic link library to compile the application data to obtain first target data in a second programming language format; transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data; and calling the dynamic link library to compile the second target data to obtain target application data. Therefore, by implementing the embodiment of the application, the application data to be processed is compiled by calling the dynamic link library, so that the application data is generated into a format which can be processed by the encryption chip and then is transmitted to the encryption chip for processing, and therefore, the android system device can directly call the encryption chip for data processing operation without conversion of a third-party device, and the data processing efficiency and the data transmission safety are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of another data processing method provided in the embodiments of the present application;
fig. 4 is a schematic view of a service implementation flow of a data processing method according to an embodiment of the present application;
fig. 5 is a block diagram illustrating functional modules of a data processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic physical architecture diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of a data processing system according to an embodiment of the present application. As shown in fig. 1, the data processing system includes: server 101, network 102, electronic device 103, and cryptographic chip 104.
Wherein, the electronic device 103 and the server can perform data interaction through the network 102; the electronic device 103 may establish a hardware connection with the encryption chip 104 through a USB/SPI/serial port, etc., thereby establishing a basis for data interaction between the electronic device 103 and the encryption chip 104. It should be noted that the encryption chip 104 may be built in the electronic device 103, or may be non-built in.
The server 101 includes, but is not limited to, a blockchain node server, a traditional server, a large storage system, a desktop computer, a notebook computer, a tablet computer, a palm computer, a smart phone, a portable digital player, a smart watch, a smart bracelet, and the like, which is not limited in this embodiment of the present application.
The network 102 may be divided into a 2G network, a 3G network, a 4G network, a 5G network, a local area network, a metropolitan area network, a wide area network, a wired network, a wireless network, or a general network or a decentralized block chain network, which is not limited in this embodiment of the present application.
The electronic device 103 includes, but is not limited to, a device with a communication function, a smart phone, a tablet computer, a notebook computer, a desktop computer, a portable digital player, an intelligent bracelet, an intelligent watch, and the like, which is not limited in this embodiment of the present application.
The encryption chip 104 integrates various symmetric and asymmetric algorithms into the inside, and has a very high security level, so that keys and information data stored in the inside can not be illegally read and tampered. The encryption chip 104 may be a conventional logic encryption chip, or may be an encryption chip of a smart card chip platform, which is not limited in this embodiment of the present application.
In a specific implementation scenario of the embodiment of the present application, the electronic device 103 may receive, through the network 102, data that needs to be encrypted and decrypted and is sent by the server 102; the electronic device 103 transmits the received data to be encrypted and decrypted and the data to be encrypted and decrypted stored in the electronic device to the encryption chip 104 through a USB/SPI/serial port and the like; the encryption chip 104 performs encryption and decryption operation processing on the data transmitted from the electronic device 103; after the processing is completed, the encryption chip 104 returns the encrypted and decrypted data to the electronic device 103; and the electronic equipment 103 sends the data processed by the encrypted chip to a server or internal application thereof.
It should be noted that the data processing system described in fig. 1 may be used to implement the data processing method described in other embodiments of the present application.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a data processing method according to an embodiment of the present disclosure. As shown in fig. 2, the method is applied to an electronic device, an encryption chip is built in the electronic device, and the data processing method includes:
s201, receiving an application data processing request of an application program by the electronic equipment; the application data is compiled using a first programming language.
The application program is installed in the electronic device, and the processing request may include data encryption, data decryption, digital signature verification, and the like.
The format of the application data is different from the data format which can be identified by the encryption chip, and the format of the application data is a first programming language; the data format recognizable by the encryption chip is a second programming language, namely the second programming language does not include a programming language used by an application program installed on the electronic equipment.
The first programming language can be Java language, Objective-C language, swift language and other programming languages.
It can be understood that, if the operating system installed in the electronic device is an android system, the programming language used by the electronic device is a Java language, that is, the first programming language may be a Java language. If the operating system installed in the electronic device is an IOS system, the language used by the electronic device is Objective-C language or swift language, that is, the first programming language may be Objective-C language or swift language.
S202, the electronic equipment calls a dynamic link library to compile the application data to obtain first target data in a second programming language format.
The dynamic link library is generated in advance, and the type of the dynamic link library depends on the type of the operating system, and may be a dynamic link library in a Linux operating system, a so file, or a dynamic link library in a Windows operating system, a dll file.
The second programming language may be a C language, a C + + language, a Python language, or other programming languages.
It can be understood that, since the application data of the application program on the electronic device is in the first programming language format, it cannot be directly processed by the application program in the second programming language format on the cryptographic chip. Therefore, before the application data is transmitted to the encryption chip for data processing, format conversion is required to be performed on the application data, so that the application data can be identified by an application program in the encryption chip for further processing. In the embodiment of the application, after the application data is compiled by calling the dynamic link library, the application data is converted into first target data in a second programming language format, and then the first target data is transmitted to an encryption chip for data processing.
Wherein the method may further comprise: the electronic equipment receives a data processing request sent by a server, wherein the data processing request comprises data needing to be processed, and the data needing to be processed is obtained by compiling the data with a first programming language; and the electronic equipment calls a dynamic link library to compile the data to be processed to obtain the first target data in a second programming language format. That is, the application data that needs to be processed may be data of an application installed on the electronic device, or may be data received by the electronic device from a network.
S203, the electronic equipment transmits the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data.
It can be understood that the format of the first target data is a second programming language, and the second target data is obtained by processing the first target data by the encryption chip, so that the format of the second target data is also the second programming language.
And S204, the electronic equipment calls the dynamic link library to compile the second target data to obtain target application data.
It can be understood that the format of the two target data processed by the encryption chip is a second programming language, and the electronic device or the application program needs to perform format conversion back to the first programming language. Therefore, the electronic device calls the dynamic link library to compile the second target data, and the format of the obtained target application data is the first programming language.
After the electronic device calls the dynamic link library to compile the second target data to obtain target application data, the method further includes: and the electronic equipment sends the target application data to a server and/or an internal application program of the electronic equipment.
It can be understood that the encryption algorithm application program of the encryption chip is written by the second programming language, and the programming language used by the application program installed on the electronic device is the second programming language, so that the data encrypted by the encryption chip to the electronic device has higher security.
It can be seen that, in the technical solution provided in the embodiment of the present application, an application data processing request of an application program is received; the application data is obtained by compiling by using a first programming language; calling a dynamic link library to compile the application data to obtain first target data in a second programming language format; transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data; and calling the dynamic link library to compile the second target data to obtain target application data. Therefore, by implementing the embodiment of the application, the application data to be processed is compiled by calling the dynamic link library, so that the application data is generated into a format which can be processed by the encryption chip and then is transmitted to the encryption chip for processing, and therefore, the android system device can directly call the encryption chip for data processing operation without conversion of a third-party device, and the data processing efficiency and the data transmission safety are improved.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating another data processing method according to an embodiment of the present disclosure. As shown in fig. 3, the method is applied to an electronic device, preferably an android system device, where an encryption chip is built in the electronic device, and the data processing method includes:
s301, receiving an application data processing request of an application program by android system equipment; the application data is compiled using a first programming language.
The application program is installed in the android system device, and the processing request may include operations of data encryption, data decryption, digital signature verification, and the like.
Wherein the first programming language is Java.
And S302, the android system device acquires the software development kit of the encryption chip.
It should be noted that the software development kit includes program code for performing data encryption and decryption operations and program code for key generation and storage.
And S303, the android system device generates a local header file by utilizing the first programming language.
The android system device generates the local header file by using the first programming language, and the method comprises the following steps: the android system device declares a Native method in a Java class, and is used for compiling and compiling a Java program; and the android system equipment generates a declared C local header file or C + + local header file of a Native method by using a Javah command.
It can be understood that the encryption program on the encryption chip is written in C language or C + + language, and android cannot directly call the encryption chip, so an interface that can allow the encryption chip to interact with each other needs to be provided, where the interface is the Java program, and the Native method refers to a local method implemented in C language or C + + language, and is an interface for implementing Java program call on C or C + + program.
And S304, the android system device calls a source file of the software development kit in a second programming language format.
The second programming language is C language or C + + language; and the source file of the second programming language format of the software development kit is a C source file or a C + + source file.
S305, the android system device compiles the source file according to the local header file to generate a dynamic link library.
The android system equipment compiles the source file according to the local header file to generate a dynamic link library, and the dynamic link library comprises: and the android system device writes the C source file or the C + + source file according to the generated C local header file or the C + + local header file to generate the dynamic link library.
Wherein, it should be noted that the dynamic link library is a.so file.
And S306, configuring the operating environment by the android system device according to the application program.
And S307, the android system device adds the dynamic link library into an environment variable path.
It should be noted that, after the android system device adds the dynamic link library to the environment variable path, the method further includes: and the android system device loads the so file in the Java class and then calls a declared Native method, so that cross-language communication between Java language and C language or C + + language is realized.
And S308, the android system device calls the dynamic link library to compile the application data to obtain first target data in a second programming language format.
S309, the android system device transmits the first target data to an encryption chip, so that the encryption chip processes the first target data to obtain second target data.
And S310, the android system device calls the dynamic link library to compile the second target data to obtain target application data.
For example, please refer to fig. 4 together with an example of an implementation manner for data encryption and decryption in the embodiment of the present application, and fig. 4 is a schematic service implementation flow diagram of a data processing method provided in the embodiment of the present application. As shown in fig. 4, the encryption chip encapsulates the external interface of the encryption algorithm application program into a Software Development Kit (SDK); after the android system device establishes a link with the encryption chip, the android device packages the software development toolkit into a JNI format to generate a dynamic link library; the android system calls the dynamic link library, and transmits data to be encrypted and/or decrypted to the encryption chip to perform data encryption and/or decryption operation; and after the encryption and/or decryption operation is completed, the encryption chip returns the data subjected to encryption and/or decryption processing to the android system device. And at this moment, the android system device calls the encryption chip to complete one-time operation of data encryption and/or decryption.
The encryption algorithm of the encryption algorithm application program can be a preset symmetric encryption algorithm (such as DES, 3DES, RC4, RC5 and the like), an asymmetric encryption algorithm (such as RSA, Diffie-Hellman, El Gamal and the like) or a hash encryption algorithm (such as MD2, MD5, HAVAL, SHA and the like), and the encryption algorithm can be set according to needs.
The encryption algorithm application program can utilize C language or C + + language to pre-write a C language or C + + language executable program corresponding to a preset encryption algorithm, and add an original key as an encryption object into the C language or C + + language executable program; or, the preset encryption algorithm may be used to encrypt the original key in advance to obtain a corresponding encryption key, and then the encryption key is directly written into the C language or the C + + language to obtain the C language or the C + + language executable program including the encryption key.
In addition, it should be noted that the related terms or explanations of the embodiments of the present application may refer to the contents described in the above embodiments.
It can be seen that, in the technical scheme provided in the embodiment of the present application, after the connection between the android system device and the encryption chip is established, the android system device receives an application data processing request of an application program; the application data is obtained by compiling a Java language; the android device acquires a software development tool package of the encryption chip, packages the software development tool package and generates the dynamic link library; the android system device calls a dynamic link library to compile the application data to obtain first target data in a C language or C + + language format; the android system device transmits the first target data to an encryption chip, so that the encryption chip processes the first target data to obtain second target data; and the android system device calls the dynamic link library to compile the second target data to obtain target application data in a Java language format. It can be seen that, by implementing the embodiment of the present application, the android system device packages the software development kit of the encryption chip to generate the dynamic link library, and compiles the application data to be processed by calling the dynamic link library to generate a format that can be processed by the encryption chip, and then transmits the format to the encryption chip for processing, so that the android system device can directly call the encryption chip to perform data processing operation, and does not need a third-party device to convert, which is beneficial to improving the efficiency of data processing and the security of data transmission.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of being implemented in hardware or a combination of hardware and computer software for carrying out the various example modules and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware 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 embodiment of the present application, the electronic device may be divided into the functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Referring to fig. 5, fig. 5 is a block diagram illustrating functional modules of a data processing apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the data processing apparatus 500 is applied to an electronic device, the electronic device is provided with a cryptographic chip, the electronic device is installed with an application program, and the data processing apparatus 500 includes the following logic modules:
a receiving module 501, configured to receive an application data processing request of an application program; the application data is obtained by compiling by using a first programming language;
a first calling module 502, configured to call a dynamic link library to compile the application data, so as to obtain first target data in a second programming language format;
a transmission module 503, configured to transmit the first target data to an encryption chip, so that the encryption chip processes the first target data to obtain second target data;
a second calling module 504, configured to call the dynamic link library to compile the second target data, so as to obtain target application data.
Optionally, the data processing apparatus 500 further includes:
the acquisition module is used for acquiring a software development kit of the encryption chip;
and the packaging module is used for packaging the software development kit to generate the dynamic link library.
Optionally, the encapsulation module includes:
the first generation submodule is used for generating a local header file by utilizing the first programming language;
the calling submodule is used for calling the source file of the software development kit in the second programming language format;
and the second generation submodule is used for compiling the source file according to the local header file to generate the dynamic link library.
Optionally, the data processing apparatus 500 further includes:
the configuration module is used for configuring the running environment according to the application program;
and the adding module is used for adding the dynamic link library into the environment variable path.
It should be noted that the logic module described in this embodiment may execute the method described in the method embodiment.
It can be seen that the data processing apparatus provided in the embodiment of the present application is applied to an electronic device with a built-in cryptographic chip, and receives an application data processing request of an application program; the application data is obtained by compiling by using a first programming language; calling a dynamic link library to compile the application data to obtain first target data in a second programming language format; transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data; and calling the dynamic link library to compile the second target data to obtain target application data. Therefore, by implementing the embodiment of the application, the application data to be processed is compiled by calling the dynamic link library, so that the application data is generated into a format which can be processed by the encryption chip and then is transmitted to the encryption chip for processing, and therefore, the android system device can directly call the encryption chip for data processing operation without conversion of a third-party device, and the data processing efficiency and the data transmission safety are improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 600 includes an application processor 610, a memory 620, a communication interface 630, and one or more programs 621, wherein the one or more programs 621 are stored in the memory 620 and configured to be executed by the application processor 610, and when the one or more programs 621 are executed, the processor 610 performs the following:
receiving an application data processing request of an application program; the application data is obtained by compiling by using a first programming language;
calling a dynamic link library to compile the application data to obtain first target data in a second programming language format;
transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data;
and calling the dynamic link library to compile the second target data to obtain target application data.
Optionally, before the invoking the dynamically linked library compiles the application data, the processor 610 further performs the following operations:
acquiring a software development kit of the encryption chip;
and packaging the software development kit to generate the dynamic link library.
Optionally, the packaging the software development kit to generate the dynamic link library, and the processor 610 further performs the following operations:
generating a local header file using the first programming language;
calling a source file of the software development kit in the second programming language format;
and compiling the source file according to the local header file to generate the dynamic link library.
Optionally, before the invoking the dynamically linked library compiles the application data, the processor 610 further performs the following operations:
configuring an operating environment according to the application program;
and adding the dynamic link library into an environment variable path.
It should be noted that the electronic device described in this embodiment may execute the method described in the method embodiment.
It can be seen that, the electronic device provided in the embodiment of the present application receives an application data processing request of an application program; the application data is obtained by compiling by using a first programming language; calling a dynamic link library to compile the application data to obtain first target data in a second programming language format; transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data; and calling the dynamic link library to compile the second target data to obtain target application data. Therefore, by implementing the embodiment of the application, the application data to be processed is compiled by calling the dynamic link library, so that the application data is generated into a format which can be processed by the encryption chip and then is transmitted to the encryption chip for processing, and therefore, the android system device can directly call the encryption chip for data processing operation without conversion of a third-party device, and the data processing efficiency and the data transmission safety are improved.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the above-described modules is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some interfaces, and may be in an electrical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated modules, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A data processing method is applied to electronic equipment, an encryption chip is arranged in the electronic equipment, and the data processing method comprises the following steps:
receiving an application data processing request of an application program; the application data is obtained by compiling by using a first programming language;
calling a dynamic link library to compile the application data to obtain first target data in a second programming language format;
transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data;
and calling the dynamic link library to compile the second target data to obtain target application data.
2. The data processing method of claim 1, wherein prior to the invoking the dynamically linked library to compile the application data, the data processing method further comprises:
acquiring a software development kit of the encryption chip;
and packaging the software development kit to generate the dynamic link library.
3. The data processing method of claim 2, wherein the encapsulating the software development kit to generate the dynamic link library comprises:
generating a local header file using the first programming language;
calling a source file of the software development kit in the second programming language format;
and compiling the source file according to the local header file to generate the dynamic link library.
4. A data processing method according to any of claims 1 to 3, wherein prior to said invoking the dynamically linked library to compile the application data, the data processing method further comprises:
configuring an operating environment according to the application program;
and adding the dynamic link library into an environment variable path.
5. A data processing device is applied to an electronic device, wherein an encryption chip is arranged in the electronic device, and the data processing device comprises:
the receiving module is used for receiving an application data processing request of an application program; the application data is obtained by compiling by using a first programming language;
the first calling module is used for calling the dynamic link library to compile the application data to obtain first target data in a second programming language format;
the transmission module is used for transmitting the first target data to an encryption chip so that the encryption chip processes the first target data to obtain second target data;
and the second calling module is used for calling the dynamic link library to compile the second target data to obtain target application data.
6. The data processing apparatus of claim 5, wherein the data processing apparatus further comprises:
the acquisition module is used for acquiring a software development kit of the encryption chip;
and the packaging module is used for packaging the software development kit to generate the dynamic link library.
7. The data processing apparatus of claim 6, wherein the encapsulation module comprises:
the first generation submodule is used for generating a local header file by utilizing the first programming language;
the calling submodule is used for calling the source file of the software development kit in the second programming language format;
and the second generation submodule is used for compiling the source file according to the local header file to generate the dynamic link library.
8. The data processing apparatus according to any of claims 5 to 7, characterized in that the data processing apparatus further comprises:
the configuration module is used for configuring the running environment according to the application program;
and the adding module is used for adding the dynamic link library into the environment variable path.
9. An electronic device, comprising a processor and a memory, the processor being configured to implement the steps of the method according to any one of claims 1-4 when executing the computer program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-4.
CN201910804128.6A 2019-08-28 2019-08-28 Data processing method and related device Active CN110619224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910804128.6A CN110619224B (en) 2019-08-28 2019-08-28 Data processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910804128.6A CN110619224B (en) 2019-08-28 2019-08-28 Data processing method and related device

Publications (2)

Publication Number Publication Date
CN110619224A true CN110619224A (en) 2019-12-27
CN110619224B CN110619224B (en) 2023-05-09

Family

ID=68922080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910804128.6A Active CN110619224B (en) 2019-08-28 2019-08-28 Data processing method and related device

Country Status (1)

Country Link
CN (1) CN110619224B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254961A (en) * 2021-05-26 2021-08-13 杭州云象网络技术有限公司 Method for calling hardware cryptographic interface based on go language encapsulation
CN113377613A (en) * 2021-06-08 2021-09-10 深圳忆联信息系统有限公司 Hard disk test monitoring method and device based on Windows system and computer equipment
CN113672526A (en) * 2021-08-24 2021-11-19 深圳忆联信息系统有限公司 Method and device for acquiring solid state disk power failure protection triggering times and computer equipment
CN114051046A (en) * 2021-11-16 2022-02-15 北京百度网讯科技有限公司 Cloud data issuing method, related device and computer program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020147909A1 (en) * 2001-01-25 2002-10-10 Mullen Glen H. System and method for providing integration via a dial-up interface
FR2854261A1 (en) * 2003-04-28 2004-10-29 Ucopia Comm Software application executing method for personal computer, involves detecting coupling of chip card with personal computer using software bootstrap program, and loading and executing client program in computer
CN104573516A (en) * 2014-12-25 2015-04-29 中国科学院软件研究所 Industrial control system trusted environment control method and platform based on safety chip
CN108959982A (en) * 2018-07-06 2018-12-07 江苏北弓智能科技有限公司 A kind of mobile terminal document encrypting and deciphering system and method based on hardware encryption TF card
CN109787759A (en) * 2019-01-23 2019-05-21 郑州云海信息技术有限公司 A kind of data transmission method, system, device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020147909A1 (en) * 2001-01-25 2002-10-10 Mullen Glen H. System and method for providing integration via a dial-up interface
FR2854261A1 (en) * 2003-04-28 2004-10-29 Ucopia Comm Software application executing method for personal computer, involves detecting coupling of chip card with personal computer using software bootstrap program, and loading and executing client program in computer
CN104573516A (en) * 2014-12-25 2015-04-29 中国科学院软件研究所 Industrial control system trusted environment control method and platform based on safety chip
CN108959982A (en) * 2018-07-06 2018-12-07 江苏北弓智能科技有限公司 A kind of mobile terminal document encrypting and deciphering system and method based on hardware encryption TF card
CN109787759A (en) * 2019-01-23 2019-05-21 郑州云海信息技术有限公司 A kind of data transmission method, system, device and computer readable storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
L. RUF等: ""A scalable high-performance router platform supporting dynamic service extensibility on network and host processors"" *
张兴科等: ""基于USB2.0控制器的软件狗设计及安全性分析"", 《微处理机》 *
戴新: ""数据采集卡在LabVIEW中的驱动方法"", 《计算机应用与软件》 *
李明等: "一种USB软件加密狗的设计", 《电子器件》 *
钟家民等: ""用虚拟加密锁实现共享软件的版权保护"" *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254961A (en) * 2021-05-26 2021-08-13 杭州云象网络技术有限公司 Method for calling hardware cryptographic interface based on go language encapsulation
CN113377613A (en) * 2021-06-08 2021-09-10 深圳忆联信息系统有限公司 Hard disk test monitoring method and device based on Windows system and computer equipment
CN113672526A (en) * 2021-08-24 2021-11-19 深圳忆联信息系统有限公司 Method and device for acquiring solid state disk power failure protection triggering times and computer equipment
CN113672526B (en) * 2021-08-24 2024-02-13 深圳忆联信息系统有限公司 Method and device for acquiring triggering times of power-down protection of solid state disk and computer equipment
CN114051046A (en) * 2021-11-16 2022-02-15 北京百度网讯科技有限公司 Cloud data issuing method, related device and computer program product

Also Published As

Publication number Publication date
CN110619224B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN110619224B (en) Data processing method and related device
CN111552931A (en) Method and system for adding shell of java code
KR101471589B1 (en) Method for Providing Security for Common Intermediate Language Program
US9443064B2 (en) Protecting method and system of java source code
US20160117518A1 (en) File Encryption/Decryption Device And File Encryption/Decryption Method
CN111177749B (en) Encrypted source code file processing method and device, computer equipment and storage medium
CN107786331B (en) Data processing method, device, system and computer readable storage medium
US10977021B2 (en) SE applet processing method, terminal, and server
CN109598107B (en) Code conversion method and device based on application installation package file
CN111159662A (en) Data processing method and device
CN106326018B (en) Data access method and terminal
US20180067777A1 (en) Application protection method, server, and terminal
US20200356642A1 (en) Enabling an encrypted software module in a container file
CN110674515B (en) Multilevel security storage chip framework
CN111159757A (en) File encryption method, file decryption method and corresponding devices
CN107871066B (en) Code compiling method and device based on android system
CN112434326A (en) Trusted computing method and device based on data flow
CN111596938A (en) Embedded equipment firmware safety upgrading method, system, terminal and storage medium
CN113032741B (en) Class file encryption method, class file operation method, device, equipment and medium
KR101667774B1 (en) Apparatus and Method of Providing Security for Script Program
CN103605927A (en) Encryption and decryption method based on embedded Linux system
CN111460464B (en) Data encryption and decryption method and device, electronic equipment and computer storage medium
US11061998B2 (en) Apparatus and method for providing security and apparatus and method for executing security to protect code of shared object
CN112883391A (en) Data protection method and device and electronic equipment
CN114943062B (en) Data processing method, device, electronic equipment and computer readable 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