Calling method, device, medium and electronic equipment of application program plug-in

By adding an application plugin to the hosting program, obtaining the user's temporary login code, and using the plugin server for identity verification and business processing, the information security and convenience issues of overseas tax refund companies within the host program ecosystem are resolved, enabling secure and efficient processing of overseas tax refund business.

CN114116036BActive Publication Date: 2025-10-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010801068.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-11
Publication Date
2025-10-24
Estimated Expiration
2040-08-11

AI Technical Summary

Technical Problem

Overseas tax refund companies face issues of information security and convenience in collecting users' passport information and making tax refund payments. Existing technologies are insufficient to securely and efficiently complete business processing within the host application ecosystem.

Method used

By adding an application plugin to the hosting program, the user's temporary login code can be obtained and the user's identity can be queried through the host program interface. The plugin server can then perform OCR recognition or tax refund code processing to achieve business response and return the call result.

Benefits of technology

It ensures the security and convenience of the hosted program within the host program ecosystem, and guarantees the accuracy and error-free nature of business processing, such as securely collecting passport information and completing tax refund payments accurately during overseas tax refund processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116036B_ABST
    Figure CN114116036B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method, device, medium and electronic equipment for calling an application plug-in. The application plug-in is added in a host program, the host program runs in a host environment provided by a host program, and the method comprises: if it is detected that the application plug-in is called in the host program, obtaining a user temporary login code of the host program; sending the user temporary login code to a server corresponding to the application plug-in, so that the server queries a user identity based on an interface provided by the host program; receiving login state information returned by the server after the user identity is queried, and obtaining a business response result corresponding to the application plug-in; and returning a calling result of the application plug-in to the host program based on the business response result. The technical solution of the embodiments of the present application can realize that the host program processes a business by calling the application plug-in, and ensures the security and convenience of the business processing process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers and communications, in particular to a calling method and device of application program plug-in, medium and electronic equipment. BACKGROUND

[0002] A host program is a program that relies on a host program and can be used without downloading and installing, such as a small program, a fast application, and the like. At present, an overseas tax refund company develops its own tax refund small program, and refunds tax refund money to a user through the tax refund small program. In the tax refund process, there are needs of collecting passport information of the user and how to pay the tax refund money into an account in China. However, the processing manner in the related art causes problems of unsafe passport information collection process and cumbersome tax refund money payment process. SUMMARY

[0003] Embodiments of the present application provide a calling method and device of application program plug-in, medium and electronic equipment, so as to at least partly realize that a host program processes a business by calling an application program plug-in, and ensure the security and convenience of the business processing process.

[0004] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0005] According to an aspect of an embodiment of the present application, a calling method of an application program plug-in is provided. The application program plug-in is added in a host program, and the host program runs in a host environment provided by a host program. The calling method of the application program plug-in includes: if it is detected that the application program plug-in is called in the host program, a user temporary login code of the host program is acquired; the user temporary login code is sent to a server corresponding to the application program plug-in, so that the server queries a user identity corresponding to the user temporary login code based on an interface provided by the host program; login state information returned by the server after the user identity is queried is received, and a business response result corresponding to the application program plug-in is acquired; and a calling result of the application program plug-in is returned to the host program based on the business response result.

[0006] According to an aspect of some embodiments of the present application, a method for calling an application plug-in is provided. The application plug-in is added in a host program, and the host program runs in a host environment provided by a host program. The method comprises the following steps: receiving a user temporary login code sent by the application plug-in, wherein the user temporary login code is obtained by the application plug-in after the application plug-in is called in the host program; querying a user identity corresponding to the user temporary login code based on an interface provided by the host program; returning login state information to the application plug-in after the user identity is queried, and returning a business response result corresponding to the application plug-in to the application plug-in, wherein the business response result is used to make the application plug-in return a calling result of the application plug-in to the host program.

[0007] According to an aspect of some embodiments of the present application, a device for calling an application plug-in is provided. The application plug-in is added in a host program, and the host program runs in a host environment provided by a host program. The device comprises the following units: an obtaining unit configured to obtain a user temporary login code of the host program when it is detected that the application plug-in is called in the host program; a sending unit configured to send the user temporary login code to a server corresponding to the application plug-in, so that the server queries a user identity corresponding to the user temporary login code based on an interface provided by the host program; a first receiving unit configured to receive login state information returned by the server after the user identity is queried, and obtain a business response result corresponding to the application plug-in; and a first returning unit configured to return a calling result of the application plug-in to the host program based on the business response result.

[0008] In some embodiments of the present application, based on the foregoing scheme, if the application plug-in comprises an OCR (Optical Character Recognition) plug-in, the first receiving unit is configured to: send a picture to be recognized and the login state information to the server, so that the server performs OCR recognition on the picture to be recognized; and receive character information obtained by the server by performing OCR recognition on the picture to be recognized based on the login state information.

[0009] In some embodiments of the present application, based on the foregoing scheme, the host program comprises a tax refund service program of an overseas tax service provider; and the first receiving unit is further configured to receive a tax refund code returned by the server after the user identity is queried; and the first returning unit is further configured to feed back the tax refund code to the host program, so that the host program initiates a tax refund request based on the tax refund code.

[0010] In some embodiments of the present application, based on the foregoing scheme, the first returning unit is configured to return the character information to the host program, or display the character information, and if a confirmation instruction for the character information is detected, return the character information to the host program.

