Data calling method, platform and equipment and readable storage medium

Through unified standards and unified management and SPI interface calls, the cumbersome operation problems when the system calls external partner systems are solved, the external docking efficiency and security are improved, and the interface for the internal system to actively call external systems is realized.

CN118965333APending Publication Date: 2024-11-15GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411200609.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, the system is cumbersome to operate when calling the external partner system interface and is difficult to control in a unified manner, resulting in low external docking efficiency and security.

Method used

By building SPI to collect interface calls to external systems, unify standards and unified management, use Nginx servers for authentication and data retrieval, reduce internal development workload and improve external docking efficiency and security.

Benefits of technology

It realizes custom SPI in the internal system and generates SPI definition instructions, simplifies the definition of external system interfaces, supports interface self-test, reduces internal development workload and improves external docking efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118965333A_ABST
    Figure CN118965333A_ABST
Patent Text Reader

Abstract

The invention discloses a data calling method, platform and device and a readable storage medium. The method comprises the steps that a calling instruction and an SPI definition instruction, sent by an internal system, of an external system are received; in response to the SPI definition instruction, defining an interactive interface corresponding to the external system and binding a permission packet; responding to the calling instruction, authenticating the external system based on the permission packet, and calling service information matched with the calling instruction from the external system through the defined interaction interface corresponding to the external system via the Nginx server after the authentication is passed; and sending the called service information to the internal system. According to the method, the interface calling of the external system is received by setting up the SPI, the standard is unified, the export of calling the external system by the internal system is managed and controlled in a unified manner, the internal development workload is reduced, and the external docking efficiency and safety are also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of system interaction, and more specifically, to a data calling method, platform, device and readable storage medium. Background Art

[0002] For various online trading systems, it is usually necessary to retrieve data from various external partner systems to achieve transaction coordination. However, when a system currently calls the interface of an external partner system, the internal system needs to connect with the external partner system and apply for various external permissions. This process is cumbersome and inconvenient for unified management and control. The same is true for external partner systems, which cannot be connected with a unified caliber.

[0003] Based on this, the present application provides a data calling solution to meet current needs. Summary of the invention

[0004] In view of this, the present application provides a data calling method, platform, device and readable storage medium, which collects interface calls to external systems by building SPI, unifies standards, and uniformly controls the exports of internal systems calling external systems, thereby reducing internal development workload and improving external docking efficiency and security.

[0005] A data calling method, comprising:

[0006] Receive the call instructions and SPI definition instructions sent by the internal system to the external system;

[0007] In response to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package;

[0008] In response to the call instruction, the external system is authenticated based on the permission package, and after the authentication is passed, the business information matching the call instruction is retrieved from the external system through the defined interaction interface corresponding to the external system via the Nginx server;

[0009] The retrieved business information is sent to the internal system.

[0010] Optionally, before retrieving the business information matching the calling instruction from the external system, the method further includes:

[0011] Performing status verification on the external system;

[0012] If the external system is in a normal access state, the process of retrieving the business information matching the calling instruction from the external system is executed.

[0013] Optionally, authenticating the external system based on the permission package includes:

[0014] Verify whether the external system has SPI authority and is configured with a corresponding URL according to the authority package;

[0015] If the external system has SPI authority and is configured with a corresponding URL, the authentication is successful.

[0016] Optionally, before sending the retrieved business information to the internal system, the method further includes:

[0017] Performing service-level parameter verification on the service information;

[0018] If the json string transmitted in the business information matches the SPI definition, the business-level parameter verification passes, and the process of sending the business information to the internal system is executed, otherwise an error message is fed back to the internal system.

[0019] Optionally, also include:

[0020] Receive and respond to the self-test request sent by the external system, call the configured test interaction interface and test URL to the ISV test environment for testing, and generate test data.

[0021] A data calling platform, comprising:

[0022] The instruction receiving module is used to receive the calling instructions and SPI definition instructions sent by the internal system to the external system;

[0023] An SPI definition module, used to respond to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package;

[0024] An interface calling module, used to respond to the calling instruction, authenticate the external system based on the permission package, and after the authentication is passed, retrieve the business information matching the calling instruction from the external system through the defined interactive interface corresponding to the external system via the Nginx server;

