Information acquisition methods, devices, electronic equipment and storage media

By generating keys using the mini-program SDK for information encryption and decryption, the problem of information leakage in collaborative development between mini-programs and clients is solved, ensuring the security and integrity of data transmission.

CN118869242BActive Publication Date: 2026-07-17BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING BAIDU NETCOM SCI & TECH CO LTD
Filing Date
2024-06-21
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

When developing products in collaboration between mini-programs and client applications, direct data transmission can easily lead to the leakage of user information, making the application vulnerable to external attacks and failing to guarantee the security and integrity of privacy data.

Method used

The key is generated by requesting the verification parameters of the target application through the mini-program SDK, and then used for information encryption and decryption to ensure the security of data transmission.

Benefits of technology

It ensures the security and integrity of information during data transmission, prevents information from being tampered with, and ensures the authenticity and accuracy of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869242B_ABST
    Figure CN118869242B_ABST
Patent Text Reader

Abstract

This disclosure provides an information acquisition method, apparatus, electronic device, and storage medium, relating to the field of data transmission technology. The specific implementation involves: requesting verification parameters from a running target application via a Mini Program Software Development Kit (SDK), and generating a first key based on the requested verification parameters; sending a request for target information to a client via the Mini Program SDK based on the first key; obtaining feedback data sent by the client via the Mini Program SDK, the feedback data including encrypted information and a random number; decrypting the encrypted information based on the random number to obtain the target information of the target application, which is used to execute the Mini Program's functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data transmission technology, and in particular to an information acquisition method, apparatus, electronic device, and storage medium. Background Technology

[0002] When a front-end mini-program collaborates with a client application to develop a product, it needs to obtain some private data about the application's current operation from the client to ensure the mini-program functions properly. However, direct data transmission can easily lead to the leakage of user information and make the application vulnerable to external attacks. Summary of the Invention

