Third-party API tool calling method, system and device

Through system authentication and horizontal expansion of real-time call requests, the problem of single function and low security of third-party API tools in large systems is solved, higher security and scalability are achieved, system monitoring is simplified, and system monitoring is improved. The overall reliability of the system.

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

Patent Information

Application Number
CN202010880906.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-27
Publication Date
2024-09-17
Estimated Expiration
2040-08-27

AI Technical Summary

Technical Problem

Existing third-party API tools have single functions, low security, and narrow scope of application, resulting in security and performance issues when exchanging data between subsystems within large systems.

Method used

System authentication is performed by obtaining real-time call requests, including security verification and permission verification, and horizontal expansion is performed based on the call type or method to achieve classification and system processing of requests to ensure data security and system scalability.

Benefits of technology

It significantly improves the security and scalability of the system, reduces the coupling between subsystems, simplifies system monitoring, and improves the reliability and maintainability of the entire system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112015494B
    Figure CN112015494B
Patent Text Reader

Abstract

The present invention relates to artificial intelligence, and provides a third-party API tool calling method, including: obtaining a real-time call request issued in an integrated system, and performing system authentication on the real-time call request to determine whether the real-time call request is legal; if the real-time call request is legal, then horizontally expanding the real-time call request according to the call type or request method of the real-time call request to achieve classification of the real-time call request; performing corresponding system processing on the real-time call request according to the classification result of the real-time call request; after the real-time call request is processed by the system, calling the target system according to the real-time call request and obtaining the corresponding call return result. The present invention also relates to blockchain technology, and request parameters and preset encrypted signature strings are stored in the blockchain. The technical solution provided by the present invention can solve the problems that the existing third-party API tools have single functions, low security factors and narrow application scope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security monitoring technology, and in particular to a third-party API tool calling method, system, device and storage medium. Background Art

[0002] With the rapid development of science and technology, network systems have been widely used in business. With each upgrade, these systems have become more and more powerful. At the same time, the internal structure of the system has become more and more complex. Based on the principle of high cohesion and low coupling that should be followed in system design, more and more subsystems will be generated inside the entire large system. These subsystems are relatively independent but coordinated with each other, and together they form this huge integrated system to provide services to the outside world. For example, in a blog integrated system, there are many subsystems with specific functions, such as user subsystem, article subsystem, message subsystem, chat subsystem, etc. The subsystems realize the operation of the overall function of the entire blog integrated system through complex data exchange.

[0003] However, with the continuous expansion of the system's business functions, higher requirements are also put forward for system functions. Usually, the data exchange between these subsystems requires a powerful third-party API tool for maintenance. Specifically, the third-party API tool is an API provided by a third party (usually some companies), which allows access and calling its functions through the API interface and uses it on the required site. For example, we can use the cloud disk's SMS sending API, email push API, and file storage API to call related functions. However, in the traditional process of interaction between subsystems, the functional structure of calling third-party API tools is relatively simple, and those relatively complex API tools are just a simple combination of certain functions, which can only play a role in the specific scenarios required by themselves. For example, in the above-mentioned blog comprehensive system, the third-party API tool used between the message subsystem and the chat subsystem cannot usually be applied to the data exchange between the user subsystem and the article subsystem.

[0004] In addition, when using traditional third-party API tools to exchange data between subsystems within a large system, some problems often arise, mainly including security and performance issues. For example, when using third-party API tools for data exchange, some illegal programs enter the system through third-party API tools, affecting the working performance of the entire system, and even stealing some important internal data, endangering the security of the entire system.

[0005] Based on the above problems, there is an urgent need for a third-party API tool calling method with high security factor and wide application range. Summary of the invention

[0006] The present invention provides a third-party API tool calling method, system, electronic device and computer storage medium, the main purpose of which is to solve the problems of existing third-party API tools having single functions, low safety factors and narrow application scope.

[0007] To achieve the above object, the present invention provides a third-party API tool calling method, the method comprising the following steps:

[0008] Acquire a real-time call request issued in the integrated system, and perform system authentication on the real-time call request to determine whether the real-time call request is legal;

[0009] If the real-time call request is legal, the real-time call request is horizontally expanded according to the call type or request mode of the real-time call request to achieve classification of the real-time call request;

