Internet channel docking method and system, electronic equipment and storage medium
Through the combination of Groovy scripts and standard model configuration library, the problem of frequent docking of Chinese and new channels in the Internet channel and inconsistent standards of multi-platforms has been solved, and rapid and unified channel docking has been achieved, reducing development costs and manpower investment.
Patent Information
- Application Number
- CN202411308799.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-02-07
AI Technical Summary
There are problems such as frequent connection between new channels, inconsistent multi-platform docking standards, strict channel requirements and high development costs.
By using Groovy scripts to decrypt and encrypt the channel messages of the target channel, and converting messages based on the standard model configuration library, a unified service standard and configuration architecture is realized, and external channels are quickly connected.
It has achieved rapid and unified Internet channel docking, facilitated post-maintenance, reduced development costs and manpower investment, and achieved the goal of reducing costs and increasing efficiency.
Smart Images

Figure CN119402219A_ABST
Abstract
Description
Background Art
[0002] Internet channel docking is divided into multi-platform, multi-standard, and diversified forms. Each channel has its own independent docking specifications and forms, such as asynchronous docking, real-time docking, file docking and other diversified access performances. Each non-standard channel docking requires setting up a new non-standard entrance according to the channel standard. The main development work is: decrypting channel messages, hard-coding conversion of channel messages into insurance policy objects, initializing data, rule verification, processing according to the personalized requirements of the channel, calling the core business logic, returning data encapsulation, and encrypting and returning according to channel requirements. However, the current Internet channel docking has the following problems:
[0003] 1) New channels are frequently connected, especially non-standard channels. Each time, it is necessary to repeat related development work such as decryption, message conversion, data initialization, rule verification, calling core business logic, data encapsulation and return, etc., which requires relatively more manpower and are all repetitive operations.
[0004] 2) Currently, there is no unified standard for multi-platform docking, and adjustments and maintenance on multiple platforms are required in the future, which is highly complex and has high maintenance costs.
[0005] 3) The requirements for Internet channels are generally quite stringent. Fault tolerance, concurrent numbers, and access timeliness are always the key difficulties. As the business develops, larger traffic becomes a hurdle that needs to be overcome for access. These pain points for Internet channel access always bring great difficulty and problems to development.
[0006] 4) The access solutions and access modes of various channels are not unified, which has become a constraining problem for businesses with wide access. The large amount of development and low reusability have greatly increased development costs. Summary of the invention
[0007] In order to solve the above technical problems, the present invention provides an Internet channel docking method, system, electronic device and storage medium.
[0008] In a first aspect, the present invention provides an Internet channel docking method, and the technical solution of the method is as follows:
[0009] Decrypt the channel message of the target channel by using the Groovy script to obtain the decrypted message, and convert the decrypted message based on the standard model configuration library to obtain the standard object;
[0010] Obtaining standardized encapsulated data corresponding to the standard object and performing a data integrity check, and when the integrity check passes, converting the standard object into a core request message;
[0011] The core request message is encrypted by using a Groovy script, and the encrypted request message is obtained and sent to the target channel.
[0012] The beneficial effects of an Internet channel docking method of the present invention are as follows:
[0013] The method of the present invention unifies service standards without affecting the Internet channel docking business, realizes rapid docking of external channels through a configurable architecture, facilitates later maintenance, and can achieve the goal of reducing costs and increasing efficiency.
[0014] On the basis of the above scheme, the Internet channel connection method of the present invention can also be improved as follows.
[0015] In an optional manner, the method further includes:
[0016] Determine whether the decrypted message meets the preprocessing conditions and obtain a determination result;
[0017] When the judgment result is yes, preprocessing the encrypted message, using the preprocessed encrypted message as the encrypted message, and executing the step of converting the decrypted message based on the standard model configuration library to obtain a standard object;
[0018] When the judgment result is no, the step of converting the decrypted message based on the standard model configuration library to obtain a standard object is executed.
[0019] In an optional manner, the method further includes:
[0020] The Groovy script is configured according to the channel type and transaction type of the target channel.
[0021] In an optional manner, the standardized encapsulation data includes: initialization data and / or object data.
[0022] In a second aspect, the present invention provides an Internet channel docking system, the technical solution of which is as follows:
[0023] It includes: a first processing module, a second processing module and an operation module;
[0024] The first processing module is used to: decrypt the channel message of the target channel by using a Groovy script to obtain a decrypted message, and convert the decrypted message based on a standard model configuration library to obtain a standard object;
[0025] The second processing module is used to: obtain the standardized encapsulation data corresponding to the standard object and perform data integrity verification, and when the integrity verification passes, convert the standard object into a core request message;
[0026] The operation module is used to: use the Groovy script to encrypt the core request message, obtain the encrypted request message and send it to the target channel.
[0027] The beneficial effects of an Internet channel docking system of the present invention are as follows:
[0028] The system of the present invention unifies service standards without affecting the Internet channel docking business, realizes rapid docking with external channels through a configurable architecture, facilitates later maintenance, and can achieve the goal of reducing costs and increasing efficiency.
[0029] Based on the above solution, the Internet channel docking system of the present invention can also be improved as follows.
[0030] In an optional manner, the method further includes: a judgment module; the judgment module is used to:
[0031] Determine whether the decrypted message meets the preprocessing conditions and obtain a determination result;
[0032] When the judgment result is yes, preprocessing the encrypted message, using the preprocessed encrypted message as the encrypted message, and executing the step of converting the decrypted message based on the standard model configuration library to obtain a standard object;
[0033] When the judgment result is no, the step of converting the decrypted message based on the standard model configuration library to obtain a standard object is executed.
[0034] In an optional manner, the method further includes: a configuration module; the configuration module is used to:
[0035] The Groovy script is configured according to the channel type and transaction type of the target channel.
[0036] In an optional manner, the standardized encapsulation data includes: initialization data and / or object data.
[0037] In a third aspect, a technical solution of an electronic device of the present invention is as follows:
[0038] The invention comprises a memory, a processor and a program stored in the memory and running on the processor. When the processor executes the program, the steps of the Internet channel docking method of the present invention are implemented.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having the following technical solution:
[0040] Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium reads the instructions, the computer-readable storage medium executes the steps of the Internet channel docking method of the present invention.
[0041] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0043] Figure 1 A schematic diagram of a flow chart of an embodiment of an Internet channel connection method of the present invention;
[0044] Figure 2 A schematic diagram of the specific process of channel docking;
[0045] Figure 3 A schematic diagram of the structure of an embodiment of an Internet channel docking system of the present invention;
[0046] Figure 4 The figure is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0047] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0048] Figure 1 A flow chart of an embodiment of an Internet channel docking method provided by the present invention is shown, and the Internet channel docking method can be executed by an electronic device such as a terminal device or a server. The terminal device can be any fixed or mobile terminal such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the Internet channel docking method by means of a processor calling computer-readable instructions stored in a memory. Figure 1 As shown, the following steps are included:
[0049] S1. Decrypt the channel message of the target channel by using a Groovy script to obtain a decrypted message, and convert the decrypted message based on a standard model configuration library to obtain a standard object.
[0050] The target channel can be a standard channel or a non-standard channel, and there is no restriction here. According to the channel type and transaction type of the target channel, the Groovy script is configured. In this embodiment, flexible service scheduling is achieved by building a unified gateway layer, pluggable services are realized, and multi-point plug-and-play is achieved. Specifically:
[0051] 1) Groovy scripts are used in encryption and decryption. The encryption and decryption keys and decryption scripts are dynamically configured according to the target channel. The scripts are loaded and converted into class objects through GroovyClassLoaderInstance.getInstance().parseClass, and class instances of encryption and decryption services are generated. The encryption and decryption methods are called to implement the encryption and decryption functions.
[0052] 2) Through the configuration capability and fuse measures, and in conjunction with the multi-center disaster recovery capability, plug-in and flexible configuration components can be realized, which can mainly achieve but not limited to the following:
[0053] ① Dynamic routing configuration to achieve free replacement of multiple centers.
[0054] ② Whitelist configuration to realize an integrated attack and defense gateway.
[0055] ③ Dynamic switching of “single center, multiple environments” (grayscale, pre-production, etc. environment switching) can be realized.
[0056] ④ The “total-total-total mode” switch upgrade achieves 7*24 hours uninterrupted operation.
[0057] Among them, the standard model configuration library is a set of standard model configuration libraries (product factories) customized and developed according to product usage scenarios. Through the model tailoring function, model conversion is completed. The functions of the standard model configuration library include: model library, component library, view library, basic products, market products, auxiliary functions, rule script configuration, and extended products (extended product models, special business models). In this embodiment, the extended product model and special business model are used by default.
[0058] It should be noted that in this embodiment, an asynchronous access center can be built, specifically:
[0059] 1) Build an asynchronous access high-traffic center and configure access for relevant channels with high timeliness requirements and large concurrency.
[0060] 2) It has the conditions for multi-center integration, realizes plug-in access and complete fault-tolerant and disaster-tolerant mechanisms.
[0061] 3) Introduce product factory capabilities to realize non-standard message conversion capabilities such as configurable model tailoring.
[0062] 4) Implement unified standard execution actions through pipeline service orchestration capabilities.
[0063] 5) By combining MQ, mongoDB, redis and other related middleware to complement each other, high concurrency and high throughput capabilities can be achieved, and the comprehensive access capability QPS can reach 2000+.
[0064] 6) The “total-total-score-total mode” switch upgrade achieves 7*24 hours uninterrupted operation.
[0065] S2. Obtain standardized encapsulation data corresponding to the standard object and perform data integrity check. When the integrity check passes, convert the standard object into a core request message.
[0066] The standard model configuration library is used to convert the decrypted message into a standard object, and then convert the standard object into a core request message. The integrity check method is configured according to the channel type and transaction type of the target channel. The standardized encapsulated data includes initialization data and / or object data.
[0067] It should be noted that by introducing the product factory, integrating and applying the product factory model tailoring capabilities, the previous hard-coded parsing messages, message conversion and other complicated and time-consuming problems can be solved, thereby greatly improving the project development efficiency and reducing costs. Through visual configuration, development is no longer boring and cumbersome, greatly improving the configuration capabilities, and thus improving the docking efficiency. This center implements and applies a variety of design patterns to achieve unified standardization of processes, and realizes high reuse, high configuration, and high efficiency development processes for the same type of channels. Through various middlewares, the project itself is decoupled, asynchronous access processes are realized, access efficiency is improved, and strong system support is provided for high concurrency, low fault tolerance, and sustainable operations.
[0068] S3. Using a Groovy script, encrypt the core request message, obtain an encrypted request message, and send it to the target channel.
[0069] Among them, the encrypted request message is used to connect to the target channel.
[0070] In an optional manner, the method further includes:
[0071] It is determined whether the decrypted message meets the preprocessing condition and a determination result is obtained.
[0072] The preprocessing condition is determined according to the target channel corresponding to the decrypted message.
[0073] When the judgment result is yes, the encrypted message is preprocessed, and the preprocessed encrypted message is used as the encrypted message, and the decrypted message is converted based on the standard model configuration library to obtain the step of obtaining the standard object.
[0074] If the decrypted message needs to be preprocessed before conversion, the preprocessing logic configuration service is called to preprocess the encrypted message.
[0075] When the judgment result is no, the step of converting the decrypted message based on the standard model configuration library to obtain a standard object is executed.
[0076] To better illustrate the technical solution of this embodiment, the following Figure 2 The following example illustrates this:
[0077] 1) Based on the service configuration architecture platform, the decryption and signature verification scripts are configured according to the channel type and transaction type. Through the configured Groovy script, the signature verification and decryption are dynamically completed, and the decrypted message is transmitted backward.
[0078] 2) If preprocessing is required before message conversion, first perform the preprocessing logic configuration service.
[0079] 3) Configure the model input parameters for calling the product factory according to the channel type and transaction type, call the product factory, and automatically convert it to a standard object.
[0080] 4) Based on the standard large object, if the channel needs to supplement the initialization data, according to the channel and transaction configuration, the specific method is called according to the Java reflection mechanism to supplement the object data.
[0081] 5) Configure data verification methods according to channels and transactions to complete data accuracy and completeness verification.
[0082] 6) Business logic processing, mainly calling the core business logic interface. The standard object is converted into a core specific service request message (core request message) through the product factory, and the core service of the target channel is called.
[0083] 7) Return data processing: according to the encryption script configured by the channel and transaction, the message is dynamically encrypted by Groovy and returned to the channel.
[0084] The technical solution of this embodiment unifies service standards without affecting the Internet channel connection business, realizes rapid connection with external channels through a configurable architecture, facilitates subsequent maintenance, and can achieve the goal of reducing costs and increasing efficiency.
[0085] Figure 3 FIG. 2 is a schematic diagram showing a structure of an embodiment of an Internet channel docking system 200 provided by the present invention. Figure 3 As shown, the system 200 includes: a first processing module 210, a second processing module 220 and an operation module 230;
[0086] The first processing module 210 is used to: use a Groovy script to decrypt the channel message of the target channel to obtain a decrypted message, and convert the decrypted message based on the standard model configuration library to obtain a standard object;
[0087] The second processing module 220 is used to: obtain the standardized encapsulation data corresponding to the standard object and perform data integrity check, and when the integrity check passes, convert the standard object into a core request message;
[0088] The operation module 230 is used to: use a Groovy script to encrypt the core request message, obtain the encrypted request message and send it to the target channel.
[0089] In an optional manner, the method further includes: a judgment module; the judgment module is used to:
[0090] Determine whether the decrypted message meets the preprocessing conditions and obtain a determination result;
[0091] When the judgment result is yes, preprocessing the encrypted message, using the preprocessed encrypted message as the encrypted message, and executing the step of converting the decrypted message based on the standard model configuration library to obtain a standard object;
[0092] When the judgment result is no, the step of converting the decrypted message based on the standard model configuration library to obtain a standard object is executed.
[0093] In an optional manner, the method further includes: a configuration module; the configuration module is used to:
[0094] The Groovy script is configured according to the channel type and transaction type of the target channel.
[0095] In an optional manner, the standardized encapsulation data includes: initialization data and / or object data.
[0096] The technical solution of this embodiment unifies service standards without affecting the Internet channel connection business, realizes rapid connection with external channels through a configurable architecture, facilitates subsequent maintenance, and can achieve the goal of reducing costs and increasing efficiency.
[0097] The above-mentioned parameters and steps for each module to implement corresponding functions in the Internet channel docking system 200 of this embodiment can refer to the parameters and steps in the embodiment of the Internet channel docking method above, and will not be repeated here.
[0098] like Figure 4As shown, an electronic device 300 of an embodiment of the present invention includes a processor 320, the processor 320 is coupled to a memory 310, and the memory 310 stores at least one computer program 330, and the at least one computer program 330 is loaded and executed by the processor 320, so that the electronic device 300 implements any of the above-mentioned Internet channel docking methods, specifically:
[0099] The electronic device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors 320 (Central Processing Units, CPU) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, and the at least one computer program 330 is loaded and executed by the one or more processors 320, so that the electronic device 300 implements any of the Internet channel docking methods provided in the above embodiments. Of course, the electronic device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the electronic device 300 may also include other components for implementing device functions, which will not be described in detail here.
[0100] A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements any one of the above-mentioned Internet channel docking methods.
[0101] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0102] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs any of the above-mentioned Internet channel docking methods.
[0103] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0104] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0105] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer 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 thereof. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0106] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. An Internet channel docking method, characterized in that: include: Decrypt the channel message of the target channel by using the Groovy script to obtain the decrypted message, and convert the decrypted message based on the standard model configuration library to obtain the standard object; Obtaining standardized encapsulated data corresponding to the standard object and performing a data integrity check, and when the integrity check passes, converting the standard object into a core request message; The core request message is encrypted by using a Groovy script, and the encrypted request message is obtained and sent to the target channel.
2. The Internet channel docking method according to claim 1, characterized in that: Also includes: Determine whether the decrypted message meets the preprocessing conditions and obtain a determination result; When the judgment result is yes, preprocessing the encrypted message, using the preprocessed encrypted message as the encrypted message, and executing the step of converting the decrypted message based on the standard model configuration library to obtain a standard object; When the judgment result is no, the step of converting the decrypted message based on the standard model configuration library to obtain a standard object is executed.
3. The Internet channel docking method according to claim 1, characterized in that: Also includes: The Groovy script is configured according to the channel type and transaction type of the target channel.
4. The Internet channel docking method according to any one of claims 1 to 3, characterized in that: The standardized encapsulation data includes: initialization data and / or object data.
5. An Internet channel docking system, characterized in that: include: A first processing module, a second processing module and an operation module; The first processing module is used to: decrypt the channel message of the target channel by using a Groovy script to obtain a decrypted message, and convert the decrypted message based on a standard model configuration library to obtain a standard object; The second processing module is used to: obtain the standardized encapsulation data corresponding to the standard object and perform data integrity verification, and when the integrity verification passes, convert the standard object into a core request message; The operation module is used to: use the Groovy script to encrypt the core request message, obtain the encrypted request message and send it to the target channel.
6. The Internet channel docking system according to claim 5, characterized in that: Also includes: A judgment module; the judgment module is used to: Determine whether the decrypted message meets the preprocessing conditions and obtain a determination result; When the judgment result is yes, preprocessing the encrypted message, using the preprocessed encrypted message as the encrypted message, and executing the step of converting the decrypted message based on the standard model configuration library to obtain a standard object; When the judgment result is no, the step of converting the decrypted message based on the standard model configuration library to obtain a standard object is executed.
7. The Internet channel docking system according to claim 5, characterized in that: Also includes: Configuration module; the configuration module is used to: The Groovy script is configured according to the channel type and transaction type of the target channel.
8. The Internet channel docking system according to any one of claims 5 to 7, characterized in that: The standardized encapsulation data includes: initialization data and / or object data.
9. An electronic device, characterized in that: The electronic device includes a processor, the processor is coupled to a memory, at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the Internet channel docking method as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by the processor so that the computer-readable storage medium implements the Internet channel docking method as described in any one of claims 1 to 4.