A channel docking method and device based on Groovy script

Through the channel docking method based on Groovy scripts, the target Groovy scripts are dynamically retrieved and executed, which solves the time-consuming and inconvenient problem of docking third-party channels in the existing technology, and realizes dynamic channel docking without restarting services and efficient feedback on business processing results.

CN118860684BActive Publication Date: 2025-04-11SHANGHAI CHUANGLAN CULTURE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410861379.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-04-11
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

When connecting to third-party channels, developers need to rewrite scripts, release versions and restart services, which makes docking time-consuming and inconvenient. When the online channel interface fails, dynamically increasing log code troubleshooting is inefficient.

Method used

The channel docking method based on Groovy script is adopted. By receiving the service request from the user, the corresponding target Groovy script is retrieved from the database, and the third-party channel corresponding to the script is retrieved for business processing, output business processing results, and dynamically docking the new channel interface does not require release of a version or restarting the service.

Benefits of technology

The new channel interface of the open platform system is realized without restarting services, improving the efficiency and accuracy of channel docking and reducing the investment time of operation and maintenance personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860684B_ABST
    Figure CN118860684B_ABST
Patent Text Reader

Abstract

The present invention provides a channel docking method based on Groovy script, which is applied to a server; a specific embodiment of the method includes: first, receiving a business request from a user end; second, retrieving a target Groovy script corresponding to the business request from a database; then, retrieving a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; finally, the business processing result is fed back to the user end. In this embodiment, the server dynamically docks a new channel interface without restarting the service, thereby not only realizing dynamic docking of the channel interface, but also updating the target Groovy script; effectively solving the problem of low work efficiency in the prior art caused by online operation and maintenance personnel compiling, packaging, publishing, and service restart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to a channel docking method and device based on Groovy script. Background Art

[0002] After the front-end development is completed, it needs to be debugged with the back-end, which usually requires the docking of the channel interface; the docking of the back-end and the back-end in terms of service also requires the docking of the channel interface; the docking process of the channel interface may involve the issue of whether it is a synchronous communication mode or an asynchronous communication mode. The company's internal docking with a third party, or the third party docking with the company, is essentially the docking of the channel interface, that is, the open platform system interface. The core of the channel interface docking work is actually the contract and specification between the client and the server.

[0003] At present, every time an existing open platform system connects to a new third-party channel, developers need to rewrite the script, release the version, and then restart the service; only in this way can the open platform system use the new third-party channel. However, open platform systems usually need to connect to various third-party channels. Since each time a new channel interface is connected, the service needs to be restarted, it is time-consuming to connect to multiple third-party channels, and it is also inconvenient to use. When an online channel interface fails, the existing docking script cannot dynamically add log code to troubleshoot the fault. For this reason, the operation and maintenance personnel need to repackage the script, execute the new version release, and restart the service. The entire process requires developers or operation and maintenance personnel to invest a lot of time, so it is time-consuming and inefficient. Summary of the invention

[0004] In view of the above problems existing in the prior art, an embodiment of the present invention provides a channel docking method and device based on Groovy script; this method enables the open platform system to dynamically dock with new channel interfaces, and dynamically publish new channels without the need to publish versions, restart services, etc.

[0005] According to a first aspect of an embodiment of the present invention, a channel docking method based on a Groovy script is provided, which is applied to a server; the method comprises: receiving a business request from a user end; retrieving a target Groovy script corresponding to the business request from a database; retrieving a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; and feeding back the business processing result to the user end.

[0006] Preferably, the retrieving a target Groovy script corresponding to the business request from a database comprises: analyzing the business request; if the analysis result indicates that a third-party channel identifier exists in the business request, retrieving a target Groovy script corresponding to the third-party channel identifier from a database; if the analysis result indicates that no third-party channel identifier exists in the business request, retrieving a default Groovy script from a database, and using the default Groovy script as the target Groovy script corresponding to the business request.