[0010] According to the classification result of the real-time call request, performing corresponding system processing on the real-time call request;

[0011] After the real-time call request is processed by the system, the target system is called according to the real-time call request and a corresponding call return result is obtained.

[0012] Optionally, the real-time call request carries request parameters and a preset encrypted signature string related to the request parameters, and the request parameters and the preset encrypted signature string are stored in the blockchain; and the system authentication includes security verification; wherein the process of performing the security verification on the real-time call request includes:

[0013] Signing the acquired request parameters of the real-time call request according to a preset algorithm to obtain a real-time encrypted signature string of the request parameters;

[0014] Comparing the real-time encrypted signature string with the preset encrypted signature string;

[0015] If the real-time encrypted signature string is consistent with the preset encrypted signature string, the real-time call request is determined to have passed the security check; if the real-time encrypted signature string is inconsistent with the preset encrypted signature string, the real-time call request is determined to be illegal and the real-time call request is rejected.

[0016] In addition, the present invention also provides a third-party API tool calling system, the system comprising:

[0017] A legality judgment unit, used for obtaining a real-time call request issued in the integrated system, and performing system authentication on the real-time call request to judge whether the real-time call request is legal;

[0018] A horizontal expansion unit, configured to, if the real-time call request is legal, horizontally expand the real-time call request according to the call type or request mode of the real-time call request, so as to classify the real-time call request;

[0019] A system processing unit, configured to perform corresponding system processing on the real-time call request according to the classification result of the real-time call request;

[0020] The system calling unit is used to call the target system according to the real-time calling request and obtain the corresponding calling return result after the real-time calling request is processed by the system.

[0021] In addition, to achieve the above-mentioned purpose, the present invention further provides an electronic device, which includes: a memory, a processor, and a third-party API tool calling program stored in the memory and executable on the processor, wherein the third-party API tool calling program implements the following steps when executed by the processor:

[0022] Acquire a real-time call request issued in the integrated system, and perform system authentication on the real-time call request to determine whether the real-time call request is legal;

[0023] If the real-time call request is legal, the real-time call request is horizontally expanded according to the call type or request mode of the real-time call request to achieve classification of the real-time call request;

[0024] According to the classification result of the real-time call request, performing corresponding system processing on the real-time call request;

[0025] After the real-time call request is processed by the system, the target system is called according to the real-time call request and a corresponding call return result is obtained.

[0026] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, in which a third-party API tool calling program is stored. When the third-party API tool calling program is executed by a processor, the steps of the third-party API tool calling method as mentioned above are implemented.

[0027] The third-party API tool calling method, electronic device and computer-readable storage medium proposed in the present invention can effectively connect various subsystems (the called subsystem is generally referred to as the target system) as a link by designing a unique internal structure for the third-party API tool, so that these subsystems can truly become a whole to provide services to users. In addition, by setting a series of technical means such as security verification, permission verification and log desensitization, the coupling between various subsystems can be significantly reduced. In addition, by setting horizontal expansion functions and system processing functions related to call requests, the scalability and maintainability of the system can be greatly improved, and system monitoring is simpler, which can significantly improve the reliability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A flowchart of a preferred embodiment of a third-party API tool calling method according to an embodiment of the present invention;

[0029] Figure 2 A schematic diagram of a preferred embodiment of the electronic device according to an embodiment of the present invention;

[0030] Figure 3 This is a schematic diagram of the internal logic of a third-party API tool calling program according to an embodiment of the present invention.

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

[0032] In the following description, for the purpose of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more embodiments. However, it is apparent that these embodiments may also be implemented without these specific details.

[0033] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0034] Example 1

[0035] To illustrate the third-party API tool calling method provided by the present invention, Figure 1 The flowchart of the third-party API tool calling method provided by the present invention is shown.

[0036] like Figure 1 As shown, the third-party API tool calling method provided by the present invention includes:

[0037] S110: Acquire a real-time call request issued in the integrated system, and perform system authentication on the real-time call request to determine whether the real-time call request is legal. The real-time call request is a call request issued when a subsystem in the integrated system interacts with one or more other subsystems (the mobilized system, i.e., the target system described below) for data exchange.

