Cross-platform calling method, device, equipment and storage medium for shared applications

By parsing and verifying user login and operation requests of third-party platforms, cross-platform calls are realized, which solves the problems of redundant and difficult maintenance of wallet application codes on different APP platforms, and improves the reusability and security of applications.

CN114185702BActive Publication Date: 2024-09-17CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111519198.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-09-17
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

Wallet applications on different APP platforms need to be developed independently, resulting in code redundancy, difficulty in maintenance, and low reusability.

Method used

By receiving the user login request from the third-party platform, parsing the access token, determining whether the user is bound, and executing the operation request under legal circumstances, cross-platform calls are realized.

Benefits of technology

It improves the security and adaptability of shared applications across multiple platforms, enables multi-platform reuse of shared applications, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114185702B
    Figure CN114185702B
Patent Text Reader

Abstract

The present invention relates to virtualized data sharing, and discloses a cross-platform calling method for a shared application, including: receiving a user login request from a third-party platform, parsing the user login request, and obtaining an access token; when the access token is legal, determining whether the user corresponding to the user login request is a bound user; if the user is not a bound user, binding the user; if the user is a bound user, receiving an operation request from the user; parsing the operation request, obtaining encrypted information and an operation token; when the operation token is legal, verifying the encrypted information and executing the operation corresponding to the operation request when the encrypted information verification succeeds. In addition, the present invention also relates to blockchain technology, and a shared application can be stored in a node of a blockchain. The present invention also proposes a cross-platform calling device, an electronic device, and a storage medium for a shared application. The present invention can improve the reusability of shared applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtualized data sharing, and in particular to a cross-platform calling method, device, electronic device and computer-readable storage medium for a shared application. Background Art

[0002] Different APP platforms have different technical systems such as login and account systems, but there are cases where multiple platforms use applications with similar functions, such as wallet applications. At present, almost every APP platform has to redevelop a wallet application, but the underlying functions of wallet applications used by different platforms are the same; different platforms have their own wallet application codes, and the work of connecting accounts, connecting logins, and debugging multiple functions one by one is very huge, labor-intensive, and difficult to maintain. Summary of the invention

[0003] The present invention provides a cross-platform calling method, device and computer-readable storage medium for a shared application, the main purpose of which is to solve the problem of low reusability of the shared application.

[0004] To achieve the above-mentioned purpose, the present invention provides a cross-platform calling method for a shared application, comprising:

[0005] Receiving a user login request from a third-party platform, parsing the user login request, and obtaining an access token;

[0006] When the access token is legal, determining whether the user corresponding to the user login request is a bound user;

[0007] If the user is an unbound user, bind the user;

[0008] If the user is a bound user, receiving an operation request from the user;

[0009] Parsing the operation request to obtain encrypted information and an operation token;

[0010] When the operation token is legal, the encrypted information is verified and when the encrypted information verification succeeds, the operation corresponding to the operation request is executed.

[0011] Optionally, parsing the user login request to obtain an access token includes:

[0012] Extracting the data type field of the user login request;

[0013] Selecting a parser corresponding to the data type field to parse the login request to obtain parsed data;

[0014] The data at a preset position in the parsed data is extracted as an access token.

[0015] Optionally, after obtaining the access token, the method further includes:

[0016] Decrypt the access token to obtain the platform information of the third-party platform;

[0017] Verify whether the platform information of the third-party platform exists in a preset authorized platform database;

[0018] If the platform information of the third-party platform does not exist in the preset authorization platform database, the access token is determined to be illegal;

[0019] If the platform information of the third-party platform exists in the preset authorized platform database, the access token is determined to be legal.

[0020] Optionally, determining whether the user corresponding to the user login request is a bound user includes:

[0021] Obtaining the user's account information, and searching in a preset user binding table according to the account information;

[0022] If the account information is retrieved in the user binding table, the user is determined to be a bound user;

[0023] If the account information is not retrieved in the user binding table, the user is determined to be an unbound user.

[0024] Optionally, parsing the operation request to obtain encrypted information and an operation token includes:

[0025] Splitting the operation request into a request header and a request body;