[0011] In some embodiments of the present application, based on the foregoing scheme, if the application plug-in includes a plug-in for querying specified information, the first receiving unit is configured to obtain the specified information returned by the server according to the user identity, the specified information being the specified information associated with the user identity and queried by the server according to the user identity.

[0012] In some embodiments of the present application, based on the foregoing scheme, the specified information includes a tax refund code; and the first returning unit is configured to return the tax refund code to the host program, so that the host program initiates a tax refund request to the server based on the tax refund code.

[0013] In some embodiments of the present application, based on the foregoing scheme, the obtaining unit is configured to display authorization prompt information for obtaining user information of the host program according to information of the host program; and after receiving confirmation authorization information for the authorization prompt information, obtain a user temporary login code of the host program.

[0014] According to an aspect of an embodiment of the present application, there is provided an application plug-in calling device, the application plug-in being added in a host program, the host program running in a host environment provided by a host program, the application plug-in calling device comprising: a second receiving unit configured to receive a user temporary login code sent by the application plug-in, the user temporary login code being a user temporary login code of the host program obtained by the application plug-in after the application plug-in is called in the host program; a querying unit configured to query a user identity corresponding to the user temporary login code based on an interface provided by the host program; and a second returning unit configured to return login state information to the application plug-in after the user identity is queried, and return a business response result corresponding to the application plug-in to the application plug-in, the business response result being used to make the application plug-in return a calling result of the application plug-in to the host program.

[0015] In some embodiments of the present application, based on the foregoing scheme, if the application plug-in comprises an optical character recognition (OCR) plug-in, the second returning unit is configured to: receive a picture to be recognized and the login state information sent by the application plug-in; perform OCR recognition on the picture to be recognized to obtain character information; and return the character information to the application plug-in based on the login state information.

[0016] In some embodiments of the present application, based on the foregoing scheme, the hosted program comprises a tax refund service program of an overseas tax service party; and the second returning unit is further configured to: after querying the user identity, return a tax refund code corresponding to the user identity to the application plug-in, so that the application plug-in feeds back the tax refund code to the hosted program, the tax refund code being used to enable the hosted program to initiate a tax refund request.

[0017] In some embodiments of the present application, based on the foregoing scheme, the hosted program comprises a tax refund service program of an overseas tax service party, and the business response result comprises a tax refund code; the calling device of the application plug-in further comprises: a third receiving unit configured to receive a tax refund request sent by the hosted program based on the tax refund code; a processing unit configured to perform tax refund processing in an account corresponding to the user identity based on the tax refund request; and the second returning unit is further configured to: if the tax refund in the account corresponding to the user identity is successful, return notification information of tax refund success to the hosted program.

[0018] According to an aspect of some embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program, which, when executed by a processor, implements the method for calling an application plug-in as described in the above embodiments.

[0019] According to an aspect of some embodiments of the present application, there is provided an electronic device, comprising: one or more processors; and a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method for calling an application plug-in as described in the above embodiments.

[0020] According to an aspect of some embodiments of the present application, there is provided a computer program product or computer program, comprising computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for calling an application plug-in provided in the various optional embodiments described above.

[0021] In the technical solutions provided in some embodiments of the present application, an application plug-in can be added in the host program, when it is detected that the application plug-in is called in the host program, a user temporary login code of the host program is acquired, and then the user temporary login code is sent to a server corresponding to the application plug-in by the application plug-in, so that the server queries a user identity corresponding to the user temporary login code based on an interface provided by the host program, after receiving login state information returned by the server after the user identity is queried, a business response result corresponding to the application plug-in is acquired, and then a calling result of the application plug-in is returned to the host program by the application plug-in based on the business response result. It can be seen that the technical solutions of the embodiments of the present application realize the information matching processing between the host program and the host program through the application plug-in added in the host program, and then the host program can be integrated into the ecological system provided by the host program, so that the host program realizes business processing by calling the application plug-in, and the security and convenience of the business processing process are ensured.

[0022] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0023] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. In the drawings:

[0024] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied is shown;

[0025] Figure 2 A flowchart of a calling method of an application plug-in according to an embodiment of the present application is shown;

[0026] Figure 3 A flowchart of a calling method of an application plug-in according to an embodiment of the present application is shown;

[0027] Figure 4 A flowchart of using the tax refund OCR plug-in for OCR identification according to an embodiment of the present application is shown;

[0028] Figures 5 to 7 An interface schematic diagram of using the tax refund OCR plug-in for OCR identification according to an embodiment of the present application is shown;

[0029] Figure 8 A flowchart of using the Tax Refund Code Plug-in to query a tax refund code according to an embodiment of the present application is shown;

[0030] Figures 9 to 11 A schematic diagram of an interface for tax refund processing using the tax refund code plug-in according to an embodiment of the present application is shown;

[0031] Figure 12 A block diagram of a device for calling an application plug-in according to an embodiment of the present application is shown;

[0032] Figure 13 A block diagram of a device for calling an application plug-in according to an embodiment of the present application is shown;

[0033] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0035] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0036] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0037] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0038] It should be noted that the "multiple" mentioned in the present text refers to two or more than two. The "and / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the existence of A alone, the existence of A and B together, and the existence of B alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0039] In an application scenario of the present application, an overseas tax refund company will develop its own tax refund applet to refund the tax refund to the user through the tax refund applet. In related technologies, if the overseas tax refund company needs to collect the passport information of tourists to generate a tax refund form, there are usually only two options: the first is to purchase hardware terminal equipment such as a passport reader, and collect the passport information of the user through the hardware terminal into the tax refund background system of the company; the second is to build an independent APP (Application), develop the ability of OCR (Optical Character Recognition) identification of passport information in the APP, or purchase the service of OCR identification of passport information from a third party, and then transmit the collected passport information to the tax refund background system. Whether it is to purchase hardware terminal equipment or to integrate the OCR identification capability of the third party into the APP, it is not as good as completing it in the ecology provided by the host program in terms of reaching the population of domestic users, and it is not safe to integrate the OCR identification capability of the third party into the applet, and it is difficult to deeply couple with the applet platform.

