System interface processing method and device, electronic equipment and storage medium

By splitting the business data path into critical and non-critical paths, and combining synchronous and asynchronous processing methods, the problem of low system interface performance is solved, and more efficient processing and accurate result output are achieved.

CN118733496APending Publication Date: 2024-10-01BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410779563.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing system interface performance is low, especially when coordinating multiple downstream systems, there are time-consuming differences and difficulty in code modification in synchronous or asynchronous processing methods.

Method used

By splitting the business data path into critical paths and non-critical paths, using synchronous processing of critical paths and asynchronous processing of non-critical paths, and extending the waiting time to wait for asynchronous processing results when necessary, adjusting thread pool parameters to optimize processing efficiency.

Benefits of technology

It shortens the synchronous processing link, reduces the amount of asynchronous processing, reduces the amount of code modifications, improves the system interface performance, and improves accuracy through comprehensive analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733496A_ABST
    Figure CN118733496A_ABST
Patent Text Reader

Abstract

The invention provides a system interface processing method and device, electronic equipment and a storage medium, and the method comprises the steps: analyzing the interface data of an upstream system, and splitting a business data path into a critical path and a non-critical path; performing synchronous processing on the critical path, and performing asynchronous processing on the non-critical path; if the asynchronous processing result is not detected while the synchronous processing result is detected, prolonging the set duration to wait for the system to return the asynchronous processing result; and if the asynchronous processing result is detected within the set duration, comprehensively analyzing the synchronous processing result and the asynchronous processing result to obtain a processing result of the system interface. The interface performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data interface, and in particular to a system interface processing method, device, electronic device and storage medium. Background Art

[0002] The upstream system needs to query more downstream systems, and the interfaces are generally complex. The upstream system combines the response results of different downstream systems into the final result and returns it to the front end. The processing logic of different downstream systems is different, resulting in large differences in the time consumption of each downstream system. Existing business service application processing interface requests are divided into synchronous interfaces and asynchronous interfaces. If the synchronous processing method is adopted, it is necessary to combine the processing time of the upstream system itself and the processing time of several downstream systems, so the interface time consumption is high. If the asynchronous processing method is adopted, if the code needs to be modified, then the upstream system and the downstream system need to modify the code at the same time, and other callers also need to modify the code, which makes coordination between systems more difficult.

[0003] There is currently no good solution to the problem of low interface performance. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a system interface processing method, device, electronic device and storage medium.

[0005] In a first aspect, the present application provides a method for analyzing interface data of an upstream system, the method comprising:

[0006] Split the business data path into critical paths and non-critical paths;

[0007] The critical path is processed synchronously, and the non-critical path is processed asynchronously;

[0008] If the asynchronous processing result is not detected while the synchronous processing result is detected, the set time is extended to wait for the system to return the asynchronous processing result;

[0009] If the asynchronous processing result is detected within the set time period, the synchronous processing result and the asynchronous processing result are comprehensively analyzed to obtain the processing result of the system interface.

[0010] Optionally, after extending the set time, the method further includes:

[0011] If no asynchronous processing result returned by the system is detected within the set time period, calling the pre-stored asynchronous processing result;

[0012] The synchronous processing result and the pre-stored asynchronous processing result are comprehensively analyzed to obtain the processing result of the system interface.

[0013] Optionally, in the process of asynchronously processing the non-critical path, the method further includes:

[0014] Reading pre-configured thread pool parameters and setting thresholds from a set memory;

[0015] During the asynchronous processing, monitoring task parameters of an asynchronous task, wherein the asynchronous task refers to a task for asynchronously processing a non-critical path;

[0016] If the task parameter exceeds the set threshold, the thread pool parameter is adjusted so that the adjusted thread number parameter satisfies the asynchronous task.

[0017] Optionally, the task parameters include asynchronous task execution time, asynchronous waiting queue length and system CPU usage. If the task parameters exceed the set threshold, adjusting the thread pool parameters includes:

[0018] If the execution time of the asynchronous task exceeds a preset time threshold, increasing the number of core threads in the thread pool; and / or,

[0019] If the length of the asynchronous waiting queue exceeds a preset length threshold, increasing the number of core threads in the thread pool; and / or,

[0020] If the system CPU usage exceeds a preset usage threshold, the number of core threads in the thread pool is increased.

[0021] Optionally, after adjusting the thread pool parameters, the method further includes:

[0022] Monitor the number of core threads in the thread pool;

[0023] The upload server is expanded or reduced in capacity according to the comparison relationship between the number of core threads and the preset number of threads, wherein the sum of the numbers of threads of a plurality of the upload servers is equal to the number of core threads.

[0024] Optionally, by analyzing the interface data of the upstream system, the business data path is split into a critical path and a non-critical path including:

[0025] Identifying keywords in the interface data;

[0026] Determine the data type of the interface data where the keyword is located according to the mapping relationship between the keyword and the data type;

[0027] A path where the interface data is located is determined according to the data type, wherein the path is a critical path or a non-critical path.

[0028] Optionally, according to the data type, determining a path where the interface data corresponding to the data type is located includes:

[0029] If the data type is an active rule, determining the path where the interface data corresponding to the data type is located as a critical path;

[0030] If the data type is whether the user participates in an activity, it is determined that the path where the interface data corresponding to the data type is located is a non-critical path.

[0031] In a second aspect, the present application provides a system interface processing device, the device comprising:

[0032] A splitting module is used to split the business data path into a critical path and a non-critical path by analyzing the interface data of the upstream system;

[0033] A processing module, used for synchronously processing the critical path and asynchronously processing the non-critical path;

[0034] A delay module, used for extending a set time to wait for the system to return the asynchronous processing result if no asynchronous processing result is detected while the synchronous processing result is detected;

[0035] The analysis module is used to comprehensively analyze the synchronous processing result and the asynchronous processing result if the asynchronous processing result is detected within the set time period to obtain the processing result of the system interface.

[0036] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0037] Memory, used to store computer programs;

[0038] The processor is used to implement any of the processing steps of the system interface when executing the program stored in the memory.

[0039] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processing method steps of any of the system interfaces are implemented.

[0040] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0041] This application implements synchronous processing of critical links and asynchronous processing of non-critical links at the same time. On the one hand, by shortening the link length of synchronous processing, the time consumed by synchronous processing is reduced. On the other hand, asynchronous processing only involves non-critical links, so the number of systems connected to asynchronous processing is also reduced, thereby reducing the amount of code modification. This application improves system interface performance from these two aspects. In addition, if the asynchronous processing result does not appear at the same time as the synchronous processing result, then the asynchronous processing result can be waited for within a certain limit, so that a comprehensive analysis of the synchronous processing results and the asynchronous processing results can be achieved, the accuracy of the results can be improved, and the interface performance can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0043] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 A schematic diagram of the hardware environment of a system interface processing method provided in an embodiment of the present application;

[0045] Figure 2 A flowchart of a method for processing a system interface provided in an embodiment of the present application;

[0046] Figure 3 It is a schematic diagram of a service data path in the prior art;

[0047] Figure 4 A schematic diagram of a service data path provided in an embodiment of the present application;

[0048] Figure 5 A simplified system interface processing flow chart provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of the structure of a processing device for a system interface provided in an embodiment of the present application;

[0050] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 making creative work are within the scope of protection of this application.

[0052] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

[0053] In order to solve the problem mentioned in the background technology, according to one aspect of an embodiment of the present application, an embodiment of a method for processing a system interface is provided.

[0054] Optionally, in the embodiment of the present application, the above system interface processing method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the terminal 101 via a network, and can be used to provide services for the terminal or a client installed on the terminal. A database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 includes but is not limited to a PC, a mobile phone, a tablet computer, etc.