[0026] Parsing the request body to obtain an operation token;

[0027] The request header is traced to obtain encrypted information corresponding to the operation request.

[0028] Optionally, tracing the request header to obtain encrypted information corresponding to the operation request includes:

[0029] Identify a request header data class in the operation request;

[0030] Performing reflection operation on the request header data class to obtain the request header method;

[0031] Constructing a request header extraction statement according to the request header method;

[0032] Execute the request header extraction statement to extract the request message header in the access request;

[0033] The message header is parsed to obtain encrypted information.

[0034] Optionally, the executing the operation corresponding to the operation request includes:

[0035] Extracting an operation code from the operation request;

[0036] The corresponding page address is retrieved according to the operation code, and a jump is performed according to the page address.

[0037] In order to solve the above problems, the present invention further provides a cross-platform calling device for a shared application, the device comprising:

[0038] An access token acquisition module is used to receive a user login request from a third-party platform, parse the user login request, and obtain an access token;

[0039] A binding user verification module, used to determine whether the user corresponding to the user login request is a bound user when the access token is legal, and to bind the user if the user is an unbound user;

[0040] An operation token acquisition module, used for receiving an operation request from the user when the user is a bound user; parsing the operation request to obtain encrypted information and an operation token;

[0041] The operation request execution module is used to verify the encrypted information when the access token is legal and execute the operation corresponding to the operation request when the encrypted information verification succeeds.

[0042] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0043] at least one processor; and,

[0044] a memory communicatively connected to the at least one processor; wherein,

[0045] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cross-platform calling method of the shared application described above.

[0046] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the cross-platform calling method of the shared application described above.

[0047] The embodiment of the present invention initiates a user access request to a shared application through a third-party platform, and verifies whether the conditions for using the shared application are met based on the access token in the user access request, thereby improving the security of the shared application in multiple platforms; by establishing a binding between the user on the third-party platform and the shared application, the shared application can be called; by verifying the operation request of the user on the third-party platform, the security of the function corresponding to the user's operation request in the shared application is improved; by establishing a legal binding relationship between the third-party platform and the shared application, the adaptation of the shared application in multiple platform scenarios can be achieved, thereby realizing the multi-platform reuse of the shared application. Therefore, the cross-platform calling method, device, electronic device and computer-readable storage medium of the shared application proposed in the present invention can solve the problem of low reusability of shared applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of a flow chart of a cross-platform calling method for a shared application provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of a process for obtaining an access token according to an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of a process for obtaining encryption information and operating a token provided in one embodiment of the present invention;

[0051] Figure 4 A functional module diagram of a cross-platform calling device for a shared application provided by an embodiment of the present invention;

[0052] Figure 5 A schematic diagram of the structure of an electronic device for implementing the cross-platform calling method of a shared application provided by an embodiment of the present invention.

[0053] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0054] 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.

[0055] The embodiment of the present application provides a cross-platform calling method for a shared application. The execution subject of the cross-platform calling method of the shared application includes but is not limited to at least one of the electronic devices such as the server, the terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the cross-platform calling method of the shared application can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0056] Reference Figure 1 FIG. 1 is a flow chart of a cross-platform calling method for a shared application provided by an embodiment of the present invention. In this embodiment, the cross-platform calling method for a shared application includes:

[0057] S1. Receive a user login request from a third-party platform, parse the user login request, and obtain an access token;

[0058] In an embodiment of the present invention, the user login request of the third-party platform is a request sent by the user through the third-party platform. For example, assuming that the wallet application is a shared application, after the user logs in to the third-party platform, if he wants to call the wallet application, the third-party platform needs to initiate a login request to the wallet application.

[0059] In an embodiment of the present invention, the access token includes an access token and a user access token. In an embodiment of the present invention, before a user issues a login request, when a user logs in to a third-party platform, a user access token and an access token can be generated according to user information and third-party platform information, respectively. For example, after a user logs in to a third-party platform and has not yet used a wallet application, the wallet application will generate an access token that can access the wallet according to the third-party platform, and when the user accesses the wallet, the access token will be carried by the access request.

