Data interaction method, device, equipment and storage medium
By obtaining the target interface parameters based on the user's identity identification and updating the communication framework, determining the target SDK data packets is solved, and the H5 and native communication framework configuration is realized, and the development cost and cycle are reduced.
Patent Information
- Application Number
- CN202011290470.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-11-17
AI Technical Summary
The configuration of the H5 and native communication framework corresponding to the existing channels is large, resulting in high development and communication costs and long development cycles.
When receiving the data access request, the target interface parameters are obtained according to the user's identity, and the current communication framework is updated to obtain the target communication framework, and the target SDK data packet is determined according to the target communication framework, and the target page is displayed in response to the data access request.
The automated configuration of the H5 and native communication framework has been realized, reducing the development workload of channel vendors on the mobile side, reducing the development and communication costs, and shortening the development cycle.
Smart Images

Figure CN112394916B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data interaction method, device, equipment and storage medium. Background Art
[0002] The display and sales of online products on the mobile side (i.e. native side, mobile phone side) are mostly presented to users through H5 pages. The advantages of using H5 are: a set of H5 page codes can be displayed on multiple channels at the same time, and the modification of H5 pages is also real-time. It only needs to be published on the server side, and there is no need to modify and publish it on the mobile side to the software store.
[0003] The display and sales of online products are realized through H5 pages. However, H5 cannot meet all functions. For example, H5 cannot meet special functions such as OCR recognition and AI face-to-face signature. Special functions require support from native hardware, that is, special functions need to take into account the communication method between the native and H5. Channel developers generally develop a communication framework between H5 and the native side, but if the product is released on different channels and communication frameworks, a lot of adaptation work needs to be done on the communication framework between H5 and the native side, that is, the configuration workload of the H5 and native communication framework corresponding to the channel is large.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a data interaction method, device, equipment and storage medium, aiming to solve the technical problem of large configuration workload of H5 and native communication framework corresponding to existing channels.
[0006] To achieve the above object, the present invention provides a data interaction method, which comprises the following steps:
[0007] Upon receiving a data access request, determining a user identity according to the data access request;
[0008] Acquire corresponding target interface parameters according to the user identity identifier;
[0009] Update the current communication frame according to the target interface parameters to obtain the target communication frame;
[0010] Determine a target SDK data packet according to the target communication framework;
[0011] The data access request is responded to through the target SDK data packet, and the target page corresponding to the data access request is sent to the requesting terminal for display.
[0012] Optionally, before the step of determining the user identity according to the data access request when the data access request is received, the step further includes:
[0013] Acquire a preset communication framework and the interaction logic between each communication framework system layer in the preset communication framework;
[0014] Encapsulating the interaction logic according to a preset encapsulation rule to obtain a number of interface parameters;
[0015] Encoding the interface parameters to obtain user identities corresponding to the interface parameters, wherein the user identities are stored in the blockchain;
[0016] Establishing a mapping relationship between the user identity and the corresponding interface parameters;
[0017] The step of acquiring corresponding target interface parameters according to the user identity identifier comprises:
[0018] Based on the mapping relationship, corresponding target interface parameters are obtained according to the user identity.
[0019] Optionally, before the step of determining the target SDK data packet according to the target communication framework, the step further includes:
[0020] Acquire target page display parameters according to the user identity identifier;
[0021] The step of determining the target SDK data packet according to the target communication framework includes:
[0022] The target SDK data packet is determined according to the target page display parameters and the target communication framework.
[0023] Optionally, the target page display parameters include: page frame display parameters;
[0024] The step of acquiring target page display parameters according to the user identity identifier comprises:
[0025] Determine the corresponding access service type according to the user identity identifier;
[0026] Acquire target webpage content information according to the access service type, and construct a page frame template according to the target webpage content information;
[0027] The page frame templates are combined to generate page frame display parameters.
[0028] Optionally, the target page display parameters include: function extension display parameters;
[0029] The step of acquiring target page display parameters according to the user identity identifier comprises:
[0030] Acquire function extension information according to the user identity identifier, and acquire code information of the function to be extended according to the function extension information;
[0031] Converting the code information into a data packet in a preset file format, and writing the data packet into the calling interface parameters to obtain updated calling interface parameters;
[0032] The updated calling interface parameters are used as function extension display parameters.
[0033] Optionally, the target page display parameters include: identity recognition parameters;
[0034] The step of acquiring target page display parameters according to the user identity identifier comprises:
[0035] Acquire identity information according to the user identity identifier, and acquire corresponding API interface information according to the identity information;
[0036] Using the API interface information as an identity identification parameter;
[0037] The step of determining the target SDK data packet according to the target page display parameters and the target communication framework includes:
[0038] Obtaining interface information of the target communication framework;
[0039] Adjust the interface information according to the API interface information to obtain unified interface information;
[0040] The unified interface information is written into the target SDK data packet.
[0041] Optionally, after the step of responding to the data access request through the target SDK data packet to display a target page corresponding to the data access request, the method further includes:
[0042] When receiving a target operation triggered based on the target page, obtaining account information corresponding to the target operation;
[0043] Acquire an identity recognition component according to the target SDK data packet;
[0044] Performing identity recognition on the account information according to the identity recognition component;
[0045] When the account information passes the identity recognition, the target operation is responded to based on the target SDK data packet.
[0046] In addition, to achieve the above object, the present invention further provides a data interaction device, the data interaction device comprising:
[0047] A determination module, configured to determine a user identity according to a data access request when receiving the data access request;
[0048] An acquisition module, used to acquire corresponding target interface parameters according to the user identity identifier;
[0049] An updating module, used for updating the current communication frame according to the target interface parameters to obtain a target communication frame;
[0050] The determination module is further used to determine the target SDK data packet according to the target communication framework;
[0051] The display module is used to respond to the data access request through the target SDK data packet, and send the target page corresponding to the data access request to the requesting terminal for display.
[0052] In addition, to achieve the above-mentioned purpose, the present invention also proposes a data interaction device, which includes: a memory, a processor, and a data interaction program stored in the memory and executable on the processor, and the data interaction program is configured to implement the steps of the data interaction method described above.
[0053] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a data interaction program is stored, and when the data interaction program is executed by a processor, the steps of the data interaction method described above are implemented.
[0054] The present invention determines the user identity according to the data access request when receiving the data access request; obtains the corresponding target interface parameters according to the user identity; updates the current communication framework according to the target interface parameters to obtain the target communication framework; determines the target SDK data packet according to the target communication framework; responds to the data access request through the target SDK data packet, and sends the target page corresponding to the data access request to the request terminal for display. In the present invention, the encapsulated public component target SDK data packet can be obtained according to the user identity of the channel merchant, and the target SDK data packet is encapsulated into a publicly available target SDK data packet for the channel merchant's own channel characteristics, so the channel merchant only needs to connect to the target SDK data packet on the mobile terminal most of the time, and do the specific details of the connection according to the relevant development documents of the target SDK data packet. During the whole process, the channel merchant only needs to call the code and set the parameters, and does not need to write too much code, which brings convenience to the promotion and sales of online products on multiple channels. The connection is simple and convenient. During the connection process, the channel merchant does not need to pay too much attention to the business logic of the product side, which greatly reduces the development and communication costs, shortens the development cycle, and solves the technical problem of large configuration workload of H5 and native communication framework corresponding to the existing channels. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a structural diagram of a data interaction device in a hardware operating environment involved in an embodiment of the present invention;
[0056] Figure 2 This is a flow chart of a first embodiment of a data interaction method of the present invention;
[0057] Figure 3 This is a flow chart of a second embodiment of the data interaction method of the present invention;
[0058] Figure 4 A schematic diagram of a flow chart of a third embodiment of a data interaction method of the present invention;
[0059] Figure 5 It is a structural block diagram of the first embodiment of the data interaction device of the present invention.
[0060] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0061] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0062] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the data interaction device structure of the hardware operating environment involved in the embodiment of the present invention.
[0063] like Figure 1 As shown, the data interaction device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0064] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the data interaction device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0065] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a data interaction program.
[0066] exist Figure 1 In the data interaction device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the data interaction device of the present invention can be set in the data interaction device, and the data interaction device calls the data interaction program stored in the memory 1005 through the processor 1001, and executes the data interaction method provided by the embodiment of the present invention.
[0067] The embodiment of the present invention provides a data interaction method, referring to Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a data interaction method of the present invention.
[0068] In this embodiment, the data interaction method includes the following steps:
[0069] Step S10: upon receiving a data access request, determining a user identity according to the data access request.
[0070] It should be noted that the execution subject of this embodiment is the data interaction device, which may be an electronic device such as a personal computer or a server, and this embodiment does not limit this. When a data access request is received, a user identity is determined according to the data access request. The user identity may include two aspects: identity authentication and function information. The user identity may also include other content, and this embodiment does not limit this.
[0071] Specifically, the channel merchant can send a registration request to the server through the terminal. The server generates a key for the channel merchant based on the registration request. The key is APP_KEY, and APP_KEY represents the unique identity of the channel merchant. The server sends the APP_KEY to the channel merchant's terminal for storage. The server stores the APP_KEY of the terminal, and when receiving the data access request, it can determine the APP_KEY according to the data access request, and determine whether the identity of the channel merchant corresponding to the terminal is legal through the APP_KEY. The channel merchant can apply to generate an APP_KEY, which is the unique identifier of the channel merchant, that is, the user identity identifier. The user identity identifier is an important basis for verifying the legitimacy of the channel merchant's identity; at the same time, the user identity identifier can also include the functional information required by the channel merchant, and the functional information can include the functions required for the channel merchant to sell products, such as AI face-to-face signing and OCR recognition.
[0072] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned user identity, the above-mentioned user identity can also be stored in a node of a blockchain.
[0073] Step S20: Acquire corresponding target interface parameters according to the user identity identifier.
[0074] It is easy to understand that after the channel merchant's terminal completes registration on the server, it can apply to the server for a request to obtain the target SDK data package. While sending the request to the server, the terminal sends the stored APP_KEY to the server. The server verifies whether the APP_KEY sent by the channel merchant's terminal is stored. If the channel merchant's APP_KEY is stored, it can be determined that the channel merchant's terminal has completed registration on the server, that is, the identity of the channel merchant corresponding to the terminal is legal. The server obtains the corresponding target interface parameters based on the user identity identifier to update the current communication framework to obtain the target communication framework, determine the target SDK data package based on the target communication framework, and then feed back the target SDK data package to the channel merchant's terminal.
[0075] Step S30: updating the current communication frame according to the target interface parameters to obtain a target communication frame.
[0076] It should be noted that due to the different functional requirements of different channel merchants, product display and sales for different channel merchants are all implemented through H5 pages, but the communication frameworks between H5 and native are different for different channel merchants. Therefore, it is necessary to configure the communication framework between H5 and native for the channel merchant corresponding to the terminal, encapsulate the communication framework between H5 and native into an SDK data package, and call the SDK data package to make the displayed page conform to the communication framework between H5 and native corresponding to the current channel merchant, so as to achieve page flexibility and reduce the configuration workload of developers. Among them, the current communication framework is updated according to the target interface parameters to obtain the target communication framework, and the target communication framework can be the communication framework between H5 and native.
[0077] Step S40: determining a target SDK data packet according to the target communication framework.
[0078] It is easy to understand that the server obtains the target page display parameters according to the user identity identifier; and determines the target SDK data packet according to the target page display parameters and the target communication framework. The user identity identifier may also include the functional information required by the channel dealer, and the functional information may include the functions required by the channel dealer to sell products. The following is an example of three functions. Of course, at least two functions may be combined to achieve the desired effect. In addition, the functional information may also be other functional information required according to the actual situation, and this embodiment does not limit this.
[0079] The first function is the encapsulation of channel characteristics: wherein the target page display parameters may include: page frame display parameters; the process of obtaining the target page display parameters according to the user identity identifier may be to determine the corresponding access service type according to the user identity identifier; to obtain the target web page content information according to the access service type, and to construct a page frame template according to the target web page content information; and to combine the page frame templates to generate the page frame display parameters. Specifically, the channel characteristics may include the access service type and the content required for displaying the web page, i.e., the target web page content information, such as the display page content information corresponding to the channel providers such as Lufax, Lucaifu and Ping An Trust, etc. The specific encapsulation process is to obtain the page display content information required by the channel providers, divide the page display content information, obtain the page frame template corresponding to each page content, combine the various page frame templates to generate the page frame display parameters, determine the target SDK data package according to the page frame display parameters and the target communication framework, so that the corresponding page display can be generated through the target SDK data package, and the encapsulation of the channel characteristics is realized, wherein the encapsulation condition may be to obtain the channel content information of each display page, and the encapsulation rule may be to generate the page display content information corresponding to different channel providers.
[0080] The second function is the encapsulation of functions: wherein the target page display parameters may include: function extension display parameters; the process of obtaining the target page display parameters according to the user identity identifier may be to obtain function extension information according to the user identity identifier, and obtain the code information of the function to be extended according to the function extension information; convert the code information into a data packet in a preset file format, and write the data packet to the call interface parameter to obtain the updated call interface parameter; use the updated call interface parameter as the function extension display parameter. Specifically, the function extension information is obtained according to the user identity identifier, the function extension information is the code information of the extended function, the JAR package is integrated according to the code information, and the JAR package is written to the call interface parameter to obtain the updated call interface parameter; use the updated call interface parameter as the function extension display parameter. The target SDK data packet is determined according to the function extension display parameters and the target communication framework, so that the corresponding page display can be generated through the target SDK data packet to realize the encapsulation of functional characteristics, and the JAR package is introduced into the current SDK data packet code to realize the encapsulation of functions, such as obtaining the code information of AI face-to-face signature, generating a JAR package with the code information of AI face-to-face signature, and generating a JAR package by introducing the code information of AI face-to-face signature to realize the encapsulation of AI face-to-face signature function, wherein the encapsulation condition is the JAR package corresponding to the code information of the extended function, and the encapsulation rule is to generate a calling interface to realize the call of the extended function. The preset file format can be JAR or other formats, which is not limited in this embodiment.
[0081] The third function is: the target page display parameters include: identity recognition parameters; the process of obtaining the target page display parameters according to the user identity identifier can be to obtain identity recognition information according to the user identity identifier, and obtain corresponding API interface information according to the identity recognition information; use the API interface information as identity recognition parameters; the process of determining the target SDK data packet according to the target page display parameters and the target communication framework can be to obtain the interface information of the target communication framework; adjust the interface information according to the API interface information to obtain unified interface information; write the unified interface information into the target SDK data packet. Specifically, obtain the API interface information of the AI face-to-face signature, unify the API interface information of the AI face-to-face signature with the interface information of the current communication framework code function, so as to realize the call of the AI face-to-face signature function through the call of the AI face-to-face signature API interface.
[0082] Step S50: responding to the data access request via the target SDK data packet, and sending the target page corresponding to the data access request to the requesting terminal for display.
[0083] It should be understood that the data access request is responded to through the target SDK data packet, and the target page corresponding to the data access request is sent to the requesting terminal for display. Specifically, the channel merchant terminal connects to the target SDK data packet and makes specific details according to the relevant development documents of the target SDK data packet. During the whole process, the channel merchant only needs to call the code and set the parameters, and does not need to write too much code.
[0084] It should be noted that after the target SDK data packet responds to the data access request to display the target page corresponding to the data access request, the account information corresponding to the target operation can be obtained when the target operation triggered based on the target page is received; the identity identification component is obtained according to the target SDK data packet; the account information is identified according to the identity identification component; when the account information passes the identity identification, the target operation is responded to based on the target SDK data packet. That is, the channel business provides a product entrance on the terminal or H5 page. When the user clicks on the product entrance, the user may need to perform a user authorization operation first. After the user authorization is successful, the WebView provided by the target SDK data packet (that is, the target communication framework that encapsulates the H5 and native ends) is directly used to open the product display page, that is, the first page of the connected product party, which is also an independent H5 page. The subsequent business operation logic is completed by the product party's H5 and the target SDK data packet.
[0085] In addition, multiple target SDK data packets can be encapsulated on the server side. The data access request sent by the terminal carries the functional requirement information of the channel business. The server side can obtain the corresponding SDK data packet based on the functional requirement information, and then send the SDK data packet to the terminal. Of course, the server can also store only one SDK package, compare the functional requirement information in the data access request with the preset requirement information, and if the functional requirement information is consistent with the preset requirement information, the SDK data packet is sent to the terminal. If the functional requirement information is inconsistent with the preset requirement information, the function in the SDK data packet is expanded according to the functional requirement to obtain the target SDK data packet, and then the target SDK data packet is sent to the terminal.
[0086] In this embodiment, when receiving a data access request, the user identity is determined according to the data access request; the corresponding target interface parameters are obtained according to the user identity; the current communication framework is updated according to the target interface parameters to obtain the target communication framework; the target SDK data packet is determined according to the target communication framework; the data access request is responded to through the target SDK data packet, and the target page corresponding to the data access request is sent to the request terminal for display. In this embodiment, the encapsulated public component target SDK data packet can be obtained according to the user identity of the channel merchant, and the target SDK data packet is encapsulated into a publicly available target SDK data packet for the channel merchant's own channel characteristics, so the channel merchant only needs to connect to the target SDK data packet on the mobile terminal most of the time, and do the specific details of the connection according to the relevant development documents of the target SDK data packet. During the whole process, the channel merchant only needs to call the code and set the parameters, and does not need to write too much code, which brings convenience to the promotion and sales of online products on multiple channels. The connection is simple and convenient. During the connection process, the channel merchant does not need to pay too much attention to the business logic of the product side, which greatly reduces the development and communication costs, shortens the development cycle, and solves the technical problem of large configuration workload of H5 and native communication framework corresponding to the existing channels.
[0087] refer to Figure 3 , Figure 3 This is a flow chart of a second embodiment of a data interaction method of the present invention. Based on the first embodiment, the data interaction method of this embodiment further includes, before step S10:
[0088] Step S11: obtaining a preset communication framework and the interaction logic between each communication framework system layer in the preset communication framework.
[0089] It should be noted that, generally, the communication framework between H5 and the native end includes communication frameworks such as JSbridge and hybrid, and may also include other communication frameworks. The preset communication framework can be the communication framework between H5 and the native end. This embodiment establishes the communication framework between H5 and the native end based on webview, that is, the JSbridge and hybrid communication framework system layer processing logic, establishes the interaction logic between each communication framework system layer according to the communication framework between H5 and the native end, generates multiple interface parameters, and encodes the interface parameters to generate corresponding ID codes, thereby realizing the encapsulation of the communication framework, and obtaining the interaction logic between each communication framework system layer in the preset communication framework, that is, obtaining the interaction logic between each communication framework system layer of the communication framework between H5 and the native end.
[0090] Step S12: Encapsulate the interaction logic according to a preset encapsulation rule to obtain a number of interface parameters.
[0091] It is easy to understand that the preset encapsulation rule can be used to generate interface parameters, and the interaction logic is encapsulated according to the preset encapsulation rule to obtain several interface parameters. The interaction logic between each communication framework system layer is established according to the communication framework between H5 and the native end to generate several interface parameters.
[0092] Step S13: Encode the interface parameters to obtain a user identity corresponding to each interface parameter, and the user identity is stored in the blockchain.
[0093] Specifically, the interaction logic between the system layers of each communication framework is established according to the communication framework between H5 and the native end, multiple interface parameters are generated, and the interface parameters are encoded to generate corresponding ID codes. The ID codes are user identity identifiers corresponding to each interface parameter, thereby realizing the encapsulation of the communication framework, wherein the encapsulation conditions are the system layer processing logic corresponding to each communication framework between H5 and the native end, and the preset encapsulation rules are to generate interface parameters.
[0094] Step S14: Establishing a mapping relationship between the user identity and the corresponding interface parameters.
[0095] It should be noted that, in this embodiment, in order to realize the adjustment of the communication framework between H5 and the native end in the target SDK data packet, the user identity identifier is bound to the channel provider, that is, the corresponding user identity identifier can be obtained through the channel provider, and then the corresponding target interface parameters are obtained according to the user identity identifier based on the mapping relationship, and the current communication framework between H5 and the native end is adjusted according to the target interface parameters, so that the current communication framework between H5 and the native end is adjusted to a target communication framework suitable for the channel provider.
[0096] Specifically, the channel dealer can send a registration request to the server through the terminal, and the server generates a key for the channel dealer based on the registration request. The key is APP_KEY, and APP_KEY represents the unique identity of the channel dealer.
[0097] The step of acquiring corresponding target interface parameters according to the user identity identifier comprises:
[0098] Step S201: acquiring corresponding target interface parameters according to the user identity based on the mapping relationship.
[0099] It is easy to understand that after the channel merchant's terminal completes registration on the server, it can apply to the server for a request to obtain the target SDK data package. While sending the request to the server, the terminal sends the stored APP_KEY to the server. The server verifies whether the APP_KEY sent by the channel merchant's terminal is stored. If the channel merchant's APP_KEY is stored, it can be determined that the channel merchant's terminal has completed registration on the server, that is, the identity of the channel merchant corresponding to the terminal is legal. The server obtains the corresponding target interface parameters based on the user identity identifier to update the current communication framework to obtain the target communication framework, determine the target SDK data package based on the target communication framework, and then feed back the target SDK data package to the channel merchant's terminal.
[0100] This embodiment obtains a preset communication framework and the interaction logic between each communication framework system layer in the preset communication framework; encapsulates the interaction logic according to the preset encapsulation rules to obtain several interface parameters; encodes the interface parameters to obtain the user identity corresponding to each interface parameter, and the user identity is stored in the blockchain; establishes a mapping relationship between the user identity and the corresponding interface parameter; and obtains the corresponding target interface parameter according to the user identity based on the mapping relationship. In this embodiment, the encapsulated public component target SDK data packet can be obtained according to the user identity of the channel dealer. The target SDK data packet is a publicly available target SDK data packet encapsulated for the channel characteristics of the channel dealer itself. Therefore, the channel dealer only needs to connect to the target SDK data packet on the mobile terminal most of the time, and do the specific details of the connection according to the relevant development documents of the target SDK data packet. During the whole process, the channel dealer only needs to call the code and set the parameters, without too much code writing, which brings convenience to the promotion and sales of online products on multiple channels. The connection is simple and convenient. During the connection process, the channel dealer does not need to pay too much attention to the business logic of the product side, which greatly reduces the development and communication costs, shortens the development cycle, and solves the technical problem of large configuration workload of H5 and native communication framework corresponding to the existing channels.
[0101] refer to Figure 4 , Figure 4 This is a flow chart of a third embodiment of a data interaction method of the present invention. Based on the first embodiment, the data interaction method of this embodiment further includes, after step S50:
[0102] Step S60: upon receiving a target operation triggered based on the target page, obtaining account information corresponding to the target operation.
[0103] It should be noted that the channel provider provides a product entrance on the terminal or H5 page. When the user clicks on the product entrance, he or she may need to perform user authorization first. After the user authorization is successful, the WebView provided by the target SDK data package (that is, the target communication framework that encapsulates the H5 and native ends) is used directly to open the product display page, which is the first page of the connected product and also an independent H5 page. The subsequent business operation logic is completed by the product's H5 and the target SDK data package.
[0104] It is easy to understand that when receiving the target operation triggered by the target page, that is, when the user clicks on the product entrance, the terminal calls the communication framework in the target SDK data package to open the product display page, which is the H5 page. When the user clicks on the product entrance, the user's identity needs to be identified. If it is determined whether the user has the authority to click on the product entrance, if the identification is successful, the H5 page is opened. The H5 page includes information about various products. After browsing various products, the user can click to buy and enter the purchase amount. The product can be a financial product.
[0105] Specifically, users browse the product list, view product details, click to buy, and enter the purchase amount. When purchasing products, they may need ID card and bank card information, which can be obtained by connecting to channel providers through backend services, or directly uploaded and used through the OCR recognition component in the target SDK data package. At the same time, the product backend service needs to synchronize user information management with channel providers. The terminal can provide a product entrance, or the terminal can provide a product entrance based on the H5 page.
[0106] It is easy to understand that after the user enters the purchase amount of the product on the page and clicks to confirm the purchase on the page, the user's account information can be obtained through the server. Of course, the terminal can directly use the OCR recognition component in the target SDK data package to identify user information such as ID cards and bank cards, thereby obtaining the user's account information. That is, when the terminal detects a purchase operation triggered based on the purchase interface, it calls the OCR recognition component in the target SDK data package to identify the bank card, ID card (bank card image), etc., and obtain the account information.
[0107] Step S70: Acquire an identity recognition component according to the target SDK data packet.
[0108] Specifically, the identity recognition component is obtained according to the target SDK data packet. In the link where AI face-to-face signature is required, the H5 page directly calls the AI face-to-face signature component in the target SDK data packet through the communication framework between the H5 encapsulated in the target SDK data packet and the native end to perform AI face-to-face signature, so as to confirm and identify the authenticity of the user.
[0109] Step S80: performing identity identification on the account information according to the identity identification component.
[0110] Specifically, the process of identifying the user's account information can be: the terminal calls the AI face-to-face signature component in the target SDK data package to perform AI face-to-face signature to identify the user, that is, to recognize the user's face to determine whether the user identified by face is the user on the ID card.
[0111] Step S90: When the account information passes the identity recognition, respond to the target operation based on the target SDK data packet.
[0112] It should be noted that after the user enters the purchase amount of the product on the page and clicks to confirm the purchase on the page, the user's account information can be obtained through the server. When the account information is identified, the target operation and purchase operation are responded to based on the target SDK data package. The entire process is basically completed by the target SDK data package.
[0113] In addition, after obtaining the account information, the terminal can obtain the user's payment method from the account information, and then determine the payment server based on the payment method. The terminal can determine the purchase amount based on the purchase operation, and then generate a payment request based on the purchase operation, and finally send the payment request to the payment server. After receiving the payment request, the payment server will send a verification message to the terminal. If the information entered by the user based on the verification information matches the verification information, the payment server will deduct the purchase amount from the user's account and send a message to the terminal, thereby completing the purchase of the product.
[0114] In this embodiment, when a target operation triggered based on the target page is received, the account information corresponding to the target operation is obtained; the identity identification component is obtained according to the target SDK data packet; the account information is identified according to the identity identification component; when the account information passes the identity identification, the target operation is responded to based on the target SDK data packet.
[0115] In addition, an embodiment of the present invention further provides a storage medium, on which a data interaction program is stored, and the data interaction program is executed by a processor to perform the steps of the data interaction method described above.
[0116] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0117] Reference Figure 5 , Figure 5 It is a structural block diagram of the first embodiment of the data interaction device of the present invention.
[0118] like Figure 5 As shown, the data interaction device according to the embodiment of the present invention includes:
[0119] The determination module 10 is used to determine the user identity according to the data access request when receiving the data access request.
[0120] It should be noted that when a data access request is received, the user identity is determined according to the data access request. The user identity may include identity authentication and function information. The user identity may also include other content, which is not limited in this embodiment.
[0121] Specifically, the channel merchant can send a registration request to the server through the terminal. The server generates a key for the channel merchant based on the registration request. The key is APP_KEY, and APP_KEY represents the unique identity of the channel merchant. The server sends the APP_KEY to the channel merchant's terminal for storage. The server stores the APP_KEY of the terminal, and when receiving the data access request, it can determine the APP_KEY according to the data access request, and determine whether the identity of the channel merchant corresponding to the terminal is legal through the APP_KEY. The channel merchant can apply to generate an APP_KEY, which is the unique identifier of the channel merchant, that is, the user identity identifier. The user identity identifier is an important basis for verifying the legitimacy of the channel merchant's identity; at the same time, the user identity identifier can also include the functional information required by the channel merchant, and the functional information can include the functions required for the channel merchant to sell products, such as AI face-to-face signing and OCR recognition.
[0122] An acquisition module 20, configured to acquire corresponding target interface parameters according to the user identity identifier;
[0123] It is easy to understand that after the channel merchant's terminal completes registration on the server, it can apply to the server for a request to obtain the target SDK data package. While sending the request to the server, the terminal sends the stored APP_KEY to the server. The server verifies whether the APP_KEY sent by the channel merchant's terminal is stored. If the channel merchant's APP_KEY is stored, it can be determined that the channel merchant's terminal has completed registration on the server, that is, the identity of the channel merchant corresponding to the terminal is legal. The server obtains the corresponding target interface parameters based on the user identity identifier to update the current communication framework to obtain the target communication framework, determine the target SDK data package based on the target communication framework, and then feed back the target SDK data package to the channel merchant's terminal.
[0124] The updating module 30 is used to update the current communication framework according to the target interface parameters to obtain a target communication framework.
[0125] It should be noted that due to the different functional requirements of different channel merchants, product display and sales for different channel merchants are all implemented through H5 pages, but the communication frameworks between H5 and native are different for different channel merchants. Therefore, it is necessary to configure the communication framework between H5 and native for the channel merchant corresponding to the terminal, encapsulate the communication framework between H5 and native into an SDK data package, and call the SDK data package to make the displayed page conform to the communication framework between H5 and native corresponding to the current channel merchant, so as to achieve page flexibility and reduce the configuration workload of developers. Among them, the current communication framework is updated according to the target interface parameters to obtain the target communication framework, and the target communication framework can be the communication framework between H5 and native.
[0126] The determination module 10 is further configured to determine a target SDK data packet according to the target communication framework.
[0127] It is easy to understand that the server obtains the target page display parameters according to the user identity identifier; and determines the target SDK data packet according to the target page display parameters and the target communication framework. The user identity identifier may also include the functional information required by the channel dealer, and the functional information may include the functions required by the channel dealer to sell products. The following is an example of three functions. Of course, at least two functions may be combined to achieve the desired effect. In addition, the functional information may also be other functional information required according to the actual situation, and this embodiment does not limit this.
[0128] The first function is the encapsulation of channel characteristics: wherein the target page display parameters may include: page frame display parameters; the process of obtaining the target page display parameters according to the user identity identifier may be to determine the corresponding access service type according to the user identity identifier; to obtain the target web page content information according to the access service type, and to construct a page frame template according to the target web page content information; and to combine the page frame templates to generate the page frame display parameters. Specifically, the channel characteristics may include the access service type and the content required for displaying the web page, i.e., the target web page content information, such as the display page content information corresponding to the channel providers such as Lufax, Lucaifu and Ping An Trust, etc. The specific encapsulation process is to obtain the page display content information required by the channel providers, divide the page display content information, obtain the page frame template corresponding to each page content, combine the various page frame templates to generate the page frame display parameters, determine the target SDK data package according to the page frame display parameters and the target communication framework, so that the corresponding page display can be generated through the target SDK data package, and the encapsulation of the channel characteristics is realized, wherein the encapsulation condition may be to obtain the channel content information of each display page, and the encapsulation rule may be to generate the page display content information corresponding to different channel providers.
[0129] The second function is the encapsulation of functions: wherein the target page display parameters may include: function extension display parameters; the process of obtaining the target page display parameters according to the user identity identifier may be to obtain function extension information according to the user identity identifier, and obtain the code information of the function to be extended according to the function extension information; convert the code information into a data packet in a preset file format, and write the data packet to the call interface parameter to obtain the updated call interface parameter; use the updated call interface parameter as the function extension display parameter. Specifically, the function extension information is obtained according to the user identity identifier, the function extension information is the code information of the extended function, the JAR package is integrated according to the code information, and the JAR package is written to the call interface parameter to obtain the updated call interface parameter; use the updated call interface parameter as the function extension display parameter. The target SDK data packet is determined according to the function extension display parameters and the target communication framework, so that the corresponding page display can be generated through the target SDK data packet to realize the encapsulation of functional characteristics, and the JAR package is introduced into the current SDK data packet code to realize the encapsulation of functions, such as obtaining the code information of AI face-to-face signature, generating a JAR package with the code information of AI face-to-face signature, and generating a JAR package by introducing the code information of AI face-to-face signature to realize the encapsulation of AI face-to-face signature function, wherein the encapsulation condition is the JAR package corresponding to the code information of the extended function, and the encapsulation rule is to generate a calling interface to realize the call of the extended function. The preset file format can be JAR or other formats, which is not limited in this embodiment.
[0130] The third function is: the target page display parameters include: identity recognition parameters; the process of obtaining the target page display parameters according to the user identity identifier can be to obtain identity recognition information according to the user identity identifier, and obtain corresponding API interface information according to the identity recognition information; use the API interface information as identity recognition parameters; the process of determining the target SDK data packet according to the target page display parameters and the target communication framework can be to obtain the interface information of the target communication framework; adjust the interface information according to the API interface information to obtain unified interface information; write the unified interface information into the target SDK data packet. Specifically, obtain the API interface information of the AI face-to-face signature, unify the API interface information of the AI face-to-face signature with the interface information of the current communication framework code function, so as to realize the call of the AI face-to-face signature function through the call of the AI face-to-face signature API interface.
[0131] The display module 40 is used to respond to the data access request through the target SDK data packet, and send the target page corresponding to the data access request to the requesting terminal for display.
[0132] It should be understood that the data access request is responded to through the target SDK data packet, and the target page corresponding to the data access request is sent to the requesting terminal for display. Specifically, the channel merchant terminal connects to the target SDK data packet and makes specific details according to the relevant development documents of the target SDK data packet. During the whole process, the channel merchant only needs to call the code and set the parameters, and does not need to write too much code.
[0133] It should be noted that after the target SDK data packet responds to the data access request to display the target page corresponding to the data access request, the account information corresponding to the target operation can be obtained when the target operation triggered based on the target page is received; the identity identification component is obtained according to the target SDK data packet; the account information is identified according to the identity identification component; when the account information passes the identity identification, the target operation is responded to based on the target SDK data packet. That is, the channel business provides a product entrance on the terminal or H5 page. When the user clicks on the product entrance, the user may need to perform a user authorization operation first. After the user authorization is successful, the WebView provided by the target SDK data packet (that is, the target communication framework that encapsulates the H5 and native ends) is directly used to open the product display page, that is, the first page of the connected product party, which is also an independent H5 page. The subsequent business operation logic is completed by the product party's H5 and the target SDK data packet.
[0134] In addition, multiple target SDK data packets can be encapsulated on the server side. The data access request sent by the terminal carries the functional requirement information of the channel business. The server side can obtain the corresponding SDK data packet based on the functional requirement information, and then send the SDK data packet to the terminal. Of course, the server can also store only one SDK package, compare the functional requirement information in the data access request with the preset requirement information, and if the functional requirement information is consistent with the preset requirement information, the SDK data packet is sent to the terminal. If the functional requirement information is inconsistent with the preset requirement information, the function in the SDK data packet is expanded according to the functional requirement to obtain the target SDK data packet, and then the target SDK data packet is sent to the terminal.
[0135] The data interaction device of this embodiment includes: a determination module 10, which is used to determine the user identity according to the data access request when a data access request is received; an acquisition module 20, which is used to obtain the corresponding target interface parameters according to the user identity; an update module 30, which is used to update the current communication framework according to the target interface parameters to obtain a target communication framework; the determination module 10 is also used to determine the target SDK data packet according to the target communication framework; a display module 40, which is used to respond to the data access request through the target SDK data packet, and send the target page corresponding to the data access request to the requesting terminal for display. In this embodiment, a packaged public component target SDK data packet can be obtained according to the channel merchant's user identity. The target SDK data packet is a publicly available target SDK data packet encapsulated according to the channel merchant's own channel characteristics. Therefore, the channel merchant only needs to connect to the target SDK data packet on the mobile terminal most of the time, and make specific details according to the relevant development documents of the target SDK data packet. During the whole process, the channel merchant only needs to call the code and set the parameters, and does not need too much code writing, which brings convenience to the promotion and sales of online products on multiple channels. The docking is simple and convenient. During the docking process, the channel merchant does not need to pay too much attention to the business logic of the product side, which greatly reduces the development and communication costs, shortens the development cycle, and solves the technical problem of large configuration workload of H5 and native communication framework corresponding to the existing channels.
[0136] In one embodiment, the data interaction device further includes a mapping module, the mapping module being used to obtain a preset communication framework and an interaction logic between each communication framework system layer in the preset communication framework;
[0137] Encapsulating the interaction logic according to a preset encapsulation rule to obtain a number of interface parameters;
[0138] Encoding the interface parameters to obtain user identities corresponding to the interface parameters, wherein the user identities are stored in the blockchain;
[0139] Establishing a mapping relationship between the user identity and the corresponding interface parameters;
[0140] The acquisition module 20 is further configured to acquire corresponding target interface parameters according to the user identity based on the mapping relationship.
[0141] In one embodiment, the determination module 10 is further used to obtain target page display parameters according to the user identity identifier;
[0142] The determination module 10 is further configured to determine a target SDK data packet according to the target page display parameters and the target communication framework.
[0143] In one embodiment, the target page display parameters include: page frame display parameters; the determination module 10 is further used to determine the corresponding access service type according to the user identity;
[0144] Acquire target webpage content information according to the access service type, and construct a page frame template according to the target webpage content information;
[0145] The page frame templates are combined to generate page frame display parameters.
[0146] In one embodiment, the target page display parameters include: function extension display parameters; the determination module 10 is further used to obtain function extension information according to the user identity, and obtain code information of the function to be extended according to the function extension information;
[0147] Converting the code information into a data packet in a preset file format, and writing the data packet into the calling interface parameters to obtain updated calling interface parameters;
[0148] The updated calling interface parameters are used as function extension display parameters.
[0149] In one embodiment, the target page display parameters include: identity recognition parameters; the determination module 10 is further used to obtain identity recognition information according to the user identity identifier, and obtain corresponding API interface information according to the identity recognition information;
[0150] Using the API interface information as an identity identification parameter;
[0151] The determination module 10 is further used to obtain the interface information of the target communication framework;
[0152] Adjust the interface information according to the API interface information to obtain unified interface information;
[0153] The unified interface information is written into the target SDK data packet.
[0154] In one embodiment, the data interaction device further includes an identification module, wherein the identification module is configured to obtain account information corresponding to the target operation when receiving the target operation triggered based on the target page;
[0155] Acquire an identity recognition component according to the target SDK data packet;
[0156] Performing identity recognition on the account information according to the identity recognition component;
[0157] When the account information passes the identity recognition, the target operation is responded to based on the target SDK data packet.
[0158] Other embodiments or specific implementations of the data interaction device of the present invention may refer to the above-mentioned data interaction method embodiments, which will not be described in detail here.
[0159] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0160] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0161] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the data interaction method provided in any embodiment of the present invention, and will not be repeated here.
[0162] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0163] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0164] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0166] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A data interaction method, characterized in that: The data interaction method comprises: Acquire a preset communication framework and the interaction logic between each communication framework system layer in the preset communication framework; Encapsulating the interaction logic according to a preset encapsulation rule to obtain a number of interface parameters; Encoding the interface parameters to obtain user identities corresponding to the interface parameters, wherein the user identities are stored in the blockchain; Establishing a mapping relationship between the user identity and the corresponding interface parameters; Upon receiving a data access request, determining a user identity according to the data access request; Acquire the corresponding target interface parameters according to the user identity identifier, wherein the step of acquiring the corresponding target interface parameters according to the user identity identifier comprises: acquiring the corresponding target interface parameters according to the user identity identifier based on the mapping relationship; Update the current communication frame according to the target interface parameters to obtain the target communication frame; Determine a target SDK data packet according to the target communication framework; The data access request is responded to through the target SDK data packet, and the target page corresponding to the data access request is sent to the requesting terminal for display.
2. The data interaction method according to claim 1, characterized in that: Before the step of determining the target SDK data packet according to the target communication framework, the method further includes: Acquire target page display parameters according to the user identity identifier; The step of determining the target SDK data packet according to the target communication framework includes: The target SDK data packet is determined according to the target page display parameters and the target communication framework.
3. The data interaction method according to claim 2, characterized in that: The target page display parameters include: page frame display parameters; The step of acquiring target page display parameters according to the user identity identifier comprises: Determine the corresponding access service type according to the user identity identifier; Acquire target webpage content information according to the access service type, and construct a page frame template according to the target webpage content information; The page frame templates are combined to generate page frame display parameters.
4. The data interaction method according to claim 2, characterized in that: The target page display parameters include: function extension display parameters; The step of acquiring target page display parameters according to the user identity identifier comprises: Acquire function extension information according to the user identity identifier, and acquire code information of the function to be extended according to the function extension information; Converting the code information into a data packet in a preset file format, and writing the data packet into the calling interface parameters to obtain updated calling interface parameters; The updated calling interface parameters are used as function extension display parameters.
5. The data interaction method according to claim 2, characterized in that: The target page display parameters include: identity recognition parameters; The step of acquiring target page display parameters according to the user identity identifier comprises: Acquire identity information according to the user identity identifier, and acquire corresponding API interface information according to the identity information; Using the API interface information as an identity identification parameter; The step of determining the target SDK data packet according to the target page display parameters and the target communication framework includes: Obtaining interface information of the target communication framework; Adjust the interface information according to the API interface information to obtain unified interface information; The unified interface information is written into the target SDK data packet.
6. The data interaction method according to any one of claims 1 to 5, characterized in that: After the step of responding to the data access request through the target SDK data packet to display the target page corresponding to the data access request, the method further includes: When receiving a target operation triggered based on the target page, obtaining account information corresponding to the target operation; Acquire an identity recognition component according to the target SDK data packet; Performing identity recognition on the account information according to the identity recognition component; When the account information passes the identity recognition, the target operation is responded to based on the target SDK data packet.
7. A data interaction device, characterized in that: The data interaction device comprises: A determination module is used to obtain a preset communication framework and the interaction logic between each communication framework system layer in the preset communication framework; encapsulate the interaction logic according to a preset encapsulation rule to obtain a number of interface parameters; encode the interface parameters to obtain a user identity corresponding to each interface parameter, and the user identity is stored in the blockchain; and establish a mapping relationship between the user identity and the corresponding interface parameter; The determination module is further configured to determine the user identity according to the data access request when receiving the data access request; An acquisition module, configured to acquire corresponding target interface parameters according to the user identity identifier, wherein acquiring corresponding target interface parameters according to the user identity identifier comprises: acquiring corresponding target interface parameters according to the user identity identifier based on the mapping relationship; An updating module, used for updating the current communication frame according to the target interface parameters to obtain a target communication frame; The determination module is further used to determine the target SDK data packet according to the target communication framework; The display module is used to respond to the data access request through the target SDK data packet, and send the target page corresponding to the data access request to the requesting terminal for display.
8. A data interaction device, characterized in that: The data interaction device comprises: a memory, a processor, and a data interaction program stored in the memory and executable on the processor, wherein the data interaction program is configured to implement the steps of the data interaction method according to any one of claims 1 to 5.
9. A storage medium, characterized in that: The storage medium stores a data interaction program, and when the data interaction program is executed by the processor, the steps of the data interaction method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Access method based on H5 access mode, access component thereof and mobile terminal
CN110580154A
Intelligent interface processing method and device
CN111427570A