[0038] It should be noted that the data transmission of the design of the present invention is the data transmission between the subsystems within the integrated system. Since the subsystems within the integrated system interact with each other by calling third-party API tools, and the third-party API tools are provided by a third party and exposed to the public network environment. Therefore, in order to prevent the data in the real-time call requests issued by each subsystem from being illegally tampered with or even illegally replaced, thereby endangering the data security within the entire integrated system, the calling of third-party API tools needs to be paid special attention. Preferably, it is generally necessary to add a system authentication function to the calling of the third-party API tool, and ensure that the data in the received real-time call requests are in a safe state through system authentication.

[0039] Specifically, system authentication includes at least two processes: security verification and permission verification. The purpose of security verification is to perform data tamper-proof check on real-time call requests, and the purpose of permission verification is to verify the scope of authority of the requester. It should be noted that since data tamper-proof check is relatively important, permission verification is generally set after security verification. When the real-time call request passes both the security verification and permission verification processes, it is determined that the real-time call request is legal.

[0040] In addition, it should be noted that when a subsystem (generally executed by the user) initiates a real-time call request to call a third-party API tool, it is necessary to simultaneously pass the encrypted signature string (such as md5 encryption) of the request parameters (corresponding to the aforementioned real-time call request, the same below) in get mode, that is, the real-time call request carries the request parameters and the preset encrypted signature string related to the request parameters.

[0041] When the server that calls the third-party API tool receives the request, it needs to sign the request parameters in the same way according to the agreed algorithm to obtain a real-time encrypted signature string of the request parameters; then compare the real-time encrypted signature string with the preset encrypted signature string; if the real-time encrypted signature string is consistent with the preset encrypted signature string, it is determined that the real-time call request has passed the security check and the next step of permission check is performed; if the real-time encrypted signature string is inconsistent with the preset encrypted signature string, it is determined that the real-time call request is illegal and the real-time call request is rejected.

[0042] It should be noted that the real-time call request usually comes with a request header, and a ciphertext string related to the user's identity information is added to the request header. For example, when a subsystem initiates a real-time call request to call a third-party API tool, a ciphertext string containing the user's identity information (based on the encryption algorithm agreed with the user) must be added to the request header of the real-time call request.

[0043] When the aforementioned security check is passed, the server that calls the third-party API tool will parse the ciphertext to obtain the user identity information in the ciphertext, and then perform corresponding permission query verification on the user identity information through a preset user identity permission comparison table (pre-stored in the server that calls the third-party API tool and related to the user identity). If user information consistent with the user identity information is found in the user identity permission comparison table, it is determined that the real-time call request has passed the permission verification; if user information consistent with the user identity information is not found in the user identity permission comparison table, it is determined that the real-time call request is illegal and the real-time call request is rejected.

[0044] In addition, it should be emphasized that in order to further ensure the privacy and security of the above request parameters and encrypted signature string, the request parameters and the encrypted signature string can be stored in the nodes of the blockchain.

[0045] S120: If the real-time call request passes the system authentication (i.e., is legal, including passing the two processes of security verification and authority verification, the same below), the real-time call request is horizontally expanded according to the call type or request method of the real-time call request to realize the classification of the real-time call request; if the real-time call request fails to pass the system authentication, the process is terminated and the real-time call request is returned.

[0046] Specifically, there are multiple extension methods for real-time call requests. The extension method is generally set according to the request attribute of the real-time call request configuration. The request attribute is a business attribute or a performance attribute. The business attribute refers to the high correlation between the real-time call request and the business itself, and the performance attribute refers to the strong correlation between the real-time call request and the request method. When the request attribute of the real-time call request is a business attribute, the real-time call request is horizontally extended according to the call type of the real-time call request. For example, in a large or medium-sized integrated system, a subsystem may need to call more than one other subsystem (target system) during the entire operation process. At this time, the type of real-time call request can be defined according to the characteristics of each call request (corresponding to different other subsystems) involved in the subsystem, so as to classify and mark the calls of the subsystem to other different subsystems. In addition, this classification and marking method is also convenient for quickly identifying the corresponding return results and processing the return results, thereby improving the work efficiency of calling third-party API tools.