[0040] At the same time, if the overseas tax refund company needs to complete the payment of the tax refund to the balance of the domestic account, there are usually only two options: the first is to abandon the self-operated applet and use the tax refund code of the applet platform to complete the tax refund; the second is to use the self-operated applet to complete the tax refund payment by letting the user input the account number. Generally speaking, the tax refund company tends to use the self-operated applet, which is conducive to providing a closed-loop tax refund service and depositing traffic on the self-operated platform, but if the tax refund payment is completed by letting the user input the account number, it is easy to cause the problem of being unable to recover due to the user inputting the account number incorrectly.

[0041] In an exemplary system architecture of the present application, as shown in Figure 1 Fig. 1, it can include a terminal device 101 (the terminal device 101 can be a smart phone, or it can also be a tablet computer, a portable computer, a desktop computer, etc.), a network 104 and a plug-in service end 102, a host program platform end 103. The network 104 is used as a medium to provide a communication link between the terminal device 101 and the plug-in service end 102. The network 104 can include various connection types, such as wired communication links, wireless communication links, etc.

[0042] In one embodiment of the present application, a host program runs on the terminal device 101, which provides a host environment. The overseas tax refund company applet runs in the host environment, and a plug-in 105 is added to the overseas tax refund company applet. If the plug-in 105 is triggered in the overseas tax refund company applet, the plug-in 105 can obtain the user's temporary login code for the overseas tax refund company applet, and then send the user's temporary login code to the plug-in server 102 via the network 104. After receiving the user's temporary login code, the plug-in server 102 can query the host program platform 103 for the user identity corresponding to the user's temporary login code based on the interface provided by the host program. If the plug-in server 102 finds the user identity, it can return login status information to the plug-in 105.

[0043] In one embodiment of the present application, if the plug-in 105 is an OCR recognition plug-in, then after the plug-in 105 receives the user identity identifier returned by the plug-in server 102, the image to be OCR recognized can be sent to the plug-in server 102 through the network 104 for OCR recognition processing. After the plug-in server 102 performs OCR recognition on the image to be OCR recognized, the recognized character information is sent to the plug-in 105 through the network 104, and then the plug-in 105 returns the recognized character information to the overseas tax refund company applet.

[0044] In one embodiment of the present application, if plug-in 105 is a plug-in for querying the tax refund code, then after or at the same time as plug-in 105 receives the user identity identifier returned by the plug-in server 102, it can also receive the tax refund code returned by the plug-in server 102, and then plug-in 105 returns the tax refund code to the overseas tax refund company applet. After receiving the tax refund code, the overseas tax refund company applet can initiate a tax refund request to the plug-in server 102 based on the tax refund code, ensuring that the overseas tax refund company applet can be integrated into the host program's ecosystem and can complete the tax refund payment without error.

[0045] The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application:

[0046] Figure 2 The flowchart of the calling method of the application plug-in according to one embodiment of the present application is shown. The application plug-in is added to the host program, and the host program runs in the host environment provided by the host program. The calling method of the application plug-in can be executed by the application plug-in. Figure 2 As shown, the calling method of the application plug-in includes at least steps S210 to S240, which are described in detail as follows:

[0047] In step S210, if it is detected that the application plug-in is called in the host program, the user temporary login code of the host program is acquired.

[0048] In an embodiment of the present application, the host program is a program that relies on a host program and can be used without downloading and installing, such as a small program, a fast application, and the like. In a computer environment, the software environment on which the host program relies is referred to as a host environment, and the program that provides the host environment can be referred to as a host program. The host program can be, for example, an open platform, an application capable of running the host program, an operating system of a mobile terminal, and the like.

[0049] The application plug-in is a functional component that can be added to the host program for direct use. A developer can develop a plug-in like a small program, for use by other small programs. Meanwhile, a small program developer can directly use the plug-in in the small program without repeated development, thereby providing more abundant services for users.

[0050] In an embodiment of the present application, if it is detected that the application plug-in is triggered in the host program (for example, the application plug-in is clicked, or a function is triggered and the application plug-in needs to be called), it can be determined that the application plug-in is called in the host program.

[0051] In an embodiment of the present application, when the user temporary login code of the host program is acquired, the authorization prompt information for acquiring the user information of the host program can be displayed according to the information of the host program, and the user temporary login code of the host program is acquired after the confirmation authorization information for the authorization prompt information is received.

[0052] In step S220, the acquired user temporary login code is sent to the server corresponding to the application plug-in, so that the server queries the user identity corresponding to the user temporary login code based on the interface provided by the host program.

[0053] In an embodiment of the present application, the server corresponding to the application plug-in is a server of the application plug-in, which is used to communicate with the application plug-in to process the request of the application plug-in. The server corresponding to the application plug-in can query the user identity corresponding to the user temporary login code through the user temporary login code, the application key, the application ID, and the like. The user identity is the identity of the user in the host program. For example, the user identity can be an OpenID.