[0007] Preferably, the method further comprises: receiving a loading instruction sent by a client; based on the loading instruction, acquiring a target Groovy script corresponding to the loading instruction from the client and storing it in a cache area; and forming a database based on all target Groovy scripts in the cache area.

[0008] Preferably, the method further includes: receiving a loading instruction sent by a client; obtaining an update Groovy script corresponding to the loading instruction from the client; obtaining a third-party channel identifier from the update Groovy script; retrieving a target Groovy script corresponding to the third-party channel identifier from a database; replacing the target Groovy script with the update Groovy script, and storing the update Groovy script as a new target Groovy script in the database.

[0009] Preferably, before retrieving the target Groovy script corresponding to the business request from the database, the method further comprises: performing user identity verification on the business request; if the user identity verification passes, retrieving the target Groovy script corresponding to the business request from the database.

[0010] Preferably, the method further includes: determining whether the business processing result satisfies a preset condition; if the determination result indicates that the business processing result does not satisfy the preset condition, sending an update instruction of the target Groovy script to the client so that the client updates the target Groovy script; obtaining an updated Groovy script based on the update completion instruction of the client for the target Groovy script; performing data processing on the business processing result based on the updated Groovy script, and outputting a new business processing result.

[0011] According to a second aspect of an embodiment of the present invention, a channel docking method based on a Groovy script is also provided, which is applied to a client; comprising: based on an editing instruction, editing the Groovy script according to a third-party channel identifier, generating a loading instruction and a target Groovy script corresponding to the loading instruction; or, based on an update instruction, updating the target Groovy script, generating a loading instruction and an update Groovy script corresponding to the loading instruction; sending the loading instruction to a server, so that the server obtains the target Groovy script or the update Groovy script corresponding to the loading instruction from the client.

[0012] According to a third aspect of an embodiment of the present invention, a channel docking method based on a Groovy script is also provided, comprising: a client and a server; the client edits the Groovy script according to a third-party channel identifier, generates a loading instruction and a target Groovy script corresponding to the loading instruction; and sends the loading instruction to the server; the server retrieves the target Groovy script corresponding to the loading instruction from the client based on the loading instruction, and stores the target Groovy script in a database; the server receives a business request from a user end, and retrieves the target Groovy script corresponding to the business request from the database; the server retrieves the third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; the server feeds back the business processing result to the user end.

[0013] According to a fourth aspect of an embodiment of the present invention, a channel docking device based on a Groovy script is also provided, which is applied to a server; the device comprises: a first receiving module, which is used to receive a business request from a user terminal; a first calling module, which is used to call a target Groovy script corresponding to the business request from a database; a business processing module, which is used to call a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; and a feedback module, which is used to feed back the business processing result to the user terminal.

[0014] According to the fifth aspect of the embodiments of the present invention, there is also provided an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in the first aspect or the second aspect.

[0015] According to a sixth aspect of an embodiment of the present invention, there is further provided a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0016] The present invention provides a channel docking method based on Groovy script, which is applied to a server; a specific embodiment of the method includes: first, receiving a business request from a user end; second, retrieving a target Groovy script corresponding to the business request from a database; then, retrieving a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; finally, the business processing result is fed back to the user end. In this embodiment, the server dynamically docks with a new channel interface without restarting the service, thereby realizing dynamic docking of the channel interface and dynamic update of the target Groovy script, effectively solving the problem of low efficiency caused by online operation and maintenance personnel compiling, packaging, publishing, and service restart in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0018] Figure 1 A schematic diagram of a process flow of a channel docking method based on a Groovy script provided by an embodiment of the present invention;

[0019] Figure 2 It is a schematic diagram of a process of dynamically updating a target Groovy script in one embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a process for adjusting a business processing result based on a target Groovy script in an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of a channel docking system based on Groovy scripts provided by an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of the structure of a channel docking device based on Groovy scripts provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] like Figure 1 As shown, a flowchart of a channel docking method based on Groovy scripts provided by an embodiment of the present invention is shown.