[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for information acquisition.

[0004] According to one aspect of this disclosure, an information acquisition method is provided, comprising: requesting verification parameters of a running target application through a mini-program software development kit (SDK), and generating a first key based on the requested verification parameters; sending a request for target information to a client through the mini-program SDK based on the first key; acquiring feedback data sent by the client through the mini-program SDK, the feedback data including encrypted information and a random number; and decrypting the encrypted information according to the random number to obtain target information of the target application, the target information being used for executing the mini-program's functions.

[0005] According to one aspect of this disclosure, another information acquisition method is provided, comprising: receiving a request for verification parameters sent by a front-end through a mini-program SDK, and sending the verification parameters to the front-end through the mini-program SDK; receiving request information sent by the front-end based on a first key through the mini-program SDK, the request information being used to request target information of the target application; generating a random number, and encrypting the target information based on the random number to obtain encrypted information; and sending feedback data to the front-end through the mini-program SDK, the feedback data including the encrypted information and the random number.

[0006] According to another aspect of this disclosure, an information acquisition device is provided, comprising: a generation module, configured to request verification parameters of a running target application via a mini-program software development kit (SDK), and generate a first key based on the requested verification parameters; a sending module, configured to send a request for target information to a client via the mini-program SDK based on the first key; a receiving module, configured to obtain feedback data sent by the client via the mini-program SDK, the feedback data including encrypted information and a random number; and a decryption module, configured to decrypt the encrypted information according to the random number to obtain target information of the target application, the target information being used for executing the mini-program's functions.

[0007] According to another aspect of this disclosure, an information acquisition device is provided, comprising: a first sending module, configured to receive a request for verification parameters sent by a front-end via a mini-program SDK, and to send the verification parameters to the front-end via the mini-program SDK; a receiving module, configured to receive request information sent by the front-end based on a first key via the mini-program SDK, the request information being used to request target information of the target application; an encryption module, configured to generate a random number, and to encrypt the target information based on the random number to obtain encrypted information; and a second sending module, configured to send feedback data to the front-end via the mini-program SDK, the feedback data including the encrypted information and the random number.

[0008] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the information acquisition method described in one aspect of the above embodiment.

[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided that stores computer instructions thereon, wherein the computer instructions are used to cause the computer to perform the information acquisition method described in the above-mentioned embodiment.

[0010] According to another aspect of this disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the information acquisition method described in one aspect of the embodiments above.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0013] Figure 1 A flowchart illustrating an information acquisition method provided in an embodiment of this disclosure;

[0014] Figure 2 A flowchart illustrating another information acquisition method provided in this embodiment of the disclosure;

[0015] Figure 3 A flowchart illustrating another information acquisition method provided in this embodiment of the disclosure;

[0016] Figure 4 A flowchart illustrating another information acquisition method provided in this embodiment of the disclosure;

[0017] Figure 5 This is a schematic diagram of the process for obtaining target information provided in an embodiment of this disclosure;

[0018] Figure 6 An interactive schematic diagram of an information acquisition method provided in an embodiment of this disclosure;

[0019] Figure 7 This is an interactive schematic diagram of obtaining target information provided in an embodiment of the present disclosure;

[0020] Figure 8 This is a schematic diagram of the structure of an information acquisition device provided in an embodiment of the present disclosure;

[0021] Figure 9 This is a schematic diagram of another information acquisition device provided in an embodiment of the present disclosure;

[0022] Figure 10 This is a block diagram of an electronic device used to implement the information acquisition method of the embodiments of this disclosure. Detailed Implementation

[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0024] The information acquisition method, apparatus, electronic device, and storage medium of this disclosure are described below with reference to the accompanying drawings.

[0025] Front-end refers to the software portion that users directly interact with. It is primarily responsible for receiving user input, displaying data and interface elements, and handling basic user interaction logic. Front-end includes: user interface, user experience, interaction logic, and data display.

[0026] A client is a software program or device that can communicate with a server and receive its services. Clients can be diverse, including desktop applications, mobile applications, web browsers, command-line tools, and more.

[0027] Figure 1 This is a flowchart illustrating an information acquisition method provided in an embodiment of the present disclosure.

[0028] like Figure 1 As shown, this information acquisition method may include:

[0029] S101, requests the verification parameters of the running target application through the Mini Program Software Development Kit (SDK), and generates the first key based on the requested verification parameters.

[0030] It should be noted that the execution entity of the information acquisition method in this embodiment can be a hardware device with data processing capabilities and / or the necessary software to drive the hardware device. Optionally, the execution entity may include a user terminal and other smart devices. Optionally, the user terminal includes, but is not limited to, mobile phones, computers, smart voice interaction devices, etc. This embodiment does not impose specific limitations.

[0031] In some implementations, the front end can use the Software Development Kit (SDK) to send a request for verification parameters to the client of the running target application in order to obtain the verification parameters of the target application.

[0032] Optionally, the front end can receive a list of parameters for the target application sent by the client and determine the validation parameters from the list of parameters.

[0033] Furthermore, the front-end can generate a random number according to the set rules based on the verification parameters of the request, and encrypt the random number using an encryption algorithm to obtain the first key. Optionally, multiple encryption algorithms can be performed to obtain the first key.

[0034] For example, assuming the verification parameters are key1, key2, and key3, the first three characters of key1 and the last three characters of key2 can be used as random numbers. These random numbers are then concatenated with a fixed string, and the concatenated string is encrypted using Message-Digest Algorithm 5 (MD5). Further, an 8-bit message key is selected from the encrypted data, and this message key is also encrypted using MD5 to obtain the first key.

[0035] S102, send a request for target information to the client based on the first key through the mini-program SDK.

[0036] In some implementations, the frontend can request target information of the target application from the client based on the first key. This target information can be the target application's private data, such as user information or location information. Optionally, the frontend can encrypt the requested information based on the first key and send it to the client via the mini-program SDK.

[0037] S103 obtains feedback data sent by the client through the mini-program SDK. The feedback data includes encrypted information and random numbers.

[0038] In some implementations, after the frontend sends a request to the client, the client can verify the frontend's identity. After successful verification, the client encrypts the target information using a random number and sends the encrypted information and the random number back to the frontend as feedback data. The frontend receives the feedback data sent by the client through the mini-program SDK and can obtain the encrypted information and the random number.

[0039] S104. Based on the random number, the encrypted information is decrypted to obtain the target information of the target application. The target information is used to execute the functions of the mini-program.

[0040] Understandably, the client uses a random number to encrypt a key and then uses that key to encrypt the target information. Once the front-end obtains the random number, it uses the same encryption method as the client to determine the encryption key and then uses that key to decrypt the encrypted information. This allows it to obtain the target information of the target application and then use that information to execute the mini-program's functions.

[0041] According to the information acquisition method provided in this disclosure, by acquiring the verification parameters of the target application and determining a first key based on the verification parameters, the first key is then used to request target information of the target application from the client. The front-end receives feedback data from the client, acquires encrypted information and a random number, and decrypts the encrypted information using the random number to obtain the target information of the target application. Encryption during data interaction between the front-end and the client ensures the security of the target application's private data and avoids potential security threats. Encryption of information ensures that it is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data.

[0042] Figure 2 This is a flowchart illustrating an information acquisition method provided in an embodiment of the present disclosure.

[0043] like Figure 2 As shown, this information acquisition method may include:

[0044] S201, request the verification parameters of the running target application through the Mini Program Software Development Kit (SDK), and generate the first key based on the requested verification parameters.

[0045] In some implementations, before the front-end requests the verification parameters of the target application through the mini-program SDK, it can receive the mini-program's startup command and load the mini-program on the front-end based on the startup command. This allows the front-end to determine the target information of the target application that needs to be obtained based on the usage requirements of the mini-program.

[0046] Optionally, the front-end can listen to the user's operations on the client and obtain the user's target operation. If the user's target operation indicates to launch the mini-program, the front-end can receive the launch command of the mini-program and then load the mini-program on the front-end.

[0047] S202, a request message for sending target information to the client based on the first key via the mini-program SDK.

[0048] S203 obtains feedback data sent by the client through the mini-program SDK. The feedback data includes encrypted information and random numbers.

[0049] The details of steps S201-S203 can be found in the above embodiments and will not be repeated here.

[0050] S204. Generate a corresponding second key based on the random number, and decrypt the encrypted information based on the second key to obtain the target information of the target application.

[0051] In some implementations, after receiving feedback data from the client, the frontend can parse the feedback data and perform random number reconstruction from the parsing result to obtain a random number. This random number is then used to encrypt the target information. By parsing the feedback data and reconstructing the random number, the target information can be easily decrypted, ensuring the confidentiality and security of the data.

[0052] Optionally, the random number includes at least two random numbers, each of which corresponds to a second key, to increase the difficulty of encryption and prevent information leakage.

[0053] In some implementations, the front-end can generate a second key from random numbers according to predefined rules, and then use this second key to decrypt encrypted information to obtain the target information of the target application. The rules for generating the second key from random numbers are the same for both the front-end and the client. Using the same rules reduces the complexity of key management, thereby avoiding the possibility of errors during encryption and decryption.

[0054] Optionally, a first candidate key is obtained by acquiring the target field and the first string, and concatenating the random number, the target field, and the first string. Then, the first candidate key is encrypted and its high-order bits are truncated to obtain a truncated information segment. This truncated information segment is then concatenated with the second string to obtain a second candidate key. Finally, the second candidate key is encrypted and its high-order bits are truncated to obtain the key corresponding to the random number.

[0055] Optionally, a second key is obtained based on the key corresponding to each random number. That is, for any random number, the second key corresponding to that random number can be obtained by using the encryption method described above.

[0056] For example, using the Advanced Encryption Standard (AES) cipher block chaining (CBC) algorithm, two random numbers, Key0 and Vi0, are randomly generated. The target field is obtained from the common fields of the front end and the client. The fixed string sdg4tsag is used as the first string.

[0057] For Key0, concatenate Key0 with the target field and the first string to obtain the first candidate key (Key1). Then, after MD5 encryption of Key1, extract the high-order bits, for example, the first 5 bits. Then, use the fixed string blnaodfw as the second string and concatenate it with the extracted information segment to obtain the second candidate key (Key2). After MD5 encryption of Key2, extract the high-order bits to finally obtain the second key Key corresponding to Key0.

[0058] S205, Send target information to the mini-program.

[0059] S206, receive the loading completion indication sent by the mini program, and send the execution instruction to the mini program.

[0060] In some implementations, after the front-end obtains the target information of the target application, it can send the target information to the mini-program through the mini-program SDK, so that the mini-program can load data according to the target information and send a loading completion indication to the front-end after the loading is completed.

[0061] Optionally, the front end can receive the loading completion indication from the mini program to determine that the mini program has completed loading according to the target information, and then send execution instructions to the mini program so that the mini program can perform various functions according to the instructions and feed back the execution results to the front end.

[0062] According to the information acquisition method provided in this disclosure, by acquiring the verification parameters of the target application and determining a first key based on the verification parameters, the first key is then used to request target information of the target application from the client. The front-end receives feedback data from the client, acquires encrypted information and a random number, determines a second key based on the random number, and uses the second key to decrypt the encrypted information to obtain the target information of the target application, thus ensuring the security of the target information and avoiding potential security threats. Encrypting the information ensures that it is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data. After acquiring the target information, it is sent to the mini-program, enabling the mini-program to immediately obtain the target information of the target application, ensuring the real-time and synchronous nature of information transmission.

[0063] Figure 3 This is a flowchart illustrating an information acquisition method provided in an embodiment of the present disclosure.

[0064] like Figure 3 As shown, this information acquisition method may include:

[0065] S301 receives a request for verification parameters sent by the front end through the mini-program SDK, and sends the verification parameters to the front end through the mini-program SDK.

[0066] It should be noted that the execution entity of the information acquisition method in this embodiment can be a hardware device with data processing capabilities and / or the necessary software to drive the hardware device. Optionally, the execution entity may include a user terminal and other smart devices. Optionally, the user terminal includes, but is not limited to, mobile phones, computers, smart voice interaction devices, etc. This embodiment does not impose specific limitations.

[0067] In some implementations, the client of the target application can initialize the parameters of the target application when the target application starts, obtain a parameter list, and store it in memory. After receiving a request from the frontend to validate the parameters through the mini-program SDK, the parameter list can be sent to the frontend through the mini-program SDK.

[0068] S302, receive request information sent by the front end based on the first key through the mini-program SDK. The request information is used to request target information of the target application.

[0069] Optionally, the client can receive request information from the front end, determine the target information of the target application requested by the front end based on the request information, and then send the target information to the front end.

[0070] In some implementations, to ensure the identity of the front-end and prevent information leakage, the client can first verify the mini-program based on its identity information. After successful verification, the client can then verify the security of the requested information. By verifying both identity and security, the client can ensure the security of the information and prevent third parties from stealing it.

[0071] Optionally, the identification information of the mini-program can be obtained based on the request information, and identity verification can be performed based on the identification information. Further, after the mini-program passes identity verification, the timestamp and first key of the request information are obtained, and security verification of the request information is performed based on the timestamp and first key.

[0072] In other words, after security verification and authentication are passed, the information retrieval code is determined based on the request information, and the target information of the target application is obtained according to the information retrieval code.

[0073] S303, generate a random number, and encrypt the target information based on the random number to obtain encrypted information.

[0074] In some implementations, once the client has verified the identity and security of the front-end mini-program, it can randomly generate multiple random numbers. Then, based on these random numbers and following predefined rules, a second key corresponding to each random number is determined. This second key is then used to encrypt the target information, yielding the encrypted information. The rules for generating the second key based on the random numbers are identical for both the front-end and the client.

[0075] Alternatively, a symmetric encryption algorithm can be used to encrypt the target information based on a second key to obtain encrypted information.

[0076] S304 sends feedback data to the front end through the mini-program SDK. The feedback data includes encrypted information and random numbers.

[0077] In some implementations, after receiving encrypted information, the client sends the encrypted information and a random number as feedback data to the front end. This allows the front end to decrypt the encrypted information based on the random number to obtain the target information. By sending the random number to the front end, the target information can only be obtained when the front end uses the same rules to obtain the second key corresponding to the random number, thus preventing the leakage of the target information.

[0078] According to the information acquisition method provided in this disclosure, by receiving a parameter request from the front end, the verification parameters of the target application are sent to the front end, and then the request information sent by the front end is received. The front end mini-program is then subjected to dual verification based on the request information to ensure data security. Furthermore, the target information requested by the front end is determined based on the request information, and the target information is encrypted using a random number to obtain encrypted information. This encrypted information and the random number are then sent to the front end as feedback data, effectively ensuring security during information transmission and avoiding potential security threats. By encrypting the information, it is ensured that the information is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data.

[0079] Figure 4 This is a flowchart illustrating an information acquisition method provided in an embodiment of the present disclosure.

[0080] like Figure 4 As shown, this information acquisition method may include:

[0081] S401 receives a request for verification parameters sent by the front end through the mini-program SDK, and sends the verification parameters to the front end through the mini-program SDK.

[0082] S402, receive request information sent by the front end based on the first key through the mini-program SDK. The request information is used to request target information of the target application.

[0083] The details of steps S401-S402 can be found in the above embodiments and will not be repeated here.

[0084] S403, generate a random number, generate a corresponding second key based on the random number, and encrypt the target information based on the second key to obtain encrypted information.

[0085] Optionally, the random number includes at least two random numbers, each of which corresponds to a second key, to increase the difficulty of encryption and prevent information leakage.

[0086] In some implementations, the client can generate a second key from random numbers according to predefined rules, and then use this second key to encrypt the target information to obtain the encrypted information. The rules for generating the second key are the same for both the front-end and the client. Using the same rules reduces the complexity of key management, thereby avoiding the possibility of errors during encryption and decryption.

[0087] Optionally, a first candidate key is obtained by acquiring the target field and the first string, and concatenating the random number, the target field, and the first string. Then, the first candidate key is encrypted and its high-order bits are truncated to obtain a truncated information segment. This truncated information segment is then concatenated with the second string to obtain a second candidate key. Finally, the second candidate key is encrypted and its high-order bits are truncated to obtain the key corresponding to the random number.

[0088] Optionally, a second key is obtained based on the key corresponding to each random number. That is, for any random number, the second key corresponding to that random number can be obtained by using the encryption method described above.

[0089] For example, using AES-CBC, two random numbers, Key0 and Vi0, are randomly generated, and a field shared by the front-end and client is obtained as the target field. The fixed string sdg4tsag is used as the first string.

[0090] For Vi0, concatenate Vi0 with the target field and the first string to obtain the first candidate key (key 1). After MD5 encryption of key 1, extract the high-order bits, for example, the first 5 bits. Then, use the fixed string blnaodfw as the second string and concatenate it with the extracted information segment to obtain the second candidate key (key 2). After MD5 encryption of key 2, extract the high-order bits to finally obtain the second key Vi corresponding to Vi0.

[0091] S404 sends feedback data to the front end through the mini-program SDK. The feedback data includes encrypted information and random numbers.

[0092] The details of step S404 can be found in the above embodiments and will not be repeated here.

[0093] According to the information acquisition method provided in this disclosure, by receiving a parameter request from the front end, the verification parameters of the target application are sent to the front end, and then the request information sent by the front end is received. The front end mini-program is then subjected to dual verification based on the request information to ensure data security. Furthermore, the target information requested by the front end is determined based on the request information, and multiple random numbers are generated. A second encryption key is determined based on the random numbers, and the target information is encrypted using the second key to obtain encrypted information. The encrypted information and the random numbers are then sent to the front end as feedback data. This effectively ensures security during information transmission and avoids potential security threats. By encrypting the information, it is ensured that the information is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data.

[0094] like Figure 5 The diagram illustrates the process of obtaining target information. The target application's client initializes parameters to determine a parameter list. The frontend requests the client's verification parameters via the mini-program SDK and generates a first key based on certain rules. The frontend sends a request for target information to the client based on the first key. The client verifies the identity and security of the frontend mini-program based on the request information. After successful verification, the client determines the information retrieval code based on the request information and obtains the target information of the target application according to the information retrieval code. Further, the client generates a random number and determines a second key corresponding to the random number according to set rules. The client then uses the second key to encrypt the target information, obtaining encrypted information. Finally, the client sends the encrypted information and the random number as feedback data to the frontend. The frontend reconstructs the second key based on the random number and decrypts the encrypted information to obtain the target information.

[0095] Figure 6 This is an interactive schematic diagram of an information acquisition method provided in an embodiment of the present disclosure.

[0096] like Figure 6 As shown, this information acquisition method may include:

[0097] S601: The front-end requests verification parameters of the target application that is running on the client through the mini-program SDK.

[0098] S602, the client sends verification parameters to the front end through the mini-program SDK.

[0099] S603, the front end generates the first key based on the verification parameters of the request.

[0100] S604, the front end sends a request for target information to the client based on the first key through the mini-program SDK.

[0101] S605: The client generates a random number and encrypts the target information based on the random number to obtain encrypted information.

[0102] S606: The client sends the random number and encrypted information to the front end via the mini-program SDK.

[0103] S607: The front end decrypts the encrypted information based on a random number to obtain the target information of the target application.

[0104] According to the information acquisition method provided in this disclosure, by acquiring the verification parameters of the target application and determining a first key based on the verification parameters, the first key is then used to request target information of the target application from the client. The front-end receives feedback data from the client, acquires encrypted information and a random number, and decrypts the encrypted information using the random number to obtain the target information of the target application. Encryption during data interaction between the front-end and the client ensures the security of the target application's private data and avoids potential security threats. Encryption of information ensures that it is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data.

[0105] like Figure 7 The diagram shows an interactive process for obtaining target information. Figure 7 This includes the user side, the front-end side, the mini-program SDK side, and the client application (APP) side.

[0106] The user launches the client app, which initializes the parameters and obtains a parameter list. The user then opens a mini-program on the front end. The front end requests verification parameters from the client app via the mini-program SDK. The client returns the parameter list to the front end via the mini-program SDK, and the front end determines the verification parameters based on this list. Further, the front end generates a first key (Key) based on the verification parameters and uses this key to request the target information from the client app via the mini-program SDK. The client can perform security verification on the Key and identity verification on the mini-program's identification information. After successful verification, the client executes the request content to determine the target information. A random number is then generated, and a second key is used to encrypt the target information, resulting in encrypted information. This encrypted information and the random number are sent back to the front end via the mini-program SDK as feedback data. The front end parses the feedback data to reconstruct the random number and uses it to generate a second key to decrypt the encrypted information, obtaining the target information. The mini-program can then load the target information and execute the corresponding functions.

[0107] Corresponding to the information acquisition methods provided in the above embodiments, an embodiment of this disclosure also provides an information acquisition device. Since the information acquisition device provided in this disclosure corresponds to the information acquisition methods provided in the above embodiments, the implementation methods of the above information acquisition methods are also applicable to the information acquisition device provided in this disclosure, and will not be described in detail in the following embodiments.

[0108] Figure 8 This is a schematic diagram of the structure of an information acquisition device provided in an embodiment of this disclosure.

[0109] like Figure 8 As shown, the information acquisition device 800 of this embodiment includes a generation module 801, a sending module 802, a receiving module 803, and a decryption module 804.

[0110] The generation module 801 is used to request the verification parameters of the running target application through the Mini Program Software Development Kit (SDK), and generate a first key based on the requested verification parameters.

[0111] Sending module 802 is used to send a request for target information to the client based on the first key through the mini-program SDK;

[0112] The receiving module 803 is used to obtain feedback data sent by the client through the mini-program SDK, the feedback data including encrypted information and random numbers;

[0113] The decryption module 804 is used to decrypt the encrypted information based on the random number to obtain the target information of the target application, and the target information is used for the function of executing the applet.

[0114] In one embodiment of this disclosure, the decryption module 804 is further configured to: generate a corresponding second key based on the random number, and decrypt the encrypted information based on the second key to obtain the target information of the target application.

[0115] In one embodiment of this disclosure, the decryption module 804 is further configured to: parse the feedback data, perform random number restoration from the parsing result, and obtain the random number.

[0116] In one embodiment of this disclosure, the decryption module 804 is further configured to: obtain a target field and a first string; concatenate the random number, the target field, and the first string to obtain a first candidate key; encrypt and truncate the first candidate key to obtain a truncated information segment, and concatenate the truncated information segment with the second string to obtain a second candidate key; encrypt and truncate the second candidate key to obtain a key corresponding to the random number; and obtain the second key based on the key corresponding to each random number.

[0117] In one embodiment of this disclosure, the random number includes at least two random numbers, each of which corresponds to the second key.

[0118] In one embodiment of this disclosure, the decryption module 804 is further configured to: send the target information to the mini-program; receive a loading completion indication sent by the mini-program; and send an execution instruction to the mini-program.

[0119] In one embodiment of this disclosure, the decryption module 804 is further configured to: receive the startup instruction of the mini-program, and load the mini-program on the front end based on the startup instruction.

[0120] According to the information acquisition apparatus provided in this disclosure, by acquiring the verification parameters of the target application and determining a first key based on the verification parameters, the first key is then used to request target information of the target application from the client. The front end receives feedback data from the client, acquires encrypted information and a random number, and decrypts the encrypted information using the random number to obtain the target information of the target application. Encryption during data interaction between the front end and the client ensures the security of the target application's private data and avoids potential security threats. Encryption of information ensures that the information is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data.

[0121] Figure 9 This is a schematic diagram of the structure of an information acquisition device provided in an embodiment of this disclosure.

[0122] like Figure 9 As shown, the information acquisition device 900 of this embodiment includes a first sending module 901, a receiving module 902, an encryption module 903, and a second sending module 904.

[0123] The first sending module 901 is used to receive a request for verification parameters sent by the front end through the mini-program SDK, and send the verification parameters to the front end through the mini-program SDK.

[0124] The receiving module 902 is used to receive request information sent by the front end based on the first key through the mini-program SDK, wherein the request information is used to request target information of the target application;

[0125] The encryption module 903 is used to generate random numbers and encrypt the target information based on the random numbers to obtain encrypted information;

[0126] The second sending module 904 is used to send feedback data to the front end through the mini-program SDK. The feedback data includes the encrypted information and the random number.

[0127] In one embodiment of this disclosure, the encryption module 903 is further configured to: obtain the timestamp of the request information and the first key, and perform security verification on the request information based on the timestamp and the first key.

[0128] In one embodiment of this disclosure, the encryption module 903 is further configured to: obtain the identification information of the mini-program based on the request information, and perform identity verification based on the identification information.

[0129] In one embodiment of this disclosure, the encryption module 903 is further configured to: after the security verification and the authentication are passed, determine an information acquisition code based on the request information, and obtain the target information of the target application according to the information acquisition code.

[0130] In one embodiment of this disclosure, the encryption module 903 is further configured to: generate a corresponding second key based on the random number, and encrypt the target information based on the second key to obtain the encrypted information.

[0131] In one embodiment of this disclosure, the encryption module 903 is further configured to: obtain a target field and a first string; concatenate the random number, the target field, and the first string to obtain a first candidate key; encrypt and truncate the first candidate key to obtain a truncated information segment, and concatenate the truncated information segment with the second string to obtain a second candidate key; encrypt and truncate the second candidate key to obtain a key corresponding to the random number; and obtain the second key based on the key corresponding to each random number.

[0132] In one embodiment of this disclosure, the random number includes at least two random numbers, each of which corresponds to the second key.

[0133] According to the information acquisition device provided in this disclosure, by receiving parameter requests from the front end, the device sends the verification parameters of the target application to the front end, and then receives the request information sent by the front end. Based on the request information, the device performs dual verification on the front end's mini-program to ensure data security. Furthermore, based on the request information, the device determines the target information requested by the front end, generates multiple random numbers, determines a second encryption key based on the random numbers, and uses the second key to encrypt the target information, obtaining encrypted information. The encrypted information and the random numbers are then sent to the front end as feedback data. This effectively ensures security during information transmission and avoids potential security threats. By encrypting the information, it ensures that the information is not tampered with during transmission, thereby maintaining the authenticity and accuracy of the data.

[0134] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0135] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0136] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0137] like Figure 10 As shown, device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to computer programs / instructions stored in read-only memory (ROM) 1002 or loaded from storage unit 1006 into random access memory (RAM) 1003. RAM 1003 may also store various programs and data required for the operation of device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0138] Multiple components in device 1000 are connected to I / O interface 1005, including: input units 1006 such as keyboard, mouse, etc.; output units 1007 such as various types of displays, speakers, etc.; storage units 1008 such as disks, optical discs, etc.; and communication units 1009 such as network cards, modems, wireless transceivers, etc. Communication unit 1009 allows device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0139] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as information acquisition methods. For example, in some embodiments, the information acquisition method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1006. In some embodiments, part or all of the computer program / instructions may be loaded and / or installed on device 1000 via ROM 1002 and / or communication unit 1009. When the computer program / instructions are loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the information acquisition method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform an information acquisition method by any other suitable means (e.g., by means of firmware).

