CN110619224B - Data processing method and related device - Google Patents

Data processing method and related device Download PDF

Info

Publication number
CN110619224B
CN110619224B CN201910804128.6A CN201910804128A CN110619224B CN 110619224 B CN110619224 B CN 110619224B CN 201910804128 A CN201910804128 A CN 201910804128A CN 110619224 B CN110619224 B CN 110619224B
Authority
CN
China
Prior art keywords
data
application
dynamic link
data processing
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.)
Active
Application number
CN201910804128.6A
Other languages
Chinese (zh)
Other versions
CN110619224A (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

Images

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 compiled by using a first programming language; invoking 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 third-party devices are not required to perform conversion, so that the efficiency of data processing and the safety of data transmission are improved.

Description

Data processing method and related device
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a data processing method and a related device.
Background
The encryption and decryption of the current data are mainly realized through two methods of hardware encryption and decryption and software encryption and decryption, and compared with the software encryption and decryption method, the hardware encryption and decryption method has the advantages of higher security and more effective prevention of data tampering. The encryption chip is one of the hardware encryption and decryption devices, and the encryption algorithm of the encryption chip is usually packaged into an interface (software development kit, SDK) to be provided for the peripheral equipment to be called. The algorithm code of the encryption chip is written in C language/C++, for android system equipment, an interface packaged by the encryption chip cannot be directly called, and data encryption and decryption of the android system equipment are difficult to realize directly through the encryption chip and can be realized only by conversion through third party equipment.
However, the android system device occupies a large market nowadays, and if the encryption chip is implemented through the third party device to encrypt and decrypt the data of the android system device, a plurality of problems are faced. Firstly, the introduction of the third party equipment tends to increase the investment of cost; secondly, the encryption and decryption efficiency of data transmission is low due to the fact that the data is converted through the third-party equipment, and meanwhile the safety of the data transmission is difficult to ensure.
Disclosure of Invention
The embodiment of the application provides a data processing method and a related device, which compile application data to be processed by calling a dynamic link library to generate a format which can be processed by an encryption chip and then transmit the format to the encryption chip for processing, so that android system equipment can directly call the encryption chip for data processing operation without conversion by 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 compiled by using a first programming language;
invoking 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 compiling the application data by the calling dynamic link library, 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;
invoking a source file in the second programming language format of the software development kit;
compiling the source file according to the local header file to generate the dynamic link library.
Optionally, before compiling the application data by the calling dynamic link library, 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 compiled 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 the 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 so as 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 and generating the dynamic link library.
Optionally, the packaging module includes:
a first generation sub-module for generating a local header using the first programming language;
a calling sub-module for calling a source file in the second programming language format of the software development kit;
and the second generation sub-module is used for compiling the source file according to the local header file and generating the dynamic link library.
Optionally, the data processing apparatus further includes:
the configuration module is used for configuring an operation 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, where the electronic device includes a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, where the programs include instructions for performing steps in the method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps described in the method according to the first aspect of embodiments 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 described in the method of the first aspect of embodiments of the present application, the computer program product may be a software installation package.
It can be seen that, in the technical solution provided in the embodiments of the present application, an application data processing request of an application program is received; the application data is compiled by using a first programming language; invoking 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 equipment can directly call the encryption chip for data processing operation without the need of third-party equipment for conversion, and the efficiency of data processing and the safety of data transmission 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 that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 3 is a flow chart of another data processing method according to an embodiment of the present disclosure;
fig. 4 is a schematic business implementation flow chart of a data processing method according to an embodiment of the present application;
FIG. 5 is a functional block diagram of a data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of a physical architecture of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second, third and the like in the description and in the claims of the application and in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules but may include other steps or modules not expressly 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 may be included in at least one embodiment of the present application. The appearances of such phrases 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. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
With reference to FIG. 1, FIG. 1 is a block 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 encryption chip 104.
Wherein the electronic device 103 and the server may interact with data 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., so as to establish 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 conventional 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, etc., which is not limited in this embodiment.
The division of the network 102 may be a 2G network, a 3G network, a 4G network, or a 5G network, or may be a local area network, a metropolitan area network, or a wide area network, or may be a wired network, a wireless network, or may be a common network, or a decentralised blockchain network, which is not limited in the embodiments 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, a smart bracelet, a smart watch, etc., which is not limited in this embodiment of the present application.
The encryption chip 104 integrates various symmetric and asymmetric algorithms, has extremely high security level, and can ensure that the secret key and information data stored in the inside cannot be illegally read and tampered. The encryption chip 104 may be a conventional logic encryption chip or 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 is sent by the server 102 and needs encryption and decryption; the electronic device 103 transmits the received data to be encrypted and decrypted and the data stored in the electronic device to be encrypted and decrypted 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; the electronic device 103 sends the data processed by the encryption chip to a server or an 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 flow chart of a data processing method according to an embodiment of the present application. As shown in fig. 2, the method is applied to an electronic device, in which an encryption chip is built, and the data processing method includes:
s201, the electronic equipment receives an application data processing request of an application program; the application data is compiled using a first programming language.
Wherein, the application program is installed in the electronic device, and the processing request can comprise operations such as data encryption, data decryption, digital signature verification and the like.
The format of the application data is different from the data format identifiable 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, that is, the second programming language does not include the programming language used by the application program installed on the electronic device.
The first programming language may be a Java language, an Objective-C language, a swift language, or the like.
It may 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 Java, that is, the first programming language may be Java. If the operating system installed on the electronic device is an IOS system, the language used is the Objective-C language or the swift language, i.e., the first programming language may be the Objective-C language or the swift language.
S202, the electronic equipment calls a dynamic link library to compile the application data, and first target data in a second programming language format is obtained.
The dynamic link library is pre-generated, and the type of the dynamic link library depends on the type of the operating system, and can 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 programming language such as C language, c++ language, python language, etc.
It will be appreciated 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 encryption chip. Therefore, before the application data is transmitted to the encryption chip for data processing, format conversion is required to enable the application data to be recognized by an application program in the encryption chip for processing. In this embodiment of the present application, after compiling the application data by calling a 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 to be processed, and the data to be processed is compiled by using 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 the second programming language format. That is, the application data that needs to be processed may be data of an application program installed on the electronic device, or may be data received by the electronic device from a network.
S203, the electronic 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.
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.
S204, the electronic equipment calls the dynamic link library to compile the second target data, and target application data is obtained.
It can be understood that the format of the two target data processed by the encryption chip is the 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 equipment 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.
The electronic device invokes the dynamic link library to compile the second target data, and after obtaining the target application data, the method further comprises: the electronic device sends the target application data to a server and/or an internal application program of the electronic device.
It can be understood that the encryption algorithm application program of the encryption chip is written in 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 embodiments of the present application, an application data processing request of an application program is received; the application data is compiled by using a first programming language; invoking 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 equipment can directly call the encryption chip for data processing operation without the need of third-party equipment for conversion, and the efficiency of data processing and the safety of data transmission are improved.
Referring to fig. 3, fig. 3 is a flow chart of another data processing method according to an embodiment of the present application. 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 can comprise operations such as data encryption, data decryption, digital signature verification and the like.
Wherein the first programming language is Java language.
S302, the android system equipment acquires a software development kit of the encryption chip.
Wherein, it should be noted that the software development kit includes program codes for performing data encryption and decryption operations and program codes for key generation and storage.
S303, the android system equipment generates a local header file by using the first programming language.
Wherein the android system device generating the local header file by using the first programming language comprises: the android system equipment declares a Native method in Java classes, and is used for writing and compiling Java programs; the android system device uses a Java command to generate a C local header file or a C++ local header file of a declaration of a Native method.
It can be understood that the encryption program on the encryption chip is written in the C language or the c++ language, and the android cannot directly call the encryption chip, so that an interface capable of enabling the android to interact needs to be provided, the interface is the Java program, and the Native method refers to a local method implemented by the C language or the c++ language, and is an interface for implementing the Java program to call the C or the c++ program.
S304, the android system equipment calls a source file in a second programming language format of the software development kit.
Wherein the second programming language is C language or C++ language; the source file in the second programming language of the software development kit is a C source file or a C++ source file.
S305, compiling the source file according to the local header file by the android system equipment to generate a dynamic link library.
The android system device compiles the source file according to the local header file, and the generation of the dynamic link library comprises the following steps: and the android system equipment 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 pointed out that the dynamic link library is a. So file.
S306, the android system equipment configures an operating environment according to the application program.
S307, the android system device adds the dynamic link library into an environment variable path.
Wherein, it should be noted that, after the android system device joins the dynamic link library into the environment variable path, the method further includes: and the android system equipment loads the so file in the Java class and then calls the declared Native method, so that cross-language communication between Java language and C language or C++ language is realized.
S308, the android system equipment calls the dynamic link library to compile the application data, and first target data in a second programming language format is obtained.
S309, the android system 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.
S310, the android system equipment calls the dynamic link library to compile the second target data, and target application data are obtained.
For example, referring to fig. 4, fig. 4 is a schematic flow chart of a service implementation of a data processing method according to an embodiment of the present application. As shown in fig. 4, the encryption chip encapsulates the encryption algorithm application external interface into a Software Development Kit (SDK); after the android device establishes a link with the encryption chip, the android device packages the software development kit into a JNI format to generate a dynamic link library; the android system calls the dynamic link library, and data needing to be encrypted and/or decrypted are transmitted to the encryption chip to conduct data encryption and/or decryption operation; and after the encryption and/or decryption operation is finished, the encryption chip returns the data subjected to the encryption and/or decryption processing to the android system equipment. Thus, the android system equipment calls the encryption chip to perform one-time operation of data encryption and/or decryption.
The encryption algorithm of the encryption algorithm application program may be a preset symmetric encryption algorithm (such as DES, 3DES, RC4, RC5, etc.), an asymmetric encryption algorithm (such as RSA, diffie-Hellman, el Gamal, etc.), or a hash encryption algorithm (such as MD2, MD5, HAVAL, SHA, etc.), and the encryption algorithm may be set as required.
The encryption algorithm application program can pre-write a C language or C++ language executable program corresponding to a preset encryption algorithm by using a C language or C++ language, and takes an original key as an encryption object to be added into the C language or C++ language executable program; the original key can be encrypted by the preset encryption algorithm in advance to obtain a corresponding encryption key, and then the encryption key is directly written into a C language or a C++ language to obtain a C language or a C++ language executable program comprising the encryption key.
In addition, it should be noted that the relevant terms or explanations of the embodiments of the present application may refer to the descriptions of the above embodiments.
It can be seen that, in the technical solution provided in the embodiment of the present application, after the android device and the encryption chip establish a connection, the android device receives an application data processing request of an application program; the application data is compiled by using Java language; the android device acquires a software development kit of the encryption chip, encapsulates the software development kit and generates the dynamic link library; the android system equipment 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 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; and the android system equipment calls the dynamic link library to compile the second target data, so as to obtain target application data in Java language format. Therefore, by implementing the embodiment of the application, the android system device encapsulates 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 the format which 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 for data processing operation without conversion by a third party device, and the efficiency of data processing and the safety of data transmission are improved.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the modules and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven 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.
The embodiment of the application may divide the functional modules of the electronic device according to the above 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 modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Referring to fig. 5, fig. 5 is a functional block diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 5, the data processing apparatus 500 is applied to an electronic device, in which an encryption chip is built, and 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 compiled by using a first programming language;
the first calling module 502 is 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;
and 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 and generating the dynamic link library.
Optionally, the packaging module includes:
a first generation sub-module for generating a local header using the first programming language;
a calling sub-module for calling a source file in the second programming language format of the software development kit;
and the second generation sub-module is used for compiling the source file according to the local header file and generating the dynamic link library.
Optionally, the data processing apparatus 500 further includes:
the configuration module is used for configuring an operation 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 in this embodiment may perform the method described in the method embodiment.
It can be seen that the data processing device provided by the embodiment of the application is applied to the electronic device with the built-in encryption chip, and receives the application data processing request of the application program; the application data is compiled by using a first programming language; invoking 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 equipment can directly call the encryption chip for data processing operation without the need of third-party equipment for conversion, and the efficiency of data processing and the safety of data transmission are improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. 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 operations:
receiving an application data processing request of an application program; the application data is compiled by using a first programming language;
invoking 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 dynamic link 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 encapsulating the software development kit generates the dynamic link library, and the processor 610 further performs the following operations:
generating a local header file using the first programming language;
invoking a source file in the second programming language format of the software development kit;
compiling the source file according to the local header file to generate the dynamic link library.
Optionally, before the invoking dynamic link 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 according to this embodiment may perform the method described in the method embodiment.
It can be seen that, in the electronic device provided by the embodiment of the present application, an application data processing request of an application program is received; the application data is compiled by using a first programming language; invoking 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 equipment can directly call the encryption chip for data processing operation without the need of third-party equipment for conversion, and the efficiency of data processing and the safety of data transmission are improved.
The embodiment of the application also provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to execute part or all of the steps of any one of the methods described in the embodiments of the method, where 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 one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising an electronic device.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as the division of the modules described above, are merely a logical function division, and may be implemented in other manners, such as multiple modules 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 with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical or other forms.
The modules described above as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules described above, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random access Memory (RanPom Access Memory, RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A data processing method, which is applied to an electronic device, wherein an encryption chip is built in the electronic device, the data processing method comprising:
receiving an application data processing request of an application program; the application data is compiled by using a first programming language;
invoking a dynamic link library to compile the application data to obtain first target data in a second programming language format, wherein the second programming language format is a format which is allowed to be processed by the encryption chip;
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 in the first programming language format.
2. The data processing method of claim 1, wherein prior to compiling the application data by the call dynamic link library, 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 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;
invoking a source file in the second programming language format of the software development kit;
compiling the source file according to the local header file to generate the dynamic link library.
4. A data processing method according to any one of claims 1-3, wherein prior to compiling the application data by the call dynamic link library, 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 apparatus, characterized by being applied to an electronic device having an encryption chip built therein, comprising:
the receiving module is used for receiving an application data processing request of an application program; the application data is compiled 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, wherein the second programming language format is a format which is allowed to be processed by the encryption chip;
the transmission module is used for transmitting the first target data to the 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 in the first programming language format.
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 and generating the dynamic link library.
7. The data processing apparatus of claim 6, wherein the encapsulation module comprises:
a first generation sub-module for generating a local header using the first programming language;
a calling sub-module for calling a source file in the second programming language format of the software development kit;
and the second generation sub-module is used for compiling the source file according to the local header file and generating the dynamic link library.
8. A data processing apparatus according to any one of claims 5-7, wherein the data processing apparatus further comprises:
the configuration module is used for configuring an operation 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, wherein the processor is configured to implement the steps of the method according to any of claims 1-4 when executing a computer program stored in the memory.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any 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 CN110619224A (en) 2019-12-27
CN110619224B true 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)

Families Citing this family (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
CN113377613B (en) * 2021-06-08 2022-12-02 深圳忆联信息系统有限公司 Hard disk test monitoring method and device based on Windows system 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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7246238B2 (en) * 2001-01-25 2007-07-17 Schlumberger Omnes, Inc. System and method for providing integration via a dial-up interface
CN108959982B (en) * 2018-07-06 2021-08-24 江苏北弓智能科技有限公司 Mobile terminal file encryption and decryption system and method based on hardware encryption TF card
CN109787759B (en) * 2019-01-23 2021-10-15 郑州云海信息技术有限公司 Data transmission method, system, device and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Non-Patent Citations (2)

* 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".《The IEEE/ACS International Conference onPervasive Services, 2004. ICPS 2004. Proceedings.》.2004,第1-4页. *
钟家民等."用虚拟加密锁实现共享软件的版权保护".《计算机应用与软件》.2010,第224-250页. *

Also Published As

Publication number Publication date
CN110619224A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
CN110619224B (en) Data processing method and related device
US9443064B2 (en) Protecting method and system of java source code
CN111177749B (en) Encrypted source code file processing method and device, computer equipment and storage medium
US20160117518A1 (en) File Encryption/Decryption Device And File Encryption/Decryption Method
WO2021217980A1 (en) Java code packing method and system
US20160203087A1 (en) Method for providing security for common intermediate language-based program
US10977021B2 (en) SE applet processing method, terminal, and server
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN111656345B (en) Software module enabling encryption in container files
CN104700003B (en) A kind of file shell adding and hulling method, apparatus and system
WO2023029447A1 (en) Model protection method, device, apparatus, system and storage medium
CN107871066B (en) Code compiling method and device based on android system
CN108133147B (en) Method and device for protecting executable code and readable storage medium
KR20170069337A (en) Method and apparatus for protecting application and program made by the method
CN105574441A (en) Embedded firmware protection method and device
CN110874476B (en) Data processing system, method, storage medium, and processor
CN113032741B (en) Class file encryption method, class file operation method, device, equipment and medium
CN112115430A (en) Apk reinforcement method, electronic equipment and storage medium
KR101667774B1 (en) Apparatus and Method of Providing Security for Script Program
CN103605927A (en) Encryption and decryption method based on embedded Linux system
CN105426702A (en) Android operating system based application program encrypting method and device, and Android operating system based application program decrypting method and device
CN111460464B (en) Data encryption and decryption method and device, electronic equipment and computer storage medium
CN108319872B (en) Method, device and equipment for generating closed container
US9218484B2 (en) Control method and information processing apparatus
CN111538988A (en) Anti-attack program running method and device, storage medium and electronic device

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