[0025] A channel docking method based on Groovy script is applied to a server and includes at least the following steps:

[0026] S101, receiving a service request from a user;

[0027] S102, calling a target Groovy script corresponding to the business request from a database;

[0028] S103, calling a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs the business processing result;

[0029] S104, feeding back the service processing result to the user end.

[0030] In S101, the server and the user end are connected in communication. The server is, for example, a Java development platform; the server is mainly used to connect to a third-party channel. The user end is, for example, a mobile phone, a computer or a browser; the third-party channel is, for example, a Tencent channel, an Ali channel, and some data interfaces provided by national websites.

[0031] In S102, Groovy script is a dynamic development language, which is presented in the form of txt file.

[0032] The server includes a business layer; the business layer accesses the corresponding third-party channel by loading the target Groovy script, which can avoid script publishing and restarting service operations, and does not require the intervention of operation and maintenance personnel. The target Groovy scripts loaded by the business layer are stored in the cache area of ​​the business layer.

[0033] For example: after the business layer receives the business request from the user, it first analyzes the business request; if the analysis result indicates that there is a third-party channel identifier in the business request, the target Groovy script corresponding to the third-party channel identifier is retrieved from the database in the cache area; if the analysis result indicates that there is no third-party channel identifier in the business request, the default Groovy script is retrieved from the database in the cache area, and the default Groovy script is used as the target Groovy script corresponding to the business request.

[0034] In S103 and S104, the business layer calls the third-party channel corresponding to the target Groovy script, the third-party channel performs business processing on the business request, and feeds back the business processing result to the business layer; the business layer feeds back the business processing result to the user end.

[0035] For example, if the business request is for ID card verification, the business layer will call the Groovy script for ID card verification, and based on the Groovy script, call the ID card verification channel to process the business request. If the business request is for bank card verification, the business layer will call the Groovy script for bank card verification, and based on the Groovy script, call the bank card verification channel to process the business request.

[0036] The server in this embodiment can connect to the channel interface without dynamically publishing scripts or restarting services; thus, the server can connect to multiple channel interfaces at the same time without the involvement of operation and maintenance personnel, effectively solving the problem of inefficiency in the prior art caused by online operation and maintenance personnel executing script releases and restarting services.

[0037] In a preferred implementation of this embodiment, a loading instruction sent by a client is received; based on the loading instruction, a target Groovy script corresponding to the loading instruction is obtained from the client and stored in a cache area; and a database is formed based on all target Groovy scripts in the cache area.

[0038] Specifically, the client is connected to the server for communication. The client is, for example, an operation platform. The developer uploads the written Groovy script to the client; for any third-party channel: the client edits the Groovy script according to the third-party channel identifier, and generates a target Groovy script and loading instructions corresponding to the third-party channel; the client sends the loading instructions to the business layer; the business layer obtains the target Groovy script corresponding to the loading instructions from the client based on the loading instructions, and stores it in the cache area, and finally forms a database. In this embodiment, when docking different channel interfaces, the developer only needs to establish a mapping relationship between the edited Groovy script and the third-party channel, and there is no need to repeatedly edit the script; this not only improves the efficiency of channel docking, but also saves version release and service restart operations.

[0039] In a preferred implementation manner of this embodiment, the user identity verification is performed on the business request; if the user identity verification passes, the target Groovy script corresponding to the business request is retrieved from the database.

[0040] Specifically, the server also includes a gateway; the user sends the service request to the server's gateway through the load balancer, and the gateway performs user identity verification on the service request; if the identity verification passes, the gateway sends the service request to the business layer; the business layer retrieves the target Groovy script corresponding to the service request from the database; if the identity verification fails, the gateway does not send the service request to the business layer. Thus, based on the gateway orchestration, the service request is sent to the third-party channel corresponding to the target Groovy script.

[0041] For example, the gateway performs user identity verification on the service request, including: the gateway obtains the user ID corresponding to the service request; determines whether the user ID exists in the partner list; if so, determines that the user identity verification has passed; if not, determines that the user identity verification has failed. The partner list is used to indicate the user end that has a cooperation agreement with the server. Thus, the accuracy of channel docking is improved.