[0140] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: implementations in one or more computer programs / instructions that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0141] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0142] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0144] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0145] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. The client-server relationship is created by computer programs / instructions running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0146] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in the disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this document does not impose any restrictions.

[0147] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An information acquisition method, wherein, Executed by the front end, the method includes: The system requests verification parameters from the running target application using the Mini Program Software Development Kit (SDK) and generates a first key based on the requested verification parameters. The mini-program SDK sends a request to the client with target information based on the first key. The feedback data sent by the client is obtained through the mini-program SDK, and the feedback data includes encrypted information and random numbers; The random number, the target field, and the first string are concatenated to obtain a first candidate key. The first candidate key is encrypted and its high-order bits are truncated to obtain a truncated information segment. The truncated information segment and the second string are concatenated to obtain a second candidate key. The second candidate key is encrypted and its high-order bits are truncated to obtain the key corresponding to the random number. A second key is generated based on the key corresponding to the random number. The encrypted information is then decrypted based on the second key to obtain the target information of the target application. The target information is used to execute the functions of the mini-program.

2. The method according to claim 1, wherein, Before decrypting the encrypted information based on the random number to obtain the target information of the target application, the method further includes: The feedback data is parsed, and a random number is obtained by restoring the random number from the parsing result.

3. The method according to claim 1, wherein, The random number includes at least two random numbers, and each of the at least two random numbers corresponds to the second key.