[0047] Specifically, in the actual operation process, it is generally possible to horizontally expand based on all historical call requests that belong to the same subsystem as the real-time call request. For example, all historical call requests that belong to the same subsystem as the real-time call request are obtained, and a corresponding classification tag table is set according to the call type of the historical call request; a corresponding classification tag is selected from the classification tag table according to the call type of the real-time call request; wherein each classification tag in the classification tag table corresponds to a corresponding target system.

[0048] When the request attribute of the real-time call request is a performance attribute, the real-time call request is horizontally expanded according to the request method of the real-time call request. This type of expansion method is to horizontally expand according to the request method of the real-time call request. For example, the most popular RESTful-style real-time http call request is personalized to configure a variety of optional request methods for the real-time http call request, such as post, put, delete, get, etc.

[0049] Specifically, in actual applications, horizontal expansion can be performed based on the request method of historical call requests. For example, all historical call requests that belong to the same subsystem as the real-time call request are obtained, and the corresponding request method table is set according to the request method of the historical call request; the corresponding request method is selected from the request method table according to the request parameters of the real-time call request. It should be noted that calling a third-party API tool can obtain the characteristics of a user's single request based on the request parameters of the real-time call request, and configure different request methods based on the characteristics of a single request. For example, if you want to obtain a fast response result and a concise request, you can choose the get method; if you are more concerned about request security, you can choose the post method; if you want to quickly delete records, you can choose the delete method, and so on.

[0050] It should be noted that the above two extension methods are generally selected for use. If users are more concerned about the business itself, such as finance, payment, signature, etc., they can be horizontally expanded according to the request type. For example, calling a subsystem requires calling the company's financial interface, which may involve related financial data registration, report statistics and other functions. This part of the function can be directly extracted to form a separate financial subsystem, standardizing input parameters, response results, etc., and setting corresponding classification tags for the real-time call request through horizontal expansion of the request type, thereby improving the work efficiency of the entire integrated system. For example, for the signature function, the signature can be extracted to form a signature subsystem, and the input parameters and security parameter verification that need to be passed for the signature can be defined later. If users are more concerned about the calling method itself, such as security and performance, they can choose to expand horizontally according to the request method. For example, if you want to get a fast response result and a concise request, you can choose the get method; if you are more concerned about request security, you can choose the post method; if you want to quickly delete records, you can choose the delete method.

[0051] S130: After the real-time call request is horizontally expanded, the real-time call request is subjected to corresponding system processing according to the classification result of the real-time call request.

[0052] It should be noted that system processing mainly includes some specific processing of certain data in the process, mainly at the system level. The main purpose is to facilitate system tracking and maintenance so that certain states between multiple subsystems remain consistent.

[0053] Specifically, the subsystem that issues the real-time call request is provided with a pipeline log ID, and the system processing includes a collaborative parameter passing process, and the process of performing collaborative parameter passing on the real-time call request includes: obtaining the user identity information of the real-time call request and the pipeline log ID of the subsystem; encoding the user identity information and the pipeline log ID as collaborative parameters, and directly splicing the collaborative parameters to the end of the URL (uniformresource locator) of the real-time call request through the Get method.

[0054] For example, the pipeline log ID (i.e., logID) of a subsystem that is accessed first is passed to the next system to be accessed (the target system, this step is called cascading logID); in addition, in order to let the next subsystem (i.e., the target system) know how to respond to the request, the user's identity information is also passed. These two methods are collaborative parameter transmission. For example, when the dmz (Demilitarized Zone) subsystem accesses the app (Application) subsystem, in order to achieve collaborative query of logs (i.e., the log pipeline ID of the dmz subsystem is consistent with the log pipeline ID of the app subsystem), the real-time call request of the dmz subsystem needs to carry its log pipeline ID and pass it to the app subsystem. The specific steps are: 1. Use the log pipeline ID as a normal parameter to splice after the request URL in get mode. 2. Pass the input parameters of the real-time call request in json format to the requestBody through the post request mode and pass it to the app subsystem.

[0055] It should be noted that the Get method can directly splice the collaborative parameters after the request URL. The corresponding request method is post, which is more secure in transmitting data, but the transmission rate is not as good as the Get method. The request URL is a uniform resource locator system, which is used to locate the network location of the third-party API tool. By splicing the log pipeline ID as a common parameter after the request URL in the Get method, the log pipeline ID can be quickly transmitted together with the request URL, improving data processing efficiency. In addition, the input parameters of the real-time call request (certain request parameters that need to be passed to call a subsystem so that the server can further understand the intention of the request) are placed in the requestBody (request body, a location where the input parameters are when sending a real-time call request, used to store the post request method) in the json format through the post request method, and then passed to the app subsystem in the form of requestBody.