[0055] A method for processing a system interface in an embodiment of the present application may be executed by the server 103. An embodiment of the present application provides a method for processing a system interface, which may be applied to a server to improve system interface performance.

[0056] The following will describe in detail a method for processing a system interface provided by an embodiment of the present application in combination with a specific implementation method. Figure 2 As shown, the specific steps are as follows:

[0057] Step 201: By analyzing the interface data of the upstream system, the business data path is split into a critical path and a non-critical path.

[0058] When an upstream system connects to multiple downstream systems, it will generate interface data, which are connected in the order of business processes to form a business data path. In the prior art, there is only one business data path, such as Figure 3 As shown, whether synchronous processing or asynchronous processing is adopted, the interface performance will be low.

[0059] The embodiment of the present application divides the business data path into two independent paths, one is a non-critical path, and the other is a critical path. The critical path is the path where data that is more important to the system return result is located, and the non-critical path is the path where data that is less important to the system return result is located.

[0060] The splitting into two paths can be done by using a neural network model, splitting based on data type, or determining which data belongs to which path based on a set relationship.

[0061] Specifically, the server inputs the interface data into a trained neural network model, obtains the path type of the interface data output by the neural network model, and then divides the interface data into the corresponding paths; or the server determines the data type of the interface data according to the mapping relationship, and divides the interface data into the corresponding paths according to the data type.

[0062] This application can be applied to any scenario where upstream and downstream systems are connected. For example, it can be applied to a user welfare system or a shopping system. This application does not limit the usage scenario.

[0063] Step 202: synchronously process the critical path and asynchronously process the non-critical path.

[0064] The server uses synchronous processing to process the critical path and obtains the synchronous processing result. While performing synchronous processing, it uses the asynchronous programming class that comes with JDK (Java SE Development kit, Java Standard Edition Development Kit) to submit asynchronous tasks and uses asynchronous processing to perform asynchronous processing on non-critical paths. Figure 4 A schematic diagram of a service data path provided for an embodiment of the present application, wherein the upper layer is a non-critical link and the lower layer is a critical link.

[0065] Among them, synchronous processing is also called blocking processing, which means that when the program is executed to a certain position, it will wait for the instruction to be executed before executing the subsequent commands. Asynchronous processing refers to a program being executed by multiple threads or processes at the same time. Synchronous processing and asynchronous processing are commonly used processing methods in the prior art, and this application will not describe them in detail.

[0066] Step 203: If the asynchronous processing result is not detected while the synchronous processing result is detected, the set time length is extended to wait for the system to return the asynchronous processing result.

[0067] After the server obtains the synchronous processing result, it determines whether it has received the asynchronous synchronous result returned by the system. If it has received the asynchronous processing result, it directly performs a comprehensive analysis on the synchronous processing result and the asynchronous processing result to obtain the processing result of the system interface. If it has not received the asynchronous processing result, it will extend the set time through a blocking method with a timeout, thereby waiting for the system to return the asynchronous processing result within the set time, and then perform a comprehensive analysis.

[0068] Step 204: If an asynchronous processing result is detected within the set time period, a comprehensive analysis is performed on the synchronous processing result and the asynchronous processing result to obtain a processing result of the system interface.

[0069] After the server extends the set time, it determines whether an asynchronous processing result is detected within the set time. If an asynchronous processing result is detected, a comprehensive analysis is performed on the synchronous processing result and the asynchronous processing result.

[0070] If no asynchronous processing result is detected, a fallback asynchronous processing result can be obtained, and specifically, the fallback asynchronous processing result can be pre-stored by the server. The server performs a comprehensive analysis on the synchronous processing result and the pre-stored asynchronous processing result to obtain the processing result of the system interface.

[0071] For different scenarios, the comprehensive analysis method is also different. It can be simple content assembly, or it can be analyzed using a trained big data model, or it can be assembled and then screened according to specific conditions. The analysis method is not the focus of this application and will not be explained here. Figure 4 As shown, "check user points information" and "check user collection records" are combined and analyzed to obtain the result of the user receiving benefits.

