WO2021092809A1 - 函数调用方法、装置、电子设备及计算机可读介质 - Google Patents

函数调用方法、装置、电子设备及计算机可读介质 Download PDF

Info

Publication number
WO2021092809A1
WO2021092809A1 PCT/CN2019/118152 CN2019118152W WO2021092809A1 WO 2021092809 A1 WO2021092809 A1 WO 2021092809A1 CN 2019118152 W CN2019118152 W CN 2019118152W WO 2021092809 A1 WO2021092809 A1 WO 2021092809A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
verification
verified
electronic device
calling
Prior art date
Application number
PCT/CN2019/118152
Other languages
English (en)
French (fr)
Inventor
尚玉栋
张志龙
郭明强
李吉雨
裴磊
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980100123.3A priority Critical patent/CN114402322A/zh
Priority to PCT/CN2019/118152 priority patent/WO2021092809A1/zh
Publication of WO2021092809A1 publication Critical patent/WO2021092809A1/zh

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/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow

Definitions

  • This application relates to the technical field of mobile terminals, and more specifically, to a function calling method, device, electronic equipment, and computer-readable medium.
  • This application proposes a function calling method, device, electronic equipment, and computer readable medium to improve the above-mentioned drawbacks.
  • an embodiment of the present application provides a function calling method, which is applied to an electronic device, and the method includes: obtaining a calling request of a target function; obtaining information to be verified of the electronic device; and sending the information to be verified To the verification server, the verification server is instructed to perform a verification operation on the information to be verified; if the verification pass information sent by the verification server is obtained, the target function call operation is executed, and the verification pass information is the verification It is sent by the server when the verification of the information to be verified is passed.
  • the embodiment of the present application also provides a function call method, which is applied to a verification server, and the method includes: obtaining information to be verified of the electronic device sent by the electronic device, and the information to be verified is that the electronic device is Sent after obtaining the call request of the target function; perform a verification operation on the information to be verified; if the verification of the information to be verified is passed, send verification passed information to the electronic device, instructing the electronic device to execute the target function Call operation.
  • an embodiment of the present application also provides a function calling device, which is applied to an electronic device.
  • the device includes: a first obtaining unit, a second obtaining unit, a verification unit, and an execution unit.
  • the first obtaining unit is used to obtain the call request of the target function.
  • the second acquiring unit is used to acquire the to-be-verified information of the electronic device.
  • the verification unit is configured to send the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified.
  • the execution unit is configured to, if the verification pass information sent by the verification server is obtained, execute the calling operation of the target function, and the verification pass information is sent by the verification server when the information to be verified is verified. .
  • an embodiment of the present application also provides a function calling device, which is applied to a verification server, and the device includes: an acquisition unit, a verification unit, and a sending unit.
  • the acquiring unit is configured to acquire information to be verified of the electronic device sent by the electronic device, and the information to be verified is sent by the electronic device after acquiring the call request of the target function.
  • the verification unit is configured to perform a verification operation on the information to be verified.
  • the sending unit is configured to send the verification passed information to the electronic device if the verification of the information to be verified is passed, instructing the electronic device to execute the calling operation of the target function.
  • an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory And is configured to be executed by the one or more processors, and the one or more programs are configured to execute the foregoing method.
  • the embodiments of the present application also provide a computer-readable medium, the readable storage medium storing a program code executable by a processor, and when the program code is executed by the processor, the processor Perform the above method.
  • the function calling method, device, electronic equipment, and computer-readable medium provided in this application acquire the information to be verified of the electronic device when acquiring the call request of the target function; send the information to be verified to the verification server to indicate
  • the verification server performs a verification operation on the information to be verified, and the verification server sends verification passed information if the verification of the information to be verified passes the verification. If the electronic device obtains the verification passed information sent by the verification server, execute all verification operations. Describe the calling operation of the objective function. Therefore, when the function is called, the verification server verifies the information to be verified sent by the electronic device, so that the function call is executed only when the verification of the information to be verified is passed, which increases the security of function calls and reduces the possibility of illegal calls. Sex.
  • Fig. 1 shows a block diagram of a function call encryption system provided by an embodiment of the present application
  • FIG. 2 shows a method flowchart of a function calling method provided by an embodiment of the present application
  • FIG. 3 shows a method flowchart of a function calling method provided by another embodiment of the present application
  • FIG. 4 shows a flowchart of the method of S340 in FIG. 3;
  • FIG. 5 shows a schematic diagram of an information string provided by an embodiment of the present application
  • FIG. 6 shows a schematic diagram of an information string provided by another embodiment of the present application.
  • FIG. 7 shows a schematic diagram of an information string provided by another embodiment of the present application.
  • FIG. 8 shows a method flowchart of a function calling method provided by still another embodiment of the present application.
  • FIG. 9 shows a method flowchart of a function calling method provided by yet another embodiment of the present application.
  • FIG. 10 shows a method flowchart of a function calling method provided by yet another embodiment of the present application.
  • FIG. 11 shows a block diagram of a function call device provided by an embodiment of the present application.
  • FIG. 12 shows a block diagram of a function call device provided by another embodiment of the present application.
  • FIG. 13 shows a module block diagram of a function calling device provided by another embodiment of the present application.
  • FIG. 14 shows a block diagram of a function call device provided by another embodiment of the present application.
  • FIG. 15 shows a block diagram of a module of an electronic device provided by an embodiment of the present application.
  • Fig. 16 shows a storage unit provided by an embodiment of the present application for storing or carrying program code for implementing the function calling method according to the embodiment of the present application.
  • an attacker can obtain important information about the application and even the user's personal privacy by reversely analyzing the application on the mobile terminal, which brings harm to the user and also challenges the developer of the application.
  • Java programs are easier to crack than C language, general developers write core functions in C language and integrate them into applications by generating a shared library so. But the attacker can still use the reverse tool to disassemble and decompile the binary code compiled into C language. With the help of the reverse tool, the attacker can easily perform control flow analysis, data flow analysis, and even decompile binary code into C language code. If the binary program is not protected, the attacker can often perform reverse analysis on the binary program relatively easily.
  • the commonly used way to protect the function call is to pack the encryption operation, where the pack operation is to hide the real OEP (entry point) of the program and prevent it from being cracked.
  • the pack operation is to hide the real OEP (entry point) of the program and prevent it from being cracked.
  • a piece of code is implanted in a binary program, and the control right of the program is first obtained when it is running, and then the control right is returned to the original code.
  • the purpose of this is to hide the real OEP (entry point of the program, to prevent being Crack).
  • an embodiment of the present application provides a function call encryption system.
  • the system includes: an electronic device 100 and a verification server 200.
  • the electronic device 100 and the verification server 200 are located in a wireless network or a wired network, and the electronic device 100 and the verification server 200 perform data interaction.
  • the client is installed in the electronic device 100, and the client can call functions running on the electronic device 100.
  • the client may be an application program with a function call function installed in the electronic device 100.
  • the user logs in through an account on the client, and all information corresponding to the account can be stored in the storage space of the verification server 200.
  • the verification server 200 may be a separate server, or a server cluster, a local server, or a cloud server.
  • the electronic device 100 When the electronic device 100 calls a function, it sends a verification request to the verification server 200. After the verification server 200 passes the verification, the electronic device 100 can successfully call, thereby increasing the security of the function call.
  • the electronic device 100 can successfully call, thereby increasing the security of the function call.
  • FIG. 2 shows a function calling method provided by an embodiment of the present application.
  • the method is applied to the above-mentioned electronic device.
  • the execution subject of the method is the electronic device, and the method uses
  • the method includes: S201 to S204.
  • the call request may be initiated when the electronic device calls the target function.
  • the access request may be a call request generated when the electronic device detects that the function call event occurs.
  • the target function may be a function in the operating system of the electronic device, for example, may be a function in a dynamic link library (Dynamic Link Library, DLL), and the caller of the target function may be an application program Or a piece of code.
  • the caller can also be another electronic device.
  • the target function can be a DLL function, of course, it can also be a function in another function library, which is not limited here.
  • the caller When the caller calls the target function, it sends a call request to the electronic device.
  • the call request includes the target function identifier.
  • the electronic device can determine that the target function is requested to be called, and then the caller of the target function can be determined, and The objective function is found according to the identification of the objective function.
  • the information to be verified of the electronic device may be information stored in the verification server in advance, and the information to be verified may be used as the identity verification information of the electronic device, that is, when the verification of the information to be verified is passed, it can indicate the identity verification of the electronic device by. Specifically, it may be generated by an electronic device in advance and sent to the verification server for storage.
  • the information to be verified can be used as a unique identifier of the identity of the electronic device, that is, the electronic device corresponds to the information to be verified, and can be distinguished from the information to be verified corresponding to other electronic devices.
  • S203 Send the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified.
  • the electronic device sends the information to be verified to a verification server, and the verification server performs a verification operation on the information to be verified, thereby verifying the legitimacy of the information to be verified.
  • the electronic device sends a verification request to the verification server.
  • the verification request includes the information to be verified and the identity of the electronic device.
  • the verification server continues the verification request to obtain the information to be verified and the electronic device. ’S identity. Then, a verification operation is performed on the to-be-verified information according to the to-be-verified information and the identity of the electronic device.
  • preset information is stored in the verification server, and the preset information may be pre-stored information corresponding to the electronic device. Then, the verification server searches for the corresponding preset information according to the identity of the electronic device, and determines the pending information. Whether the verification information matches the preset information, if the information to be verified matches the preset information, it is determined that the information to be verified is verified, and if the information to be verified does not match the preset information, it is determined that the information to be verified fails.
  • the verification server determines that the information to be verified is passed, it will send the verification passed information to the electronic device.
  • the electronic device obtains the verification passed information sent by the verification server, it can determine that the verification information of the electronic device has passed verification, then the execution target Function call operation.
  • the verification server determines that the information to be verified is not passed, it will send the verification failure information to the electronic device.
  • the electronic device obtains the verification failure information sent by the verification server, it can determine the electronic device's If the verification of the information to be verified fails, the call operation of the target function is not performed. Specifically, a call failure message can be returned to the caller of the target function, and the caller can determine the call of the target function after obtaining the call failure information. If it fails, a warning message can be issued, and the warning message is used to remind the user that the call to the target function failed this time.
  • FIG. 3 shows a function calling method provided by an embodiment of the present application.
  • the method is applied to the above-mentioned electronic device.
  • the execution subject of the method is the electronic device, and the method uses
  • the method includes: S310 to S350.
  • the information to be verified includes at least one of user information and device information of the electronic device, wherein the user information is the identity information of a user currently logging in the electronic device.
  • the user information of the electronic device includes the identity information of the user currently logged in to the electronic device, and the electronic device obtains the currently logged-in information after obtaining the call request of the target function.
  • the identity information of the user of the electronic device, the identity information of the user currently logged in to the electronic device is used as the information to be verified of the electronic device, and the identity information of the user currently logged in to the electronic device is sent to the verification server, and the verification server verifies the user’s
  • the legitimacy of the identity information specifically, a list of authorized users is stored in the verification server, and the list of authorized users includes the identity information of multiple legitimate users, and the verification server combines the acquired identity information of the user sent by the electronic device with the list of authorized users If the identity information of the legal user in the authorized user list is found matching the identity information of the user currently logging in the electronic device, it is determined that the verification of the information to be verified of the electronic device is passed.
  • the information to be verified is the device information of the electronic device, where the device information of the electronic device may be information corresponding to the parameters of the electronic device.
  • the device information includes the processor information and the hard disk of the electronic device. At least one of information, internet protocol address, and physical address.
  • the device information includes processor information, hard disk information, Internet Protocol address, and physical address of the electronic device.
  • the processor information of the electronic device may be the processor identifier of the electronic device.
  • the processor identifier of the electronic device is used to indicate the identity information of the processor of the electronic device.
  • the processor identifier may be the device identifier of the processor, specifically, it may be the chip identifier of the processor, for example, it may be a CPU sequence. Number, also called CPU id.
  • the hard disk information of the electronic device may be the hard disk identification of the electronic device.
  • the hard disk identifier of the electronic device is used to indicate the identity information of the hard disk of the electronic device.
  • the hard disk identifier may be the device identifier of the hard disk, specifically, it may be the chip identifier of the hard disk, for example, it may be the hard disk serial number, also called Hard disk id.
  • the Internet Protocol address of the electronic device may be the IP address of the electronic device, and the physical address of the electronic device may be the MAC address of the electronic device.
  • the information to be verified is the device information of the electronic device. If the electronic device enters the device information of the electronic device in the verification server in advance, the verification server stores the device information as pre-stored device information. After the electronic device sends the device information of the electronic device as the information to be verified to the verification server, as an implementation manner, the device information of the electronic device may be sent to the verification server through a verification request. Specifically, the verification request includes the electronic device.
  • the verification server pre-stores the correspondence between the identification of the electronic device and the pre-stored device information of the electronic device, and the verification server obtains the verification request, and parses the verification request to obtain
  • the identification of the electronic device and the device information sent by the electronic device, the corresponding pre-stored device information is found according to the identification of the electronic device, the verification server determines whether the device information matches the pre-stored device information, and if the device information matches the pre-stored device information , It is determined that the verification of the information to be verified is passed, and if the device information does not match the pre-stored device information, it is determined that the verification of the information to be verified is not passed.
  • the electronic device may send the user information and the device information of the electronic device to the verification server, and the verification server is verifying the user information and the device information.
  • the verification server is verifying the user information and the device information.
  • S330 Obtain a call time, where the call time is a time to obtain a call request of the target function.
  • the electronic device obtains the calling time after sending the information to be verified of the electronic device, or before sending the information to be verified of the electronic device and after obtaining the call request of the target function, where the call time is the time of obtaining the call request of the target function .
  • the electronic device when it obtains the call request of the target function, it generates a timestamp as the time when the call request of the target function is obtained, so that it is convenient to record the time point of the target function call, which is regarded as the target function.
  • the timestamp is the system time point read when the call request of the target function is obtained.
  • S340 Send the calling time and the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified when determining that the calling time meets a specified condition.
  • the calling time and the information to be verified may be sending the identification of the electronic device, the calling time, and the information to be verified to the verification server.
  • the identification of the electronic device, the calling time, and the information to be verified are sent to the verification server through the above verification request. Verify the server. Then, when the verification server determines that the specified condition is met at the time of invocation and the information to be verified passes the verification, the verification server sends the verification passed information to the electronic device.
  • the verification server first determines whether the call time meets the specified condition, and if the call time meets the specified condition, it performs a verification operation on the information to be verified, where the specified condition may correspond to the target function.
  • the specific implementation is Refer to the subsequent embodiment.
  • this step S340 may include S341 to S342.
  • S341 Generate an information string according to the calling time and the information to be verified.
  • the character string can be a data set composed of multiple characters, and the calling time and the information to be verified are packaged and sent to the verification server in the form of a character string, so that the data transmission between the electronic device and the verification server meets the string form .
  • the information string can be 128 bits.
  • the information to be verified includes user information and device information, and the specific implementation manner for generating an information string based on the calling time and the information to be verified may be: combining the user information, device information, and calling time into an information string, Wherein, in the information string, the device information occupies 64 bits, the user information occupies 11 bits, and the call time occupies 13 bits.
  • the information string may include three areas, namely a first area S1, a second area S2, and a third area S3.
  • the information corresponding to the first area S1 is device information
  • the information corresponding to the second area S2 is user information
  • the information corresponding to the third area S3 is the calling time.
  • an initial string is set.
  • the initial string is an empty string. If the initial character string is 128 bits, the initial character string can be divided into a first area S1, a second area S2, and a third area S3.
  • the device information is written into the first area S1, and the user information is stored in the second area S2: Store the call time in the third area S3, so that user information, device information, and call time are written into the initial character string to obtain the information string.
  • the first area S1, the second area S2, and the third area S3 are adjacent and do not intersect, that is, the first area S1 and the second area S2 are adjacent, and the second area S2 and the third area S3 are adjacent to each other. adjacent.
  • the string is an array of 128, and each element is used to store a character.
  • the array includes: a[0], a[1], a[2],,,, , A[127], where a[i] is the element corresponding to the array, and i is 0,1,2,,,,127.
  • the call time can be accurate to milliseconds.
  • the bits need to be supplemented. Therefore, the user information, device information, calling time, and random code can be combined into Information string.
  • the device information occupies 64 bits
  • the user information occupies 11 bits
  • the call time occupies 13 bits
  • the random code occupies 8 bits.
  • the information string includes four areas, namely, a first area S1, a second area S2, a third area S3, and a fourth area S4.
  • the information corresponding to the first area S1 is device information
  • the information corresponding to the second area S2 is user information
  • the information corresponding to the third area S3 is the calling time
  • the information corresponding to the fourth area S4 is a random code.
  • an initial string is set.
  • the initial string is an empty string. If the initial character string is 128 bits, the initial character string can be divided into a first area S1, a second area S2, a third area S3, and a fourth area S4.
  • the device information is written into the first area S1, and the user information Store in the second area S2, store the call time in the third area S3, store the random code in the fourth area S4, so that user information, device information, call time and random code are written into the initial string to obtain the information character string.
  • the device information includes processor information, hard disk information, Internet Protocol address, and physical address.
  • the processor information occupies 32 characters, and the hard disk information occupies 8 characters.
  • the Internet Protocol address occupies 12 characters, and the physical address occupies 12 characters.
  • the first area can be divided into multiple sub-areas. Specifically, as shown in FIG. 7, the first area S1 is divided into a first sub-area S11, a second sub-area S12, a third sub-area S13, and a fourth sub-area S14.
  • the information corresponding to the first sub-area S11 is processor information
  • the information corresponding to the second sub-area S12 is hard disk information
  • the information corresponding to the third sub-area S13 is an Internet Protocol address
  • the information corresponding to the fourth sub-area S14 is a physical address .
  • the ways of combining information strings in the two implementations are similar, they will not be described separately here.
  • the user information, device information, calling time, and random code are combined in a way from low to high of the string. Take the information string as an example.
  • the user information may be in the lowest 64 bits, and the device information may be in the 11 bits after the user information, and so on.
  • the verification server After the verification server obtains the character string, it can parse the character string to obtain the corresponding calling time and information to be verified.
  • the electronic device informs the verification server of the combination of character strings in advance, and after obtaining the information string, the verification server can determine the user information, device information, and call time according to the combination of the information string obtained in advance. In the position within the string, and quickly obtain user information, device information, and the corresponding content at the time of the call.
  • the verification passed information is sent after the verification operation is performed on the information to be verified when the verification server satisfies a specified condition at the time of invocation, and the verification of the information to be verified is determined to be sent. .
  • the verification information may be encrypted.
  • the information to be verified is sent to the verification server, instructing the verification server to
  • the specific implementation manner of performing the verification operation on the information to be verified may be: performing an encryption operation on the information to be verified to obtain encrypted information; sending the encrypted information to the verification server to instruct the verification server to perform the verification operation on the encrypted information After decryption, the information to be verified is obtained, and a verification operation is performed on the information to be verified.
  • the encryption operation may be the AES algorithm, and the encryption operation is performed on the information to be verified according to the AES algorithm to obtain the encrypted information.
  • the verification server obtains the encrypted information, and after decrypting the encrypted information by the decryption algorithm corresponding to the encryption algorithm, the encrypted information is obtained. verify message.
  • the electronic device combines processor information, hard disk information, Internet Protocol address, physical address, user information, calling time, and random code into an information string, and the information string is encrypted by the AES algorithm to obtain encrypted information To send the encrypted information to the verification server.
  • the authentication server obtains processor information, hard disk information, Internet protocol address, physical address, user information, and calling time after decryption.
  • FIG. 8 shows a function calling method provided by an embodiment of the present application.
  • the method is applied to the above-mentioned electronic device.
  • the execution subject of the method is the electronic device, and the method uses In order to increase the security of function calls and reduce the possibility of illegal calls, specifically, please refer to Figure 8.
  • the method includes: S801 to S805.
  • S802 Acquire the to-be-verified information of the electronic device.
  • S803 Send the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified.
  • the preset information of the advance device may be stored in the electronic device, and when the function is called, the preset information corresponding to the identifier is searched according to the identifier of the function to be called.
  • the preset information is built into the function, and when the function is called, and when the verification pass information is obtained, the preset information that is built in the function in advance is solely authorized.
  • the verification passed information is the calling code, and taking the target function as the DLL function as an example, the electronic device sends the encrypted string code to the verification server, and the verification server decrypts and analyzes the code and verifies it in the background, and the registered user information, After the verification of the device information, etc., the DLL call code is returned.
  • the encrypted string code is an encrypted information string, that is, encrypted information. Then the DLL call code is the verification pass information.
  • the electronic device After obtaining preset information and verification passed information, the electronic device determines whether the verification passed information matches the preset information, and if the verification passed information matches the preset information, executes the call of the target function Operation, if the verification passed information does not match the preset information, the call operation of the target function is not performed, and the call failure information is pushed to the user.
  • the specific implementation manner for judging whether the verification passed information matches the preset information may be judging whether the verification passed information is consistent with the preset information, or it may be judging whether the first key information of the verification passed information is consistent with the preset information. Whether the second key information of the preset information is consistent, wherein the key information may be a keyword in the verified information, and the second key information may be a keyword in the preset information.
  • an anti-disassembly operation may be performed on the target function.
  • the electronic device performs a packed encryption operation on the target function, wherein the packed operation refers to Through a series of mathematical operations, the code of the executable program file or the dynamic link library file is changed (including compression and encryption of the executable program file) to achieve the purpose of encrypting the executable file.
  • the shell program is run first, and then the shell program decompresses the original program in the memory, and returns the control right to the real program after unpacking. This process is completely hidden. It is automatically completed in the memory, and the user does not know the specific operation process.
  • Figure 9 shows a function call method provided by an embodiment of the present application.
  • the method is applied to the verification server described above.
  • the execution subject of the method is the verification server, and the method uses
  • the method includes: S901 to S903.
  • S901 Acquire information to be verified of the electronic device sent by the electronic device, where the information to be verified is sent by the electronic device after obtaining a call request of the target function.
  • the electronic device obtains the call request of the target function, then obtains the information to be verified of the electronic device, and then sends the information to be verified to the verification server.
  • S902 Perform a verification operation on the information to be verified.
  • FIG. 10 shows a function call method provided by an embodiment of the present application.
  • the method is applied to the verification server described above.
  • the execution subject of the method is the verification server, and the method uses
  • the method includes: S1001 to S1006.
  • S1001 Obtain the calling time and the information to be verified sent by the electronic device.
  • S1002 Determine whether the calling time meets a specified condition.
  • the manner of determining whether the calling time meets the specified condition may be to determine whether the calling time is within a preset time range, where the preset time range is a preset time period during which the target function is allowed to be called. For example, it can be the time period from 10:00 to 18:00. Then, when the verification server obtains the calling time, it judges whether the calling time is within the preset time range, if it is within the preset time range, it performs a verification operation on the information to be verified, if it is not within the preset time range, Within the time range, if the verification operation is not performed on the information to be verified, S1006 may be executed, that is, the verification failure information is returned to the electronic device.
  • the preset time range is a preset time period during which the target function is allowed to be called. For example, it can be the time period from 10:00 to 18:00.
  • the specified time length can be a preset time length. If the time difference is within the time length, it indicates that the call time sent by the electronic device is the time of the function call in the nearby time period. The corresponding function call is the call in the nearest time period.
  • the specified duration may be set according to the objective function.
  • the verification server stores multiple identifications of objective functions and the specified duration corresponding to the identification of each objective function, then different objective functions
  • the corresponding designated duration can be different.
  • the designated duration corresponding to the hotspot function can be shorter, that is, the higher the popularity of the objective function, the shorter the corresponding designated duration.
  • the popularity of the objective function is the same as the preset duration.
  • the number of calls of the objective function within a time period is related, that is, the higher the number of calls of the objective function, the higher the popularity of the objective function.
  • the designated duration is also related to the signal quality of the communication signal between the electronic device and the verification server. Specifically, the designated duration is also related to the quality of the channel between the electronic device and the verification server. Okay, the shorter the specified duration.
  • the channel quality can be the error vector magnitude of the channel, the number of access points, signal strength, and so on.
  • EVM Error Vector Magnitude
  • EVM specifically represents the signal received by the receiving terminal.
  • the closeness of the IQ component generated during demodulation to the ideal signal component is an indicator for considering the quality of the modulated signal.
  • the smaller the EVM the better the channel quality of the channel.
  • the number of access points can also be obtained during channel scanning to obtain access points on each channel, so that the number of access points on each channel can be determined. The greater the number of access points, The worse the channel quality, on the contrary, the better.
  • the signal strength can also be obtained during channel scanning. The higher the signal strength, the higher the channel quality, and vice versa.
  • S1003 Perform a verification operation on the information to be verified.
  • S1004 Determine whether the verification of the information to be verified passes.
  • S1005 Send verification pass information to the electronic device, and instruct the electronic device to execute the calling operation of the target function.
  • the verification failure description information is included in the verification failure information, and the verification failure description information is used to describe the reason for the verification failure this time, for example, it may be that a specific piece of information is inconsistent.
  • the device information includes processor information, hard disk information, Internet Protocol address, and physical address.
  • the authentication server verifies the user information and device information one by one, the information that has not passed the verification will be recorded in the description of the verification failure.
  • the verification failure description information includes the description information of the physical address verification failure.
  • the verification failure description information may also include information indicating that the specified condition is not met at the time of invocation.
  • the electronic device After obtaining the verification failure information, the electronic device displays the verification failure description information or pushes it to the caller.
  • FIG. 11 shows a structural block diagram of a function calling apparatus 1100 provided by an embodiment of the present application.
  • the function calling apparatus 1100 is applied to an electronic device.
  • the apparatus may include: a first obtaining unit 1101, a second obtaining unit 1102 , The verification unit 1103 and the execution unit 1104.
  • the first obtaining unit 1101 is configured to obtain the call request of the target function.
  • the second acquiring unit 1102 is configured to acquire the to-be-verified information of the electronic device.
  • the verification unit 1103 is configured to send the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified.
  • the execution unit 1104 is configured to execute the calling operation of the target function if the verification passed information sent by the verification server is obtained, and the verification passed information is sent by the verification server when the information to be verified is verified. of.
  • FIG. 12 shows a structural block diagram of a function calling apparatus 1200 provided by an embodiment of the present application.
  • the function calling apparatus 1200 is applied to an electronic device.
  • the apparatus may include: a first acquiring unit 1210 and a second acquiring unit 1220. , The verification unit 1230 and the execution unit 1240.
  • the first obtaining unit 1210 is used to obtain the call request of the target function.
  • the second obtaining unit 1220 is configured to obtain the information to be verified of the electronic device.
  • the information to be verified includes at least one of user information and device information of the electronic device, wherein the user information is the identity information of a user currently logging in the electronic device.
  • the device information includes at least one of processor information, hard disk information, Internet Protocol address, and physical address of the electronic device.
  • the verification unit 1230 is configured to send the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified.
  • the verification unit 1230 is further configured to perform an encryption operation on the information to be verified to obtain encrypted information; send the encrypted information to the verification server, and instruct the verification server to obtain the encrypted information after decrypting the encrypted information. Information to be verified, and a verification operation is performed on the information to be verified.
  • the verification unit 1230 includes a time acquisition sub-unit 1231 and a verification sub-unit 1232.
  • the time obtaining subunit 1231 is configured to obtain a call time, where the call time is the time when the call request of the target function is obtained.
  • the verification subunit 1232 is configured to send the calling time and the information to be verified to a verification server, and instruct the verification server to perform a verification operation on the information to be verified when determining that the calling time meets a specified condition.
  • the verification subunit 1232 is further configured to generate an information string according to the calling time and the information to be verified; and send the string to the verification server.
  • the information string is 128-bit characters.
  • the information to be verified includes user information and device information
  • the verification subunit is also used to combine the user information, device information, and calling time into an information string, wherein, in the information string, the device The information occupies 64 bits, the user information occupies 11 bits, and the call time occupies 13 bits.
  • the information to be verified includes user information and device information
  • the verification subunit is also used to combine the user information, device information, calling time, and random code into an information string, wherein, in the information string, The device information occupies 64 bits, the user information occupies 11 bits, the call time occupies 13 bits, and the random code occupies 8 bits.
  • the device information includes processor information, hard disk information, Internet Protocol address, and physical address.
  • the processor information occupies 32 characters
  • the hard disk information occupies 8 characters
  • the Internet occupies 12 characters
  • the physical address occupies 12 characters.
  • the executing unit 1240 is configured to execute the calling operation of the target function if the verification passed information sent by the verification server is obtained, and the verification passed information is sent by the verification server when the information to be verified is verified. of.
  • execution unit 1240 is further configured to obtain preset information set in advance if the verification passed information sent by the verification server is obtained; if the verification passed information matches the preset information, execute the objective function Call operation.
  • execution unit 1240 is further configured to perform an anti-disassembly operation on the target function if the verification pass information sent by the verification server is obtained, after executing the calling operation of the target function.
  • the target function is a DLL function.
  • FIG. 13 shows a structural block diagram of a function calling device 1300 provided by an embodiment of the present application.
  • the function calling device 1300 is applied to a verification server.
  • the device may include: an obtaining unit 1301, a verification unit 1302, and a sending unit 1303. .
  • the obtaining unit 1301 is configured to obtain information to be verified of the electronic device sent by the electronic device, where the information to be verified is sent by the electronic device after obtaining the call request of the target function.
  • the verification unit 1302 is configured to perform a verification operation on the information to be verified.
  • the sending unit 1303 is configured to send the verification passed information to the electronic device if the verification of the information to be verified is passed, instructing the electronic device to perform the calling operation of the target function.
  • FIG. 14 shows a structural block diagram of a function calling device 1400 provided by an embodiment of the present application.
  • the function calling device 1400 is applied to a verification server.
  • the device may include: an obtaining unit 1410, a verification unit 1420, and a sending unit 1430. .
  • the obtaining unit 1410 is configured to obtain information to be verified of the electronic device sent by the electronic device, where the information to be verified is sent by the electronic device after obtaining the call request of the target function.
  • the acquiring unit 1410 is further configured to acquire the calling time and the information to be verified sent by the electronic device, where the calling time is the time when the electronic device acquires the calling request of the target function.
  • the verification unit 1420 is configured to perform a verification operation on the information to be verified.
  • the verification unit 1420 includes a time verification sub-unit 1421 and an information verification sub-unit 1422.
  • the time verification sub-unit 1421 is used to determine whether the calling time meets a specified condition.
  • the information verification subunit 1422 is configured to perform a verification operation on the information to be verified if the specified conditions are met.
  • the time verification subunit 1421 is also used to obtain the time difference between the call time and the current time; if the time difference is less than a specified time period, it is determined that the call time meets the specified condition; if the time difference is greater than or equal to the specified time period, then It is determined that the call time does not meet the specified condition.
  • the sending unit 1430 is configured to send verification passed information to the electronic device if the verification of the to-be-verified information is passed, instructing the electronic device to perform the calling operation of the target function.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • 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 above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
  • the electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book.
  • the electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be configured by One or more processors 110 execute, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the electronic device 100 may adopt at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PDA Programmable Logic Array
  • the processor 110 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • FIG. 16 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 1600 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 1600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 1600 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 1600 has storage space for the program code 1610 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • the program code 1610 may be compressed in a suitable form, for example.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