[0054] Continuing to refer to Figure 2 In step S230, the login state information returned by the server after the user identity is queried is received, and the business response result corresponding to the application plug-in is acquired.

[0055] In step S240, the application plug-in returns the calling result of the application plug-in to the host program based on the obtained service response result.

[0056] In an embodiment of the present application, the application plug-in can include an OCR plug-in, and the process of obtaining the service response result corresponding to the application plug-in can be that the application plug-in sends the to-be-recognized picture and the login state information to the server corresponding to the application plug-in, and then the server performs OCR recognition on the to-be-recognized picture, and the application plug-in can receive the character information obtained by performing OCR recognition on the to-be-recognized picture and returned by the server based on the login state information.

[0057] In an embodiment of the present application, after obtaining the character information obtained by performing OCR recognition on the to-be-recognized picture, the application plug-in can directly return the character information to the host program, or the application plug-in can display the character information, and if a confirmation instruction for the character information is detected, the character information is returned to the host program. The technical scheme of the embodiment enables the user to confirm the result of the OCR recognition, and of course, the user can also edit and correct the result, thereby ensuring the accuracy of the character information returned to the host program.

[0058] In an embodiment of the present application, the host program can be a tax refund service program of an overseas tax service party, and in this case, the application plug-in can also receive the tax refund code returned by the server after querying the user identity, and then the application plug-in feeds back the tax refund code to the host program, so that the host program initiates a tax refund request based on the tax refund code. This way can ensure that the tax refund service program of the overseas tax service party can be integrated into the ecological system of the host program and can also complete the tax refund payment and account without error.

[0059] In an embodiment of the present application, the application plug-in can include a plug-in for querying specified information, and when obtaining the service response result corresponding to the application plug-in, the application plug-in can obtain the specified information returned by the server corresponding to the application plug-in according to the user identity, and the specified information is the specified information associated with the user identity and queried by the server according to the user identity. For example, the specified information can be a tax refund code, and in this case, after obtaining the tax refund code, the application plug-in can return the tax refund code to the host program, and then the host program can initiate a tax refund request to the server based on the tax refund code. The tax refund code can be a program code corresponding to a tax refund page, such as a two-dimensional code, which is generated by encoding the access address of the tax refund page.

[0060] In an embodiment of the present application, the specified information can also be a historical tax refund record, in which case the application plug-in can obtain the historical tax refund record returned by the server corresponding to the application plug-in according to the user identity, and the application plug-in can return the historical tax refund record to the host program after obtaining the historical tax refund record, so that the host program can view the historical tax refund record of the relevant user.

[0061] Figure 2 The technical solutions of the embodiments of the present application are described from the perspective of the application plug-in, and the following describes the implementation details of the technical solutions of the embodiments of the present application from the perspective of the server corresponding to the application plug-in: Figure 3 The technical solutions of the embodiments of the present application are described from the perspective of the application plug-in, and the following describes the implementation details of the technical solutions of the embodiments of the present application from the perspective of the server corresponding to the application plug-in:

[0062] Figure 3 FIG. 3 shows a flowchart of a calling method of an application plug-in according to an embodiment of the present application. The application plug-in is added in a host program, and the host program runs in a host environment provided by a host program. The calling method of the application plug-in can be executed by a server corresponding to the application plug-in. Referring to FIG. 3, the calling method of the application plug-in at least includes steps S310 to S330, which are described in detail as follows: Figure 3

[0063] In step S310, a user temporary login code sent by the application plug-in is received. The user temporary login code is obtained by the application plug-in after the application plug-in is called in the host program.

[0064] In an embodiment of the present application, the process in which the application plug-in obtains the user temporary login code refers to the technical solutions of the aforementioned embodiments, and will not be described herein.

[0065] In step S320, a user identity corresponding to the user temporary login code is queried based on an interface provided by the host program.

[0066] In an embodiment of the present application, the server corresponding to the application plug-in can query the user identity corresponding to the user temporary login code by using the user temporary login code, an application key, an application ID, and the like. The user identity is the identity of the user in the host program. For example, the user identity can be an OpenID.

[0067] In step S330, after the user identity is queried, login state information is returned to the application plug-in, and a business response result corresponding to the application plug-in is returned to the application plug-in. The business response result is used to make the application plug-in return a calling result of the application plug-in to the host program.

[0068] ​In an embodiment of the present application, the application plug-in can include an OCR plug-in, and then the application plug-in sends the picture to be recognized and the login state information to the server corresponding to the application plug-in, and then the server receives the picture to be recognized and the login state information sent by the application plug-in, performs OCR recognition on the picture to be recognized, obtains character information, and returns the character information to the application plug-in based on the login state information.

[0069] In an embodiment of the present application, the hosted program can be a tax refund service program of an overseas tax service party, and in this case, the server corresponding to the application plug-in can return a tax refund code corresponding to the user identity to the application plug-in after querying the user identity, so that the application plug-in feeds back the tax refund code to the hosted program, and then the hosted program can initiate a tax refund request based on the tax refund code.

[0070] In an embodiment of the present application, if the hosted program initiates a tax refund request based on the tax refund code, the server corresponding to the application plug-in can perform tax refund processing in the account corresponding to the user identity based on the tax refund request, and return notification information of successful tax refund to the hosted program when the tax refund in the account corresponding to the user identity is successful. The technical scheme of this embodiment enables the hosted program to initiate a tax refund request to the server corresponding to the application plug-in based on the tax refund code, ensuring that the hosted program can be integrated into the ecological system of the host program and can complete the payment of tax refund without error.