[0072] The present application provides a schematic diagram of a processing method for a system interface, which splits the business data path into a critical path and a non-critical path, performs synchronous processing on the critical path, and performs asynchronous processing on the non-critical path, and finally combines the synchronous processing results and the asynchronous processing results, and finally outputs the processing results. The simplified processing flow chart is as follows: Figure 5 The server mentioned in this application is a monitoring server, that is, Figure 5 Management Monitoring Center in.

[0073] The present application realizes synchronous processing of critical links and asynchronous processing of non-critical links at the same time. On the one hand, by shortening the link length of synchronous processing, the time consumed by synchronous processing is reduced. On the other hand, asynchronous processing only involves non-critical links, so the amount of code modification involved in asynchronous processing is also reduced. The present application adopts a synchronous and asynchronous method, combined with a pipeline mode to process business requests and improve application interface performance.

[0074] In addition, if the asynchronous processing result does not appear at the same time as the synchronous processing result, the timeout waiting mechanism can be used to wait for the asynchronous processing result within a certain limit. This will not affect the system's response result in the case where the downstream system is temporarily unable to provide services or the system has large traffic, complex business logic, and is time-consuming. This allows for a comprehensive analysis of the synchronous and asynchronous processing results, improves the accuracy of the results, and further improves interface performance.

[0075] In summary, for systems with large traffic and complex and time-consuming business logic, this application asynchronousizes non-critical paths, which can improve the efficiency of machine resource utilization while reducing machine costs and improving system interface performance. For situations where downstream systems are temporarily unable to provide services, this application uses a timeout waiting mechanism to wait for asynchronous processing results to improve interface performance.

[0076] As an optional implementation method, if the downstream system is unavailable, resulting in a longer service response time, and the asynchronous processing results fed back by the downstream system cannot be received in a short period of time, the upstream system can also return the interface processing results normally due to the existence of a backup asynchronous processing result, thereby improving the response speed of the interface, ensuring system stability, and allowing users to quickly see the processing results, improving user experience. For example, if Figure 4 Even if the dotted link in the middle is broken, it will not affect the normal return of the system, thus ensuring the stability of the system.

[0077] For example, Figure 4 As shown, if the "user collection record" has been detected, but the "user points information" has not been detected after a delay, then the user points information can be considered to be zero. At this time, the asynchronous processing result pre-stored by the server is that the user points information is zero. Then the interface processing result can be calculated based on the synchronous processing result "user collection record" and the asynchronous processing result "user points information is zero".

[0078] As an optional implementation method, during the process of asynchronously processing non-critical paths, the method also includes: reading the configured thread pool parameters and setting thresholds from a set memory; monitoring the task parameters of asynchronous tasks during the asynchronous processing, wherein the asynchronous task refers to the task that performs asynchronous processing on non-critical paths; if the task parameters exceed the set threshold, adjusting the thread pool parameters so that the adjusted thread number parameters meet the asynchronous task.

[0079] The server's memory stores configured thread pool parameters and some set thresholds. The thread pool parameters mentioned here refer to the number of core threads. During the asynchronous processing, an interface request log is generated. The server monitors the task parameters of the asynchronous task during the asynchronous processing according to the interface request log, and then compares the task parameters with the set thresholds. If the task parameters do not exceed the set threshold, it indicates that the asynchronous task can be completed by relying on the number of core threads, and there is no need to adjust the number of core threads; if the task parameters exceed the set threshold, it indicates that the asynchronous task cannot be completed by relying on the number of core threads, then the number of core threads is increased so that the adjusted number of core threads can meet the asynchronous task.

[0080] This application adjusts the thread pool parameters by comparing the task parameters with the set thresholds to ensure that the adjusted thread pool parameters can meet the asynchronous processing process, improve the accuracy of the asynchronous processing results, and thus improve the accuracy of the system interface processing results.