[0025] The information forwarding module is used to send the retrieved business information to the internal system.

[0026] Optionally, also include:

[0027] The status verification module is used to perform status verification on the external system before retrieving information matching the call instruction from the external system. If the external system is in a normal access state, the interface calling module executes the process of retrieving business information matching the call instruction from the external system.

[0028] Optionally, also include:

[0029] The parameter verification module is used to perform business-level parameter verification on the business information before sending the retrieved business information to the internal system. If the json string transmitted in the business information matches the SPI definition, the business-level parameter verification passes, and the information forwarding module executes the process of sending the business information to the internal system, otherwise, an error message is fed back to the internal system.

[0030] A data calling device, comprising a memory and a processor;

[0031] The memory is used to store programs;

[0032] The processor is used to execute the program to implement each step of the data calling method as described in any one of the above items.

[0033] A readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, each step of the data calling method as described in any one of the above items is implemented.

[0034] It can be seen from the above technical solutions that a data calling method, platform, device and readable storage medium provided in the embodiment of the present application first receive the calling instructions and SPI definition instructions sent by the internal system to the external system, and support the definition of the interface. After that, by responding to the SPI definition instruction, the interactive interface corresponding to the external system can be defined and the permission package can be bound. By responding to the calling instruction, the business information matching the calling instruction can be retrieved from the external system through the defined interactive interface corresponding to the external system via the Nginx server, and the internal system is supported to actively call the SPI of the external system to implement the interface call. Finally, the external system is authenticated based on the permission package, and the self-test of the interface is supported and the business information is sent to the internal system after the authentication is passed, so as to complete the call of the external system business information.

[0035] This application provides an SPI definition function that allows the internal system to customize the SPI and generate SPI definition instructions. Based on the SPI definition instructions, the interactive interface corresponding to the external system can be defined and the permission package can be bound. At the same time, based on the call instruction, the internal system can actively call the SPI implementation interface of the external system and retrieve the required business information. Building SPI can collect interface calls to external systems, unify standards, and uniformly control the exits of internal systems calling external systems. The interface implementer can perform interface self-testing through the interface, and the interface definition party does not need to participate in the whole process, which not only reduces the internal development workload, but also improves the efficiency and security of external docking. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0037] Figure 1 A flowchart of a data calling method disclosed in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of a system interaction disclosed in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of a system data flow disclosed in an embodiment of the present application;

[0040] Figure 4 A schematic diagram of a data calling platform disclosed in an embodiment of the present application;

[0041] Figure 5 This is a hardware structure block diagram of the data calling device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] The present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, etc.

[0044] An embodiment of the present application provides a data calling method, which can be applied to various system platforms that have interactive needs with multiple external system data, such as e-commerce transaction systems, etc., and can also be applied to various computer terminals or smart terminals. The execution subject can be the processor or server of the computer terminal or smart terminal.

[0045] Next, the present application scheme is introduced. The present application proposes the following technical scheme, please see below for details.

[0046] Figure 1 This is a flowchart of a data calling method disclosed in an embodiment of the present application.

[0047] Figure 2 A schematic diagram of a system interaction disclosed in an embodiment of the present application.

[0048] like Figure 1 and Figure 2 As shown, the method may include:

[0049] Step S1, receiving a call instruction to an external system and an SPI definition instruction sent by an internal system.

[0050] Specifically, for this application, the external system refers to the external partner system that needs to be called, that is, the system of the cooperating independent software developer, the system of the supplier, etc. The SPI (Service Provider Interface) is the interface specification defined by the caller, and the service provider needs to implement the interface according to the interface specification.

[0051] In the present application, the internal system provides an SPI definition interface, through which the internal system can customize the SPI. The internal system then generates call instructions and SPI definition instructions and sends them to the SPI connected to the internal system. The SPI connected to the internal system calls the required business information from the external system by responding to the SPI definition instructions and call instructions.

[0052] Step S2: respond to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package.