[0071] The technical scheme of the embodiments of the present application is described above from the perspective of the application plug-in and the server corresponding to the application plug-in. The implementation details of the technical scheme of the embodiments of the present application are described in detail below taking the application plug-in as a tax refund plug-in (i.e., a plug-in for performing tax refund) as an example:

[0072] Figure 4 A flowchart of performing OCR recognition using the tax refund OCR plug-in according to an embodiment of the present application is shown, which specifically includes the following steps:

[0073] Step S401, mounting the tax refund OCR plug-in in the third-party mini-program page.

[0074] In an embodiment of the present application, for the third-party mini-program, the plug-in can be added in the "Settings-Third-party service-Plug-in management" of the mini-program management background, and after the authorization of the tax refund mini-program plug-in manager is obtained, the plug-in code package is introduced in the third-party mini-program according to the official document, and then the tax refund mini-program plug-in is mounted and instantiated in the page of the third-party mini-program, and the custom style class name, success callback function and failure function need to be injected into the mini-program.

[0075] Step S402, the user triggers OCR recognition in the third-party applet page.

[0076] In an embodiment of the present application, as shown in Figure 5 The interface for uploading the tax refund form in the third-party applet is shown, which can be the applet of an overseas tax refund company. After the user clicks the "scan tax refund QR code" control 501, the user needs to upload passport information, and then can be redirected to Figure 6 , prompting the user to log in to the tax refund channel to use the OCR plug-in.

[0077] Step S403, authorization obtains code.

[0078] In an embodiment of the present application, as shown in Figure 6 If the passport information needs to be recognized by OCR, the user can be prompted whether to allow the tax refund channel to use the public information of the user in the third-party applet. If the user triggers the "allow to use" control 601, the temporary login credential code of the third-party applet is obtained.

[0079] Step S404, the tax refund OCR plug-in sends the code to the background server.

[0080] In an embodiment of the present application, the tax refund OCR plug-in can send the code to the background server through the https protocol. The background server can be the server of the tax refund OCR plug-in.

[0081] Step S405, after receiving the code, the background server transmits appid+APPsecret+code based on the login credential verification interface provided by the platform interface service to obtain openID.

[0082] Step S406, the platform interface service returns session_key+openID, etc. to the background server.

[0083] Step S407, the background server customizes the login state, which is associated with openID and session_key.

[0084] Step S408, the background server returns the login state and the user tax refund code to the tax refund OCR plug-in.

[0085] Step S409, the tax refund OCR plug-in caches the login state.

[0086] Step S410, the tax refund OCR plug-in uploads the picture to the background server for passport OCR recognition, carrying the login state.

[0087] In an embodiment of the present application, as shown in Figure 7As shown, the user can take a passport image in the interface by triggering the shooting control 701 and upload it to the background server for OCR recognition.

[0088] Step S411, the background server returns the recognition result to the tax refund OCR plug-in.

[0089] Step S412, the user checks the result and determines.

[0090] Step S413, the tax refund OCR plug-in sends the passport information to the background server.

[0091] Step S414, the background server returns the save result to the tax refund OCR plug-in.

[0092] It should be noted that steps S413 and S414 are optional steps, and in other embodiments of the present application, steps S413 and S414 can also be omitted.

[0093] Step S415, the tax refund OCR plug-in returns the passport information to the third-party applet.

[0094] Figure 8 A flowchart for querying a tax refund code using the tax refund code plug-in according to an embodiment of the present application is shown, which specifically includes the following steps:

[0095] Step S801, the tax refund code plug-in is mounted in the third-party applet page.

[0096] In an embodiment of the present application, for the third-party applet, the plug-in can be added in the "Settings-Third-party service-Plug-in management" of the applet management background, and after the tax refund applet plug-in manager authorizes its use, the plug-in code package is introduced in the third-party applet according to the official document, and then the tax refund applet plug-in is mounted and instantiated in the page of the third-party applet, and the custom style class name, success callback function and failure function need to be injected into the applet.

[0097] Step S802, the user triggers the tax code acquisition event in the third-party applet page.

[0098] In an embodiment of the present application, as Figure 9 shown is the tax refund withdrawal page, when the user clicks the "immediate account, confirm withdrawal" control 901, it means that the user triggers the tax code acquisition event, and then it can be jumped to Figure 10 , prompting to log in to the tax refund to use the tax code plug-in.

[0099] Step S803, authorize to acquire code.

[0100] In an embodiment of the present application, asFigure 10 If it is necessary to obtain the tax refund code for tax refund, the user can be prompted whether to allow the tax refund pass to use the public information of the user in the third-party applet. If the user triggers the "allow to use" control 1001, the user temporary login credential code of the third-party applet is obtained.

[0101] In step S804, the tax refund pass plugin sends the code to the background server.

[0102] In an embodiment of the present application, the tax refund pass plugin can send the code to the background server through the https protocol. The background server can be the server of the tax refund pass plugin.

[0103] In step S805, after receiving the code, the background server passes appid+APPsecret+code based on the login credential verification interface provided by the platform interface service to obtain openID.

[0104] In step S806, the platform interface service returns session_key+openID, etc. to the background server.

[0105] In step S807, the background server customizes the login state, which is associated with openID and session_key.

[0106] In step S808, the background server returns the login state and the user tax refund code to the tax refund pass plugin.

[0107] In step S809, the tax refund pass plugin caches the login state.

[0108] In step S810, the tax refund pass plugin returns the tax refund code to the third-party applet.