[0081] As an optional implementation method, when the task parameters exceed the set threshold, the thread pool parameters are adjusted, including: if the execution time of the asynchronous task exceeds the preset time threshold, the number of core threads of the thread pool is increased; and / or, if the length of the asynchronous waiting queue exceeds the preset length threshold, the number of core threads of the thread pool is increased; and / or, if the system CPU usage exceeds the preset usage threshold, the number of core threads of the thread pool is increased.

[0082] Specifically, the task parameters include the execution time of the asynchronous task, the length of the asynchronous waiting queue, and the system CPU usage rate. If the task parameters exceed the set threshold, the thread pool parameters are adjusted in at least three ways. The first way is that if the execution time of the asynchronous task exceeds the preset time threshold, the number of core threads of the thread pool can be increased based on qps (Queries Per Second); the second way is that if the length of the asynchronous waiting queue exceeds the preset length threshold, the number of core threads of the thread pool is increased; the third way is that if the system CPU usage rate exceeds the preset usage threshold, the number of core threads of the thread pool is increased. If at least one of the above three methods is met, the number of core threads of the thread pool must be increased.

[0083] This application compares the commonly used execution time, waiting queue length and system CPU usage with the threshold, increases the number of core threads in the thread pool, so that the number of core threads can meet the asynchronous tasks and improve the efficiency of asynchronous task completion.

[0084] As an optional implementation, after adjusting the thread pool parameters, the method further includes: monitoring the number of core threads in the thread pool; and expanding or reducing the capacity of the upload server based on a comparison relationship between the number of core threads and a preset number of threads.

[0085] In addition to the monitoring server, this application also includes an upload server. The monitoring server is used to execute the process steps in this application. The upload server is used to upload the number of real-time threads of its own device to the monitoring server. The sum of the number of real-time threads of each upload server is the number of core threads in the thread pool. If the monitoring server determines that the number of core threads is greater than the preset number of threads, it indicates that the upload server is under great pressure. The monitoring server can expand the number of deployed upload servers to reduce the pressure on the upload server; if the monitoring server determines that the number of core threads is less than or equal to the preset number of threads, it indicates that the upload server is under less pressure and the number of upload servers is too large, which will lead to increased costs. The monitoring server can reduce capacity to reduce the number of deployed upload servers, thereby controlling traffic costs.

[0086] As an optional implementation, splitting the business data path into critical paths and non-critical paths for the user welfare system includes: identifying keywords in the interface data; determining the data type of the interface data where the keywords are located based on the mapping relationship between the keywords and the data types; and determining the path where the interface data is located based on the data type, wherein the path is a critical path or a non-critical path.

[0087] The interface data in the user welfare system is divided into multiple data types. The importance of the interface data can be determined according to the data type, and then the interface data can be divided into critical paths or non-critical paths according to its importance, thereby achieving accurate division of the interface data.

[0088] Specifically, the server identifies keywords in the interface data in combination with the context, such as "user", "recharge", "points", "receipt record", etc. The mapping relationship between the keywords and the data types is defined in advance. The data type of the interface data where the keyword is located can be determined based on the mapping relationship. For example, the data type of the interface data in the user welfare system is analyzed. The data types are roughly divided into two categories, one is the activity rules (such as display position information, the relationship between the display position and the welfare, and the user receipt disclosure), and the other is whether the user has participated in the activity (user membership information or user points information).

[0089] Interface data can be divided into critical paths or non-critical paths according to data types. For example, for interface data corresponding to activity rules, the path where the interface is located can be defined as a critical path. For interface data corresponding to whether a user has participated in the activity, the path where the interface is located can be defined as a non-critical path.

[0090] Generally speaking, the activity rules involve a large range of users and usage scenarios, and the activity rules themselves are also very important. Therefore, the path corresponding to the activity rules is taken as the critical path. However, whether the user participates in the activity has large variables and uncertainty. Therefore, the path corresponding to whether the user participates in the activity is taken as a non-critical path. This application determines the critical path and non-critical path based on actual conditions, improves the accuracy of path division, and thus improves the accuracy of subsequent system interface processing results.