一种函数调用方法、装置、电子设备及计算机可读介质,涉及移动终端技术领域,所述方法包括:获取目标函数的调用请求(S201);获取所述电子设备(100)的待验证信息(S202);将所述待验证信息发送至验证服务器(200),指示所述验证服务器(200)对所述待验证信息执行验证操作(S203);若获取到所述验证服务器(200)发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器(200)在所述待验证信息验证通过的情况下发送的(S204)。因此,在函数调用的时候,通过验证服务器(200)对电子设备(100)发送的待验证信息的验证,使得在待验证信息验证通过的时候才执行函数调用,增加了函数调用的安全性,降低了非法调用的可能性。

Description

函数调用方法、装置、电子设备及计算机可读介质 技术领域
本申请涉及移动终端技术领域,更具体地,涉及一种函数调用方法、装置、电子设备及计算机可读介质。
背景技术
目前,对函数调用的保护只对函数进行加壳加密工作,然而,可以通过一些脱壳工具,破解工具获取到函数中的相关信息,依然有非法调用的可能性。
发明内容
本申请提出了一种函数调用方法、装置、电子设备及计算机可读介质,以改善上述缺陷。
第一方面,本申请实施例提供了一种函数调用方法,应用于电子设备,所述方法包括:获取目标函数的调用请求;获取所述电子设备的待验证信息;将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作;若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
第二方面,本申请实施例还提供了函数调用方法,应用于验证服务器,所述方法包括:获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的;对所述待验证信息执行验证操作;若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
第三方面,本申请实施例还提供了一种函数调用装置,应用于电子设备,所述装置包括:第一获取单元、第二获取单元、验证单元和执行单元。第一获取单元,用于获取目标函数的调用请求。第二获取单元,用于获取所述电子设备的待验证信息。验证单元,用于将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作。执行单元,用于若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
第四方面,本申请实施例还提供了一种函数调用装置,应用于验证服务器,所述装置包括:获取单元、验证单元和发送单元。获取单元,用于获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的。验证单元,用于对所述待验证信息执行验证操作。发送单元,用于若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
第五方面,本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述方法。
第六方面,本申请实施例还提供了一种计算机可读介质,所述可读存储介质存储有处理器可执行的程序代码,所述程序代码被所述处理器执行时使所述处理器执行上述方法。
本申请提供的函数调用方法、装置、电子设备及计算机可读介质,在获取目标函数的调用请求的时候,获取所述电子设备的待验证信息;将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作,验证服务器在所述待验证信息验证通过的情况下会发送验证通过信息,若电子设备获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作。因此,在函数调用的时候,通过验证服务器对电子设备发送的待验证信息的验证,使得在待验证信息验证通过的时候才执行函数调用,增加了函数调用的安全性,降低了非法调用的可能性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请实施例提供的函数调用加密系统的模块框图;
图2示出了本申请一实施例提供的函数调用方法的方法流程图;
图3示出了本申请另一实施例提供的函数调用方法的方法流程图;
图4示出了图3中的S340的方法流程图;
图5示出了本申请一实施例提供的信息字符串的示意图;
图6示出了本申请另一实施例提供的信息字符串的示意图;
图7示出了本申请又一实施例提供的信息字符串的示意图;
图8示出了本申请再一实施例提供的函数调用方法的方法流程图;
图9示出了本申请再又一实施例提供的函数调用方法的方法流程图;
图10示出了本申请再再又一实施例提供的函数调用方法的方法流程图;
图11示出了本申请一实施例提供的函数调用装置的模块框图;
图12示出了本申请另一实施例提供的函数调用装置的模块框图;
图13示出了本申请又一实施例提供的函数调用装置的模块框图;
图14示出了本申请再一实施例提供的函数调用装置的模块框图;
图15示出了本申请实施例提供的电子设备的模块框图;
图16出了本申请实施例提供的用于保存或者携带实现根据本申请实施例的函数调用方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
随着科技的发展,移动终端的硬件性能越来越强悍,用户可以通过安装各种功能不 同的应用程序来实现不同的功能,给用户的日常生活带了便利,但是,也存在一定的安全隐患。
比如,攻击者通过对移动终端上的应用程序逆向分析的方法,可以获取应用程序的重要信息,甚至是用户的个人隐私,给用户带来危害的同时也给应用程序的开发者带来挑战。
由于Java程序较C语言容易被破解,一般开发人员将核心函数用C语言来编写,通过生成共享库so的方式集成到应用程序中。但是攻击者仍然可以借助逆向工具对C语言编译成后的二进制反汇编和反编译,借助逆向工具,攻击者可以方便的进行控制流分析,数据流分析,甚至将二进制代码反编译为C语言代码,如果不对二进制程序做保护,攻击者往往可以比较轻松的对二进制程序进行逆向分析。
目前常用的对函数调用保护的方式加壳加密操作,其中,加壳操作为为了隐藏程序真正的OEP(入口点),防止被破解。具体地,在二进制的程序中植入一段代码,在运行的时候优先取得程序的控制权,之后再把控制权交还给原始代码,这样做的目的是隐藏程序真正的OEP(入口点,防止被破解)。
然而,发明人在研究中发现,即使经过加壳加密的方式对函数调用保护,非法用户依然可以通过一些脱壳工具,破解工具获取到函数中的相关信息,依然有非法调用的可能性。
因此,为了解决上述缺陷,本申请实施例提供了一种函数调用加密系统,如图1所示,该系统包括:电子设备100和验证服务器200。
如图1中所示,电子设备100和验证服务器200位于无线网络或有线网络中,电子设备100和验证服务器200进行数据交互。
在一些实施例中,客户端安装在电子设备100内,该客户端能够调用在电子设备100上运行的函数。例如,可以是安装在电子设备100的具有函数调用功能的应用程序。用户在客户端通过帐号登录,则该帐号对应的所有信息可以存储在验证服务器200的存储空间内。验证服务器200可以是单独的服务器,也可以是服务器集群,可以是本地服务器,也可以是云端服务器。
在电子设备100调用函数的时候,会发送一个验证请求至验证服务器200,验证服务器200验证通过之后,电子设备100才能够成功调用,从而能够增加函数调用的安全性,则具体的实施方式请参阅后续实施例。
请参阅图2,图2示出了本申请实施例提供的一种函数调用方法,该方法应用于上述的电子设备,则本申请实施例中,该方法的执行主体是电子设备,该方法用于增加函数调用的安全性,降低非法调用的可能性,具体地,请参阅图2,该方法包括:S201至S204。
S201:获取目标函数的调用请求。
具体地,调用请求可以是电子设备在调用目标函数的时候发起的,则作为一种实施方式,该访问请求可以是电子设备检测到函数的调用事件发生的时候,产生一个调用请求。
作为一种实施方式,该目标函数可以是电子设备的操作系统内的函数,例如,可以是动态链接库(Dynamic Link Library,DLL)内的函数,而该目标函数的调用方可以是一个应用程序或者一段代码,另外,该调用方还可以是其他的电子设备。则目标函数可以是DLL函数,当然也可以是其他的函数库内的函数,在此不做限定。
则调用方在调用目标函数的时候,发送一个调用请求至电子设备,该调用请求内包括目标函数的标识,则电子设备能够确定目标函数被请求调用,则能够确定该目标函数的调用方,并且根据该目标函数的标识查找到该目标函数。
S202:获取所述电子设备的待验证信息。
其中,电子设备的待验证信息可以是预先在验证服务器内存储的信息,并且该待验证信息可以作为电子设备的身份验证信息,即在待验证信息验证通过的时候,能够表明电子设备的身份验证通过。具体地,可以是预先有电子设备生成并且发送至验证服务器内存储的。
作为一种实施方式,该待验证信息能够作为电子设备的身份的唯一性标识,即该电子设备对应该待验证信息,并且能够与其他的电子设备所对应的待验证信息区别。
S203:将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作。
电子设备将待验证信息发送至验证服务器,该验证服务器对该待验证信息执行验证操作,从而验证该待验证信息的合法性。作为一种实施方式,电子设备发送验证请求至验证服务器,该验证请求包括待验证信息和电子设备的身份标识,验证服务器获取到该验证请求之后,接续该验证请求以获得待验证信息和电子设备的身份标识。然后,根据待验证信息和电子设备的身份标识对该待验证信息执行验证操作。
作为一种实施方式,验证服务器内存储有预设信息,该预设信息可以是预先存储的电子设备对应的信息,则验证服务器根据该电子设备的身份标识查找对应的预设信息,判断该待验证信息与预设信息是否匹配,如果该待验证信息与预设信息匹配,则判定待验证信息验证通过,如果该待验证信息与预设信息不匹配,则判定待验证信息不通过。
S204:若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
验证服务器在确定待验证信息通过的时候,会发送验证通过信息至电子设备,电子设备在获取到验证服务器发送的验证通过信息的时候,能够确定该电子设备的待验证信息验证通过,则执行目标函数的调用操作。
作为一种实施方式,验证服务器在确定待验证信息不通过的时候,会发送验证未通过信息至电子设备,电子设备在获取到验证服务器发送的验证未通过信息的时候,能够确定该电子设备的待验证信息验证未通过,则不执行目标函数的调用操作,具体地,可以返回一个调用失败信息至该目标函数的调用方,调用方获取到该调用失败信息之后能够确定本次目标函数的调用失败,则可以发出警示信息,该警示信息用于提示用户本次目标函数的调用失败。
请参阅图3,图3示出了本申请实施例提供的一种函数调用方法,该方法应用于上述的电子设备,则本申请实施例中,该方法的执行主体是电子设备,该方法用于增加函数调用的安全性,降低非法调用的可能性,具体地,请参阅图3,该方法包括:S310至S350。
S310:获取目标函数的调用请求。
S320:获取所述电子设备的待验证信息。
其中,待验证信息包括用户信息和所述电子设备的设备信息的至少一种,其中,所述用户信息为当前登录所述电子设备的用户的身份信息。
作为一种实施方式,待验证信息为用户信息,则电子设备的用户信息包括当前登录所述电子设备的用户的身份信息,则电子设备在获取到目标函数的调用请求之后,获取当前登录所述电子设备的用户的身份信息,将当前登录所述电子设备的用户的身份信息作为电子设备的待验证信息,将当前登录所述电子设备的用户的身份信息发送至验证服务器,验证服务器验证用户的身份信息的合法性,具体地,验证服务器内存储有授权用户名单,该授权用户名单内包括多个合法用户的身份信息,验证服务器将所获取的电子设备发送的用户的身份信息与授权用户名单内的合法用户的身份信息匹配,如果在授权 用户名单内查找到与该当前登录所述电子设备的用户的身份信息匹配的身份信息,则判定电子设备的待验证信息的验证通过。
作为另一种实施方式,待验证信息为电子设备的设备信息,其中,电子设备的设备信息可以是电子设备的参数对应的信息,例如,该设备信息包括所述电子设备的处理器信息、硬盘信息、互联网协议地址和物理地址中的至少一个。作为一种实施方式,该设备信息包括所述电子设备的处理器信息、硬盘信息、互联网协议地址和物理地址。
其中,电子设备的处理器信息可以是电子设备的处理器标识。该电子设备的处理器标识用于表示电子设备的处理器的身份信息,例如,该处理器标识可以是处理器的设备标识,具体地,可以是处理器的芯片标识,例如,可以是CPU序列号,也称为CPU id。
其中,电子设备的硬盘信息可以是电子设备的硬盘标识。该电子设备的硬盘标识用于表示电子设备的硬盘的身份信息,例如,该硬盘标识可以是硬盘的设备标识,具体地,可以是硬盘的芯片标识,例如,可以是硬盘序列号,也称为硬盘id。
其中,电子设备的互联网协议地址可以是电子设备的IP地址,电子设备的物理地址可以是电子设备的MAC地址。
作为另一种实施方式,待验证信息为电子设备的设备信息,其中,则电子设备预先在验证服务器内录入电子设备的设备信息,则验证服务器将该设备信息存储,作为预存设备信息。则电子设备将电子设备的设备信息作为待验证信息发送至验证服务器之后,作为一种实施方式,可以是通过验证请求将电子设备的设备信息发送至验证服务器,具体地,该验证请求内包括电子设备的设备信息和电子设备的标识,则验证服务器预先存储有电子设备的标识与电子设备的预存设备信息之间的对应关系,则验证服务器获取到验证请求之后,解析该验证请求,以获取到电子设备的标识和电子设备发送的设备信息,根据该电子设备的标识查找到对应的预存设备信息,验证服务器判断该设备信息与该预存设备信息是否匹配,如果该设备信息与该预存设备信息匹配,则判定待验证信息验证通过,如果该设备信息与该预存设备信息不匹配,则判定待验证信息验证未通过。
作为另一种实施方式,待验证信息包括用户信息和所述电子设备的设备信息,则电子设备可以将用户信息和所述电子设备的设备信息发送至验证服务器,验证服务器在验证用户信息和所述电子设备的设备信息均通过的时候,则判定待验证信息验证通过,如果用户信息和所述电子设备的设备信息至少一个不通过,则判定待验证信息验证未通过。则用户信息和所述电子设备的设备信息均可以通过上述的验证请求发送至验证服务器,而具体地的验证方式可以参考上述描述,在此不再赘述。
S330:获取调用时刻,所述调用时刻为获取目标函数的调用请求的时刻。
除了上述的待验证信息验证通过的情况下可以执行S350的验证服务器发送验证通过信息至电子设备之外,还需要保证本次调用的时效性。
则电子设备在发送电子设备的待验证信息之后,或者在发送电子设备的待验证信息之前并且在获取目标函数的调用请求之后,获取调用时刻,其中,调用时刻为获取目标函数的调用请求的时刻。
具体地,电子设备在获取到目标函数的调用请求的时候,生成一个时间戳,作为该获取到目标函数的调用请求的时刻,从而便于记录本次目标函数调用的时间点,即作为本次目标函数调用的时间起点。具体地,该时间戳为获取到目标函数的调用请求的时候,所读取的系统时间点。
S340:将所述调用时刻和待验证信息发送至验证服务器,指示所述验证服务器在确定所述调用时刻满足指定条件的情况下,对所述待验证信息执行验证操作。
则具体地,调用时刻和待验证信息可以是将电子设备的标识、调用时刻和待验证信息发送至验证服务器,例如,通过上述的验证请求将电子设备的标识、调用时刻和待验 证信息发送至验证服务器。则验证服务器在确定调用时刻满足指定条件并且待验证信息通过验证的时候,发送验证通过信息至电子设备。
具体地,验证服务器先判断调用时刻是否满足指定条件,若调用时刻满足指定条件,则对所述待验证信息执行验证操作,其中,指定条件可以是与目标函数对应,则具体地的实施方式请参考后续实施例。
作为一种实施方式,调用时刻和待验证信息可以通过上述的验证请求被发送至验证服务器,则该验证请求可以是一个指令,也可以是一个数据包,还可以是一个字符串,则具体地,请参考图4,该步骤S340可以包括S341至S342。
S341:根据所述调用时刻和待验证信息生成信息字符串。
其中,字符串可以是由多个字符构成的一个数据集合,则通过字符串的形式将调用时刻和待验证信息打包发送至验证服务器,使得电子设备与验证服务器之间的数据传输满足字符串形式。
则信息字符串可以是128位。则待验证信息包括用户信息和设备信息,所述根据所述调用时刻和待验证信息生成信息字符串的具体实施方式可以是:将所述用户信息、设备信息和调用时刻组合成信息字符串,其中,所述信息字符串中,所述设备信息占用64位,所述用户信息占用11位,调用时刻占用13位。
具体地,如图5所示,可以是该信息字符串包括三个区域,分别为第一区域S1、第二区域S2和第三区域S3。其中,第一区域S1对应的信息为设备信息,第二区域S2对应的信息为用户信息,第三区域S3对应的信息为调用时刻。作为一种实施方式,设置一个初始字符串,作为一种实施方式,该初始字符串为一个空的字符串。该初始字符串为128位,则该初始字符串可以分为第一区域S1、第二区域S2和第三区域S3,则将设备信息写入第一区域S1,将用户信息存放在第二区域S2,将调用时刻存放在第三区域S3,从而将用户信息、设备信息和调用时刻写入初始字符串,从而得到信息字符串。
具体地,该第一区域S1、第二区域S2和第三区域S3是相邻的,并且不相交,即第一区域S1和第二区域S2相邻,第二区域S2和第三区域S3相邻。作为一种实施方式,该字符串是一个128为的数组,每个元素用于存放一个字符,具体地,该数组包括:a[0]、a[1]、a[2]、、、、、a[127],其中,a[i]为该数组对应的元素,i为0、1、2、、、、、127。
则第一区域S1对应该数组中的64个元素,第二区域S2对应该数组中的第11个元素,第三区域S3对应该数据中的第13个元素,即调用时刻的位数为13位,调用时刻能够精确到毫秒。
另外,考虑到第一区域S1、第二区域S2和第三区域S3所对应所有元素不足128位,则需要补位,因此,可以将所述用户信息、设备信息、调用时刻和随机码组合成信息字符串。其中,所述信息字符串中,所述设备信息占用64位,所述用户信息占用11位,所述调用时刻占用13位,所述随机码占用8位。
具体地,如图6所示,该信息字符串包括四个区域,分别为第一区域S1、第二区域S2、第三区域S3和第四区域S4。其中,第一区域S1对应的信息为设备信息,第二区域S2对应的信息为用户信息,第三区域S3对应的信息为调用时刻,第四区域S4对应的信息为随机码。作为一种实施方式,设置一个初始字符串,作为一种实施方式,该初始字符串为一个空的字符串。该初始字符串为128位,则该初始字符串可以分为第一区域S1、第二区域S2、第三区域S3和第四区域S4,则将设备信息写入第一区域S1,将用户信息存放在第二区域S2,将调用时刻存放在第三区域S3,将随机码存入第四区域S4,从而将用户信息、设备信息、调用时刻和随机码写入初始字符串,从而得到信息字符串。
作为一种实施方式,设备信息包括处理器信息、硬盘信息、互联网协议地址和物理地址,所述信息字符串中,所述处理器信息占用32位字符,所述硬盘信息占用8位字 符,所述互联网协议地址占用12位字符,所述物理地址占用12位字符。
则第一区域又可以分为多个子区域,具体地,如图7所示,第一区域S1分为第一子区域S11、第二子区域S12、第三子区域S13和第四子区域S14,第一子区域S11对应的信息为处理器信息,第二子区域S12对应的信息为硬盘信息,第三子区域S13对应的信息为互联网协议地址,第四子区域S14对应的信息为物理地址。
作为一种实施方式,可以是按照字符串的低位至高位的方式,将用户信息、设备信息、调用时刻和随机码组合成信息字符串,或者将用户信息、设备信息和调用时刻组合成信息字符串,由于两种实施方式下的组合信息字符串的方式相似,则在此不再分开说明,以按照字符串的低位至高位的方式,将用户信息、设备信息、调用时刻和随机码组合成信息字符串为例。
具体地,按照字符串的低位至高位的方向,可以是用户信息在最低的64位,设备信息位于用户信息之后的11位,依次类推。
作为另一种实施方式,还可以是按照字符串的高位至低位的方式,将用户信息、设备信息、调用时刻和随机码组合成信息字符串。
S342:将所述字符串发送至验证服务器。
验证服务器在获取到字符串之后,解析该字符串能够获取到对应的调用时刻和待验证信息。
作为一种实施方式,电子设备预先将字符串的组合方式告知验证服务器,则验证服务器获取到信息字符串之后,按照预先获取的信息字符串的组合方式,能够确定用户信息、设备信息和调用时刻在字符串内的位置,而快速获取用户信息、设备信息和调用时刻对应的内容。
S350:若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
作为一种实施方式,验证通过信息为所述验证服务器在调用时刻满足指定条件的情况下,对所述待验证信息执行验证操作之后,并且在确定所述待验证信息验证通过的情况下发送的。
作为一种实施方式,为了保证待验证信息发送至验证服务器时的信息的安全性,可以对该验证信息加密,具体地,将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作的具体实施方式可以是,将所述待验证信息执行加密操作,得到加密信息;将所述加密信息发送至所述验证服务器,指示所述验证服务器对所述加密信息解密之后得到所述待验证信息,并对所述待验证信息执行验证操作。
具体地,加密操作可以是AES算法,则根据AES算法对待验证信息执行加密操作,得到加密信息,验证服务器获取该加密信息,通过与加密算法对应的解密算法对该加密信息解密之后得到所述待验证信息。
于本申请实施例中,电子设备将处理器信息、硬盘信息、互联网协议地址、物理地址、用户信息、调用时刻和随机码组合成信息字符串,对该信息字符串通过AES算法加密得到加密信息,将该加密信息发送至验证服务器。由验证服务器在解密之后得到处理器信息、硬盘信息、互联网协议地址、物理地址、用户信息和调用时刻。
请参阅图8,图8示出了本申请实施例提供的一种函数调用方法,该方法应用于上述的电子设备,则本申请实施例中,该方法的执行主体是电子设备,该方法用于增加函数调用的安全性,降低非法调用的可能性,具体地,请参阅图8,该方法包括:S801至S805。
S801:获取目标函数的调用请求。
S802:获取所述电子设备的待验证信息。
S803:将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作。
S804:若获取到所述验证服务器发送的验证通过信息,获取预先设置的预设信息。
作为一种实施方式,该预先设备的预设信息可以是存储在电子设备内的,则函数调用的时候,根据所要调用的函数的标识查找与该标识对应的预设信息。
作为另一种实施方式,该预设信息为内置在函数内的,则调用函数的时候,并且在获取到验证通过信息的时候,独权预先内置在函数内的预设信息。
其中,该验证通过信息为调用编码,以目标函数为DLL函数为例,电子设备将该加密串码发送到验证服务器,验证服务器对该编码进行解密解析和后台验证,和已登记的用户信息、设备信息等验证通过后回传DLL调用编码。具体地,该加密串码为加密后的信息字符串,即加密信息。则DLL调用编码为验证通过信息。
S805:若所述验证通过信息与所述预设信息匹配,则执行所述目标函数的调用操作。
电子设备在获取到预设信息和验证通过信息,判断所述验证通过信息与所述预设信息是否匹配,如果所述验证通过信息与所述预设信息匹配,则执行所述目标函数的调用操作,如果所述验证通过信息与所述预设信息不匹配,则不执行所述目标函数的调用操作,并向用户推送调用失败信息。
其中,判断所述验证通过信息与所述预设信息是否匹配的具体实施方式可以是,判断验证通过信息与所述预设信息是否一致,还可以是,判断验证通过信息的第一关键信息与所述预设信息的第二关键信息是否一致,其中,关键信息可以是验证通过信息中的关键字,而第二关键信息可以是预设信息中的关键字。
另外,在执行所述目标函数的调用操作之后,还可以对所述目标函数执行防反汇编操作,作为一种实施方式,电子设备对目标函数执行加壳加密操作,其中,加壳操作是指通过一系列数学运算,将可执行程序文件或动态链接库文件的编码进行改变(包括压缩、加密可执行程序文件),以达到加密可执行文件的目的。当被加壳的文件运行时,外壳程序先被运行,然后由这个外壳程序将原有的程序在内存中解压缩,并把控制权交还给脱壳后的真正程序,这个过程完全隐蔽,在内存中自动完成,用户不知道其具体运行过程。
请参阅图9,图9示出了本申请实施例提供的一种函数调用方法,该方法应用于上述的验证服务器,则本申请实施例中,该方法的执行主体是验证服务器,该方法用于增加函数调用的安全性,降低非法调用的可能性,具体地,请参阅图9,该方法包括:S901至S903。
S901:获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的。
电子设备获取目标函数的调用请求,然后,获取所述电子设备的待验证信息,之后将所述待验证信息发送至验证服务器。
S902:对所述待验证信息执行验证操作。
S903:若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
上述S901至S903的具体实施方式可以参考前述以电子设备为执行主体的方法的实施方式,在此不再赘述。
请参阅图10,图10示出了本申请实施例提供的一种函数调用方法,该方法应用于上述的验证服务器,则本申请实施例中,该方法的执行主体是验证服务器,该方法用于增加函数调用的安全性,降低非法调用的可能性,具体地,请参阅图10,该方法包括: S1001至S1006。
S1001:获取所述电子设备发送的调用时刻和待验证信息。
S1002:确定所述调用时刻是否满足指定条件。
作为一种实施方式,确定调用时刻是否满足指定条件的方式可以是,确定调用时刻是否在预设时间范围内,其中,该预设时间范围为预先设定的允许调用目标函数的时间段。例如,可以是10:00至18:00的时间段。则验证服务器在获取到调用时刻的时候,判读该调用时刻是否在该预设时间范围内,如果位于该预设时间范围内,则对所述待验证信息执行验证操作,如果不位于该预设时间范围内,则不执行对所述待验证信息执行验证操作,则可以执行S1006,即返回验证失败信息至电子设备。
作为另一种实施方式,可以是确定调用时刻是否为就近的时间段内调用的,则确定所述调用时刻是否满足指定条件的具体实施方式为,获取所述调用时刻与当前时刻的时间差;若所述时间差小于指定时长,则判定所述调用时刻满足指定条件;若所述时间差大于或等于指定时长,则判定所述调用时刻不满足指定条件。
其中,指定时长可以是预先设定的时间长度,如果该时间差位于该时间长度内,则表明电子设备所发送的调用时刻为就近时间段内的函数调用的时间,则本次的待验证信息所对应的函数调用是就近时间段内的调用。
作为一种实施方式,该指定时长可以是根据目标函数而设定的,具体地,验证服务器内存储有多个目标函数的标识和每个目标函数的标识对应的指定时长,则不同的目标函数所对应的指定时长可以是不同的,具体地,可以是热点函数对应的指定时长较短,即目标函数的热度越高,则所对应的指定时长越短,其中,目标函数的热度与预设时间段内的目标函数的被调用次数相关,即目标函数的被调用次数越高则目标函数的热度越高。
作为另一种实施方式,该指定时长还与电子设备与验证服务器之间的通信信号的信号质量有关,具体地,该指定时长还与电子设备与验证服务器之间的信道质量相关,信道质量越好,指定时长越短。
其中,信道质量可以是信道的误差向量幅度、接入点个数、信号强度等。其中,误差向量幅度(Error Vector Magnitude,简称EVM)指在给定时刻理想无误差基准信号与实际发射信号的向量差,用于衡量调制信号的幅度误差和相位误差,EVM具体表示接收终端对信号进行解调时产生的IQ分量与理想信号分量的接近程度,是考量调制信号质量的一种指标。EVM越小,信道的信道质量越好。而接入点的个数也可以在信道扫描的时候,获取每个信道上的接入点,由此就能够确定每个信道上的接入点个数,接入点的个数越多,信道质量越差,反之,越好。同理,信号强度也可以在信道扫描的时候获得,信号强度越高,则信道质量越高,反之,越低。
S1003:对所述待验证信息执行验证操作。
S1004:判断所述待验证信息验证是否通过。
S1005:发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
S1006:返回验证失败信息。
具体地,在返回验证失败信息的时候,在该验证失败信息内包括验证失败描述信息,该验证失败描述信息用于描述本次验证失败的原因,例如,可以是具体的某个信息不一致。
以上述的待验证信息包括用户信息和设备信息为例,以及设备信息包括处理器信息、硬盘信息、互联网协议地址和物理地址。在验证服务器对用户信息和设备信息逐个验证之后,未通过验证的信息会记录在该验证失败描述信息内。例如,该验证失败描述 信息包括物理地址验证失败的说明信息。
另外,在调用时刻不满足指定条件的时候,该验证失败描述信息还可以包括调用时刻不满足指定条件的说明信息。
则电子设备在获取到验证失败信息之后,将验证失败描述信息显示,或者推送至调用方。
请参阅图11,其示出了本申请实施例提供的一种函数调用装置1100的结构框图,函数调用装置1100应用于电子设备,该装置可以包括:第一获取单元1101、第二获取单元1102、验证单元1103和执行单元1104。
第一获取单元1101,用于获取目标函数的调用请求。
第二获取单元1102,用于获取所述电子设备的待验证信息。
验证单元1103,用于将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作。
执行单元1104,用于若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
请参阅图12,其示出了本申请实施例提供的一种函数调用装置1200的结构框图,函数调用装置1200应用于电子设备,该装置可以包括:第一获取单元1210、第二获取单元1220、验证单元1230和执行单元1240。
第一获取单元1210,用于获取目标函数的调用请求。
第二获取单元1220,用于获取所述电子设备的待验证信息。
其中,所述待验证信息包括用户信息和所述电子设备的设备信息的至少一种,其中,所述用户信息为当前登录所述电子设备的用户的身份信息。
所述设备信息包括所述电子设备的处理器信息、硬盘信息、互联网协议地址和物理地址中的至少一个。
验证单元1230,用于将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作。
具体地,验证单元1230还用于将所述待验证信息执行加密操作,得到加密信息;将所述加密信息发送至所述验证服务器,指示所述验证服务器对所述加密信息解密之后得到所述待验证信息,并对所述待验证信息执行验证操作。
验证单元1230包括时间获取子单元1231和验证子单元1232。
时间获取子单元1231,用于获取调用时刻,所述调用时刻为获取目标函数的调用请求的时刻。
验证子单元1232,用于将所述调用时刻和待验证信息发送至验证服务器,指示所述验证服务器在确定所述调用时刻满足指定条件的情况下,对所述待验证信息执行验证操作。
具体地,验证子单元1232还用于根据所述调用时刻和待验证信息生成信息字符串;将所述字符串发送至验证服务器。其中,所述信息字符串为128位字符。
进一步地,所述待验证信息包括用户信息和设备信息,验证子单元还用于将所述用户信息、设备信息和调用时刻组合成信息字符串,其中,所述信息字符串中,所述设备信息占用64位,所述用户信息占用11位,调用时刻占用13位。
进一步地,所述待验证信息包括用户信息和设备信息,验证子单元还用于将所述用户信息、设备信息、调用时刻和随机码组合成信息字符串,其中,所述信息字符串 中,所述设备信息占用64位,所述用户信息占用11位,所述调用时刻占用13位,所述随机码占用8位。
其中,所述设备信息包括处理器信息、硬盘信息、互联网协议地址和物理地址,所述信息字符串中,所述处理器信息占用32位字符,所述硬盘信息占用8位字符,所述互联网协议地址占用12位字符,所述物理地址占用12位字符。
执行单元1240,用于若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
进一步地,执行单元1240还用于若获取到所述验证服务器发送的验证通过信息,获取预先设置的预设信息;若所述验证通过信息与所述预设信息匹配,则执行所述目标函数的调用操作。
进一步地,执行单元1240还用于所述若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作之后,对所述目标函数执行防反汇编操作。
其中,所述目标函数为DLL函数。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
请参阅图13,其示出了本申请实施例提供的一种函数调用装置1300的结构框图,函数调用装置1300应用于验证服务器,该装置可以包括:获取单元1301、验证单元1302和发送单元1303。
获取单元1301,用于获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的。
验证单元1302,用于对所述待验证信息执行验证操作。
发送单元1303,用于若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
请参阅图14,其示出了本申请实施例提供的一种函数调用装置1400的结构框图,函数调用装置1400应用于验证服务器,该装置可以包括:获取单元1410、验证单元1420和发送单元1430。
获取单元1410,用于获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的。
进一步地,获取单元1410还用于获取所述电子设备发送的调用时刻和待验证信息,其中,所述调用时刻为所述电子设备获取目标函数的调用请求的时刻。
验证单元1420,用于对所述待验证信息执行验证操作。
进一步地,验证单元1420包括时间验证子单元1421和信息验证子单元1422。
时间验证子单元1421用于确定所述调用时刻是否满足指定条件。
信息验证子单元1422用于若满足指定条件,则对所述待验证信息执行验证操作。
其中,时间验证子单元1421还用于获取所述调用时刻与当前时刻的时间差;若所述时间差小于指定时长,则判定所述调用时刻满足指定条件;若所述时间差大于或等于指定时长,则判定所述调用时刻不满足指定条件。
发送单元1430,用于若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
请参考图15,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
请参考图16,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质1600中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质1600可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1600包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质1600具有执行上述方法中的任何方法步骤的程序代码1610的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1610可以例如以适当形式进行压缩。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种函数调用方法,其特征在于,应用于电子设备,所述方法包括:
    获取目标函数的调用请求;
    获取所述电子设备的待验证信息;
    将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作;
    若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
  2. 根据权利要求1所述的方法,其特征在于,所述待验证信息包括用户信息和所述电子设备的设备信息的至少一种,其中,所述用户信息为当前登录所述电子设备的用户的身份信息。
  3. 根据权利要求2所述的方法,其特征在于,所述设备信息包括所述电子设备的处理器信息、硬盘信息、互联网协议地址和物理地址中的至少一个。
  4. 根据权利要求1所述的方法,其特征在于,所述将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作,包括:
    获取调用时刻,所述调用时刻为获取目标函数的调用请求的时刻;
    将所述调用时刻和待验证信息发送至验证服务器,指示所述验证服务器在确定所述调用时刻满足指定条件的情况下,对所述待验证信息执行验证操作。
  5. 根据权利要求4所述的方法,其特征在于,所述将所述调用时刻和待验证信息发送至验证服务器,包括:
    根据所述调用时刻和待验证信息生成信息字符串;
    将所述字符串发送至验证服务器。
  6. 根据权利要求5所述的方法,其特征在于,所述信息字符串为128位字符。
  7. 根据权利要求6所述的方法,其特征在于,所述待验证信息包括用户信息和设备信息,所述根据所述调用时刻和待验证信息生成信息字符串,包括:
    将所述用户信息、设备信息和调用时刻组合成信息字符串,其中,所述信息字符串中,所述设备信息占用64位,所述用户信息占用11位,调用时刻占用13位。
  8. 根据权利要求6所述的方法,其特征在于,所述待验证信息包括用户信息和设备信息,所述根据所述调用时刻和待验证信息生成信息字符串,包括:
    将所述用户信息、设备信息、调用时刻和随机码组合成信息字符串,其中,所述信息字符串中,所述设备信息占用64位,所述用户信息占用11位,所述调用时刻占用13位,所述随机码占用8位。
  9. 根据权利要求7或8所述的方法,其特征在于,所述设备信息包括处理器信息、硬盘信息、互联网协议地址和物理地址,所述信息字符串中,所述处理器信息占用32位字符,所述硬盘信息占用8位字符,所述互联网协议地址占用12位字符,所述物理地址占用12位字符。
  10. 根据权利要求1-9任一所述的方法,其特征在于,所述将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作,包括:
    将所述待验证信息执行加密操作,得到加密信息;
    将所述加密信息发送至所述验证服务器,指示所述验证服务器对所述加密信息解密之后得到所述待验证信息,并对所述待验证信息执行验证操作。
  11. 根据权利要求1-10任一所述的方法,其特征在于,若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,包括:
    若获取到所述验证服务器发送的验证通过信息,获取预先设置的预设信息;
    若所述验证通过信息与所述预设信息匹配,则执行所述目标函数的调用操作。
  12. 根据权利要求1-11任一所述的方法,其特征在于,所述若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作之后,还包括:
    对所述目标函数执行防反汇编操作。
  13. 根据权利要求1-12任一所述的方法,其特征在于,所述目标函数为DLL函数。
  14. 一种函数调用方法,其特征在于,应用于验证服务器,所述方法包括:
    获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的;
    对所述待验证信息执行验证操作;
    若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
  15. 根据权利要求14所述的方法,其特征在于,所述获取电子设备发送的待验证信息,对所述待验证信息执行验证操作,包括:
    获取所述电子设备发送的调用时刻和待验证信息,其中,所述调用时刻为所述电子设备获取目标函数的调用请求的时刻;
    确定所述调用时刻是否满足指定条件;
    若满足指定条件,则对所述待验证信息执行验证操作。
  16. 根据权利要求15所述的方法,其特征在于,所述确定所述调用时刻是否满足指定条件,包括:
    获取所述调用时刻与当前时刻的时间差;
    若所述时间差小于指定时长,则判定所述调用时刻满足指定条件;
    若所述时间差大于或等于指定时长,则判定所述调用时刻不满足指定条件。
  17. 一种函数调用装置,其特征在于,应用于电子设备,所述装置包括:
    第一获取单元,用于获取目标函数的调用请求;
    第二获取单元,用于获取所述电子设备的待验证信息;
    验证单元,用于将所述待验证信息发送至验证服务器,指示所述验证服务器对所述待验证信息执行验证操作;
    执行单元,用于若获取到所述验证服务器发送的验证通过信息,执行所述目标函数的调用操作,所述验证通过信息为所述验证服务器在所述待验证信息验证通过的情况下发送的。
  18. 一种函数调用装置,其特征在于,应用于验证服务器,所述装置包括:
    获取单元,用于获取电子设备发送的所述电子设备的待验证信息,所述待验证信息为所述电子设备在获取到目标函数的调用请求之后发送的;
    验证单元,用于对所述待验证信息执行验证操作;
    发送单元,用于若所述待验证信息验证通过,发送验证通过信息至所述电子设备,指示所述电子设备执行所述目标函数的调用操作。
  19. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    存储器;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-13任一项所述的方法。
  20. 一种计算机可读介质,其特征在于,所述可读存储介质存储有处理器可执行的程序代码,所述程序代码被所述处理器执行时使所述处理器执行权利要求1-13任一项 所述方法。