[0053] Specifically, SPI defines the interaction interface corresponding to the external system based on the meaning, output parameters and input parameters of SPI contained in the SPI definition instruction information in response to the SPI definition instruction sent by the internal system, wherein both the output parameters and input parameters are saved in the form of json schame, and at the same time, the permission package is set and bound to set permissions for the interaction interface to prevent external systems that are not within the permission range from interacting and docking.

[0054] Step S3, responding to the calling instruction, authenticating the external system based on the permission package, and after the authentication is passed, retrieving the business information matching the calling instruction from the external system through the defined interactive interface corresponding to the external system via the Nginx server.

[0055] Specifically, SPI needs to authenticate the external system according to the permission package to determine whether the external system has the authority to interact with the internal system through the call instruction received in response to the call instruction sent by the internal system. For the external system with authority, SPI, that is, the external system that has passed the authentication, can execute the process of sending the business information to the internal system. After the authentication is passed, SPI calls the Nginx server, so that the Nginx server retrieves the business information matching the call instruction from the external system through the defined interactive interface corresponding to the external system, and then the Nginx server forwards the business information to SPI.

[0056] Furthermore, the process of authenticating the external system based on the authority package specifically includes:

[0057] ① Verify whether the external system has SPI authority and is configured with a corresponding URL according to the authority package;

[0058] ② If the external system has SPI permission and is configured with a corresponding URL, the authentication is successful.

[0059] URL is a uniform resource locator, which is the address and location of the resource. Generally, after the external system applies for the corresponding SPI permission, it can configure the corresponding SPI URL. Therefore, for this application, the permission package is used to verify whether the external system has SPI permission and is configured with the corresponding URL. If the external system has SPI permission and is configured with the corresponding URL, the authentication is passed, and SPI sends the business information to the internal system. If the external system does not have SPI permission or is not configured with the corresponding URL, the authentication fails, and SPI refuses to send the business information to the internal system.

[0060] In addition, for this application, a process of performing status verification on the external system may be added, specifically:

[0061] Before calling the business information matching the calling instruction from the external system, the method further includes:

[0062] ① Performing status verification on the external system;

[0063] ② If the external system is in a normal access state, the process of retrieving the business information matching the calling instruction from the external system is executed.

[0064] Step S4: sending the retrieved business information to the internal system.

[0065] Specifically, after the Nginx server forwards the business information to the SPI, the SPI sends the business information back to the internal system to complete the internal system's data retrieval from the external system.

[0066] In addition, for the present application, before the SPI sends the retrieved business information to the internal system, a process of performing business-level parameter verification on the business information may be added, specifically:

[0067] Before sending the retrieved business information to the internal system, the method further includes:

[0068] ① Performing business-level parameter verification on the business information;

[0069] ② If the json string transmitted in the business information matches the SPI definition, the business-level parameter verification passes, and the process of sending the business information to the internal system is executed, otherwise an error message is fed back to the internal system.

[0070] The process of business-level parameter verification is to match and verify the JSON string passed in the business information with the SPI definition to see if the verification is correct. If the verification is correct, it means that the business-level parameter verification has passed, and the process of sending the business information to the internal system is executed. If the verification is incorrect, it means that the business-level parameter verification has failed, and an error message is fed back to the internal system.

[0071] Furthermore, the present application can also support ISV to perform self-test, and the specific implementation method is as follows:

[0072] Receive and respond to the self-test request sent by the external system, call the configured test interaction interface and test URL to the ISV test environment for testing, and generate test data.

[0073] Specifically, Figure 3 As shown, the red data flow is the data flow for the official production run, which is initiated by the internal system, calls the interactive interface of the official business information, and reaches the ISV production environment through SPI. The green data flow is the data flow of the ISV self-test interface, which is initiated by the ISV on the portal website corresponding to the internal system, calls the test interactive interface specially provided for testing, and directly reaches the ISV test environment through SPI. The black data flow is the data flow that the internal system needs to debug with the external ISV. It is initiated by the internal system, passes through the SPI test environment, and reaches the ISV test environment. After the ISV configures the URL, it can perform self-testing through the interface. After clicking the test, a self-test request will be generated. At this time, the configured test interactive interface and test URL will be called to the ISV test environment for testing to generate test data.