[0109] In step S811, the third-party applet sends a tax refund request to the background server based on the tax refund code.

[0110] In step S812, the background server returns the tax refund request result to the third-party applet. If it is successful, the tax refund amount is credited.

[0111] In an embodiment of the present application, as shown in Figure 11 When the tax refund amount is successfully withdrawn, a prompt information of successful withdrawal can be displayed.

[0112] In the technical solutions of the foregoing embodiments of the present application, the third-party applet can be an applet of an overseas tax refund company. Since there is a fund compliance problem in the process of cross-border tax refund, the technical solutions of the foregoing embodiments of the present application enable cross-border tax refund entry processing to be conveniently implemented by means of the tax refund plug-in, thereby ensuring that the overseas tax refund company applet can be integrated into the ecological system of the host program and can also complete tax refund payment entry without error. Of course, the technical solutions of the embodiments of the present application are not only applicable to the scenario of cross-border tax refund, but also applicable to other application scenarios of being integrated into the ecological system of the host program by means of the application plug-in, such as a scenario of issuing consumer coupons to cross-border users by means of the third-party applet.

[0113] The device embodiments of the present application are described below, which can be used to implement the calling method of the application plug-in in the foregoing embodiments of the present application. For details not disclosed in the device embodiments of the present application, refer to the foregoing embodiments of the calling method of the application plug-in.

[0114] Figure 12 A block diagram of a calling device of an application plug-in is shown, according to an embodiment of the present application, the application plug-in being added in a host program running in a host environment provided by a host program, Figure 12 The calling device of the application plug-in shown can be arranged in a terminal device in which the application plug-in is installed.

[0115] Referring to Figure 12 As shown, the calling device 1200 of the application plug-in according to an embodiment of the present application includes an acquisition unit 1202, a sending unit 1204, a first receiving unit 1206, and a first returning unit 1208.

[0116] The acquisition unit 1202 is configured to acquire a user temporary login code of the host program when it is detected that the application plug-in is called in the host program; the sending unit 1204 is configured to send the user temporary login code to a server corresponding to the application plug-in, so that the server queries a user identity corresponding to the user temporary login code based on an interface provided by the host program; the first receiving unit 1206 is configured to receive login state information returned by the server after the user identity is queried, and acquire a business response result corresponding to the application plug-in; and the first returning unit 1208 is configured to return a calling result of the application plug-in to the host program based on the business response result.

[0117] In some embodiments of the present application, based on the foregoing scheme, if the application plug-in includes an OCR plug-in, the first receiving unit 1206 is configured to: send the picture to be recognized and the login state information to the server, so that the server performs OCR recognition on the picture to be recognized; and receive character information returned by the server based on the login state information, the character information being obtained by the server performing OCR recognition on the picture to be recognized.

[0118] In some embodiments of the present application, based on the foregoing scheme, the hosted program includes a tax refund service program of an overseas tax service provider; the first receiving unit 1206 is further configured to: receive a tax refund code returned by the server after querying the user identity; and the first returning unit 1208 is further configured to: feed back the tax refund code to the hosted program, so that the hosted program initiates a tax refund request based on the tax refund code.

[0119] In some embodiments of the present application, based on the foregoing scheme, the first returning unit 1208 is configured to: return the character information to the hosted program; or display the character information, and if a confirmation instruction for the character information is detected, return the character information to the hosted program.

[0120] In some embodiments of the present application, based on the foregoing scheme, if the application plug-in includes a plug-in for querying specified information, the first receiving unit 1206 is configured to: obtain the specified information queried and returned by the server according to the user identity, the specified information being specified information associated with the user identity and queried by the server according to the user identity.

[0121] In some embodiments of the present application, based on the foregoing scheme, the specified information includes a tax refund code; and the first returning unit 1208 is configured to: return the tax refund code to the hosted program, so that the hosted program initiates a tax refund request to the server based on the tax refund code.

[0122] In some embodiments of the present application, based on the foregoing scheme, the obtaining unit 1202 is configured to: according to the information of the hosted program, display authorization prompt information for obtaining user information of the hosted program; and after receiving confirmation authorization information for the authorization prompt information, obtain a user temporary login code of the hosted program.

[0123] Figure 13 A block diagram of an application plug-in calling device is shown, according to an embodiment of the present application, the application plug-in being added in a hosted program running in a host environment provided by a host program, Figure 13 The application plug-in calling device shown can be arranged in a server corresponding to the application plug-in.

[0124] Referring to Figure 13 The calling apparatus 1300 of the application plug-in according to one embodiment of the present application includes a second receiving unit 1302, a querying unit 1304, and a second returning unit 1306.

[0125] The second receiving unit 1302 is configured to receive a user temporary login code sent by the application plug-in, the user temporary login code being a user temporary login code of the host program acquired by the application plug-in after being called in the host program; the querying unit 1304 is configured to query a user identity corresponding to the user temporary login code based on an interface provided by the host program; and the second returning unit 1306 is configured to return login state information to the application plug-in after the user identity is queried, and return a business response result corresponding to the application plug-in to the application plug-in, the business response result being used to make the application plug-in return a calling result of the application plug-in to the host program.

[0126] In some embodiments of the present application, based on the foregoing scheme, if the application plug-in includes an optical character recognition (OCR) plug-in, the second returning unit 1306 is configured to receive a picture to be recognized and the login state information sent by the application plug-in; perform OCR recognition on the picture to be recognized to obtain character information; and return the character information to the application plug-in based on the login state information.