[0060] In the embodiment of the present invention, before parsing the user login request to obtain the access token, the method may further include:

[0061] Obtaining platform information of a third-party platform, encrypting the platform information of the third-party platform, and generating encrypted data;

[0062] The encrypted data is encoded according to a preset algorithm to obtain summary data with a fixed length and the summary data is used as an access token.

[0063] Specifically, the embodiment of the present invention can encrypt the platform information of the third-party platform based on the AES (Advanced Encryption Standard, Rijndael encryption method) encryption algorithm to generate encrypted data, and use the MD5 (Message Digest Algorithm) algorithm to encode the encrypted data to generate summary data with a fixed length.

[0064] In the embodiment of the present invention, when encrypting the platform information of the third-party platform, the issuing name of the shared application may be attached to the access token of the third-party platform to assist in the subsequent verification of the legitimacy of the token.

[0065] In the embodiment of the present invention, please refer to Figure 2 As shown, the parsing of the user login request to obtain an access token includes:

[0066] S11, extracting the data type field of the user login request;

[0067] S12, selecting a parser corresponding to the data type field to parse the login request to obtain parsed data;

[0068] S13: Extract data at a preset position in the parsed data as an access token.

[0069] In detail, the data type field is a field used to identify the type of data in the login request. The data type field of the login request can be extracted using a pre-built regular expression. The regular expression is a pre-compiled function that can recall data in a fixed format.

[0070] In the embodiment of the present invention, the parser can evaluate the syntax of the script when it is executed on the server, which includes but is not limited to C language and Java.

[0071] In the embodiment of the present invention, the data packet parsed by the parser contains data corresponding to the access token, and the position of the data in the parsed data may be fixed at a certain preset position.

[0072] S2. Determine whether the access token is legal;

[0073] In an embodiment of the present invention, the access token may include a user access token and a third-party platform access token. Therefore, if the access token is to be verified as legal, the user access token and the third-party platform access token need to be verified separately. When the user access token and the third-party platform access token are the same, the access token is legal.

[0074] In the embodiment of the present invention, the determining whether the access token is legal includes:

[0075] Decrypting the access token to obtain platform information of the third-party platform;

[0076] Verify whether the platform information of the third-party platform exists in a preset authorized platform database;

[0077] If the platform information of the third-party platform does not exist in the preset authorization platform database, the access token is determined to be illegal;

[0078] If the platform information of the third-party platform exists in the preset authorized platform database, the access token is determined to be legal.

[0079] In the embodiment of the present invention, the user access token can be decrypted by a key, a decryption algorithm, etc.

[0080] In the embodiment of the present invention, if the user access token contains the issuing name of the shared application, it is also possible to verify whether the user access token is legal based on the issuing name.

[0081] If the access token is illegal, execute S3 and reject the user login request;

[0082] In an embodiment of the present invention, if the access token is not legal, it means that the legitimacy verification of both the user access token and the third-party platform access token has not passed, which means that the user and the third-party platform corresponding to the user do not have the conditions to access the shared application, and therefore cannot access the shared application, and the user login request is rejected.

[0083] If the access token is legal, execute S4 to determine whether the user corresponding to the user login request is a bound user;

[0084] In an embodiment of the present invention, under the condition that the user and the platform corresponding to the user have access to the shared application, in order to access the shared application, it is also necessary to determine whether the user is specifically connected to the interface of the shared application. Only when the user is connected to the interface of the shared application can the user use the shared application normally.

[0085] In the embodiment of the present invention, the determining whether the user corresponding to the user login request is a bound user includes:

[0086] Obtaining the user's account information, and searching in a preset user binding table according to the account information;

[0087] If the account information is retrieved in the user binding table, the user is determined to be a bound user;

[0088] If the account information is not retrieved in the user binding table, the user is determined to be an unbound user.

[0089] In the embodiment of the present invention, the user binding table contains the account information of the user who establishes a connection with the interface of the shared application. After the user is bound to the shared application, the account information of the user will be stored in the user binding table.

[0090] If the user is not a bound user, execute S5, bind the user, and execute the following S6;