[0042] like Figure 2 FIG. 1 is a flow chart of dynamically updating a target Groovy script in an embodiment of the present invention.

[0043] Dynamically updating the target Groovy script, applied to the server, includes at least the following steps:

[0044] S201, receiving a loading instruction sent by a client;

[0045] S202, obtaining an update Groovy script corresponding to the loading instruction from the client;

[0046] S203, obtaining a third-party channel identifier from the updated Groovy script;

[0047] S204, retrieving a target Groovy script corresponding to the third-party channel identifier from a database;

[0048] S205: Replace the target Groovy script with the updated Groovy script, and store the updated Groovy script as a new target Groovy script in the database.

[0049] Specifically, the client updates the target Groovy script based on the user update instruction, generates a loading instruction and an update Groovy script corresponding to the loading instruction; and the client sends the loading instruction to the business layer of the server.

[0050] The business layer obtains an update Groovy script corresponding to the loading instruction from the client, and extracts a third-party channel identifier from the update Groovy script; queries a target Groovy script corresponding to the third-party channel identifier from a database; replaces the target Groovy script in the database with the update Groovy script; and stores the update Groovy script as a new target Groovy script in the database.

[0051] Groovy scripts can not only be used to access third-party channels, but also to change online policies. For example, if you offer a 2-yuan discount during a previous event, but find that the 2-yuan discount is a bit unprofitable in actual operation, you can change the 2-yuan discount to 1-yuan discount in the Groovy script, and then click the publish button to generate a loading instruction; therefore, when the online channel interface fails or the code is changed, you only need to directly modify the target Groovy script and re-push it to achieve code release, without the intervention of operation and maintenance personnel or restarting the service, which improves work efficiency and the accuracy of channel docking.

[0052] like Figure 3 FIG. 1 is a flow chart of adjusting a business processing result based on a target Groovy script in one embodiment of the present invention.

[0053] Adjusting the business processing results based on the target Groovy script includes at least the following steps:

[0054] S301, determining whether the business processing result meets the preset conditions;

[0055] S302, if the judgment result indicates that the business processing result does not meet the preset condition, sending an update instruction of the target Groovy script to the client so that the client updates the target Groovy script;

[0056] S303, based on the update completion instruction of the client for the target Groovy script, obtaining an update Groovy script;

[0057] S304, performing data processing on the business processing result based on the updated Groovy script, and outputting a new business processing result.

[0058] Specifically, the business layer determines whether the business processing result meets the requirements of the business request; if the judgment result indicates that the business processing result does not meet the requirements of the business request, it sends an update instruction of the target Groovy script to the client; the client updates the target Groovy script based on the update instruction, generates a loading instruction and an update Groovy script corresponding to the loading instruction. The client sends the loading instruction to the business layer; the business layer obtains the update Groovy script corresponding to the loading instruction from the client; and uses the update Groovy script to replace the target Groovy script, performs data processing on the business processing results fed back by the third party, and outputs a new business processing result.

[0059] Groovy scripts can not only be used to change online policies, but also to modify business processing results. For example, three parameters may be returned in the business processing results; but suddenly the user wants to add an additional parameter. At this time, a parameter can be added by updating the Groovy script. In this way, the code can be dynamically modified through the Groovy script, without restarting the service and without the intervention of operation and maintenance personnel, and it can be put into production.

[0060] This channel docking method can effectively solve the problems of online problems that require operation and maintenance personnel to release versions, restart services, and low efficiency, thereby meeting the needs of dynamically updating channels and adding dynamic codes.

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

[0062] Another embodiment of the present invention provides a channel docking method based on a Groovy script, including: a client and a server; the method at least includes:

[0063] The client edits the Groovy script according to the third-party channel identifier, generates a loading instruction and a target Groovy script corresponding to the loading instruction; and sends the loading instruction to the server;