[0056] It should be noted here that the Json format is the most popular format for network communication data flow. This format is concise, widely used, and highly versatile. Therefore, choosing the post request method in the Json format can improve the applicability of calling third-party API tools while ensuring secure data transmission.

[0057] In addition, the system processing also includes system monitoring, which mainly includes: performance monitoring, exception handling and log record feedback.

[0058] The performance monitoring process includes: obtaining the interface response time associated with the real-time mobilization request, and determining whether the interface response time is greater than the preset response time. If the interface response time is greater than the preset response time, it is determined that the response time performance is not up to standard. The interface response time refers to the time taken from the service receiving the request to the time it is processed and the result is returned, usually in ms. The interface response time can be used as an important reference for the service response capability of third-party API tools;

[0059] Exception handling means: the exception handling process includes: when the response time performance does not meet the standard, it is necessary to consider whether the third-party API tool has a problem, and the exceptions of each interface inside the third-party API tool can be self-checked and each exception can be handled uniformly. It should be noted that the exception detection process is a prior art in this field, and the present invention is used for its use here, so it will not be repeated here.

[0060] The log record feedback process includes: after all exceptions are handled, printing the real-time log generated by the third-party API tool during the period and desensitizing the real-time log; sending the desensitized real-time log to the requesting user or developer.

[0061] Specifically, if the interface response time is within the preset response time (such as 50ms), no processing is performed. If the interface response time exceeds the threshold and is able to return a result eventually, the timeout time is calculated and returned to the requester. When the interface response time exceeds the threshold and no result is returned, the request is retried. If no result is obtained after multiple retries, a network failure is determined and the requester is prompted with the network failure. If the interface response time is within the threshold after the request is retried again, it is generally determined that the last request is an exception on the interface service side. At this time, the exception can be found by parsing the key error information of the exception (such as errors in the log) and the requester is prompted.

[0062] In addition, logs are an important reflection of system operation and can provide important clues when problems occur in system operation. Of course, desensitization of sensitive data is also essential (when it comes to user sensitive information). The specific desensitization technology solution is to extract sensitive keywords such as mobile phone number, ID number, and address information when printing logs, and output the values ​​after processing them according to the corresponding rules (such as the 4 digits in the middle of the mobile phone number * mask, the 10 digits in the middle of the ID number * mask, the fixed number of digits in the middle of the address information mask, etc.). Through this specified rule mask processing method, the user's real information will not be spied on or leaked.

[0063] S140: After the real-time call request is processed by the system, the target system is called according to the real-time call request and a corresponding call return result is obtained.

[0064] Specifically, when the target system is successfully called, the called target system will also return the return data in the responseBody in the form of a post request in json format. In addition, it should be noted that when calling a third-party API tool to obtain the return results and related return parameters, these data will also be processed for exception monitoring or permission verification. In the event of an exception or other failure to pass the verification, the process will automatically terminate and send a return error message to both the requester and the target system. Since the data processing principles of the exception monitoring, permission verification, etc. for the return results of calling a third-party API tool are the same, they will not be repeated here.

[0065] It can be seen from the description of the above technical solution that the third-party API tool calling method proposed in the present invention, by designing a unique internal structure for the third-party API tool, can effectively connect various subsystems (the called subsystem is generally referred to as the target system) as a link, so that these subsystems truly become a whole to provide services to users. In addition, by setting a series of technical means such as security verification, permission verification, and log desensitization, the coupling between the various subsystems can be significantly reduced. In addition, by setting horizontal expansion functions and system processing functions related to the call request, the system scalability and maintainability can be greatly improved, and system monitoring is simpler, which can significantly improve the reliability of the entire system.

[0066] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0067] Example 2

[0068] Corresponding to the above method, the present application also provides a third-party API tool calling system, which includes:

[0069] A legality judgment unit, used for obtaining a real-time call request issued in the integrated system, and performing system authentication on the real-time call request to judge whether the real-time call request is legal;