PCT/CN2019/118152 2019-11-13 2019-11-13 函数调用方法、装置、电子设备及计算机可读介质 WO2021092809A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980100123.3A CN114402322A (zh) 2019-11-13 2019-11-13 函数调用方法、装置、电子设备及计算机可读介质
PCT/CN2019/118152 WO2021092809A1 (zh) 2019-11-13 2019-11-13 函数调用方法、装置、电子设备及计算机可读介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/118152 WO2021092809A1 (zh) 2019-11-13 2019-11-13 函数调用方法、装置、电子设备及计算机可读介质

Publications (1)

Publication Number Publication Date
WO2021092809A1 true WO2021092809A1 (zh) 2021-05-20

Family

ID=75911582

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118152 WO2021092809A1 (zh) 2019-11-13 2019-11-13 函数调用方法、装置、电子设备及计算机可读介质

Country Status (2)

Country Link
CN (1) CN114402322A (zh)
WO (1) WO2021092809A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319119A (zh) * 2023-05-26 2023-06-23 广东广宇科技发展有限公司 一种伴随式迭代通信验证方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032467B (zh) * 2023-10-08 2024-01-09 成都卓拙科技有限公司 与聊天机器人交互的方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078790A1 (en) * 2009-09-29 2011-03-31 Fazunenko Dmitry A API Signature Verification for High-Security Platforms
CN102347941A (zh) * 2011-06-28 2012-02-08 奇智软件(北京)有限公司 一种基于开放平台的安全应用控制方法
CN102469098A (zh) * 2010-11-11 2012-05-23 财团法人资讯工业策进会 信息安全防护主机
CN103873439A (zh) * 2012-12-11 2014-06-18 联想(北京)有限公司 一种联网的方法及电子设备
CN106372497A (zh) * 2016-08-31 2017-02-01 北京深思数盾科技股份有限公司 一种应用编程接口api 保护方法和保护装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078790A1 (en) * 2009-09-29 2011-03-31 Fazunenko Dmitry A API Signature Verification for High-Security Platforms
CN102469098A (zh) * 2010-11-11 2012-05-23 财团法人资讯工业策进会 信息安全防护主机
CN102347941A (zh) * 2011-06-28 2012-02-08 奇智软件(北京)有限公司 一种基于开放平台的安全应用控制方法
CN103873439A (zh) * 2012-12-11 2014-06-18 联想(北京)有限公司 一种联网的方法及电子设备
CN106372497A (zh) * 2016-08-31 2017-02-01 北京深思数盾科技股份有限公司 一种应用编程接口api 保护方法和保护装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319119A (zh) * 2023-05-26 2023-06-23 广东广宇科技发展有限公司 一种伴随式迭代通信验证方法
CN116319119B (zh) * 2023-05-26 2023-09-26 广东广宇科技发展有限公司 一种伴随式迭代通信验证方法