4. The method according to any one of claims 1-3, wherein, After obtaining the target information of the target application, the process further includes: Send the target information to the mini-program; Receive the loading completion indication sent by the mini-program and send an execution instruction to the mini-program.

5. The method according to any one of claims 1-3, wherein, Before requesting the verification parameters of the running target application through the mini-program SDK, the process also includes: Receive the launch command of the mini-program, and load the mini-program on the front end based on the launch command.

6. An information acquisition method, wherein, The method, executed by a client of the target application, includes: The system receives a request for verification parameters sent by the front end through the mini-program SDK, and sends the verification parameters to the front end through the mini-program SDK. The mini-program SDK receives request information sent by the front end based on the first key, and the request information is used to request target information of the target application. A random number is generated, and the random number, the target field, and the first string are concatenated to obtain a first candidate key. The first candidate key is encrypted and the high-order bits are truncated to obtain a truncated information segment. The truncated information segment and the second string are concatenated to obtain a second candidate key. The second candidate key is encrypted and the high-order bits are truncated to obtain the key corresponding to the random number. Based on the key corresponding to the random number, a second key is generated, and the target information is encrypted based on the second key to obtain encrypted information; Feedback data is sent to the front end through the mini-program SDK. The feedback data includes the encrypted information and the random number.

7. The method according to claim 6, wherein, Before generating random numbers, the process also includes: Obtain the timestamp of the request information and the first key, and perform security verification on the request information based on the timestamp and the first key.