[0064] The server retrieves a target Groovy script corresponding to the loading instruction from the client based on the loading instruction, and stores the target Groovy script in a database; the server receives a service request from the user end, and retrieves a target Groovy script corresponding to the service request from the database; the server retrieves a third-party channel corresponding to the target Groovy script, so that the third-party channel performs service processing on the service request and outputs a service processing result; the server feeds back the service processing result to the user end.

[0065] The channel docking method of this embodiment is interactively simple, intelligent, flexible, and easily expandable when used, and has the ability to add or modify online services at any time without restarting the service; thus, it more intelligently meets the needs of online channel interface docking.

[0066] like Figure 4 , which is a schematic diagram of the structure of a channel docking system based on Groovy scripts provided by an embodiment of the present invention.

[0067] The channel docking method based on Groovy script provided in this embodiment will be described in detail below in conjunction with specific application scenarios.

[0068] A channel docking system based on Groovy scripts includes: a server, and a user end and a client end connected to the server for communication; the server includes a gateway and a business layer;

[0069] S1, the client receives the edited Groovy script, and edits the Groovy script according to the third-party channel identifier to generate a loading instruction and a target Groovy script corresponding to the loading instruction; the client sends the loading instruction to the business layer.

[0070] S2, the business layer obtains the target Groovy script corresponding to the loading instruction from the client based on the loading instruction, and stores it in the cache area; the cache area forms a database based on all target Groovy scripts.

[0071] S3, the gateway receives the business request from the user through the load balancer and performs user identity verification on the business request; if the user identity verification passes, the gateway sends the business request to the business layer. The business layer analyzes the business request; if the analysis result indicates that there is a third-party channel identifier in the business request, the business layer retrieves the target Groovy script corresponding to the third-party channel identifier from the database; if the analysis result indicates that there is no third-party channel identifier in the business request, the business layer retrieves the default Groovy script from the database and uses the default Groovy script as the target Groovy script corresponding to the business request.

[0072] S4, the business layer calls the third-party channel corresponding to the target Groovy script so that the third-party channel performs business processing on the business request and outputs the business processing result.

[0073] S5, the business layer determines whether the business processing result meets the preset conditions; if the judgment result indicates that the business processing result does not meet the preset conditions, the business layer sends an update instruction of the target Groovy script to the client so that the client updates the target Groovy script; the business layer obtains the updated Groovy script based on the client's update completion instruction for the target Groovy script; the business layer performs data processing on the business processing result based on the updated Groovy script and outputs a new business processing result.

[0074] S6, the business layer sends the new business processing result to the gateway; the gateway feeds back the new business processing result to the user end via the responsible balancer.

[0075] This embodiment uses the Groovy scripting language as the core, and cooperates with the original Java backend platform to complete different tasks. For example: write a Groovy script to complete the access of the third-party channel interface, and complete the loading and compilation by pushing the Groovy script to the server. Therefore, the method of this embodiment can not only dynamically connect to the new third-party channel interface without restarting the service, but also dynamically modify the code of the Groovy script and dynamically publish the code even if the online channel fails, without relying on the operation and maintenance personnel; it improves the work efficiency of channel interface docking.

[0076] The channel connection method of this embodiment is mainly used for:

[0077] 1. A platform system that can connect to various third-party channel requirements;

[0078] 2. Online platform systems that require frequent changes in requirements;

[0079] 3. Platform system with uncertainty about future demand changes.

[0080] like Figure 5 , which is a schematic diagram of the structure of a channel docking device based on Groovy scripts provided by an embodiment of the present invention.

[0081] A channel docking device based on Groovy script is applied to a server; the device 500 comprises: a first receiving module 501, used for receiving a service request from a user end; a first calling module 502, used for calling a target Groovy script corresponding to the service request from a database; a service processing module 503, used for calling a third-party channel corresponding to the target Groovy script, so that the third-party channel performs service processing on the service request and outputs a service processing result; and a feedback module 504, used for feeding back the service processing result to the user end.

