Data transmission method and device, storage medium and computer program product
Through a distributed full-stack dynamic integration architecture, dynamically configure interface access parameters and core business scripts, and support active and passive docking, solving the flexibility of data transmission and service collaboration among multiple systems, and achieving efficient, flexible and secure data collaboration.
Patent Information
- Application Number
- CN202510484836.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The existing technology cannot achieve efficient and flexible data transmission and service collaboration between multiple third-party systems. Especially in the fields of medical care, finance, supply chain, etc., traditional solutions rely on hard coding to implement interface parameter settings, cannot dynamically adjust according to business scenarios, and only support a single docking mode, making it difficult to meet the needs of complex business scenarios.
It adopts a distributed full-stack dynamic integration architecture to obtain the business needs of third-party systems, configure core business scripts, receive user-input interface access parameters and configuration instructions, dynamically configure interface access parameters, support active and passive docking methods, and determine the docking methods through interface access parameters to achieve diversified service data transmission.
A standardized and extensible docking framework has been built, which can effectively respond to business changes between multiple systems, flexibly adapt to technical differences, support parallel docking of multiple systems, reduce high concurrency pressure, and ensure the safety and reliability of data collaboration.
Smart Images

Figure CN120343080A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and particularly to a data transmission method, apparatus, storage medium, and computer program product. Background Art
[0002] In fields such as healthcare, finance, and supply chain, the need for data interaction and business collaboration between multiple systems is becoming increasingly urgent. Efficient data interaction and business collaboration between different systems have become the key to improving business efficiency and reducing operation and maintenance costs. Currently, software docking on the market generally uses hard-coded methods to define interface parameters, limited to passively waiting for third-party systems to call the interface, or only supporting simple scheduled tasks to actively call, lacking the ability to flexibly switch between the two modes. Therefore, it is impossible to solve the problems of data interaction and business collaboration between different systems, nor is it applicable to various scenarios that require data transmission and integration with multiple third-party systems.
[0003] Therefore, how to achieve efficient and flexible data transmission and business collaboration between multiple third-party systems has become an urgent problem to be solved in the present application.
[0004] The above content is only used to assist in understanding the technical solution of the present application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of the present application is to provide a data transmission method, apparatus, storage medium, and computer program product, aiming to solve the problem of how to achieve efficient and flexible data transmission and business collaboration between multiple third-party systems.
[0006] To achieve the above objective, the present application proposes a data transmission method applied to a data transmission apparatus. The data transmission apparatus adopts a distributed full-stack dynamic integration architecture. The data transmission method includes:
[0007] Obtain the business requirements of a third-party system, and configure a core business script according to the business requirements;
[0008] Receive an interface input / output parameter configuration instruction input by a user, and configure interface input / output parameters according to the interface input / output parameter configuration instruction;
[0009] Determine the docking method of the third-party system based on the interface input / output parameters;
[0010] Dock with the third-party system according to the interface input / output parameters, the third-party system docking method, and the core business script, and perform business data transmission.
[0011] In one embodiment, the step of receiving an interface input / output parameter configuration instruction input by a user and configuring interface input / output parameters according to the interface input / output parameter configuration instruction includes:
[0012] Receive the interface input and output parameter configuration instructions entered by the user, and the interface input and output parameter configuration instructions are input in an interface manner, a file configuration manner, or a database storage manner;
[0013] Associate the interface input and output parameter configuration instructions with the business requirements, and configure and adjust the interface input and output parameters according to the interface input and output parameter configuration instructions and the business scenario.
[0014] In one embodiment, the third-party system docking method includes active docking and passive docking, and the step of docking with the third-party system and performing business data transmission according to the interface input and output parameters, the third-party system docking method, and the core business script includes:
[0015] If the third-party system docking method is passive docking, determine the callable interface based on the interface input and output parameters, parse the core business script, and send the business data to the third-party system through the callable interface;
[0016] If the third-party system docking method is active docking, regularly call the third-party interface based on the interface input and output parameters, execute the core business script, and receive the business data sent by the third-party system through the third-party interface.
[0017] In one embodiment, the step of determining the callable interface based on the interface input and output parameters, parsing the core business script, and sending the business data to the third-party system through the callable interface includes:
[0018] Receive the interface call request sent by the third-party system, and determine the callable interface according to the interface input and output parameters;
[0019] Judge whether the interface call request is legal and whether the callable interface exists through the pre-filter;
[0020] If the interface call request is legal and the callable interface exists, judge whether to perform the signature verification operation on the interface call request according to the interface input and output parameters;
[0021] If the signature verification operation is performed and the signature verification operation is successful, parse the core business script, determine the business data according to the result of parsing the core business script, and encrypt the business data using the preset encryption parameters;
[0022] Send the encrypted business data to the third-party system through the callable interface.
[0023] In one embodiment, the step of regularly calling the third-party interface based on the interface input and output parameters, executing the core business script, and receiving the business data sent by the third-party system through the third-party interface includes:
[0024] Configure a pre - business script and execute the pre - business script regularly based on the distributed full - stack dynamic integration architecture;
[0025] If the execution of the pre - business script is successful, determine whether to perform a signature addition operation on the request data after the execution of the pre - business script based on the interface input and output parameters;
[0026] If the signature addition operation is performed and the signature addition operation is successful, initiate a request to call a third - party interface;
[0027] If the request to call the third - party interface is successful, execute the core business script and receive business data sent by the third - party system through the third - party interface.
[0028] In one embodiment, before the step of docking with the third - party system and performing data transmission according to the interface input and output parameters, the third - party system docking method, and the core business script, the following steps are further included:
[0029] Receive an encryption algorithm configuration instruction, and select at least one encryption method based on the encryption algorithm configuration instruction;
[0030] Set encryption parameters according to the encryption method and the encryption algorithm configuration instruction.
[0031] In one embodiment, the interface input and output parameters and the encryption parameters are stored in a configuration database, the log data generated by docking with the third - party system is stored in a log database, the business data is stored in a business database, the business database is dynamically configured by multiple data sources, and the configuration database, the business database, and the log database are isolated from each other.
[0032] In addition, to achieve the above object, the present application also proposes a data transmission device, and the data transmission device includes:
[0033] A core business script logic configuration module, configured to obtain the business requirements of the third - party system and configure a core business script according to the business requirements;
[0034] An interface configuration module, configured to receive an interface input and output parameter configuration instruction input by a user and configure interface input and output parameters according to the interface input and output parameter configuration instruction;
[0035] A third - party system docking module, configured to determine the third - party system docking method based on the interface input and output parameters, and dock with the third - party system and perform business data transmission according to the interface input and output parameters, the third - party system docking method, and the core business script.
[0036] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.
[0037] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the data transmission method described above are implemented.
[0038] One or more technical solutions proposed by the present application have at least the following technical effects:
[0039] Obtain the business requirements of the third-party system, and configure the core business script according to the business requirements: receive the interface input / output parameter configuration instruction input by the user, and configure the interface input / output parameters according to the interface input / output parameter configuration instruction; determine the third-party system docking method based on the interface input / output parameters; dock with the third-party system according to the interface input / output parameters, the third-party system docking method, and the core business script, and perform business data transmission. First, according to the business requirements of the third-party system, diverse core business scripts are configured to cover complex business logics. Secondly, the dynamic configuration of the interface input / output parameters is realized according to the interface input / output parameter configuration instruction, supporting parallel docking of multiple systems, avoiding developing interfaces separately for each system, and solving the problems of difficult adjustment of interface parameters and poor flexibility. Further, different third-party system docking methods are applicable to different scenarios. It can either actively dock with the third-party system or provide an interface for the third-party system to call, meeting the requirements under different business scenarios. Active docking can execute tasks during off-peak hours to avoid high concurrency pressure; passive docking responds on demand, reducing the occupation of invalid resources. In summary, through the dynamic configuration of interface input / output parameters, diverse core business scripts, and flexible third-party system docking methods, the present application constructs a standardized and extensible docking framework, realizing efficient response to business changes, flexible adaptation to technical differences, and secure and reliable data collaboration among multiple systems, thereby achieving the dual technical goals of high efficiency and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present application and, together with the description, used to explain the principles of the present application.
[0041] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1 Schematic flowchart provided for the first embodiment of the data transmission method of this application;
[0043] Figure 2 Schematic flowchart provided for the second embodiment of the data transmission method of this application;
[0044] Figure 3 Schematic diagram of the passive docking method provided for the third embodiment of this application;
[0045] Figure 4 Schematic diagram of the active docking method provided for the third embodiment of this application;
[0046] Figure 5 Schematic diagram of the module structure of the data transmission device according to the embodiment of this application;
[0047] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the data transmission method according to the embodiment of this application.
[0048] The realization of the purpose, functional features and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0050] In order to better understand the technical solutions of this application, the following will be described in detail with reference to the accompanying drawings of the specification and specific embodiments.
[0051] The main solution of the embodiment of this application is: obtaining the business requirements of the third-party system and configuring the core business script according to the business requirements; receiving the interface input / output parameter configuration instruction input by the user and configuring the interface input / output parameters according to the interface input / output parameter configuration instruction; determining the third-party system docking method based on the interface input / output parameters, where the third-party system docking method includes active docking and passive docking. If the third-party system docking method is passive docking, providing a callable interface to the third-party system based on the interface input / output parameters and the core business script, and sending business data to the third-party system through the callable interface; if the third-party system docking method is active docking, regularly calling the third-party interface based on the interface input / output parameters and the core business script, and receiving the business data sent by the third-party system through the third-party interface.
[0052] In this embodiment, for the convenience of description, the data transmission device is used as the execution entity for elaboration below.
[0053] The embodiments of the present application consider that: in the fields of medical care, finance, supply chain, etc., the need for data interaction and business collaboration between multiple systems is becoming increasingly urgent. Efficient data interaction and business collaboration between different systems have become the key to improving business efficiency and reducing operation and maintenance costs. However, the third-party system docking technology generally has limitations: traditional solutions mostly rely on hard coding to set interface parameters and cannot be dynamically adjusted according to business scenarios; and only support a single docking mode, passively waiting for the third party to call the interface or actively obtaining data through simple polling; its core business processing logic usually only supports simple SQL queries or fixed scripts, making it difficult to meet the requirements of complex business scenarios.
[0054] Therefore, the present application provides a solution to obtain the business requirements of the third-party system and configure the core business script according to the business requirements: receive the interface input / output parameter configuration instruction input by the user and configure the interface input / output parameters according to the instruction; determine the third-party system docking method based on the interface input / output parameters; dock with the third-party system according to the interface input / output parameters, the third-party system docking method, and the core business script and perform business data transmission. First, according to the business requirements of the third-party system, diverse core business scripts are configured to cover complex business logics. Second, the dynamic configuration of the interface input / output parameters is realized according to the interface input / output parameter configuration instruction, supporting parallel docking of multiple systems, avoiding developing interfaces separately for each system, and solving the problems of difficult adjustment and poor flexibility of interface parameters. Further, different third-party system docking methods are applicable to different scenarios. It can either actively dock with the third-party system or provide an interface for the third party to call, meeting the requirements under different business scenarios. Active docking can execute tasks during off-peak hours to avoid high concurrency pressure; passive docking responds on demand, reducing the occupation of invalid resources. In summary, the present application constructs a standardized and extensible docking framework through the dynamic configuration of interface input / output parameters, diverse core business scripts, and flexible third-party system docking methods, realizing efficient response to business changes, flexible adaptation to technical differences, and secure and reliable data collaboration between multiple systems, thereby achieving the dual technical goals of high efficiency and flexibility.
[0055] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a multi-party data transmission device, etc. that can implement the above functions. Taking the data transmission in the medical field as an example, this embodiment and the following embodiments will be described below.
[0056] Based on this, the embodiments of the present application provide a data transmission method, referring to Figure 1 , Figure 1 which is the flowchart of the first embodiment of the data transmission method of the present application.
[0057] In this embodiment, the data transmission method is applied to a data transmission device, and the data transmission device adopts a distributed full-stack dynamic integration architecture. The data transmission method includes steps S10 to S40:
[0058] Step S10: Obtain the business requirements of a third-party system, and configure a core business script according to the business requirements;
[0059] The data transmission device adopts a distributed full-stack dynamic integration architecture, which refers to a technical architecture of springboot + redis + quartz + vue + Nashorn JavaScript. Among them, Redis (Remote Dictionary Server) provides distributed caching and message queue functions, supporting data sharing and horizontal expansion in high-concurrency scenarios; the timed task scheduling module of Quartz (open-source job scheduling framework) can coordinate multi-node tasks in a distributed environment; Vue (Vue.js: progressive JavaScript framework) is used to implement the user interface; Spring Boot (Spring Boot: rapid development framework based on the Spring framework) provides business logic processing; Nashorn JavaScript (Nashorn JavaScript: JavaScript engine) supports dynamic business logic. This application adopts the above-mentioned distributed full-stack dynamic integration architecture, providing an efficient and stable operating environment and a good user experience, and having excellent performance in aspects such as data processing, task scheduling, interface display, and script execution, providing strong support for the realization of multi-party software docking.
[0060] Obtain the business requirements of a third-party system, and configure a core business script according to the business requirements. For example, if the business requirement of the third-party system is to query the patient files of the medical system, then configure a core business script to extract specific fields or aggregated results from the database according to this business requirement; another example is that the business requirement is the reconciliation of transaction flows in the financial system, then configure a core business script to perform data cleaning, conversion, or batch operations according to this business requirement. It can be understood that the core business script can be configured correspondingly according to the specific application scenario and specific business requirements of the third-party system, so as to flexibly adapt to multiple scenarios.
[0061] The core business script supports multiple methods such as MyBatis SQL syntax configuration, stored procedures, and Js (JavaScript: lightweight programming language) script configuration, and is used to process the business logic for docking with the third-party system. For example, database queries and operations can be performed through MyBatis SQL syntax, stored procedures can improve data processing efficiency, and js scripts can implement complex business logic judgments and processing.
[0062] It should be noted that MyBatis is an excellent persistence layer framework that supports customized SQL, stored procedures, and advanced mapping; Js, JavaScript is a lightweight programming language mainly used for web development, adding dynamic functions and interactivity to web pages, and is one of the core technologies of the Web, widely used for client-side scripting and can be directly executed in the user's browser.
[0063] Step S20: Receive the interface input and output parameter configuration instruction input by the user, and configure the interface input and output parameters according to the interface input and output parameter configuration instruction.
[0064] The interface input and output parameters include the interface address, request method, parameter format, etc. The user can input the parameters in the form of a form or a JSON editor through the user interface (Vue front-end). The interface input and output parameter configuration is stored in the configuration database SQLite in real time, and the configuration database supports version management and rollback. Dynamically configure the interface address, protocol type, and parameter format through the interface input and output parameter configuration instruction input by the user to quickly adapt to the interface standards of different third-party systems.
[0065] Specifically, the user inputs a request body template in JSON format on the interface. The data transmission device listens for configuration change events through Spring Boot Actuator and dynamically refreshes the configuration cache of the interface service module. For example, after modifying the interface address, the new URL (uniform resource locator) takes effect immediately without restarting the service; the data transmission device can also automatically detect parameter logic conflicts and prompt the user to correct them, and perform a legality check on the parameters input by the user. The legality check includes: the interface address needs to conform to the URL specification, the request method needs to match the business logic, etc.
[0066] Step S30: Determine the docking method with the third-party system based on the interface input and output parameters.
[0067] Automatically match the applicable third-party system docking method according to the protocol type, request method, and business scenario identifier in the interface input and output parameters. The third-party system docking method includes a passive docking mode and an active docking mode. This means that the data transmission device can provide an interface for the third-party system to call, or can actively call the third-party interface. The diverse docking methods meet the requirements in different business scenarios and improve the versatility and practicality of the software.
[0068] Among them, the triggering condition of the passive docking mode is that the interface parameters include the externally exposed interface address and the request method, which is applicable to scenarios that require real-time response to third-party requests. The data transmission device generates a standardized API for third-party calls; the triggering condition of the active docking mode is that the interface parameters include the triggering condition of the scheduled task and the target interface address, periodically pulls data or processes it in batches, generates a scheduled task scheduling rule, and actively calls the third-party interface.
[0069] Step S40: Connect to the third-party system according to the interface input and output parameters, the third-party system docking method, and the core business script, and perform business data transmission.
[0070] According to the protocol type and request format in the interface input and output parameters, a standardized request template is dynamically generated. The standardized request template includes two methods: HTTP and WebService. Connect to the third-party system and perform business data transmission based on the standardized request template and the third-party system docking method. Among them, the execution logic of the passive docking mode is: after receiving a third-party request, call the core business script to process the data, and return the result according to the response format defined by the interface parameters; the execution logic of the active docking mode is: trigger a scheduled task through Quartz, call the core script to generate request data, and actively push it to the third-party interface.
[0071] Furthermore, the execution result of the core business script is automatically mapped to the fields defined by the interface parameters. For example, the query result of the SQL script is directly filled into the JSON response body; the business logic result dynamically generated in the JavaScript script is bound to the request body.
[0072] The data transmission device records the request parameters, response status (success / failure), and elapsed time of each call, and stores them in the log database. In the active docking scenario, lock the business data before calling the third-party interface to prevent concurrent modification; in the passive docking scenario, ensure the atomicity of script execution and data update through database transactions.
[0073] It should be noted that the interface input and output parameters and the subsequent encryption parameters for security encryption are stored in the configuration database parameters, the log data generated by docking with the third-party system is stored in the log database, and the business data is stored in the business database. The business database is dynamically configured by multiple data sources. The configuration database, business database, and log database are isolated from each other. Taking the medical field as an example, the dynamic configuration of multiple data sources means that users can select appropriate data sources according to the database type of the medical system.
[0074] This embodiment provides a data transmission method, which obtains the business requirements of a third-party system and configures a core business script according to the business requirements: receives an interface input / output parameter configuration instruction input by a user, and configures the interface input / output parameters according to the interface input / output parameter configuration instruction; determines the docking method with the third-party system based on the interface input / output parameters; docks with the third-party system according to the interface input / output parameters, the third-party system docking method, and the core business script, and performs business data transmission. First, according to the business requirements of the third-party system, diverse core business scripts are configured to cover complex business logics. Second, the dynamic configuration of the interface input / output parameters is realized according to the interface input / output parameter configuration instruction, supporting parallel docking of multiple systems, avoiding developing interfaces separately for each system, and solving the problems of difficult adjustment of interface parameters and poor flexibility. Further, different docking methods for the third-party system are applicable to different scenarios. It can either actively dock with the third-party system or provide an interface for the third-party system to call, meeting the requirements in different business scenarios. Active docking can execute tasks during off-peak hours to avoid high concurrency pressure; passive docking responds on demand, reducing the occupation of invalid resources. In summary, through the dynamic configuration of interface input / output parameters, diverse core business scripts, and flexible docking methods for the third-party system, this application constructs a standardized and extensible docking framework, realizing efficient response to business changes, flexible adaptation to technical differences, and secure and reliable data collaboration among multiple systems, thus achieving the dual technical goals of efficiency and flexibility.
[0075] In a feasible implementation manner, step S20 may include steps S21 to S22:
[0076] Step S21, receiving an interface input / output parameter configuration instruction input by a user, where the interface input / output parameter configuration instruction is input in a graphical interface manner, a file configuration manner, or a database storage manner;
[0077] The interface input / output parameter configuration instruction being input in a graphical interface manner means that a visual configuration interface is constructed through the Vue front end, and the visual configuration interface provides form-based input components, and the user defines the interface parameters by dragging or filling in fields.
[0078] The file configuration manner input means that the data transmission device supports the upload of configuration files in YAML or JSON format, verifies the syntax and field legality of the files, and parses the file content and maps it to the interface input / output parameters.
[0079] The database storage manner input means that the configuration database SQLite is directly operated through SQL statements or an ORM framework to write the interface input / output parameters. Among them, the configuration database records the parameter modification history and supports querying or rolling back by timestamp.
[0080] It is understandable that different instruction input methods can be selected according to the usage habits and requirements of different users, and the interface input and output parameter configuration instructions are not limited to the above three types.
[0081] Step S22: Associate the interface input and output parameter configuration instruction with the service requirement, and configure and adjust the interface input and output parameters according to the interface input and output parameter configuration instruction and the service scenario.
[0082] Associate the interface input and output parameter configuration instruction with the service requirement. According to the tags in the service requirement, load the preset parameter template. For example, in the medical scenario, automatically enhance the security parameters; in the financial scenario, optimize the high-frequency request configuration to improve the service fit. The change of the service requirement drives the automatic adjustment of the parameters, thus realizing the dynamic adjustment of the interface, greatly improving the flexibility and adaptability.
[0083] Based on the first embodiment of the present application, the second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be elaborated hereinafter.
[0084] On this basis, refer to Figure 2 , Figure 2 FIG. is a schematic flowchart of the second embodiment provided by the present application. In this embodiment, before step S40 of docking with the third-party system and performing data transmission according to the interface input and output parameters, the third-party system docking method, and the core service script, steps S01 to S02 are further included:
[0085] Step S01: Receive the encryption algorithm configuration instruction, and select at least one encryption method based on the encryption algorithm configuration instruction;
[0086] The user can select the encryption algorithm type through the Vue front-end interface, input the encryption algorithm configuration instruction, and the data transmission device selects at least one encryption method according to the encryption algorithm configuration instruction input by the user. The available encryption methods include: SM2, an elliptic curve public key cryptography algorithm in the national cryptography standard, used for digital signature and key exchange; SM3, a hash algorithm in the national cryptography standard, used for data integrity verification; AES algorithm, RSA algorithm, etc. Select a suitable encryption algorithm based on specific user requirements.
[0087] Step S02: Set the encryption parameters according to the encryption method and the encryption algorithm configuration instruction.
[0088] Further, encryption parameters are set according to the encryption method and the encryption algorithm configuration instruction. The SM2 algorithm is used for digital signature or key exchange, and the SM3 algorithm is used for data integrity verification. The encryption parameters include key length, signature mode, hash salt value, and the range of encrypted data. An encryption key is generated based on the encryption parameters and stored in an isolated configuration database. At the same time, key lifecycle management rules are set, and the lifecycle management includes regular key rotation and automatic archiving of expired keys.
[0089] Before calling the interface to transmit data, according to the encryption algorithm and encryption parameters, encryption or signature operations are performed on the service data. If the SM2 algorithm is selected, the data is asymmetrically encrypted and a digital signature is generated. If the SM3 algorithm is selected, a hash digest of the data is generated and transmitted bound to the original data. Exemplarily, the encryption parameters can be dynamically modified or the encryption algorithm can be switched through the user interface, and the modified configuration takes effect in real time without restarting the service.
[0090] In this embodiment, by receiving the encryption algorithm configuration instruction, the encryption method is flexibly selected, and the encryption parameters are dynamically configured according to the encryption method and encryption parameters. Before calling the interface to transmit data, encryption or signature operations are performed on the service data to ensure the security of data transmission.
[0091] Based on the first embodiment and / or the second embodiment of the present application, the third embodiment of the present application is proposed. In the third embodiment of the present application, for the same or similar content as the above embodiments, reference can be made to the above introduction and will not be repeated hereinafter.
[0092] In this embodiment, the third-party system docking methods include active docking and passive docking. Step S40 may include steps S41 to S42:
[0093] Step S41, if the third-party system docking method is passive docking, then based on the interface input and output parameters, the callable interface is determined, the core service script is parsed, and the service data is sent to the third-party system through the callable interface;
[0094] If the third-party system docking method is passive docking, that is, the third-party system needs to actively obtain data or perform business processing, and actively obtain data through the callable interface provided by the docking data transmission device. In the case of passive docking, the data transmission device automatically generates a callable standardized interface according to the address (URL) and protocol type in the interface input and output parameters and registers it to the server. The standardized interface includes an HTTP interface and a WebService interface. The HTTP interface dynamically creates RESTful endpoints through the RestController annotation of Spring Boot; the WebService interface generates a WSDL file through the Apache CXF framework and publishes SOAP service endpoints. Send business data to the third-party system through the callable interface.
[0095] Step S42, if the third-party system docking method is active docking, then regularly call the third-party interface based on the interface input and output parameters, execute the core business script, and receive the business data sent by the third-party system through the third-party interface.
[0096] If the third-party system docking method is active docking, that is, actively call the third-party interface and receive the business data sent by the third-party interface. In the case of active docking, a timing task is triggered through Quartz task scheduling to automatically call the core business script to generate request data. Similarly, the interface call method supports the HTTP method and the WebService method.
[0097] In this embodiment, the interface call method supports the HTTP (lightweight and fast) method and the WebService (cross-platform reliable communication) method, covering different third-party technology stacks; passive docking meets the real-time interaction requirements, and active docking optimizes the batch processing efficiency. Different processing is performed according to different docking methods, taking into account security and execution efficiency, and solving the pain points of rigid interfaces, poor scalability, and insufficient security in traditional solutions, providing an efficient, flexible, and secure standardized solution for multi-system data interaction.
[0098] Specifically, refer to Figure 3 , Figure 3 is a schematic diagram of the passive docking method provided in the third embodiment of the present application. In a feasible implementation manner, step S41 may include steps S411 to S415:
[0099] Step S411, receive the interface call request sent by the third-party system, and determine the callable interface according to the interface input and output parameters;
[0100] The data transmission device receives an interface call request sent by a third-party system through Spring Boot, parses the interface call request, determines the request header, request body, and URL path, and extracts key parameters including the interface address, request method, and protocol type. According to the interface address and request method, query the interface registry in the configuration database (SQLite) to determine the interfaces that can be called by the third-party system.
[0101] Step S412, use a pre-filter to determine whether the interface call request is legal and whether the callable interface exists;
[0102] Furthermore, verify whether the source IP of the interface call request is within the permitted range through Redis caching, extract the API Key from the request header, compare it with the key in the configuration database, and enable the Redis counter to limit the maximum number of requests per minute; verify whether the interface is registered in the configuration database and the status is "enabled". If the interface does not exist or the request is illegal, return a standard error code and record the security log in the log database.
[0103] Step S413, if the interface call request is legal and the callable interface exists, determine whether to perform a signature verification operation on the interface call request according to the input and output parameters of the interface;
[0104] If the interface call request is legal and the callable interface exists, determine whether to perform a signature verification operation on the interface call request according to the security level identifier configured in the interface input and output parameters. For example, the medical privacy data interface is marked as "highly sensitive" and must be signature-verified; the ordinary log interface does not require signature verification.
[0105] The signature verification operation includes extracting the signature value from the request header, generating the hash value of the request data using the SM3 algorithm, decrypting the signature with the SM2 public key, and comparing the hash.
[0106] Step S414, if the signature verification operation is performed and the signature verification operation is successful, parse the core business script, determine the business data according to the result of parsing the core business script, and encrypt the business data using the encryption parameters;
[0107] If the signature verification operation needs to be performed and the signature verification operation is successful, then parse the core business script. Exemplarily, the core business script is a MyBatis SQL script, generate SQL statements dynamically according to the request parameters, and execute database queries; JavaScript scripts can execute dynamic logic through the Nashorn engine.
[0108] Further, after executing the core business script and determining the business data to be sent to the third-party system, use the pre-generated encryption parameters to perform an encryption operation on the response data. For SM2 encryption, use the third-party public key to encrypt sensitive fields (such as diagnostic results); for SM3 hashing: generate a data digest and append it to the response header.
[0109] Step S415, send the encrypted business data to the third-party system through the callable interface.
[0110] Encapsulate the encrypted data in the format defined by the interface input and output parameters, and send the encrypted business data to the third-party system through the callable interface. The applicable transport protocols include the HTTP protocol and the WebService protocol.
[0111] Such as Figure 3 As shown, if in the above steps: the interface call request is illegal, the callable interface does not exist, the signature verification operation is unsuccessful, or the core business script fails to be parsed, and any of these situations occurs, an error will be directly reported and the process will be terminated. Only when all verifications pass, will the business logic processing be executed and data be returned. Among them, the log data generated from docking with the third-party system is stored in the log database, and the business data is stored in the business database. The business database is dynamically configured with multiple data sources, and the databases are isolated from each other.
[0112] Specifically, referring to Figure 4 Figure 4 is a schematic diagram of the active docking method provided in the third embodiment of the present application. In a feasible implementation, step S42 may include steps S421 to S424:
[0113] Step S421, configure the pre-business script and execute the pre-business script regularly based on the distributed full-stack dynamic integration architecture;
[0114] Configure the pre-business script through the Vue interface, support MyBatis SQL, stored procedures, or JavaScript scripts. Define the execution period based on Quartz of the distributed full-stack dynamic integration architecture and register the execution period with the scheduler. When the task is triggered, call the Nashorn engine or MyBatis to execute the script, process the data, and generate request parameters.
[0115] Step S422, if the pre-business script is executed successfully, determine whether to perform a signature addition operation on the request data after the execution of the pre-business script based on the interface input and output parameters;
[0116] If the pre-business script is executed successfully, determine whether to perform a signature addition operation on the executed request data according to the security level identifier in the interface input and output parameters. For example, medical test data marked as "highly sensitive" will automatically trigger signature addition.
[0117] Step S423, if the signature addition operation is performed and the signature addition operation is successful, initiate a request to call a third-party interface;
[0118] The signature addition operation includes generating an SM3 hash, generating a hash digest for the request data, or performing an SM2 signature, encrypting the hash value with a private key to generate a signature. Attach the signature generated by the signature addition to the request header and initiate a request to call a third-party interface. The third-party interface request includes an HTTP request and a WebService request. Exemplarily, the HTTP request sends a POST request, and the request body is the encrypted JSON data; the WebService request generates an XML message that conforms to the SOAP standard and contains encrypted fields.
[0119] Step S424, if the request to call the third-party interface is successful, execute the core business script and receive the business data sent by the third-party system through the third-party interface.
[0120] If the request to call the third-party interface is successful and the third-party system successfully responds, parse the business data returned by the third party and verify the signature; call the core business script to update the status of the local database. Correspondingly, if the call to the third-party request fails, call the corresponding failure business script.
[0121] Such as Figure 4 As shown, if there are situations such as response failure or signature addition operation failure in the above steps that affect the reception of business data, record the error log in the SQLite log database, including the error code, timestamp, and original request data. The log data generated by docking with the third-party system is stored in the log database, and the business data is stored in the business database. The business database is dynamically configured with multiple data sources, and the databases are isolated from each other. The dynamic configuration of multiple data sources means that users can select appropriate data sources according to the specific database type. The isolation between databases enables quick switching to the backup data source when the business database fails, ensuring the continuity of data transmission.
[0122] To better illustrate the data transmission method proposed in this application, the following takes a medical system as the third-party system and the Yimaiqiao software as a computer program product that applies the corresponding method of the software described in this application as an example:
[0123] Interface configuration: The user enters the interface configuration module through the interface method and sets the input and output parameters of the interface. For example, set the interface address to a specific URL of the medical system, the request method to POST, and the parameter format to JSON. At the same time, the user can dynamically adjust the interface parameters according to needs to adapt to different business scenarios.
[0124] Core business script logic configuration: According to the business requirements of the third-party system, users can select a suitable core business script logic configuration method. For example, use MyBatis syntax to configure the SQL statement for querying patient information, or use stored procedures to process the statistical analysis of medical data. If complex business logic judgments are required, js scripts can be used for configuration, where not only js syntax can be written, but also custom SQL statements can be written.
[0125] Third-party system docking: The Yimaiqiao software can be docked with the third-party system in two ways. If the third-party system needs to actively obtain data or perform business processing, it can call the interfaces provided by Yimaiqiao. If the Yimaiqiao software needs to actively obtain data from the medical system, it can regularly call the interfaces of the medical system by configuring scheduled tasks. During the interface call process, select the HTTP or WebService method for communication according to the actual situation.
[0126] Database management: The Yimaiqiao software supports the dynamic configuration of multiple data sources for the business database, and users can select a suitable data source according to the database type of the medical system. At the same time, isolate the business database from the log database and the configuration database to ensure data security and management convenience. For example, when the business database fails, it can be quickly switched to the backup data source to ensure the continuity of data transmission.
[0127] Security encryption: When transmitting data through the interface, the Yimaiqiao software uses encryption methods such as national secret SM2, SM3, etc. to encrypt the data to ensure the security of sensitive data such as patient information. Users can dynamically configure encryption details through the interface, such as the parameters of the encryption algorithm, key length, etc.
[0128] This application also provides a data transmission device, please refer to Figure 5 The data transmission device includes:
[0129] The core business script logic configuration module 10 is used to obtain the business requirements of the third-party system and configure the core business script according to the business requirements;
[0130] The interface configuration module 20 is used to receive the interface input and output parameter configuration instructions input by the user and configure the interface input and output parameters according to the interface input and output parameter configuration instructions;
[0131] The third-party system docking module 30 is used to determine the third-party system docking method based on the interface input and output parameters, and dock with the third-party system according to the interface input and output parameters, the third-party system docking method, and the core business script to perform business data transmission.
[0132] The data transmission device provided by the present application adopts the data transmission method in the above-mentioned embodiment, and can solve the technical problem of data transmission. Compared with the prior art, the beneficial effects of the data transmission device provided by the present application are the same as those of the data transmission method provided by the above-mentioned embodiment, and other technical features in the data transmission device are the same as the features disclosed in the method of the above-mentioned embodiment, and will not be elaborated here.
[0133] The present application provides a data transmission device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data transmission method in the first embodiment above.
[0134] Reference is made below to Figure 6 , which shows a schematic structural diagram of a data transmission device suitable for implementing the embodiments of the present application. The data transmission device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The data transmission device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0135] As Figure 6As shown, the data transmission device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in the read-only memory 1002 or a program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the data transmission device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the data transmission device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a data transmission device having various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.
[0136] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.
[0137] The data transmission device provided in the present application adopts the data transmission method in the above-mentioned embodiment and can solve the technical problems of data transmission. Compared with the prior art, the beneficial effects of the data transmission device provided in the present application are the same as those of the data transmission method provided in the above-mentioned embodiment, and other technical features in the data transmission device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0138] It should be understood that the various parts disclosed in the present application may be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0139] As described above, it is only the specific implementation manner of the present application. However, the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims described above.
[0140] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the data transmission method in the above embodiments.
[0141] The computer-readable storage medium provided by the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0142] The above computer-readable storage medium may be included in the data transmission device; or it may exist separately without being assembled into the data transmission device.
[0143] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the data transmission device, the data transmission device is enabled to: obtain the service requirements of the third-party system and configure the core service script according to the service requirements; receive the interface input / output parameter configuration instruction input by the user and configure the interface input / output parameters according to the interface input / output parameter configuration instruction; determine the third-party system docking method based on the interface input / output parameters; and dock with the third-party system and perform business data transmission according to the interface input / output parameters, the third-party system docking method, and the core service script.
[0144] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN: Local Area Network) or a wide area network (WAN: Wide Area Network), or it can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutively represented blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0146] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0147] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above data transmission method, and can solve the technical problems of data transmission. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the data transmission method provided by the above embodiments, and will not be elaborated here.
[0148] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the data transmission method as described above.
[0149] The computer program product provided by the present application can solve the technical problem of data transmission. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the data transmission method provided in the above embodiments, and will not be elaborated herein.
[0150] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A data transmission method, characterized in that Applied to a data transmission device, the data transmission device adopts a distributed full-stack dynamic integration architecture, and the data transmission method includes: Obtain the business requirements of a third-party system and configure the core business script according to the business requirements; Receive the interface input / output parameter configuration instruction input by the user and configure the interface input / output parameters according to the interface input / output parameter configuration instruction; Determine the docking method with the third-party system based on the interface input / output parameters; Dock with the third-party system according to the interface input / output parameters, the third-party system docking method, and the core business script, and perform business data transmission.
2. The data transmission method according to claim 1, wherein The step of receiving the interface input / output parameter configuration instruction input by the user and configuring the interface input / output parameters according to the interface input / output parameter configuration instruction includes: Receive the interface input / output parameter configuration instruction input by the user, and the interface input / output parameter configuration instruction is input in a graphical interface manner, a file configuration manner, or a database storage manner; Associate the interface input / output parameter configuration instruction with the business requirements, and configure and adjust the interface input / output parameters according to the interface input / output parameter configuration instruction and the business scenario.
3. The data transmission method according to claim 1, wherein The third-party system docking method includes active docking and passive docking. The step of docking with the third-party system according to the interface input / output parameters, the third-party system docking method, and the core business script, and performing business data transmission includes: If the third-party system docking method is passive docking, determine the callable interface based on the interface input / output parameters, parse the core business script, and send the business data to the third-party system through the callable interface; If the third-party system docking method is active docking, regularly call the third-party interface based on the interface input / output parameters, execute the core business script, and receive the business data sent by the third-party system through the third-party interface.
4. The data transmission method according to claim 3, wherein The step of determining the callable interface based on the interface input / output parameters, parsing the core business script, and sending the business data to the third-party system through the callable interface includes: Receive the interface call request sent by the third-party system and determine the callable interface according to the interface input / output parameters; Judge whether the interface call request is legal and whether the callable interface exists through the pre-filter; If the interface call request is legal and the callable interface exists, judge whether to perform a signature verification operation on the interface call request according to the interface input / output parameters; If the signature verification operation is performed and the signature verification operation is successful, parse the core business script, determine the business data according to the result of parsing the core business script, and encrypt the business data using the preset encryption parameters; Send the encrypted business data to the third-party system through the callable interface.
5. The data transmission method according to claim 3, characterized in that, The step of regularly calling the third-party interface based on the interface input / output parameters, executing the core business script, and receiving the business data sent by the third-party system through the third-party interface includes: Configure the pre-business script and regularly execute the pre-business script based on the distributed full-stack dynamic integration architecture; If the pre-business script is executed successfully, judge whether to perform a signature addition operation on the request data after the execution of the pre-business script according to the interface input / output parameters; If the signature addition operation is performed and the signature addition operation is successful, a request to call a third-party interface is initiated; If the request to call the third-party interface is successful, the core business script is executed, and business data sent by the third-party system is received through the third-party interface.
6. The data transmission method according to claim 1, wherein Before the step of docking with the third-party system and performing data transmission according to the interface input and output parameters, the third-party system docking method, and the core business script, the following steps are further included: Receiving an encryption algorithm configuration instruction, and selecting at least one encryption method based on the encryption algorithm configuration instruction; Setting encryption parameters according to the encryption method and the encryption algorithm configuration instruction.
7. The data transmission method according to any one of claims 1 to 6, characterized in that The interface input and output parameters and the encryption parameters are stored in a configuration database, the log data generated by docking with the third-party system is stored in a log database, the business data is stored in a business database, the business database is dynamically configured by multiple data sources, and the configuration database, the business database, and the log database are isolated from each other.
8. A data transmission device, characterized in that, The data transmission device adopts a distributed full-stack dynamic integration architecture, and the data transmission device includes: A core business script logic configuration module, configured to obtain the business requirements of the third-party system and configure the core business script according to the business requirements; An interface configuration module, configured to receive an interface input and output parameter configuration instruction input by a user and configure the interface input and output parameters according to the interface input and output parameter configuration instruction; A third-party system docking module, configured to determine the third-party system docking method based on the interface input and output parameters, and dock with the third-party system and perform business data transmission according to the interface input and output parameters, the third-party system docking method, and the core business script.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that, The computer program product includes a computer program. When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for exchanging data with third-party system
CN101751256A
Method and system for service interface development
CN103870260A
A third-party service interface construction method and device
CN109947410A
Interface definition configuration method, service processing method, server and storage medium
CN112860308A
Data query method and device, equipment and storage medium
CN113312374A