8. The method according to claim 7, wherein, Before obtaining the timestamp and the first key of the request information, the method further includes: Based on the request information, obtain the identification information of the mini-program, and perform identity verification based on the identification information.

9. The method according to claim 8, wherein, The method further includes: After the security verification and authentication are passed, an information acquisition code is determined based on the request information, and the target information of the target application is obtained according to the information acquisition code.

10. The method according to any one of claims 6-9, wherein, The random number includes at least two random numbers, and each of the at least two random numbers corresponds to the second key.

11. An information acquisition device, wherein, Suitable for the front end, the device includes: The generation module is used to request verification parameters from the running target application through the Mini Program Software Development Kit (SDK) and generate a first key based on the requested verification parameters. The sending module is used to send a request for target information to the client based on the first key through the mini-program SDK; The receiving module is used to obtain feedback data sent by the client through the mini-program SDK, the feedback data including encrypted information and random numbers; The decryption module is used to concatenate the random number, the target field, and the first string to obtain a first candidate key; encrypt the first candidate key and truncate its high-order bits to obtain a truncated information segment; concatenate the truncated information segment with the second string to obtain a second candidate key; encrypt the second candidate key and truncate its high-order bits to obtain the key corresponding to the random number; generate a second key based on the key corresponding to the random number; and decrypt the encrypted information based on the second key to obtain the target information of the target application. The target information is used to execute the functions of the mini-program.