[0082] In a preferred implementation manner of this embodiment, the first calling module includes: an analysis unit, which is used to analyze the business request; a first calling unit, which is used to call a target Groovy script corresponding to the third-party channel identifier from a database if the analysis result indicates that the business request contains a third-party channel identifier; and a second calling unit, which is used to call a default Groovy script from a database if the analysis result indicates that the business request does not contain a third-party channel identifier, and use the default Groovy script as the target Groovy script corresponding to the business request.

[0083] In a preferred implementation manner of this embodiment, the device also includes: a second receiving module, used to receive a loading instruction sent by a client; a first obtaining module, used to obtain a target Groovy script corresponding to the loading instruction from the client based on the loading instruction, and store it in a cache area; and a generating module, used to form a database based on all target Groovy scripts in the cache area.

[0084] In a preferred implementation manner of this embodiment, the device further includes: a third receiving module, used to receive a loading instruction sent by a client; a second obtaining module, used to obtain an updated Groovy script corresponding to the loading instruction from the client; a third obtaining module, used to obtain a third-party channel identifier from the updated Groovy script; a second calling module, used to call a target Groovy script corresponding to the third-party channel identifier from a database; and a replacement module, used to replace the target Groovy script with the updated Groovy script, and store the updated Groovy script as a new target Groovy script in the database.

[0085] In a preferred implementation of this embodiment, the device further includes: a verification module for performing user identity verification on the business request; and a determination module for retrieving a target Groovy script corresponding to the business request from a database if the user identity verification passes.

[0086] In a preferred implementation manner of this embodiment, the device also includes: a judgment module, which is used to judge whether the business processing result meets the preset conditions; a sending module, which is used to send an update instruction of the target Groovy script to the client if the judgment result indicates that the business processing result does not meet the preset conditions, so that the client updates the target Groovy script; a fourth acquisition module, which is used to acquire the updated Groovy script based on the update completion instruction of the client for the target Groovy script; and a data processing module, which is used to perform data processing on the business processing result based on the updated Groovy script and output a new business processing result.

[0087] A channel docking device based on Groovy script is applied to a client; the device comprises: a generating module, which is used to edit a Groovy script based on an editing instruction and a third-party channel identifier to generate a loading instruction and a target Groovy script corresponding to the loading instruction; or, which is used to update a target Groovy script based on an updating instruction to generate a loading instruction and an updating Groovy script corresponding to the loading instruction; and a sending module, which is used to send the loading instruction to a server, so that the server obtains the target Groovy script or the updating Groovy script corresponding to the loading instruction from the client.

[0088] The above device can execute the channel docking method based on Groovy script provided in one embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the channel docking method based on Groovy script. For technical details not described in detail in this embodiment, please refer to the channel docking method based on Groovy script provided in one embodiment of the present invention.

[0089] The present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the channel docking method based on Groovy scripts described in the present invention.

[0090] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0091] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0092] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method according to the following embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0093] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0094] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0095] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0096] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0097] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0098] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

[0099] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0100] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0101] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A channel docking method based on Groovy script, characterized in that: Applies to servers; includes: Receive service requests from the user end; Analyzing the business request; If the analysis result indicates that the service request contains a third-party channel identifier, a target Groovy script corresponding to the third-party channel identifier is retrieved from a database; If the analysis result indicates that there is no third-party channel identifier in the business request, a default Groovy script is retrieved from a database, and the default Groovy script is used as a target Groovy script corresponding to the business request; Invoking a third-party channel corresponding to the target Groovy script so that the third-party channel performs business processing on the business request and outputs a business processing result; Feedback the business processing results to the user end; Receive the loading instruction sent by the client; Obtaining an updated Groovy script corresponding to the loading instruction from the client; Obtain the third-party channel identifier from the update Groovy script; Retrieving a target Groovy script corresponding to the third-party channel identifier from a database; The target Groovy script is replaced by the updated Groovy script, and the updated Groovy script is stored in a database as a new target Groovy script.