[0127] In some embodiments of the present application, based on the foregoing scheme, the host program includes a tax refund service program of an overseas tax service party; and the second returning unit 1306 is further configured to return a tax refund code corresponding to the user identity to the application plug-in after the user identity is queried, so that the application plug-in feeds back the tax refund code to the host program, the tax refund code being used to make the host program initiate a tax refund request.

[0128] In some embodiments of the present application, based on the foregoing scheme, the host program includes a tax refund service program of an overseas tax service party, and the business response result includes a tax refund code; and the calling apparatus 1300 of the application plug-in further includes a third receiving unit configured to receive a tax refund request sent by the host program based on the tax refund code; a processing unit configured to perform tax refund processing in an account corresponding to the user identity based on the tax refund request; and the second returning unit 1306 is further configured to return notification information of successful tax refund to the host program if the tax refund in the account corresponding to the user identity is successful.

[0129] Figure 14A structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown.

[0130] It should be noted that, Figure 14 The computer system 1400 of the electronic device shown is only an example and should not bring any limitation to the functions and usage range of the embodiments of the present application.

[0131] As Figure 14 shown, the computer system 1400 includes a central processing unit (CPU) 1401 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1402 or programs loaded from a storage portion 1408 into a random access memory (RAM) 1403, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in the RAM 1403. The CPU 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0132] The following components are connected to the I / O interface 1405: an input portion 1406 including a keyboard, a mouse, and the like; an output portion 1407 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion 1408 including a hard disk, and the like; and a communication portion 1409 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication portion 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as necessary. A removable recording medium 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 1410 as necessary, so that a computer program read therefrom is installed in the storage portion 1408 as necessary.

[0133] In particular, the processes described above with reference to the flow charts can be implemented as computer software programs in accordance with the embodiments of the present application. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing computer programs for executing the methods shown in the flow charts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1409, and / or installed from the detachable medium 1411. When the computer program is executed by the central processing unit (CPU) 1401, various functions defined in the system of the present application are executed.

[0134] It should be noted that the computer readable medium shown in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable computer programs. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, device or apparatus. The computer programs contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination of the above.

[0135] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.

[0136] The units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The units described may

[0137] As another aspect, the present application also provides a computer readable medium, which can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement the method described in the above embodiments.

[0138] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, the division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into a plurality of modules or units.

[0139] From the above description of the embodiments, those skilled in the art will readily appreciate that the example embodiments described herein can be implemented by software and / or by hardware coupled with software. Accordingly, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, or the like) or on a network, and includes a number of instructions for causing a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the methods according to the embodiments of the present application.

[0140] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the application embrace any and all variations of the present application that fall within the scope of the general inventive concept as defined by the appended claims and their equivalents. It is intended that the application not be limited to the examples described herein and that upon reading this disclosure, persons of ordinary skill in the art will appreciate still other implementations that are within the scope of the present application. Accordingly, the application is not to be restricted except in the spirit of the claims that follow.

[0141] It is to be understood that the application is not limited to particular details described herein and as illustrated in the figures and that various modifications can be made therein without departing from the scope of the application. The scope of the application should, therefore, be determined not with reference to the above description, but should instead be determined with reference to the appended claims, along with their full scope of equivalents.

Claims

1. A method of calling an application program plug-in, characterized by, The application program plug-in is added in a host program, the host program runs in a host environment provided by a host program, the host program includes a tax refund service program of an overseas tax service provider, and a calling method of the application program plug-in is applied to the application program plug-in, including: An interface for uploading a tax refund form is displayed in the host program, if it is detected that a trigger of an optical character recognition (OCR) plug-in corresponding control in the interface, a user temporary login code of the host program is obtained; The user temporary login code is sent to a server corresponding to the application program plug-in, so that the server queries a user identity corresponding to the user temporary login code based on an interface provided by the host program; After the user identity is queried, login state information returned by the server is received, the login state information is defined by the server, and is associated with the user identity and a session key, the session key is provided by the server through the interface provided by the host program, A shooting interface including a shooting control and a shooting example is displayed, a to-be-recognized picture corresponding to the shooting example obtained by triggering the shooting control is obtained, the to-be-recognized picture and the login state information are sent to the server, so that the server performs OCR identification on the to-be-recognized picture; character information obtained by performing OCR identification on the to-be-recognized picture by the server based on the login state information is received; The character information is returned to the host program, so that the host program generates a tax refund form; A tax refund withdrawal page is displayed in the host program, if it is detected that a trigger of a target control corresponding to a tax refund code plug-in in the page, the login state information and the tax refund code returned by the server after the user identity is queried are received, the target control is a control for triggering a tax refund code acquisition event; The tax refund code is fed back to the host program, so that the host program initiates a tax refund request to the server based on the tax refund code, the server performs tax refund processing in an account corresponding to the user identity based on the tax refund request; if the tax refund in the account corresponding to the user identity is successful, notification information of the tax refund success is returned to the host program, and prompt information of withdrawal success is displayed in the host program.

2. The method of claim 1, wherein the application plug-in is called by a program. Including: The character information is displayed, if a confirmation instruction for the character information is detected, the character information is returned to the host program.

3. The method of claim 1 or 2, wherein, A user temporary login code of the host program is obtained, including: According to the information of the host program, authorization prompt information for obtaining user information of the host program is displayed; After receiving confirmation authorization information for the authorization prompt information, the user temporary login code of the host program is obtained.