[0070] A horizontal expansion unit, used for, if the real-time call request is legal, horizontally expanding the real-time call request according to the call type or request mode of the real-time call request, so as to classify the real-time call request;

[0071] A system processing unit, configured to perform corresponding system processing on the real-time call request according to the classification result of the real-time call request;

[0072] The system call unit is used to call the target system according to the real-time call request and obtain the corresponding call return result after the system processes the real-time call request.

[0073] Example 3

[0074] The present invention also provides an electronic device 70. Figure 2 As shown, this figure is a schematic structural diagram of a preferred embodiment of the electronic device 70 provided by the present invention.

[0075] In this embodiment, the electronic device 70 may be a terminal device with computing functions, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.

[0076] The electronic device 70 includes a processor 71 and a memory 72 .

[0077] The memory 72 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, etc. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 70, such as a hard disk of the electronic device 70. In other embodiments, the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 70, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc.

[0078] In this embodiment, the readable storage medium of the memory 72 is generally used to store a third-party API tool calling program 73 installed in the electronic device 70. The memory 72 can also be used to temporarily store data that has been output or is to be output.

[0079] In some embodiments, the processor 72 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 72, such as a third-party API tool calling program 73.

[0080] In some embodiments, the electronic device 70 is a terminal device such as a smart phone, a tablet computer, a portable computer, etc. In other embodiments, the electronic device 70 may be a server.

[0081] Figure 2 Only an electronic device 70 having components 71 - 73 is shown, but it is understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0082] Optionally, the electronic device 70 may also include a user interface, which may include an input unit such as a keyboard, a voice input device such as a microphone and other devices with voice recognition function, a voice output device such as a speaker, headphones, etc. Optionally, the user interface may also include a standard wired interface or a wireless interface.

[0083] Optionally, the electronic device 70 may further include a display, which may also be referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) touch device. The display is used to display information processed in the electronic device 70 and to display a visual user interface.

[0084] Optionally, the electronic device 70 may further include a touch sensor. The area provided by the touch sensor for the user to perform a touch operation is called a touch control area. In addition, the touch sensor here may be a resistive touch sensor, a capacitive touch sensor, etc. Moreover, the touch sensor includes not only a contact touch sensor, but also a proximity touch sensor, etc. In addition, the touch sensor may be a single sensor or a plurality of sensors arranged in an array, for example.

[0085] In addition, the area of ​​the display of the electronic device 70 can be the same as or different from the area of ​​the touch sensor. Optionally, the display and the touch sensor are stacked to form a touch display screen. The device detects touch operations triggered by the user based on the touch display screen.

[0086] Optionally, the electronic device 70 may also include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be described in detail here.

[0087] exist Figure 2 In the device embodiment shown, the memory 72 as a computer storage medium may include an operating system and a third-party API tool calling program 73; when the processor 71 executes the third-party API tool calling program 73 stored in the memory 72, the following steps are implemented:

[0088] Obtaining a real-time call request issued within the integrated system, and performing system authentication on the real-time call request to determine whether the real-time call request is legal;

[0089] If the real-time call request is legal, the real-time call request is horizontally expanded according to the call type or request method of the real-time call request to classify the real-time call request;

[0090] According to the classification result of the real-time call request, the real-time call request is processed by the system accordingly;

[0091] After the real-time call request is processed by the system, the target system is called according to the real-time call request and the corresponding call return result is obtained.

[0092] In this embodiment, Figure 3 FIG. 1 is a schematic diagram of the internal logic of a third-party API tool calling program according to an embodiment of the present invention. Figure 3 As shown, the third-party API tool calling program 73 can also be divided into one or more modules, one or more modules are stored in the memory 72 and executed by the processor 71 to complete the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can complete a specific function. Figure 3 As shown, Figure 2 The third-party API tool calling program 73 in the preferred embodiment of the program module diagram. The third-party API tool calling program 73 can be divided into: a legal judgment module 74, a horizontal expansion module 75, a system processing module 76 and a system calling module 77. The functions or operation steps implemented by modules 74-77 are similar to those above and will not be described in detail here. For example, for example:

[0093] A legality judgment module 74 is used to obtain a real-time call request issued in the integrated system, and to perform system authentication on the real-time call request to determine whether the real-time call request is legal;

[0094] A horizontal expansion module 75 is used to horizontally expand the real-time call request according to the call type or request mode of the real-time call request if the real-time call request is legal, so as to classify the real-time call request;

[0095] The system processing module 76 is used to perform corresponding system processing on the real-time call request according to the classification result of the real-time call request;

[0096] The system call module 77 is used to call the target system according to the real-time call request and obtain the corresponding call return result after the system processes the real-time call request.

[0097] Example 4

[0098] The present invention further provides a computer-readable storage medium, in which a third-party API tool calling program 73 is stored. When the third-party API tool calling program 73 is executed by a processor, the following operations are implemented:

[0099] Obtaining a real-time call request issued within the integrated system, and performing system authentication on the real-time call request to determine whether the real-time call request is legal;

[0100] If the real-time call request is legal, the real-time call request is horizontally expanded according to the call type or request method of the real-time call request to classify the real-time call request;

[0101] According to the classification result of the real-time call request, the real-time call request is processed by the system accordingly;

[0102] After the real-time call request is processed by the system, the target system is called according to the real-time call request and the corresponding call return result is obtained.

[0103] The specific implementation of the computer-readable storage medium provided by the present invention is substantially the same as the specific implementation of the third-party API tool calling method and the electronic device described above, and will not be described in detail herein.

[0104] It should be noted that the blockchain referred to in the present invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.

[0105] It should be further noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method 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, device, article or method. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0106] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. Through the description of the above implementation modes, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present invention.

[0107] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A third-party API tool calling method, applied to an electronic device, characterized in that: The method comprises: Acquire a real-time call request issued in the integrated system, and perform system authentication on the real-time call request to determine whether the real-time call request is legal; If the real-time call request is legal, the real-time call request is horizontally expanded according to the call type or request mode of the real-time call request to realize the classification of the real-time call request; wherein, the real-time call request is configured with a request attribute; the request attribute is a business attribute or a performance attribute; when the request attribute is the business attribute, the real-time call request is horizontally expanded according to the call type of the real-time call request, including: obtaining all historical call requests belonging to the same subsystem as the real-time call request, and setting a corresponding classification mark table according to the call type of the historical call request; selecting a corresponding classification mark from the classification mark table according to the call type of the real-time call request; when the request attribute is the performance attribute, the real-time call request is horizontally expanded according to the request mode of the real-time call request, including: obtaining all historical call requests belonging to the same subsystem as the real-time call request, and setting a corresponding request mode table according to the request mode of the historical call request; selecting a corresponding request mode from the request mode table according to the request parameters of the real-time call request; According to the classification result of the real-time call request, performing corresponding system processing on the real-time call request; After the real-time call request is processed by the system, the target system is called according to the real-time call request and a corresponding call return result is obtained.

2. The third-party API tool calling method according to claim 1, characterized in that: The real-time call request carries request parameters and a preset encrypted signature string related to the request parameters, and the request parameters and the preset encrypted signature string are stored in the blockchain; and the system authentication includes security verification; The performing system authentication on the real-time call request to determine whether the real-time call request is legal includes: Signing the acquired request parameters of the real-time call request according to a preset algorithm to obtain a real-time encrypted signature string of the request parameters; Comparing the real-time encrypted signature string with the preset encrypted signature string; If the real-time encrypted signature string is consistent with the preset encrypted signature string, the real-time call request is determined to have passed the security check; if the real-time encrypted signature string is inconsistent with the preset encrypted signature string, the real-time call request is determined to be illegal and the real-time call request is rejected.

3. The third-party API tool calling method according to claim 2, characterized in that: The real-time call request has a request header, and a cipher string related to the user identity information is added to the request header; and the system authentication also includes permission verification; The performing system authentication on the real-time call request to determine whether the real-time call request is legal includes: Parsing the ciphertext string to obtain the user identity information implicit in the ciphertext string; Query and verify the user identity information according to a preset user identity authority comparison table; If user information consistent with the user identity information is found in the user identity and authority comparison table, it is determined that the real-time call request has passed the authority check; if user information consistent with the user identity information is not found in the user identity and authority comparison table, it is determined that the real-time call request is illegal and the real-time call request is rejected.

