Interface service data processing methods, devices, and electronic equipment
By using interface service data processing methods and leveraging the data center for dynamic configuration and anomaly handling of script information, the problem of low efficiency in adjusting scripts through interface services is solved. This enables timely updates and efficient storage of scripts, improving system stability and maintenance efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUNSHINE LIFE INSURANCE CO LTD
- Filing Date
- 2022-08-17
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the efficiency of adjusting interface service dialogue is low, making it difficult to achieve dynamic and efficient configuration.
By obtaining the front-end call requests, performing pre-processing and business processing, comparing the script information in the data center, dynamically configuring the script information, and storing the script data in the data center, the timely updating of the script and the handling of anomalies are achieved.
It improves the efficiency of adjusting interface service scripts, alleviates the problem of script data storage and persistence, and enhances system stability and maintenance efficiency.
Smart Images

Figure CN115328676B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a service data processing method, apparatus, and electronic device for an interface. Background Technology
[0002] Currently, various applications need to initiate a call request to the target interface when requesting interface services from the server. When providing the corresponding interface service, the server can display a corresponding message to prompt the user. For example, it can prompt the user that the interface request failed.
[0003] However, existing technologies suffer from the problem of low efficiency in adjusting interface service language. Summary of the Invention
[0004] The purpose of this application is to provide a service data processing method, apparatus, and electronic device for an interface, so as to alleviate the technical problem of low efficiency in adjusting interface service language in the prior art.
[0005] In a first aspect, embodiments of this application provide a service data processing method for an interface, applied to a service data processing system for the interface, the service data processing system including a data center; the method includes:
[0006] Obtain the frontend's call request for the target interface;
[0007] The call request is preprocessed to obtain the preprocessing result;
[0008] If the result of the preprocessing is that the target interface is in an online state, then the target interface is processed to obtain a processing result; wherein, the processing result includes information about the target interface and the corresponding first script information;
[0009] The business processing result is compared with all the script information data in the data center to obtain the comparison result;
[0010] If the comparison result indicates that the first script information has not been modified, then the information of the target interface and the first script information are returned to the front end.
[0011] In one possible implementation, after obtaining the comparison results, the following is also included:
[0012] If the comparison result indicates that the first script information is newly added script information, then the first script information is stored in the data center;
[0013] The information of the target interface and the first script information are returned to the front end.
[0014] In one possible implementation, after comparing the business processing result with all the script information data in the data center to obtain the comparison result, the method further includes:
[0015] If the comparison result indicates that the first script information has been modified, then the modified second script information corresponding to the information of the target interface is determined in the data center;
[0016] The information of the target interface and the second script information are returned to the front end.
[0017] In one possible implementation, after the step of performing business processing on the target interface and obtaining the business processing result if the result of the preprocessing is that the target interface is in an online state, the method further includes:
[0018] A first determination is made as to whether the business processing result is abnormal; wherein, the business processing result includes information about the target interface and the corresponding first dialogue information;
[0019] If the first judgment result is yes, then a second judgment is made on whether the anomaly is a business anomaly;
[0020] If the second judgment result is negative, then the frequency of occurrence of the abnormality is recorded;
[0021] If the frequency of occurrence exceeds a preset threshold, an alarm message is sent to the management terminal.
[0022] In one possible implementation, after determining whether the exception is a business exception by making a second determination if the first determination result is yes, the method further includes:
[0023] If the second judgment result is yes, then a third judgment is made on whether there is specified abnormal dialogue information in the data center; wherein, the specified abnormal dialogue information is the dialogue information corresponding to the business abnormality;
[0024] If the third judgment result is yes, then the information of the target interface and the specified abnormal dialogue information are returned to the front end;
[0025] If the third judgment result is negative, the information of the target interface and the first dialogue information are returned to the front end, and the first dialogue information is stored in the data center as newly added abnormal dialogue information.
[0026] In one possible implementation, the invocation request includes a shutdown request for the target interface; the preprocessing of the invocation request to obtain the preprocessing result includes:
[0027] In response to the offline request for the target interface, the target interface is taken offline, thus putting the target interface into an offline state.
[0028] In one possible implementation, the data center includes a Redis database and local memory; the Redis database and the local memory synchronize data at a preset period.
[0029] Secondly, embodiments of this application provide a service data processing apparatus for an interface, characterized in that it is applied to a service data processing system for the interface, the service data processing system including a data center; the apparatus includes:
[0030] The acquisition module is used to acquire the front-end's call request for the target interface;
[0031] The first processing module is used to perform pre-processing on the call request and obtain the pre-processing result;
[0032] The second processing module is used to perform business processing on the target interface if the result of the preprocessing is that the target interface is in an online state, and obtain a business processing result; wherein, the business processing result includes information about the target interface and corresponding first script information;
[0033] The comparison module is used to compare the business processing result with all the script information data in the data center to obtain the comparison result;
[0034] The return module is used to return the information of the target interface and the first dialogue information to the front end if the comparison result shows that the first dialogue information has not been modified.
[0035] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the method described in the first aspect above.
[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the steps of the method described in the first aspect above.
[0037] The embodiments of this application bring the following beneficial effects:
[0038] This application provides a service data processing method, apparatus, and electronic device for an interface. First, a call request from the front end for a target interface is obtained. Then, the call request undergoes pre-processing to obtain a pre-processing result. If the pre-processing result indicates that the target interface is not offline, business processing is performed on the target interface to obtain a business processing result. This business processing result includes information about the target interface and corresponding first dialogue information. The business processing result is then compared with all dialogue information data in the data center to obtain a comparison result. If the comparison result indicates that the first dialogue information has not been modified, the target interface information and the first dialogue information are returned to the front end. This achieves dynamic configuration of dialogue, avoids control delays in dialogue, and alleviates the low efficiency problem of adjusting interface service dialogue in existing technologies. Furthermore, by storing dialogue data in the server's data center, the problems of large-scale storage of dynamic dialogue and persistent data storage are alleviated. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0040] Figure 1 A flowchart illustrating a service data processing method for an interface provided in an embodiment of this application;
[0041] Figure 2 A general flowchart provided for an embodiment of this application;
[0042] Figure 3 A schematic diagram illustrating the workflow of a pre-processor provided in an embodiment of this application;
[0043] Figure 4 A schematic diagram illustrating the workflow of a post-processor provided in an embodiment of this application;
[0044] Figure 5 This is a schematic diagram of an anomaly interception process provided in an embodiment of this application;
[0045] Figure 6 A schematic diagram of a data center workflow provided for an embodiment of this application;
[0046] Figure 7 A schematic diagram of the structure of a service data processing device for an interface provided in an embodiment of this application;
[0047] Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this application, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0050] Currently, various API services have their own corresponding prompts to remind and guide users. However, the API state may change during operation, or the prompts may need to be modified due to business requirements, thus creating a need for dynamic adjustments to the prompts. However, existing technologies suffer from low efficiency in adjusting API service prompts.
[0051] Based on this, embodiments of this application provide a service data processing method, apparatus, and electronic device for an interface, which can alleviate the technical problem of low efficiency in adjusting interface service scripts.
[0052] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0053] Figure 1 This is a flowchart illustrating a service data processing method for an interface provided in an embodiment of this application. The method can be applied to a service data processing system for the interface, which includes a data center. Figure 1 As shown, the method includes:
[0054] Step S110: Obtain the front-end call request for the target interface.
[0055] For example, the principles of Aspect-Oriented Programming (AOP) in Java Spring can be utilized to intercept call requests and perform pre-processing and post-processing. Spring AOP technology allows for non-intrusive pre- and post-enhancement of interfaces.
[0056] Step S120: Perform pre-processing on the call request to obtain the pre-processing result.
[0057] For example, such as Figure 2 As shown, the call request can be pre-processed, primarily to intercept the offline status of the target interface. By determining whether the target interface corresponding to the request is offline, the decision on whether to continue business processing is made based on the online / offline status of the target interface. The specific workflow is as follows: Figure 3 As shown, after receiving the call request, the front-end processor requests the data corresponding to the target interface from the data center. Based on the interface offline information in the data, it determines whether to allow the call. If the target interface is offline, the offline message is returned to the front end, i.e., returned to the client through the gateway.
[0058] Step S130: If the result of the preprocessing is that the target interface is in an online state, then perform business processing on the target interface to obtain the business processing result.
[0059] The business processing result includes information about the target interface and the corresponding first dialogue message.
[0060] For example, such as Figure 3 As shown, if the target interface is not offline, the preprocessor will allow the call request to proceed, perform normal actual interface business logic processing, and determine the information of the target interface and the corresponding first dialogue information.
[0061] Step S140: Compare the business processing result with all the script information data in the data center to obtain the comparison result.
[0062] For example, such as Figure 4 As shown, after obtaining the business processing result, a post-processor can be used to perform post-processing on the result, i.e., post-interception. This involves intercepting the returned business processing result and filtering out the dialogue. For example, the dialogue returned in the BaseModel of the return body (business processing result) can be filtered and compared with all dialogue information data in the data center to obtain comparison results. Then, different processing can be performed on the dialogue based on different comparison results.
[0063] Step S150: If the comparison result shows that the first dialogue information has not been modified, then the information of the target interface and the first dialogue information are returned to the front end.
[0064] For example, such as Figure 2As shown, if the comparison result shows that the first script information has not been modified, that is, the first script information and the corresponding script information stored in the data center of the target interface are the same script information, then the information of the target interface and the first script information are returned to the front end.
[0065] This application provides a service data processing method, apparatus, and electronic device for an interface. First, it obtains a call request from the front end for a target interface. Then, it performs pre-processing on the call request to obtain a pre-processing result. If the pre-processing result indicates that the target interface is not offline, it performs business processing on the target interface to obtain a business processing result. This business processing result includes information about the target interface and corresponding first dialogue information. The business processing result is then compared with all dialogue information data in the data center to obtain a comparison result. If the comparison result indicates that the first dialogue information has not been modified, the target interface information and the first dialogue information are returned to the front end. This achieves dynamic configuration of dialogue, avoids control delays in dialogue, and alleviates the low efficiency problem of adjusting interface service dialogue in existing technologies. Furthermore, by storing dialogue data in the server's data center, it alleviates the problems of large-scale storage of dynamic dialogue and persistent data storage.
[0066] The steps described above will be explained in detail below.
[0067] In some embodiments, after step S140 described above, the method may further include the following steps:
[0068] Step a) If the comparison result shows that the first script information is newly added script information, then store the first script information in the data center.
[0069] Step b) returns the target interface information and the first dialogue information to the front end.
[0070] For example, such as Figure 4 As shown, if the comparison result of the post-processing is that the first script information is newly added script information, the first script information can be stored and added to the data center, and the information of the target interface and the first script information can be returned to the front end.
[0071] By storing newly added first-line script information in the data center, timely updates of the target interface and corresponding first-line script information in the database can be achieved. This allows subsequent call requests to correctly carry the relevant script information back to the front end, enabling dynamic configuration of scripts and improving the efficiency of adjusting scripts for interface services.
[0072] In some embodiments, after step S140 described above, the method may further include the following steps:
[0073] Step c) If the comparison result shows that the first script information has been modified, then determine the modified second script information corresponding to the information of the target interface in the data center.
[0074] Step d) returns the target interface information and the second dialogue information to the front end.
[0075] For example, such as Figure 4 As shown, in actual operation, customers may report that the tone of the first script is too harsh. Therefore, the content of the first script in the data center can be edited and modified in real time online to obtain the second script. For example, if the original script is "This account is not registered, there is a security risk, and it needs to be fixed immediately," the operations and maintenance personnel can modify it to "Username or password entered incorrectly, please try again." This results in the post-processing comparison showing that the first script has been modified, meaning that the first script and the corresponding script stored in the data center for the target interface are different; the two information do not match. Therefore, the modified second script corresponding to the information of the target interface can be determined in the data center, and the BaseModel can be reconstructed. The second script is then placed back into the return body corresponding to the information of the target interface and returned to the front end.
[0076] By determining the modified second script information corresponding to the target interface within the data center and returning the target interface information and the second script information to the front end, the return body can carry the correct script information corresponding to the target interface back to the front end, realizing dynamic configuration of the script and improving the efficiency of adjusting the script for interface services.
[0077] In some embodiments, after step S120 described above, the method may further include the following steps:
[0078] Step e) is to make the first judgment on whether there are any abnormalities in the business processing results.
[0079] Step f): If the first judgment result is yes, then a second judgment is made on whether the exception is a business exception.
[0080] Step g): If the second judgment result is negative, the frequency of the abnormality is recorded.
[0081] Step h): If the frequency of occurrence exceeds the preset threshold, an alarm message is sent to the management terminal.
[0082] For step e) above, the business processing result includes the target interface information and the corresponding first dialogue information.
[0083] For example, such as Figure 5As shown, after obtaining the business processing result, anomaly detection and processing can be performed in parallel through an anomaly handler to first determine whether an anomaly exists in the business processing result. If an anomaly exists, a second determination is made as to whether the anomaly is a business anomaly. Because before the system runs, maintenance personnel can anticipate some potential business anomalies and set specific countermeasures for them, such as setting specific anomaly statements. If the second determination result is that the anomaly is not a business anomaly, such as an exception being thrown, the frequency of the anomaly needs to be recorded, and then it needs to be judged whether the frequency exceeds a preset threshold (e.g., ten times per minute). If it exceeds the preset threshold, an alarm message can be sent to the management end (maintenance personnel) via email, SMS, etc., so that the management end can locate the problem and troubleshoot it immediately. This improves the stability and maintenance efficiency of the system.
[0084] Based on steps e), f), g), and h) above, after step f), the method may further include the following steps:
[0085] Step i): If the second judgment result is yes, then a third judgment is made on whether the specified abnormal dialogue information exists in the data center.
[0086] Step j): If the third judgment result is yes, then return the target interface information and the specified exception message information to the front end.
[0087] Step k): If the third judgment result is negative, return the target interface information and the first dialogue information to the front end, and store the first dialogue information as newly added abnormal dialogue information in the data center.
[0088] For step i) above, the specified abnormal dialogue information is the dialogue information corresponding to the business abnormality.
[0089] For example, such as Figure 5 As shown, before the system runs, the operations and maintenance personnel set specific exception scripts for some potential business anomalies. Therefore, when an anomaly is a business anomaly, the system can query the data center to see if the corresponding specified exception script is stored. If the specified exception script exists, the target interface information and the specified exception script information are returned to the front end. If the specified exception script does not exist, the target interface information and the first script information are returned to the front end, and the first script information is stored in the data center as newly added exception script information, thereby achieving efficient adjustment of script information.
[0090] In some embodiments, the call request includes a shutdown request for the target interface; step S120 above may specifically include the following steps:
[0091] Step 1): In response to the offline request for the target interface, the target interface is taken offline, and the target interface is put into an offline state.
[0092] For example, such as Figure 2 As shown, operations and maintenance personnel can also control the temporary shutdown of the corresponding target interface by sending relevant requests, and modify the corresponding message information after the target interface is offline. For example, if the target interface service becomes unavailable due to an unknown anomaly from a third party, it is necessary to temporarily shut down the target interface to avoid the generation of garbage data and reduce the cost of subsequent system repair. Therefore, the target interface can be temporarily shut down, and the corresponding message information can be modified to "Service is being upgraded, please try again later". When the front end makes a request to the target interface, it will receive the message "Service is being upgraded, please try again later".
[0093] By making the system respond to the offline request for the target interface and taking the target interface offline, the target interface can be taken offline with one click in case of abnormal conditions, avoiding the generation of garbage data and reducing the cost of subsequent system repair.
[0094] In some embodiments, the data center includes a Redis database and local memory; the Redis database and local memory synchronize data at preset intervals.
[0095] For example, such as Figure 6 As shown, the data center stores interface paths and related script information. The data center includes a Redis database and local memory. A memory space is allocated in the local memory, and interface data is periodically refreshed to this space via Redis middleware. For example, a Scheduled timer is used for periodic task processing to achieve periodic data synchronization and efficient interaction between stored and in-memory data. All logic processing of the pre-processor, post-processor, and exception handler simultaneously passes through the Redis database in the data center and local memory. For example, Pointcut scan points specify the classes to be scanned, thereby enabling script comparison and modification. Maintenance personnel modify script information through the backend management system, modifying the data in the Redis database. After modification, the Redis database and local memory are synchronized. Furthermore, Canal middleware can be used for monitoring and synchronization, achieving efficient real-time synchronization of data between external databases (such as MySQL) and the Redis database.
[0096] It enables dynamic configuration of dialogue scripts, avoids control delays for dialogue scripts, alleviates the technical problem of low adjustment efficiency for interface service dialogue scripts in existing technologies, and alleviates the problem of large-scale storage of dynamic dialogue scripts and data storage persistence by storing dialogue script data in the server-side data center.
[0097] Figure 7 This is a schematic diagram of the structure of a service data processing device for an interface provided in an embodiment of this application. Figure 7 As shown, the service data processing device 700 of the interface includes:
[0098] The acquisition module 701 is used to acquire the front-end's call request for the target interface;
[0099] The first processing module 702 is used to perform pre-processing on the call request and obtain the pre-processing result;
[0100] The second processing module 703 is used to perform business processing on the target interface if the result of the previous processing is that the target interface is in an online state, and obtain the business processing result; wherein, the business processing result includes the information of the target interface and the corresponding first script information;
[0101] The comparison module 704 is used to compare the business processing results with all the script information data in the data center to obtain the comparison results;
[0102] The return module 705 is used to return the target interface information and the first dialogue information to the front end if the comparison result shows that the first dialogue information has not been modified.
[0103] In some embodiments, the device may further include:
[0104] The second return module is used to compare the business processing result with all the script information data in the data center. After obtaining the comparison result, if the comparison result is that the first script information is newly added script information, then the first script information is stored in the data center.
[0105] Return the target interface information and the first dialogue information to the front end.
[0106] In some embodiments, the device may further include:
[0107] The third return module is used to compare the business processing result with all the script information data in the data center. After obtaining the comparison result, if the comparison result shows that the first script information has been modified, the modified second script information corresponding to the information of the target interface is determined in the data center.
[0108] Return the target interface information and the second dialogue information to the front end.
[0109] In some embodiments, the device may further include:
[0110] The alarm module is used to perform business processing on the target interface if the result of the preprocessing is that the target interface is in an online state. After obtaining the business processing result, it performs a first judgment on whether there is an anomaly in the business processing result. The business processing result includes the information of the target interface and the corresponding first dialogue information.
[0111] If the first judgment result is yes, then a second judgment is made to determine whether the exception is a business exception;
[0112] If the second judgment result is negative, then the frequency of the abnormality is recorded;
[0113] If the frequency of occurrence exceeds a preset threshold, an alarm message will be sent to the management terminal.
[0114] In some embodiments, the device may further include:
[0115] The storage module is used to perform a second judgment on whether the exception is a business exception if the first judgment result is yes; and if the second judgment result is yes, to perform a third judgment on whether the specified exception script information exists in the data center; wherein, the specified exception script information is the script information corresponding to the business exception.
[0116] If the third judgment result is yes, then the information of the target interface and the specified abnormal message information will be returned to the front end;
[0117] If the third judgment result is negative, the target interface information and the first dialogue information are returned to the front end, and the first dialogue information is stored in the data center as newly added abnormal dialogue information.
[0118] In some embodiments, the first processing module 702 is specifically used for:
[0119] In response to a request to take the target interface offline, the target interface is taken offline, thus putting the target interface into an offline state.
[0120] In some embodiments, the data center includes a Redis database and local memory; the Redis database and local memory synchronize data at preset intervals.
[0121] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0122] This invention provides an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method of any of the above embodiments.
[0123] Figure 8 The present invention provides a schematic diagram of the structure of an electronic device, which includes: a processor 801, a memory 802, a bus 803 and a communication interface 804. The processor 801, the communication interface 804 and the memory 802 are connected through the bus 803. The processor 801 is used to execute executable modules, such as computer programs, stored in the memory 802.
[0124] The memory 802 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 804 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0125] The 803 bus can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0126] The memory 802 is used to store programs. After receiving an execution instruction, the processor 801 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 801 or implemented by the processor 801.
[0127] The processor 801 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 801 or by software instructions. The processor 801 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 802, and processor 801 reads the information in memory 802 and, in conjunction with its hardware, completes the steps of the above method.
[0128] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the foregoing method embodiments. For specific implementation, please refer to the foregoing method embodiments, which will not be repeated here.
[0129] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0130] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for processing service data of an interface, characterized in that, The service data processing system applied to the interface includes a data center; the method includes: Obtain the frontend's call request for the target interface; The call request is preprocessed to obtain the preprocessing result; If the result of the preprocessing is that the target interface is in an online state, then the target interface is processed to obtain a processing result; wherein, the processing result includes information about the target interface and the corresponding first script information; The business processing result is compared with all the script information data in the data center to obtain the comparison result; If the comparison result indicates that the first dialogue information has not been modified, then the information of the target interface and the first dialogue information are returned to the front end; After comparing the business processing result with all the script information data in the data center to obtain the comparison result, the process further includes: If the comparison result indicates that the first script information is newly added script information, then the first script information is stored in the data center; The information of the target interface and the first script information are returned to the front end; After comparing the business processing result with all the script information data in the data center to obtain the comparison result, the method further includes: If the comparison result indicates that the first script information has been modified, then the modified second script information corresponding to the information of the target interface is determined in the data center; The information of the target interface and the second script information are returned to the front end.
2. The method according to claim 1, characterized in that, After the step of performing business processing on the target interface and obtaining the business processing result if the result of the preprocessing is that the target interface is in an online state, the method further includes: A first determination is made as to whether the business processing result is abnormal; wherein, the business processing result includes information about the target interface and the corresponding first dialogue information; If the first judgment result is yes, then a second judgment is made on whether the anomaly is a business anomaly; If the second judgment result is negative, then the frequency of occurrence of the abnormality is recorded; If the frequency of occurrence exceeds a preset threshold, an alarm message is sent to the management terminal.
3. The method according to claim 2, characterized in that, After determining whether the anomaly is a business anomaly if the first determination result is yes, the method further includes: If the second judgment result is yes, then a third judgment is made on whether there is specified abnormal dialogue information in the data center; wherein, the specified abnormal dialogue information is the dialogue information corresponding to the business abnormality; If the third judgment result is yes, then the information of the target interface and the specified abnormal dialogue information are returned to the front end; If the third judgment result is negative, the information of the target interface and the first dialogue information are returned to the front end, and the first dialogue information is stored in the data center as newly added abnormal dialogue information.
4. The method according to claim 1, characterized in that, The invocation request includes a shutdown request for the target interface; the preprocessing of the invocation request to obtain the preprocessing result includes: In response to the offline request for the target interface, the target interface is taken offline, thus putting the target interface into an offline state.
5. The method according to claim 1, characterized in that, The data center includes a Redis database and local memory; the Redis database and the local memory synchronize data at a preset period.
6. A service data processing device for an interface, characterized in that, A service data processing system applied to the interface, the service data processing system including a data center; the apparatus includes: The acquisition module is used to acquire the front-end's call request for the target interface; The first processing module is used to perform pre-processing on the call request and obtain the pre-processing result; The second processing module is used to perform business processing on the target interface if the result of the preprocessing is that the target interface is in an online state, and obtain a business processing result; wherein, the business processing result includes information about the target interface and corresponding first script information; The comparison module is used to compare the business processing result with all the script information data in the data center to obtain the comparison result; The return module is used to return the information of the target interface and the first dialogue information to the front end if the comparison result shows that the first dialogue information has not been modified. The second return module is used to store the first dialogue information in the data center when the comparison result indicates that the first dialogue information is newly added dialogue information; and to return the information of the target interface and the first dialogue information to the front end. The third return module is used to determine, in the data center, the modified second script information corresponding to the information of the target interface when the comparison result indicates that the first script information has been modified; and to return the information of the target interface and the second script information to the front end.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 5.