4. A method of invoking an application plug-in, characterized by, The application program plug-in is added in a host program, the host program runs in a host environment provided by a host program, the host program includes a tax refund service program of an overseas tax service provider, and a calling method of the application program plug-in is applied to the application program plug-in of the server, including: receive a user temporary login code sent by the application plug-in, the user temporary login code being a user temporary login code of the host program obtained by the application plug-in after detecting triggering of an optical character recognition (OCR) plug-in corresponding control in an interface for uploading a tax refund form in the host program; query a user identity corresponding to the user temporary login code based on an interface provided by the host program; after the user identity is queried, customize login state information, return the login state information to the application plug-in, and receive a to-be-recognized picture and the login state information sent by the application plug-in; perform OCR recognition on the to-be-recognized picture to obtain character information; return the character information to the application plug-in based on the login state information, so that the application plug-in returns the character information to the host program, so that the host program generates a tax refund form; the login state information is associated with the user identity and a session key, and the session key is provided by the host program to the server; after the user identity is queried, return the login state information and a tax refund code to the application plug-in, so that the application plug-in feeds back the tax refund code to the host program, so that the host program initiates a tax refund request to the server based on the tax refund code; based on the tax refund request, perform tax refund processing on an account corresponding to the user identity; if the tax refund to the account corresponding to the user identity is successful, return notification information that the tax refund is successful to the host program, so as to display prompt information that the cashing is successful in the host program.

5. An application plug-in calling apparatus characterized by comprising: The application plug-in is added in the host program, the host program runs in a host environment provided by a host program, and the host program includes a tax refund service program of an overseas tax service party. The calling device of the application plug-in includes: An obtaining unit is configured to display an interface for uploading a tax refund form in the host program, and obtain a user temporary login code of the host program if triggering of an optical character recognition (OCR) plug-in corresponding control in the interface is detected; A sending unit is configured to send the user temporary login code to a server corresponding to the application plug-in, so that the server queries a user identity corresponding to the user temporary login code based on an interface provided by the host program; A first receiving unit is configured to receive login state information returned by the server after the user identity is queried, the login state information being customized by the server and being associated with the user identity and a session key, the session key being provided by the host program to the server, display a shooting interface including a shooting control and a shooting example, obtain a to-be-recognized picture corresponding to the shooting example shot by triggering the shooting control, send the to-be-recognized picture and the login state information to the server, so that the server performs OCR recognition on the to-be-recognized picture; and receive character information obtained by the server by performing OCR recognition on the to-be-recognized picture based on the login state information; The first returning unit is configured to return the character information to the hosting program, so that the hosting program generates a tax refund form. The first receiving unit is further configured to display a tax refund withdrawal page in the hosting program, and if it is detected that a target control corresponding to a tax refund code plug-in in the page is triggered, the login state information and the tax refund code returned by the server after the user identity is queried are received. The first returning unit is further configured to feed back the tax refund code to the hosting program, so that the hosting program initiates a tax refund request to the server based on the tax refund code, and the server performs tax refund processing in the account corresponding to the user identity based on the tax refund request.

6. An application plug-in calling apparatus characterized by comprising: The application program plug-in is added in the hosting program, the hosting program runs in a host environment provided by a host program, and the calling device of the application program plug-in comprises: The second receiving unit is configured to receive a user temporary login code sent by the application program plug-in, the user temporary login code being a user temporary login code of the hosting program obtained by the application program plug-in after detecting that a control corresponding to an optical character recognition (OCR) plug-in in an interface for uploading a tax refund form in the hosting program is triggered; The query unit is configured to query a user identity corresponding to the user temporary login code based on an interface provided by the host program; The second returning unit is configured to customize login state information after the user identity is queried, receive a to-be-recognized picture and the login state information sent by the application program plug-in, perform OCR recognition on the to-be-recognized picture to obtain character information, and return the character information to the application program plug-in based on the login state information, so that the application program plug-in returns the character information to the hosting program, so that the hosting program generates a tax refund form; the login state information is associated with the user identity and a session key, and the session key is provided by the host program to a server; The second returning unit is further configured to return the login state information and a tax refund code to the application program plug-in after the user identity is queried, so that the application program plug-in feeds back the tax refund code to the hosting program, so that the hosting program initiates a tax refund request to the server based on the tax refund code; The third receiving unit is further configured to perform tax refund processing in the account corresponding to the user identity based on the tax refund request, and if the tax refund in the account corresponding to the user identity is successful, notification information of successful tax refund is returned to the hosting program, so that the hosting program displays prompt information of successful withdrawal.

7. A computer readable medium having stored thereon a computer program, characterized in that The computer program is executed by a processor to implement the calling method of the application program plug-in in any one of claims 1 to 3, or to implement the calling method of the application program plug-in in claim 4.

8. An electronic device, comprising: The application comprises: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the application plug-in calling method as claimed in any one of claims 1 to 3, or implement the application plug-in calling method as claimed in claim 4.

9. A computer program product, characterised in that, The computer program product comprises computer instructions stored in a computer readable storage medium, which are read by the processor of the computer device, and the processor executes the computer instructions, so that the computer device executes the application plug-in calling method as claimed in any one of claims 1 to 3, or implements the application plug-in calling method as claimed in claim 4.

Citation Information

Patent Citations

  • A small program running method and device and a storage medium

    CN109032691A

  • WeChat applet and API security protection method and device, equipment and storage medium

    CN110210203A

  • Information processing method and device, computer readable storage medium and electronic equipment

    CN110633968A