[0091] The present application can be applied to a user welfare system, which is a system that can distribute red envelopes, redemption vouchers, surprise boxes, coupons and other benefits to users. It is mainly used in applications that can sell goods. The embodiments of the present application can also be applied to other business systems. The present application does not limit the specific application scenarios.

[0092] Figure 4 This is a specific implementation example of system interface processing in a user welfare system. When an upstream system connects to multiple downstream interfaces, multiple interface data are generated. The server classifies the types of interface data obtained by the upstream system, and divides the interface data into critical paths and non-critical paths respectively. User information, user membership information and user points information are obtained from non-critical paths, and these information are processed synchronously. Display position information, the relationship between the display position and welfare, and user collection records are obtained from critical paths, and these information are processed asynchronously. Then, the synchronous processing results and the asynchronous processing results are assembled to obtain the processing results of the system interface, and the processing results are returned to the terminal.

[0093] Based on the same technical concept, the embodiment of the present application also provides a system interface processing device, such as Figure 6 As shown, the device comprises:

[0094] A splitting module 601 is used to split the service data path into a critical path and a non-critical path by analyzing the interface data of the upstream system;

[0095] Processing module 602, used for synchronously processing the critical path and asynchronously processing the non-critical path;

[0096] The delay module 603 is used to extend the set time to wait for the system to return the asynchronous processing result if the asynchronous processing result is not detected while the synchronous processing result is detected;

[0097] The analysis module 604 is used to perform a comprehensive analysis on the synchronous processing result and the asynchronous processing result if an asynchronous processing result is detected within a set time period to obtain a processing result of the system interface.

[0098] Optionally, the device is also used for:

[0099] If the asynchronous processing result returned by the system is not detected within the set time, the pre-stored asynchronous processing result is called;

[0100] The synchronous processing results and the pre-stored asynchronous processing results are comprehensively analyzed to obtain the processing results of the system interface.

[0101] Optionally, the processing module 602 is used to:

[0102] Reading pre-configured thread pool parameters and setting thresholds from a set memory;

[0103] During the asynchronous processing, the task parameters of the asynchronous task are monitored, wherein the asynchronous task refers to the task of asynchronously processing a non-critical path;

[0104] If the task parameters exceed the set threshold, the thread pool parameters are adjusted so that the adjusted thread number parameters meet the asynchronous task.

[0105] Optionally, the task parameters include asynchronous task execution time, asynchronous waiting queue length, and system CPU usage rate. The processing module 602 is used to:

[0106] If the execution time of the asynchronous task exceeds the preset time threshold, the number of core threads in the thread pool is increased; and / or,

[0107] If the length of the asynchronous waiting queue exceeds a preset length threshold, increasing the number of core threads in the thread pool; and / or,

[0108] If the system CPU usage exceeds the preset usage threshold, the number of core threads in the thread pool is increased.

[0109] Optionally, the device is also used for:

[0110] Monitor the number of core threads in the thread pool;

[0111] The upload server is expanded or reduced in capacity according to the comparison relationship between the number of core threads and the preset number of threads, wherein the sum of the numbers of threads of multiple upload servers is equal to the number of core threads.

[0112] Optionally, the splitting module 601 is used to:

[0113] Identify keywords in interface data;

[0114] According to the mapping relationship between the keyword and the data type, the data type of the interface data where the keyword is located is determined;

[0115] A path where the interface data is located is determined according to the data type, wherein the path is a critical path or a non-critical path.

[0116] Optionally, the splitting module 601 is used to:

[0117] If the data type is an active rule, the path where the interface data corresponding to the data type is located is determined to be the critical path;

[0118] If the data type is whether the user participates in the activity, it is determined that the path where the interface data corresponding to the data type is located is a non-critical path.