[0074] It can be seen from the above technical solutions that a data calling method, platform, device and readable storage medium provided in the embodiment of the present application first receive the calling instructions and SPI definition instructions sent by the internal system to the external system, and support the definition of the interface. After that, by responding to the SPI definition instruction, the interactive interface corresponding to the external system can be defined and the permission package can be bound. By responding to the calling instruction, the business information matching the calling instruction can be retrieved from the external system through the defined interactive interface corresponding to the external system via the Nginx server, and the internal system is supported to actively call the SPI of the external system to implement the interface call. Finally, the external system is authenticated based on the permission package, and the self-test of the interface is supported and the business information is sent to the internal system after the authentication is passed, so as to complete the call of the external system business information.

[0075] This application provides an SPI definition function that allows the internal system to customize the SPI and generate SPI definition instructions. Based on the SPI definition instructions, the interactive interface corresponding to the external system can be defined and the permission package can be bound. At the same time, based on the call instruction, the internal system can actively call the SPI implementation interface of the external system and retrieve the required business information. Building SPI can collect interface calls to external systems, unify standards, and uniformly control the exits of internal systems calling external systems. The interface implementer can perform interface self-testing through the interface, and the interface definition party does not need to participate in the whole process, which not only reduces the internal development workload, but also improves the efficiency and security of external docking.

[0076] A data calling platform provided in an embodiment of the present application is described below. The data calling platform described below and the data calling method described above can refer to each other.

[0077] See also Figure 4 , Figure 4 A schematic diagram of a data calling platform disclosed in an embodiment of the present application.

[0078] like Figure 4 As shown, the data calling platform may include:

[0079] The instruction receiving module 110 is used to receive the call instruction and SPI definition instruction sent by the internal system to the external system;

[0080] The SPI definition module 120 is used to respond to the SPI definition instruction, define the interaction interface corresponding to the external system and bind the permission package;

[0081] The interface calling module 130 is used to respond to the calling instruction, authenticate the external system based on the permission package, and after the authentication is passed, retrieve the business information matching the calling instruction from the external system through the defined interactive interface corresponding to the external system via the Nginx server;

[0082] The information forwarding module 140 is used to send the retrieved business information to the internal system.

[0083] It can be seen from the above technical solutions that a data calling method, platform, device and readable storage medium provided in the embodiment of the present application first receive the calling instructions and SPI definition instructions sent by the internal system to the external system, and support the definition of the interface. After that, by responding to the SPI definition instruction, the interactive interface corresponding to the external system can be defined and the permission package can be bound. By responding to the calling instruction, the business information matching the calling instruction can be retrieved from the external system through the defined interactive interface corresponding to the external system via the Nginx server, and the internal system is supported to actively call the SPI of the external system to implement the interface call. Finally, the external system is authenticated based on the permission package, and the self-test of the interface is supported and the business information is sent to the internal system after the authentication is passed, so as to complete the call of the external system business information.

[0084] This application provides an SPI definition function that allows the internal system to customize the SPI and generate SPI definition instructions. Based on the SPI definition instructions, the interactive interface corresponding to the external system can be defined and the permission package can be bound. At the same time, based on the call instruction, the internal system can actively call the SPI implementation interface of the external system and retrieve the required business information. Building SPI can collect interface calls to external systems, unify standards, and uniformly control the exits of internal systems calling external systems. The interface implementer can perform interface self-testing through the interface, and the interface definition party does not need to participate in the whole process, which not only reduces the internal development workload, but also improves the efficiency and security of external docking.

[0085] Optionally, the data calling platform may also include:

[0086] The status verification module is used to perform status verification on the external system before retrieving the business information matching the calling instruction from the external system. If the external system is in a normal access state, the interface calling module executes the process of retrieving the business information matching the calling instruction from the external system.

[0087] Optionally, the data calling platform may also include:

[0088] The parameter verification module is used to perform business-level parameter verification on the business information before sending the retrieved business information to the internal system. If the json string transmitted in the business information matches the SPI definition, the business-level parameter verification passes, and the information forwarding module executes the process of sending the business information to the internal system, otherwise, an error message is fed back to the internal system.

[0089] Optionally, the information forwarding module performs a process of authenticating the external system based on the authority package, including:

[0090] Verify whether the external system has SPI authority and is configured with a corresponding URL according to the authority package;

[0091] If the external system has SPI authority and is configured with a corresponding URL, the authentication is successful.

[0092] Optionally, the data calling platform may also include:

[0093] The ISV self-test module is used to receive and respond to the self-test request sent by the external system, call the configured test interaction interface and test URL to the ISV test environment for testing, and generate test data.

[0094] The data calling platform provided in the embodiment of the present application can be applied to a data calling device. Figure 5 The hardware structure diagram of the data calling device is shown in FIG. Figure 5 ,The hardware structure of the data calling device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0095] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0096] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0097] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;

[0098] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0099] Receive the call instructions and SPI definition instructions sent by the internal system to the external system;

[0100] In response to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package;

[0101] In response to the call instruction, the external system is authenticated based on the permission package, and after the authentication is passed, the business information matching the call instruction is retrieved from the external system through the defined interaction interface corresponding to the external system via the Nginx server;

[0102] The retrieved business information is sent to the internal system.

[0103] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0104] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0105] Receive the call instructions and SPI definition instructions sent by the internal system to the external system;

[0106] In response to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package;

[0107] In response to the call instruction, the external system is authenticated based on the permission package, and after the authentication is passed, the business information matching the call instruction is retrieved from the external system through the defined interaction interface corresponding to the external system via the Nginx server;

[0108] The retrieved business information is sent to the internal system.

[0109] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0110] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0111] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0112] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data calling method, It is characterized in that include: Receive the call instructions and SPI definition instructions sent by the internal system to the external system; In response to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package; In response to the call instruction, the external system is authenticated based on the permission package, and after the authentication is passed, the business information matching the call instruction is retrieved from the external system through the defined interaction interface corresponding to the external system via the Nginx server; The retrieved business information is sent to the internal system.

2. The method according to claim 1, It is characterized in that Before retrieving the business information matching the calling instruction from the external system, the method further includes: Performing status verification on the external system; If the external system is in a normal access state, the process of retrieving the business information matching the calling instruction from the external system is executed.

3. The method according to claim 1, It is characterized in that Authenticating the external system based on the authority package includes: Verify whether the external system has SPI authority and is configured with a corresponding URL according to the authority package; If the external system has SPI authority and is configured with a corresponding URL, the authentication is successful.

4. The method according to claim 1, It is characterized in that Before sending the retrieved business information to the internal system, the method further includes: Performing service-level parameter verification on the service information; If the json string transmitted in the business information matches the SPI definition, the business-level parameter verification passes, and the process of sending the business information to the internal system is executed, otherwise an error message is fed back to the internal system.

5. The method according to claim 1, It is characterized in that Also includes: Receive and respond to the self-test request sent by the external system, call the configured test interaction interface and test URL to the ISV test environment for testing, and generate test data.

6. A data calling platform, It is characterized in that include: The instruction receiving module is used to receive the calling instructions and SPI definition instructions sent by the internal system to the external system; An SPI definition module, used to respond to the SPI definition instruction, define an interactive interface corresponding to the external system and bind a permission package; An interface calling module, used to respond to the calling instruction, authenticate the external system based on the permission package, and after the authentication is passed, retrieve the business information matching the calling instruction from the external system through the defined interactive interface corresponding to the external system via the Nginx server; The information forwarding module is used to send the retrieved business information to the internal system.

7. The platform according to claim 6, It is characterized in that Also includes: The status verification module is used to perform status verification on the external system before retrieving the business information matching the calling instruction from the external system. If the external system is in a normal access state, the interface calling module executes the process of retrieving the business information matching the calling instruction from the external system.

8. The platform according to claim 6, It is characterized in that Also includes: The parameter verification module is used to perform business-level parameter verification on the business information before sending the retrieved business information to the internal system. If the json string transmitted in the business information matches the SPI definition, the business-level parameter verification passes, and the information forwarding module executes the process of sending the business information to the internal system, otherwise, an error message is fed back to the internal system.

9. A data calling device, It is characterized in that including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the data calling method as described in any one of claims 1-5.

10. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, each step of the data calling method according to any one of claims 1 to 5 is implemented.