[0091] In an embodiment of the present invention, an interface connection is established between the user and the shared application by calling the binding interface of the shared application. The connection process is a process in which the shared application authorizes the user. After the user is bound, the account information corresponding to the user is stored in the user binding table, which is used to determine whether the user is a bound user when the user calls the shared application later.

[0092] If the user is a bound user, executing S6, receiving an operation request from the user;

[0093] In an embodiment of the present invention, the operation request is an operation request issued by the user according to the function of the shared application. For example, when the shared application is a wallet application, there are functions "balance" and "bank card". In the "bank card" function, there may be functions "bank card A", "bank card B" and "add bank card". The user can initiate an operation request based on the above functions, such as initiating an operation request based on "add bank card".

[0094] S7, parsing the operation request, obtaining encrypted information and an operation token, and determining whether the operation token is legal;

[0095] In the embodiment of the present invention, please refer to Figure 3 As shown, the parsing of the operation request to obtain the encrypted information and the operation token includes:

[0096] S71, splitting the operation request into a request header and a request body;

[0097] S72, parsing the request body to obtain an operation token;

[0098] S73. Tracing the request header to obtain encrypted information corresponding to the operation request.

[0099] In the embodiment of the present invention, a pre-acquired parser may be used to parse the request body to obtain the identity token contained in the target request. The parser includes CarakanC / C++, SquirrelFishC++, SquirrelFishExtremeC++, etc.

[0100] In the embodiment of the present invention, tracing the information source of the request header to obtain the encrypted information corresponding to the operation request includes:

[0101] Identify a request header data class in the operation request;

[0102] Performing reflection operation on the request header data class to obtain the request header method;

[0103] Constructing a request header extraction statement according to the request header method;

[0104] Execute the request header extraction statement to extract the request message header in the access request;

[0105] The message header is parsed to obtain encrypted information.

[0106] In detail, an embodiment of the present invention can determine the request header data class in the operation request by traversing the operation request, and then trace the information of the request header according to the request body data class. The request header data class can be used to implement the operation request. By performing reflection operations on the request header data class, the request header method can be obtained.

[0107] Specifically, the request header data class is subjected to a reflection operation to obtain a request header method. For example, the request header data class is subjected to a reflection operation using the following Java statement:

[0108] Stringname="Hualing"; Classc1=name.getClass(); System.out.println(c1.getName()).

[0109] Among them, "Hualing" is the request header data class.

[0110] After the request header data class is reflected, the request header method can be obtained. For example, the following request header extraction statement can be constructed according to the request header method:

[0111] String name=field.getName().

[0112] In an embodiment of the present invention, the encrypted information in each operation request is extracted through reflection operation, so as to realize the extraction of the real encrypted information of each operation request, avoid malicious attack requests to extract the encrypted information and apply the encrypted information, and avoid security problems in the subsequent identification process, thereby improving the security of operation execution.

[0113] In the embodiment of the present invention, the legality of the operation token can be verified through a unified filter; if it is legal, the encrypted information is checked; if it is illegal, the access condition is not met and the access is stopped.

[0114] If the operation token is illegal, execute S3 and stop access;

[0115] If the access token is legal, execute S8, verify the encrypted information and determine whether the verification is successful;

[0116] In the embodiment of the present invention, the encrypted information includes information such as encryption and signing of operation parameters in the operation request by the shared application when the user initiates the operation request.

[0117] In an embodiment of the present invention, the verification process of the encrypted information can be: using the decryption private key of the asymmetric function to decrypt the hash value in the encrypted and signed information to obtain the encrypted data and the hash value, and then the hash function can be used to recalculate the hash value of the encrypted data, and the calculated hash value is compared with the decrypted hash value. When the calculated hash value is consistent with the decrypted hash value, it is determined that the encrypted data has integrity. When the calculated hash value is inconsistent with the decrypted hash value, it is determined that the encrypted data does not have integrity, and then the verification fails. When the encrypted data has integrity, the encrypted data is decrypted using a symmetric encryption algorithm to obtain the token contained in the decrypted data, and whether it is a shared application token is confirmed based on the token, and then it is determined whether the verification is successful.

[0118] If the verification fails, execute S3 and stop access;