12. The apparatus according to claim 11, wherein, The decryption module is also used for: The feedback data is parsed, and a random number is obtained by restoring the random number from the parsing result.

13. The apparatus according to claim 11, wherein, The random number includes at least two random numbers, and each of the at least two random numbers corresponds to the second key.

14. The apparatus according to any one of claims 11-13, wherein, The decryption module is also used for: Send the target information to the mini-program; Receive the loading completion indication sent by the mini-program and send an execution instruction to the mini-program.

15. The apparatus according to any one of claims 11-13, wherein, The decryption module is also used for: Receive the launch command of the mini-program, and load the mini-program on the front end based on the launch command.

16. An information acquisition device, wherein, A client for a target application, the device comprising: The first sending module is used to receive a request for verification parameters sent by the front end through the mini-program SDK, and to send the verification parameters to the front end through the mini-program SDK. The receiving module is used to receive request information sent by the front end based on the first key through the mini-program SDK, the request information being used to request target information of the target application; An encryption module is used to generate a random number, concatenate the random number, the target field, and a first string to obtain a first candidate key, encrypt the first candidate key and truncate the high-order bits to obtain a truncated information segment, concatenate the truncated information segment and the second string to obtain a second candidate key, encrypt the second candidate key and truncate the high-order bits to obtain the key corresponding to the random number, generate a second key based on the key corresponding to the random number, and encrypt the target information based on the second key to obtain encrypted information. The second sending module is used to send feedback data to the front end through the mini-program SDK. The feedback data includes the encrypted information and the random number.

17. The apparatus according to claim 16, wherein, The encryption module is also used for: Obtain the timestamp of the request information and the first key, and perform security verification on the request information based on the timestamp and the first key.

18. The apparatus according to claim 17, wherein, The encryption module is also used for: Based on the request information, obtain the identification information of the mini-program, and perform identity verification based on the identification information.

19. The apparatus according to claim 18, wherein, The encryption module is also used for: After the security verification and authentication are passed, an information acquisition code is determined based on the request information, and the target information of the target application is obtained according to the information acquisition code.

20. The apparatus according to any one of claims 16-19, wherein, The random number includes at least two random numbers, and each of the at least two random numbers corresponds to the second key.

21. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.

23. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method of any one of claims 1-10.