4. The third-party API tool calling method according to claim 3, characterized in that: The system processing includes collaborative parameter transmission, and the corresponding system processing of the real-time call request includes: Obtaining user identity information of the real-time call request and the pipeline log ID of the subsystem that issued the real-time call request; The user identity information and the pipeline log ID are encoded as collaborative parameters, and the collaborative parameters are directly spliced ​​to the end of the URL of the real-time call request through the Get method.

5. The third-party API tool calling method according to claim 4, characterized in that: The system processing also includes system monitoring; The corresponding system processing of the real-time call request also includes: Obtaining the interface response time associated with the real-time mobilization request, and determining whether the interface response time is greater than a preset response time, if the interface response time is greater than the preset response time, determining that the response time performance does not meet the standard at this time; When the response time performance does not meet the standard, self-check the exceptions of each interface inside the third-party API tool and handle each exception in a unified manner; Print the real-time log generated by the third-party API tool and perform desensitization on the real-time log; and send the desensitized real-time log to the requesting user.

6. A third-party API tool calling system, characterized in that: The system comprises: A legality judgment unit, used for obtaining a real-time call request issued in the integrated system, and performing system authentication on the real-time call request to judge whether the real-time call request is legal; A horizontal expansion unit, for horizontally expanding the real-time call request according to the call type or request mode of the real-time call request if the real-time call request is legal, so as to classify the real-time call request; wherein the real-time call request is configured with a request attribute; the request attribute is a business attribute or a performance attribute; when the request attribute is the business attribute, the real-time call request is horizontally expanded according to the call type of the real-time call request, including: obtaining all historical call requests belonging to the same subsystem as the real-time call request, and setting a corresponding classification mark table according to the call type of the historical call request; selecting a corresponding classification mark from the classification mark table according to the call type of the real-time call request; when the request attribute is the performance attribute, the real-time call request is horizontally expanded according to the request mode of the real-time call request, including: obtaining all historical call requests belonging to the same subsystem as the real-time call request, and setting a corresponding request mode table according to the request mode of the historical call request; selecting a corresponding request mode from the request mode table according to the request parameters of the real-time call request; A system processing unit, configured to perform corresponding system processing on the real-time call request according to the classification result of the real-time call request; The system calling unit is used to call the target system according to the real-time calling request and obtain the corresponding calling return result after the real-time calling request is processed by the system.

7. An electronic device comprising a memory, a processor, and a third-party API tool calling program stored in the memory and executable on the processor, characterized in that: The third-party API tool calling program implements the following steps when executed by the processor: Acquire a real-time call request issued in the integrated system, and perform system authentication on the real-time call request to determine whether the real-time call request is legal; If the real-time call request is legal, the real-time call request is horizontally expanded according to the call type or request mode of the real-time call request to realize the classification of the real-time call request; wherein, the real-time call request is configured with a request attribute; the request attribute is a business attribute or a performance attribute; when the request attribute is the business attribute, the real-time call request is horizontally expanded according to the call type of the real-time call request, including: obtaining all historical call requests belonging to the same subsystem as the real-time call request, and setting a corresponding classification mark table according to the call type of the historical call request; selecting a corresponding classification mark from the classification mark table according to the call type of the real-time call request; when the request attribute is the performance attribute, the real-time call request is horizontally expanded according to the request mode of the real-time call request, including: obtaining all historical call requests belonging to the same subsystem as the real-time call request, and setting a corresponding request mode table according to the request mode of the historical call request; selecting a corresponding request mode from the request mode table according to the request parameters of the real-time call request; According to the classification result of the real-time call request, performing corresponding system processing on the real-time call request; After the real-time call request is processed by the system, the target system is called according to the real-time call request and a corresponding call return result is obtained.

8. A computer-readable storage medium storing a third-party API tool calling program, characterized in that: When the third-party API tool calling program is executed by the processor, the steps of the third-party API tool calling method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Server-side multithread management method based on CS architecture

    CN106953857A

  • Methods and devices for executing system calling

    CN107203715A

  • Interface calling method and device, computer device and storage medium

    CN109871287A

  • Third-party interface calling method and device

    CN111552578A

  • System and method for providing classification security in a database management system

    US20050192939A1