Also Published As

Publication number Publication date
CN114402322A (zh) 2022-04-26

Similar Documents

Publication Publication Date Title
CN109194625B (zh) 一种基于云端服务器的客户端应用保护方法、装置及存储介质
CN112559993B (zh) 身份认证方法、装置、系统及电子设备
CN107528865B (zh) 文件的下载方法和系统
CN111143869B (zh) 应用程序包处理方法、装置、电子设备及存储介质
US20150286805A1 (en) Method, system, server and terminal for implementing secure transmission of data
US11470060B2 (en) Private exchange of encrypted data over a computer network
CN110011950B (zh) 一种视频流地址的鉴权方法及装置
KR101729960B1 (ko) 신뢰 보안 플랫폼 모듈을 이용한 보안 애플리케이션 인증 및 관리 방법 및 장치
CN107870793B (zh) 一种应用程序中加载so文件的方法及装置
CN111163095B (zh) 网络攻击分析方法、网络攻击分析装置、计算设备和介质
CN112823503B (zh) 一种数据访问方法、数据访问装置及移动终端
CN109873819B (zh) 一种防止非法访问服务器的方法及系统
CN110933109B (zh) 小程序动态认证方法及装置
US11042364B2 (en) One click application asset distribution
US10778452B2 (en) Blockchain ledger authentication
CN113204772B (zh) 数据处理方法、装置、系统、终端、服务器和存储介质
WO2021092809A1 (zh) 函数调用方法、装置、电子设备及计算机可读介质
CN110765470A (zh) 安全键盘实现方法、装置、计算机设备及存储介质
CN110290097B (zh) 数据的处理方法、装置、存储介质和电子装置
CN108235067B (zh) 一种视频流地址的鉴权方法及装置
GB2488753A (en) Encrypted communication
CN111182010B (zh) 一种本地服务提供方法及装置
CN111385258B (zh) 一种数据通信的方法、装置、客户端、服务器和存储介质
TWI546698B (zh) 基於伺服器的登入系統、登入驗證伺服器及其驗證方法
CN111132149A (zh) 5g用户终端的注册方法、用户终端设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19952377

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19952377

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19952377

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19952377

Country of ref document: EP

Kind code of ref document: A1