[0119] When the verification is successful, execute S9 to execute the operation corresponding to the operation request.

[0120] In the embodiment of the present invention, the operation request includes a corresponding operation code, and the corresponding function can be called through the operation code.

[0121] In the embodiment of the present invention, the executing the operation corresponding to the operation request includes:

[0122] Extracting an operation code from the operation request;

[0123] The corresponding page address is retrieved according to the operation code, and a jump is performed according to the page address.

[0124] In the embodiment of the present invention, after executing the operation corresponding to the operation request, the method further includes:

[0125] Extract the HTML code of the page address and add CSS attributes;

[0126] The HTML code with CSS attributes is packaged and sent to the front-end page, and displayed through the front-end page parsing and rendering.

[0127] Specifically, by extracting the page address and rendering it, the front end can display the page corresponding to the operation request. For example, when the shared application is a wallet application, there are functions "balance" and "bank card", and in the "bank card" function there may be functions "bank card A", "bank card B" and "add bank card". The user initiates an operation request according to "add bank card" and executes the operation corresponding to the operation request, that is, transfers to the specific operation page for adding a bank card.

[0128] The embodiment of the present invention initiates a user access request to a shared application through a third-party platform, and verifies whether the conditions for using the shared application are met based on the access token in the user access request, thereby improving the security of the shared application in multiple platforms; by establishing a binding between the user of the third-party platform and the shared application, the shared application can be called; by verifying the operation request of the user of the third-party platform, the security of the function corresponding to the user's operation request in the shared application is improved; by establishing a legal binding relationship between the third-party platform and the shared application, the adaptation of the shared application in multiple platform scenarios can be achieved, thereby realizing the multi-platform reuse of the shared application. Therefore, the cross-platform calling method of the shared application proposed in the present invention can solve the problem of low reusability of the shared application.

[0129] like Figure 4 , which is a functional module diagram of a cross-platform calling device for a shared application provided by an embodiment of the present invention.

[0130] The cross-platform calling device 100 for shared applications of the present invention can be installed in an electronic device. According to the functions to be implemented, the cross-platform calling device 100 for shared applications can include an access token acquisition module 101, a binding user verification module 102, an operation token acquisition module 103, and an operation request execution module 104. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0131] In this embodiment, the functions of each module / unit are as follows:

[0132] The access token acquisition module 101 is used to receive a user login request from a third-party platform, parse the user login request, and obtain an access token;

[0133] The bound user verification module 102 is used to determine whether the user corresponding to the user login request is a bound user when the access token is legal, and to bind the user if the user is an unbound user;

[0134] The operation token acquisition module 103 is used to receive the operation request of the user when the user is a bound user; parse the operation request to obtain the encrypted information and the operation token;

[0135] The operation request execution module 104 is configured to verify the encrypted information when the access token is legal and to execute the operation corresponding to the operation request when the encrypted information verification succeeds.

[0136] In detail, each module described in the cross-platform calling device 100 for sharing applications in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The cross-platform calling method of the shared application described in is the same technical means and can produce the same technical effect, so it will not be repeated here.

[0137] like Figure 5 , which is a schematic diagram of the structure of an electronic device for implementing a cross-platform calling method for a shared application provided by an embodiment of the present invention.

[0138] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a cross-platform calling program for a shared application.

[0139] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, cross-platform calling programs for executing shared applications, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0140] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the cross-platform calling program of the shared application, but also can be used to temporarily store data that has been output or is to be output.

[0141] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0142] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0143] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0144] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0145] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0146] The cross-platform calling program of the shared application stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0147] Receiving a user login request from a third-party platform, parsing the user login request, and obtaining an access token;

[0148] When the access token is legal, determining whether the user corresponding to the user login request is a bound user;

[0149] If the user is an unbound user, bind the user;

[0150] If the user is a bound user, receiving an operation request from the user;

[0151] Parsing the operation request to obtain encrypted information and an operation token;

[0152] When the operation token is legal, the encrypted information is verified and when the encrypted information verification succeeds, the operation corresponding to the operation request is executed.