2. The method according to claim 1, characterized in that Also includes: Receive the loading instruction sent by the client; Based on the loading instruction, a target Groovy script corresponding to the loading instruction is obtained from the client, and stored in a cache area; A database is formed based on all target Groovy scripts in the cache.

3. The method according to claim 1, characterized in that Before calling the target Groovy script corresponding to the business request from the database, the method further includes: Performing user identity verification on the service request; If the user identity verification is passed, the target Groovy script corresponding to the business request is retrieved from the database.

4. The method according to claim 1, characterized in that: Also includes: Determine whether the business processing result meets the preset conditions; If the judgment result indicates that the business processing result does not meet the preset condition, an update instruction of the target Groovy script is sent to the client so that the client updates the target Groovy script; Based on the update completion instruction of the client for the target Groovy script, obtain the update Groovy script; Perform data processing on the business processing results based on the updated Groovy script and output new business processing results.

5. A channel docking method based on Groovy script as claimed in any one of claims 1 to 4, characterized in that: The method is also applied to the client; include: Based on the editing instruction, the Groovy script is edited according to the third-party channel identifier to generate a loading instruction and a target Groovy script corresponding to the loading instruction; Alternatively, based on the update instruction, the target Groovy script is updated to generate a loading instruction and an update Groovy script corresponding to the loading instruction; The loading instruction is sent to the server so that the server obtains a target Groovy script or updates the Groovy script corresponding to the loading instruction from the client.

6. A channel docking method based on Groovy script, characterized in that: include: Client and server; The client edits the Groovy script according to the third-party channel identifier, generates a loading instruction and a target Groovy script corresponding to the loading instruction; and sends the loading instruction to the server; The server retrieves a target Groovy script corresponding to the loading instruction from the client based on the loading instruction, and stores the target Groovy script in a database; The server receives a service request from a user terminal and analyzes the service request; if the analysis result indicates that a third-party channel identifier exists in the service request, a target Groovy script corresponding to the third-party channel identifier is retrieved from a database; if the analysis result indicates that no third-party channel identifier exists in the service request, a default Groovy script is retrieved from the database and the default Groovy script is used as a target Groovy script corresponding to the service request; The server calls a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; The server feeds back the service processing result to the user end; The server receives a loading instruction sent by the client; and obtaining an updated Groovy script corresponding to the loading instruction from the client; The server obtains a third-party channel identifier from the updated Groovy script; and retrieve a target Groovy script corresponding to the third-party channel identifier from a database; The server replaces the target Groovy script with the updated Groovy script, and stores the updated Groovy script as a new target Groovy script in a database.

7. A channel docking device based on Groovy script, characterized in that: Applies to servers; includes: A first receiving module, used for receiving a service request from a user terminal; A first calling module is used to analyze the business request; if the analysis result indicates that the business request contains a third-party channel identifier, a target Groovy script corresponding to the third-party channel identifier is called from a database; if the analysis result indicates that the business request does not contain a third-party channel identifier, a default Groovy script is called from the database, and the default Groovy script is used as the target Groovy script corresponding to the business request; A business processing module, used to call a third-party channel corresponding to the target Groovy script, so that the third-party channel performs business processing on the business request and outputs a business processing result; A feedback module, used for feeding back the service processing result to the user end; A third receiving module is used to receive a loading instruction sent by a client; A second acquisition module, used to acquire an update Groovy script corresponding to the loading instruction from a client; A third acquisition module, used to acquire a third-party channel identifier from the update Groovy script; A second calling module, used for calling a target Groovy script corresponding to the third-party channel identifier from a database; The replacement module is used to replace the target Groovy script with the update Groovy script, and store the update Groovy script as a new target Groovy script in a database.

8. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 5 or claim 6 is implemented.

Citation Information

Patent Citations

  • Third-party interface arrangement method and system

    CN115202651A

  • Third-party platform HTTP callback distribution method and system, electronic equipment and storage medium

    CN115276968A