[0119] Based on the same technical concept, an embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0120] Memory 703, used for storing computer programs;

[0121] The processor 701 is used to implement the above steps when executing the program stored in the memory 703.

[0122] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0123] The communication interface is used for communication between the above electronic device and other devices.

[0124] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0125] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0126] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0127] In another embodiment of the present invention, a computer program product including instructions is provided, which enables the computer to execute any one of the methods in the above embodiments when the computer program product is executed on the computer.

[0128] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0129] It should be noted that, in this article, relational terms such as "first" and "second" 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 existence of other identical elements in the process, method, article or device including the elements.

[0130] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. 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 invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for processing a system interface, characterized in that: The method comprises: By analyzing the interface data of the upstream system, the business data path is split into critical paths and non-critical paths; The critical path is processed synchronously, and the non-critical path is processed asynchronously; If the asynchronous processing result is not detected while the synchronous processing result is detected, the set time is extended to wait for the system to return the asynchronous processing result; If the asynchronous processing result is detected within the set time period, the synchronous processing result and the asynchronous processing result are comprehensively analyzed to obtain the processing result of the system interface.

2. The method according to claim 1, characterized in that: After extending the set time, the method further includes: If no asynchronous processing result returned by the system is detected within the set time period, calling the pre-stored asynchronous processing result; The synchronous processing result and the pre-stored asynchronous processing result are comprehensively analyzed to obtain the processing result of the system interface.

3. The method according to claim 1, characterized in that In the process of asynchronously processing the non-critical path, the method further includes: Reading pre-configured thread pool parameters and setting thresholds from a set memory; During the asynchronous processing, the task parameters of the asynchronous task are monitored, wherein the asynchronous task refers to a task for asynchronously processing a non-critical path; If the task parameter exceeds the set threshold, the thread pool parameter is adjusted so that the adjusted thread number parameter satisfies the asynchronous task.

4. The method according to claim 3, characterized in that The task parameters include asynchronous task execution time, asynchronous waiting queue length and system CPU usage. If the task parameters exceed the set threshold, adjusting the thread pool parameters includes: If the execution time of the asynchronous task exceeds a preset time threshold, increasing the number of core threads in the thread pool; and / or, If the length of the asynchronous waiting queue exceeds a preset length threshold, increasing the number of core threads in the thread pool; and / or, If the system CPU usage exceeds a preset usage threshold, the number of core threads in the thread pool is increased.

5. The method according to claim 3, characterized in that: After adjusting the thread pool parameters, the method further includes: Monitor the number of core threads in the thread pool; The upload server is expanded or reduced in capacity according to the comparison relationship between the number of core threads and the preset number of threads, wherein the sum of the numbers of threads of a plurality of the upload servers is equal to the number of core threads.

6. The method according to claim 1, characterized in that By analyzing the interface data of the upstream system, the business data path is split into critical paths and non-critical paths, including: Identifying keywords in the interface data; Determine the data type of the interface data where the keyword is located according to the mapping relationship between the keyword and the data type; A path where the interface data is located is determined according to the data type, wherein the path is a critical path or a non-critical path.

7. The method according to claim 6, characterized in that Determining the path where the interface data corresponding to the data type is located includes: If the data type is an active rule, determining that the path where the interface data corresponding to the data type is located is a critical path; If the data type is whether the user participates in an activity, it is determined that the path where the interface data corresponding to the data type is located is a non-critical path.

8. A system interface processing device, characterized in that: The device comprises: A splitting module is used to split the business data path into a critical path and a non-critical path by analyzing the interface data of the upstream system; A processing module, used for synchronously processing the critical path and asynchronously processing the non-critical path; A delay module, used for extending a set time to wait for the system to return the asynchronous processing result if no asynchronous processing result is detected while the synchronous processing result is detected; The analysis module is used to comprehensively analyze the synchronous processing result and the asynchronous processing result if the asynchronous processing result is detected within the set time period to obtain the processing result of the system interface.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.