[0153] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0154] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0155] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0156] Receiving a user login request from a third-party platform, parsing the user login request, and obtaining an access token;

[0157] When the access token is legal, determining whether the user corresponding to the user login request is a bound user;

[0158] If the user is an unbound user, bind the user;

[0159] If the user is a bound user, receiving an operation request from the user;

[0160] Parsing the operation request to obtain encrypted information and an operation token;

[0161] When the operation token is legal, the encrypted information is verified and when the encrypted information verification succeeds, the operation corresponding to the operation request is executed.

[0162] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0163] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0165] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0166] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0167] 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.

[0168] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0169] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A cross-platform calling method for a shared application, characterized in that: The method comprises: Receiving a user login request from a third-party platform, parsing the user login request, and obtaining an access token, wherein the user login request from the third-party platform is a request sent by a user through the third-party platform; When the access token is not legal, the user login request is rejected; or, when the access token is legal, it is determined whether the user corresponding to the user login request is a bound user, wherein the access token includes a third-party platform access token and a user access token, wherein if the access token is not legal, it means that the legitimacy verification of both the user access token and the third-party platform access token has not passed, which means that the user and the third-party platform corresponding to the user do not have the conditions to access the shared application; If the user is an unbound user, bind the user; If the user is a bound user, receiving an operation request from the user, where the operation request is an operation request issued by the user according to a function of a shared application; Parsing the operation request to obtain encrypted information and an operation token; When the operation token is legal, the encrypted information is verified and when the encrypted information verification succeeds, the operation corresponding to the operation request is executed, wherein the operation request includes a corresponding operation code, and the corresponding function can be called through the operation code; After obtaining the access token, the method further includes: decrypting the access token to obtain the platform information of the third-party platform; verifying whether the platform information of the third-party platform exists in a preset authorization platform database; if the platform information of the third-party platform does not exist in the preset authorization platform database, determining that the access token is illegal; if the platform information of the third-party platform exists in the preset authorization platform database, determining that the access token is legal; The determining whether the user corresponding to the user login request is a bound user includes: obtaining the account information of the user, and searching a preset user binding table according to the account information; if the account information is retrieved in the user binding table, determining that the user is a bound user; if the account information is not retrieved in the user binding table, determining that the user is an unbound user; The parsing of the operation request to obtain the encrypted information and the operation token includes: splitting the operation request into a request header and a request body; parsing the request body to obtain the operation token; tracing the information source of the request header to obtain the encrypted information corresponding to the operation request; The step of tracing the information of the request header to obtain the encrypted information corresponding to the operation request includes: identifying the request header data class in the operation request; performing reflection operation on the request header data class to obtain the request header method; constructing a request header extraction statement according to the request header method; executing the request header extraction statement to extract the request message header in the operation request; and parsing the message header to obtain the encrypted information.

2. The cross-platform calling method for a shared application according to claim 1, characterized in that: The parsing of the user login request to obtain an access token includes: Extracting the data type field of the user login request; Selecting a parser corresponding to the data type field to parse the login request to obtain parsed data; The data at a preset position in the parsed data is extracted as an access token.

3. The cross-platform calling method for a shared application according to any one of claims 1 to 2, characterized in that: The executing the operation corresponding to the operation request includes: Extracting an operation code from the operation request; The corresponding page address is retrieved according to the operation code, and a jump is performed according to the page address.

4. A cross-platform calling device for a shared application, used to implement the cross-platform calling method for a shared application as claimed in any one of claims 1 to 3, characterized in that: The device comprises: An access token acquisition module is used to receive a user login request from a third-party platform, parse the user login request, and obtain an access token; A binding user verification module, used to determine whether the user corresponding to the user login request is a bound user when the access token is legal, and to bind the user if the user is an unbound user; An operation token acquisition module, used for receiving an operation request from the user when the user is a bound user; parsing the operation request to obtain encrypted information and an operation token; The operation request execution module is used to verify the encrypted information when the access token is legal and execute the operation corresponding to the operation request when the encrypted information verification succeeds.

5. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cross-platform calling method for a shared application as claimed in any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cross-platform calling method for a shared application as claimed in any one of claims 1 to 3 is implemented.