A method, apparatus, device and readable storage medium for data transmission

CN115202906BActive Publication Date: 2026-10-27BEIJING FENBEIJINFU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210974656.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2026-10-27
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

[0003]上述数据传输时需配置大量的配置化数据,导致程序开发需要冗余的开发逻辑和大量的开发时间

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115202906B_ABST
    Figure CN115202906B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method, device, equipment and readable storage medium. The method comprises the following steps: obtaining to-be-connected data in a to-be-connected system and configuration source data of a target system, wherein the to-be-connected system is one of a plurality of to-be-connected systems, the data formats of the plurality of to-be-connected systems are different, and the data formats of the plurality of to-be-connected systems and the target system are different; performing script analysis on the to-be-connected data and the configuration source data according to a preset template to obtain to-be-connected data in a target system adaptation format, wherein the formats of the preset templates corresponding to different to-be-connected systems are the same, and the contents configured in the preset templates corresponding to different to-be-connected systems are different; and transmitting the to-be-connected data to the target system. Through the method, the efficiency of program development in the data transmission process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission, and more specifically, to a method, apparatus, device, and readable storage medium for data transmission. Background Technology

[0002] Currently, the main method used for data transmission during system integration is to develop customized programs, adapt them to different systems, and then use these customized programs to achieve data transmission between different systems.

[0003] The aforementioned data transmission requires the configuration of a large amount of data, resulting in redundant development logic and a significant amount of development time for the program.

[0004] Therefore, how to improve the efficiency of program development during data transmission is a technical problem that needs to be solved. Summary of the Invention

[0005] The purpose of this application is to provide a data transmission method. The technical solution of this application can improve the efficiency of program development during data transmission.

[0006] In a first aspect, embodiments of this application provide a data transmission method, comprising: acquiring data to be connected from a system to be connected and configuration source data from a target system, wherein the system to be connected is one of multiple systems to be connected, the data formats of the multiple systems to be connected are different, and the data formats of the multiple systems to be connected are different from those of the target system; parsing the data to be connected and the configuration source data according to a preset template to obtain connection data in a format adapted to the target system, wherein the preset templates corresponding to different systems to be connected have the same format, but the configuration content in the preset templates corresponding to different systems to be connected is different; and transmitting the connection data to the target system.

[0007] In the above embodiments, by parsing the data to be connected into data with the same data format as the target system's storage data according to a preset template, it is possible to achieve data transmission between different systems while connecting different systems. This method can improve the efficiency of program development during data transmission.

[0008] In some embodiments, the preset template includes:

[0009] Input parameter template and output parameter template;

[0010] The input parameter template includes at least one of the following: the target system's system identifier, the interface identifier, the input parameter template, and version management.

[0011] The output parameter template includes at least one of the following: the target system's system identifier, interface identifier, output parameter template, and version management.

[0012] In the above embodiments, this application stores data in different formats through preset input and output parameter templates. By parsing the data, the format conversion of different data formats can be realized, thereby enabling the connection between different systems.

[0013] In some embodiments, the data to be interfaced and the configuration source data are parsed by a script according to a preset template to obtain interface data in a format compatible with the target system, including:

[0014] The docking data and configuration source data are stored according to the input parameter template format to obtain the input parameter template data. The input parameter template data includes at least one of the following: docking data in a preset format, system identifier of the target system, interface identifier of the target system, and version management data.

[0015] The input parameter template data is parsed according to the output parameter template format to obtain the docking data. The docking data includes at least one of the following: docking data in the target system adaptation format, system identifier, interface identifier, and version management data.

[0016] In the above embodiments, this application achieves system docking and data transmission by parsing the data stored in the input parameter template into data of the corresponding format in the output parameter template after data conversion.

[0017] In some embodiments, before obtaining the data to be interfaced in the system to be interfaced and the configuration source data of the target system, the method further includes:

[0018] Configure the template format of the input parameter template and output parameter template in the preset template according to the preset rules;

[0019] The input and output parameter templates are tested using the test data to determine whether they are usable templates.

[0020] When a preset template is determined to be an available template, the input parameter template and the output parameter template are also determined to be preset templates.

[0021] In the above embodiments, by testing the configured preset template, it can be confirmed whether the template can complete the parsing of data in different data formats. After the test is passed, the preset template after the test can be used as a usable module.

[0022] In some embodiments, the input parameter template and output parameter template are tested using detection data to determine whether the input parameter template and output parameter template are usable templates, including:

[0023] Configure the detection data and configuration source data according to the input parameter template to obtain the input parameter data. The detection data includes one or more data to be connected to the system to be connected and one or more standard connection data corresponding to the one or more data to be connected.

[0024] The input parameter data is parsed according to the format of the output parameter template to obtain multiple data sets for the interface.

[0025] The comparison results are obtained by comparing multiple docking data with one or more standard docking data.

[0026] Based on the comparison results, determine whether the input parameter template and output parameter template are usable templates.

[0027] In the above embodiments, this application compares the data parsed from the preset template with standard data, and then confirms whether the preset template is usable based on the comparison results, thereby ensuring the accuracy of the preset template.

[0028] In some embodiments, the configuration source data includes:

[0029] The target system's system identifier, interface address, interface data, request method, request type, timeout, header configuration, and version management are at least one of the following:

[0030] In the above embodiments, this application utilizes one or more configuration source data of the target system to transmit data after parsing, ensuring that the data transmission is purposeful.

[0031] In some embodiments, the data to be interfaced and the configuration source data are parsed by a script according to a preset template to obtain interface data in a format compatible with the target system, including:

[0032] The data to be connected and the configuration source data are parsed by script according to the preset template, and the parsing results are checked to obtain the check results;

[0033] If the test results show successful parsing, generate docking data;

[0034] If the test result shows that the parsing failed, an parsing error will be displayed and an alarm will be triggered.

[0035] In the above embodiments, if the parsing is successful, the data transmission can be completed directly; if the parsing fails, an alarm will be displayed to provide a warning to the user.

[0036] In some embodiments, after transmitting the docking data to the target system, the method further includes:

[0037] Record at least one of the following: the time of data transmission, the user requesting data transmission, the content of the data to be connected, and the content of the data to be connected.

[0038] In the above embodiments, by recording the aforementioned data, this application can facilitate users in querying access records and transmitted data content.

[0039] Secondly, embodiments of this application provide a data transmission apparatus, comprising:

[0040] The acquisition module is used to acquire the data to be connected from the system to be connected and the configuration source data of the target system. The system to be connected is one of multiple systems to be connected, and the data formats of the multiple systems to be connected are different, and the data formats of the multiple systems to be connected are different from those of the target system.

[0041] The parsing module is used to parse the data to be connected and the configuration source data according to the preset template to obtain the connection data in the format adapted to the target system. The preset templates for different systems to be connected have the same format, but the configuration content in the preset templates for different systems to be connected is different.

[0042] The transmission module is used to transmit docked data to the target system.

[0043] Optional, preset templates include:

[0044] Input parameter template and output parameter template;

[0045] The input parameter template includes at least one of the following: the target system's system identifier, the interface identifier, the input parameter template, and version management.

[0046] The output parameter template includes at least one of the following: the target system's system identifier, interface identifier, output parameter template, and version management.

[0047] Optionally, the parsing module is specifically used for:

[0048] The docking data and configuration source data are stored according to the input parameter template format to obtain the input parameter template data. The input parameter template data includes at least one of the following: docking data in a preset format, system identifier of the target system, interface identifier of the target system, and version management data.

[0049] The input parameter template data is parsed according to the output parameter template format to obtain the docking data. The docking data includes at least one of the following: docking data in the target system adaptation format, system identifier, interface identifier, and version management data.

[0050] Optionally, the device further includes:

[0051] The detection module is used to configure the template format of the input parameter template and output parameter template in the preset template according to preset rules before the parsing module obtains the data to be connected in the system to be connected and the configuration source data of the target system.

[0052] The input and output parameter templates are tested using the test data to determine whether they are usable templates.

[0053] When a preset template is determined to be an available template, the input parameter template and the output parameter template are also determined to be preset templates.

[0054] Optionally, the detection module is specifically used for:

[0055] Configure the detection data and configuration source data according to the input parameter template to obtain the input parameter data. The detection data includes one or more data to be connected to the system to be connected and one or more standard connection data corresponding to the one or more data to be connected.

[0056] The input parameter data is parsed according to the format of the output parameter template to obtain multiple data sets for the interface.

[0057] The comparison results are obtained by comparing multiple docking data with one or more standard docking data.

[0058] Based on the comparison results, determine whether the input parameter template and output parameter template are usable templates.

[0059] Optional, configure source data, including:

[0060] The target system's system identifier, interface address, interface data, request method, request type, timeout, header configuration, and version management are at least one of the following:

[0061] Optionally, the parsing module is specifically used for:

[0062] The data to be connected and the configuration source data are parsed by script according to the preset template, and the parsing results are checked to obtain the check results;

[0063] If the test results show successful parsing, generate docking data;

[0064] If the test result shows that the parsing failed, an parsing error will be displayed and an alarm will be triggered.

[0065] Optionally, the device further includes:

[0066] The recording module is used to record at least one of the following after the transmission module transmits the docking data to the target system: the time of data transmission, the user who requested the data transmission, the content of the data to be docked, and the content of the docking data.

[0067] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method provided in the first aspect above are performed.

[0068] Fourthly, embodiments of this application provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.

[0069] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0070] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0071] Figure 1 A schematic diagram illustrating a conventional system interface method provided in an embodiment of this application;

[0072] Figure 2 A flowchart illustrating a data transmission method provided in an embodiment of this application;

[0073] Figure 3 A schematic diagram of a data transmission system provided in an embodiment of this application;

[0074] Figure 4 A schematic block diagram of a data transmission apparatus provided in an embodiment of this application;

[0075] Figure 5 This is a schematic block diagram of a data transmission device provided in an embodiment of this application. Detailed Implementation

[0076] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0077] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0078] First, some of the terms used in the embodiments of this application will be explained to facilitate understanding by those skilled in the art.

[0079] IP stands for Internet Protocol, a network layer protocol in the TCP / IP architecture. The purpose of IP is to improve network scalability: firstly, to solve internet problems and achieve interconnection of large-scale, heterogeneous networks; and secondly, to separate the coupling between top-level network applications and underlying network technologies, facilitating their independent development. Based on end-to-end design principles, IP provides only one connectionless, unreliable, best-effort packet transmission service to hosts.

[0080] Port: An interface through which data is transferred between a computer and other devices (such as printers, mice, keyboards, or monitors), between networks, or between a computer and other directly connected computers.

[0081] SDK: Software Development Kit is generally a collection of development tools used by software engineers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.

[0082] This application is applied to scenarios involving data transmission. Specifically, when a system to be connected transmits data to a target system, the data transmission format can be converted to enable connection between different systems and complete the data transmission between them.

[0083] However, currently, the main method used for data transmission during system integration is to develop customized programs, adapt them to different systems, and then use these customized programs to achieve data transmission between different systems. This data transmission requires configuring a large amount of configuration data, resulting in redundant development logic and significant development time.

[0084] For example, in various business scenarios, there are numerous requests for clients' financial systems to interface with target systems within the target domain. However, during this integration process, the target system needs specific adaptations for different financial systems, including adaptation of financial master data and voucher information. This adaptation generates a significant amount of redundant development logic, a lengthy development cycle, and impacts the capabilities of Fenbeitong's own products. For specific examples, please refer to... Figure 1 Specific traditional data transmission methods.

[0085] Please refer to Figure 1 , Figure 1 A schematic diagram of a traditional system interfacing method provided in this application embodiment, as shown below. Figure 1 The methods shown include:

[0086] The financial systems of User 1, User 2, User 3, User 4, and User 5 each developed customized programs to interface with the target system, enabling the transmission of basic data, voucher data, and other data, thus achieving the effect of data transmission between different systems in different data formats.

[0087] To address this, this application acquires the data to be interfaced from the system to be interfaced and the configuration source data from the target system. The system to be interfaced is one of multiple systems with different data formats, and these formats differ from the target system's data format. The data to be interfaced and the configuration source data are parsed using a script according to a preset template to obtain interface data in a format compatible with the target system. The preset templates for different systems have the same format, but the configuration content within the templates differs. The interface data is then transmitted to the target system. By parsing the data to be interfaced according to the preset template into data with the same storage format as the target system, simultaneous interface integration between different systems and data transmission between them can be achieved. This method improves the efficiency of program development during data transmission.

[0088] In this embodiment of the application, the executing entity can be a data transmission device in a data transmission system. In practical applications, the data transmission device can be an electronic device such as a system interface device, a terminal device, or a server, and there are no restrictions on this.

[0089] The following is combined with Figure 2 The data transmission method of the embodiments of this application will be described in detail.

[0090] Please refer to Figure 2 , Figure 2 A flowchart of a data transmission method provided in an embodiment of this application is shown below. Figure 2 The data transmission methods shown include:

[0091] Step 210: Obtain the data to be integrated from the system to be integrated and the configuration source data from the target system.

[0092] The system to be integrated is one of multiple systems, each with different data formats, and these formats differ from the target system's data format. These multiple systems can be systems used by different client companies, such as financial and business systems. The target system is the user's own system. The data to be integrated can be customer billing data, insurance policy data, final payment data, and virtual card expense report data, etc., and this application is not limited to these.

[0093] In some embodiments of this application, the configuration source data includes at least one of the following: the target system's system identifier, interface address, interface data, request method, request type, timeout period, header configuration, and version management.

[0094] In the above process, this application uses one or more configuration source data of the target system to transmit data after parsing, ensuring that the data transmission is purposeful.

[0095] The system identifier can be the name or number of the user system. The interface address (interface IP) is the interface of the user system used for data transmission during system integration. The interface data (port) is the interface data of the user system used for data transmission during system integration. The request method can be via network IP or Bluetooth IP, etc. The request type can be the type of network request, such as HTTP / Web Service. The timeout period can be a timeout period set by the user according to their needs. The header configuration contains information needed to display parsed content during parsing. Version management includes generating new versions, coordinating and managing various versions, effectively recording the evolution process of different versions, and effectively managing different versions.

[0096] In some embodiments of this application, before obtaining the data to be interfaced in the system to be interfaced and the configuration source data of the target system, Figure 2The method also includes: configuring the template format of the input parameter template and output parameter template in the preset template according to preset rules; using detection data to detect the input parameter template and output parameter template to determine whether the input parameter template and output parameter template are usable templates; when the preset template is determined to be a usable template, the input parameter template and output parameter template are determined to be preset templates.

[0097] In the above process, this application can confirm whether the configured preset template can complete the parsing of data in different data formats by testing the preset template. After the test is passed, the preset template after the test can be used as a usable module.

[0098] The preset rules can be the rules configured in the preset template, which can be used to specify the type of data stored in the template. For example, the formats of the input parameter template and the output parameter template can be configured. The input parameter template can include at least one of the target system's system identifier, interface identifier, input parameter template, and version management; the output parameter template can include at least one of the target system's system identifier, interface identifier, output parameter template, and version management, etc. This application is not limited to this.

[0099] In some embodiments of this application, the input parameter template and output parameter template are tested using detection data to determine whether they are usable templates. This includes: configuring the detection data and configuration source data according to the format of the input parameter template to obtain input parameter data, wherein the detection data includes one or more data to be connected to the system to be connected and one or more standard connection data corresponding to the one or more data to be connected; parsing the input parameter data according to the format of the output parameter template to obtain multiple connection data; comparing the multiple connection data with one or more standard connection data to obtain a comparison result; and determining whether the input parameter template and output parameter template are usable templates based on the comparison result.

[0100] In the above process, this application compares the data parsed from the preset template with the standard data, and then confirms whether the preset template is usable based on the comparison results, thus ensuring the accuracy of the preset template.

[0101] The test data can be data stored in multiple random customer systems, such as financial bills stored in a company's financial system. The test data also includes standard data in the same format as the target system. The standard format is the same as the data to be integrated, only the format is different.

[0102] In addition, based on the comparison results, it is determined whether the input parameter template and the output parameter template are usable templates, including: if the comparison results show that the data format of the docking data and the corresponding standard docking data are the same, then the input parameter template and the output parameter template are determined to be usable templates; if the comparison results show that the data format of the docking data and the corresponding standard docking data are different, then the input parameter template and the output parameter template are determined to be unusable templates.

[0103] Step 220: Parse the data to be connected and the configuration source data according to the preset template using a script to obtain the data in the target system's compatible format.

[0104] The preset templates for different systems to be integrated share the same format, but the content configured within these templates differs. The target system adaptation format can be the data format in which the target system stores its data.

[0105] In some embodiments of this application, the preset template includes: an input parameter template and an output parameter template; the input parameter template includes at least one of the target system's system identifier, interface identifier, input parameter template, and version management; the output parameter template includes at least one of the target system's system identifier, interface identifier, output parameter template, and version management.

[0106] In the above process, this application stores data in different formats through preset input and output parameter templates. By parsing the data, the format conversion of different data formats can be realized, thereby enabling the connection between different systems.

[0107] The system identifier can be the name or number of the user system. The interface identifier can be the interface of the user system used for data transmission during system integration. The input parameter template is the data format of the data to be integrated, and the output parameter template is the data format of the integrated data. Version management includes generating new versions, coordinating and managing various versions, effectively recording the evolution process of different versions, and effectively managing different versions.

[0108] In some embodiments of this application, the data to be interfaced and the configuration source data are parsed according to a preset template to obtain interface data in a target system-compatible format. This includes: storing the interface data and the configuration source data according to the input parameter template format to obtain input parameter template data, wherein the input parameter template data includes at least one of the data to be interfaced in a preset format, the system identifier of the target system, the interface identifier of the target system, and version management data; and parsing the input parameter template data according to the output parameter template format to obtain interface data, wherein the interface data includes at least one of the interface data in a target system-compatible format, the system identifier, the interface identifier, and version management data.

[0109] In the above process, this application parses the data stored in the input parameter template into data of the corresponding format in the output parameter template. After completing the data conversion, the system can be connected and the data can be transmitted.

[0110] In some embodiments of this application, the data to be connected and the configuration source data are parsed by script according to a preset template to obtain the connection data in the target system adapted format. This includes: parsing the data to be connected and the configuration source data according to a preset template by script, and detecting the parsing results to obtain the detection results; if the detection results show that the parsing is successful, the connection data is generated; if the detection results show that the parsing fails, the parsing error is displayed and an alarm is triggered.

[0111] In the above process, if the parsing is successful, the data transmission can be completed directly. If the parsing fails, an alarm will be displayed to provide a warning to the user.

[0112] The script can be a user-developed parsing script or a parsing script directly obtained from the system or other devices. The parsing result can be a comparison between the parsed data and the standard parsed data; if they are the same, parsing is successful; otherwise, parsing fails. If the detection result indicates parsing failure, after displaying a parsing exception and issuing an alarm, it also includes: displaying the specific reason for the parsing exception, such as whether it is a template error or a system error, including the reason for the template or system error, and providing specific solutions, or performing self-repair based on the specific error cause.

[0113] Step 230: Transmit the docking data to the target system.

[0114] In some embodiments of this application, after the docking data is transmitted to the target system, Figure 2 The method also includes recording at least one of the following: the time of data transmission, the user requesting data transmission, the content of the data to be connected, and the content of the data to be connected.

[0115] In the above process, by recording the aforementioned data, this application can facilitate users' subsequent querying of access records and transmitted data content.

[0116] The data transmission time can be either the time of successful data transmission or the time of data transmission failure. After recording the above data, users of the target system can directly query the data stored in the system of the user to be connected when using the target system. This includes at least one of the following: the time of data transmission, the user requesting data transmission, the content of the data to be connected, and the content of the connected data. This allows users to query the data stored in other customers' systems using their own systems.

[0117] In the above Figure 2In the process described, this application acquires the data to be interfaced from the system to be interfaced and the configuration source data of the target system. The system to be interfaced is one of multiple systems with different data formats, and the data formats of these systems differ from those of the target system. The data to be interfaced and the configuration source data are parsed using a script according to a preset template to obtain interface data in a format compatible with the target system. The preset templates for different systems have the same format, but the configuration content within the preset templates differs. The interface data is then stored and transmitted to the target system. By parsing the data to be interfaced according to the preset template into data with the same storage format as the target system, the interface between different systems can be achieved simultaneously, and data transmission between different systems can be completed. This method can improve the efficiency of program development during data transmission.

[0118] The previous text passed Figures 1-2 The method of data transmission is described below, in conjunction with... Figure 3 The data transmission system of the embodiments of this application will be described in detail.

[0119] Please refer to Figure 3 , Figure 3 This is a schematic diagram of a data transmission system provided in an embodiment of this application, such as... Figure 3 The data transmission system shown includes:

[0120] The module includes an SDK module, a data source configuration module, an input parameter template module, an output parameter template module, a data source version management module, an input parameter script parsing module, an output parameter script parsing module, an exception alarm module, a configuration grayscale module, and a logging module.

[0121] The SDK module is used to create a data source configuration module, an input parameter template module, an output parameter template module, a data source version management module, an input parameter script parsing module, an output parameter script parsing module, an exception alarm module, a configuration grayscale module, and a logging module.

[0122] The data source configuration module is used to configure the source data.

[0123] The input parameter template module is used to generate input parameter templates and set the format of input parameter data;

[0124] The output parameter template module is used to generate output parameter templates and set the format of output parameter data;

[0125] The data source version management module is used for version updates, managing various versions, effectively recording the evolution process of different versions, and effectively managing different versions.

[0126] The input parameter script parsing module is used to store the docking data and configuration source data according to the input parameter template format to obtain the input parameter template data;

[0127] The output parameter script parsing module is used to parse the input parameter template data according to the format of the output parameter template to obtain the docking data;

[0128] The anomaly alarm module is used to parse the data to be connected and the configuration source data according to the preset template, and to detect the parsing results. If the detection result shows that the parsing failed, the parsing anomaly will be displayed and an alarm will be triggered.

[0129] Configure the grayscale module to configure the template format of the input and output templates in the preset template according to preset rules; use the detection data to detect the input and output templates to determine whether the input and output templates are usable templates;

[0130] The log module is used to record at least one of the following: the time of data transmission, the user requesting the data transmission, the content of the data to be connected, and the content of the data to be connected.

[0131] For details on the specific functions of the above modules, please refer to [link / reference]. Figure 2 The specific steps of the method shown are explained in the text, and will not be repeated here.

[0132] The output parameter script parsing module is used to parse the input parameter template data according to the format of the output parameter template to obtain the docking data;

[0133] Please refer to Figure 4 This is a schematic block diagram of a data transmission device 400 provided in an embodiment of this application. The device 400 may be a module, program segment, or code on an electronic device. This device 400 is related to the above... Figure 2 The method implementation corresponds to this and can be executed. Figure 2 The various steps involved in the method embodiment, and the specific functions of the device 400, can be found in the following description. To avoid repetition, detailed descriptions are omitted here.

[0134] Optionally, the device 400 includes:

[0135] The acquisition module 410 is used to acquire the data to be connected in the system to be connected and the configuration source data of the target system. The system to be connected is one of multiple systems to be connected. The data formats of the multiple systems to be connected are different, and the data formats of the multiple systems to be connected are different from those of the target system.

[0136] The parsing module 420 is used to parse the data to be connected and the configuration source data according to the preset template to obtain the connection data in the target system adapted format. The preset templates for different systems to be connected have the same format, but the configuration content in the preset templates for different systems to be connected is different.

[0137] The transmission module 430 is used to transmit docked data to the target system.

[0138] Optional, preset templates include:

[0139] Input parameter template and output parameter template; the input parameter template includes at least one of the target system's system identifier, interface identifier, input parameter template, and version management; the output parameter template includes at least one of the target system's system identifier, interface identifier, output parameter template, and version management.

[0140] Optionally, the parsing module is specifically used for:

[0141] The docking data and configuration source data are stored according to the input parameter template format to obtain input parameter template data. The input parameter template data includes at least one of the following: docking data in a preset format, system identifier of the target system, interface identifier of the target system, and version management data. The input parameter template data is parsed according to the output parameter template format to obtain docking data. The docking data includes at least one of the following: docking data in the target system adaptation format, system identifier, interface identifier, and version management data.

[0142] Optionally, the device further includes:

[0143] The detection module is used to configure the template format of the input parameter template and output parameter template in the preset template according to preset rules before the parsing module obtains the data to be connected in the system to be connected and the configuration source data of the target system; to detect the input parameter template and output parameter template using the detection data to determine whether the input parameter template and output parameter template are usable templates; and to determine that the preset template is a usable template when it is determined that the input parameter template and output parameter template are preset templates.

[0144] Optionally, the detection module is specifically used for:

[0145] Configure the detection data and configuration source data according to the input parameter template to obtain the input parameter data. The detection data includes one or more data to be connected to the system to be connected and one or more standard connection data corresponding to the one or more data to be connected. Parse the input parameter data according to the output parameter template to obtain multiple connection data. Compare the multiple connection data with one or more standard connection data to obtain the comparison result. Based on the comparison result, determine whether the input parameter template and the output parameter template are usable templates.

[0146] Optional, configure source data, including:

[0147] The target system's system identifier, interface address, interface data, request method, request type, timeout, header configuration, and version management are at least one of the following:

[0148] Optionally, the parsing module is specifically used for:

[0149] The script parses the data to be connected and the configuration source data according to the preset template, and checks the parsing results. If the check result shows that the parsing is successful, the connection data is generated; if the check result shows that the parsing fails, the parsing error is displayed and an alarm is triggered.

[0150] Optionally, the device further includes:

[0151] The recording module is used to record at least one of the following after the transmission module transmits the docking data to the target system: the time of data transmission, the user who requested the data transmission, the content of the data to be docked, and the content of the docking data.

[0152] Please refer to Figure 5 This is a schematic block diagram of a data transmission device 500 provided in an embodiment of this application. The device may include a memory 510 and a processor 520. Optionally, the device may further include a communication interface 530 and a communication bus 540. This device is similar to the one described above. Figure 2 The method implementation corresponds to this and can be executed. Figure 2 The specific functions of the device involved in the method embodiments can be found in the following description.

[0153] Specifically, memory 510 is used to store computer-readable instructions.

[0154] Processor 520 is used to process readable instructions stored in memory and is capable of executing... Figure 2 Each step in the method.

[0155] The communication interface 530 is used for signaling or data communication with other node devices. For example, it is used for communication with a server or terminal, or for communication with other device nodes, but the embodiments of this application are not limited thereto.

[0156] Communication bus 540 is used to enable direct communication between the above components.

[0157] In this embodiment, the communication interface 530 of the device is used for signaling or data communication with other node devices. The memory 510 can be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 510 can also be at least one storage device located remotely from the aforementioned processor. The memory 510 stores computer-readable instructions, which, when executed by the processor 520, enable the electronic device to perform the aforementioned... Figure 2The method process is shown. Processor 520 can be used on device 400 and is used to perform the functions described in this application. Exemplarily, the processor 520 described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components; the embodiments of this application are not limited thereto.

[0158] This application embodiment also provides a readable storage medium, wherein when the computer program is executed by a processor, it performs the following... Figure 2 The method process executed by the electronic device in the illustrated method embodiment.

[0159] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.

[0160] In summary, embodiments of this application provide a method, apparatus, electronic device, and readable storage medium for data transmission. The method includes: acquiring data to be connected from a system to be connected and configuration source data from a target system, wherein the system to be connected is one of multiple systems to be connected, the data formats of the multiple systems to be connected are different, and the data formats of the multiple systems to be connected are different from those of the target system; parsing the data to be connected and the configuration source data according to a preset template using a script to obtain connection data in a format compatible with the target system, wherein the preset templates corresponding to different systems to be connected have the same format, but the configuration content in the preset templates corresponding to different systems to be connected is different; and transmitting the connection data to the target system. This method can improve the efficiency of program development during data transmission.

[0161] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a 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 those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0162] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0163] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the format of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0164] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0165] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0166] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for data transmission, characterized in that, include: Obtain the data to be connected from the system to be connected and the configuration source data of the target system. The system to be connected is one of multiple systems to be connected, the data formats of the multiple systems to be connected are different, and the data formats of the multiple systems to be connected are different from those of the target system. The data to be connected and the configuration source data are parsed by script according to the preset template to obtain the connection data in the target system adapted format. The preset templates for different systems to be connected have the same format, but the content configured in the preset templates for different systems to be connected is different. The docking data is transmitted to the target system; The preset template includes: Input parameter template and output parameter template; The input parameter template includes at least one of the following: the target system's system identifier, interface identifier, input parameter template, and version management. The output parameter template includes at least one of the following: the target system's system identifier, interface identifier, output parameter template, and version management. The step of parsing the data to be interfaced and the configuration source data according to a preset template to obtain interface data in a format compatible with the target system includes: The data to be connected and the configuration source data are stored in the format of the input parameter template to obtain the input parameter template data. The input parameter template data includes at least one of the following: the data to be connected in a preset format, the system identifier of the target system, the interface identifier of the target system, and version management data. The input parameter template data is parsed according to the output parameter template format to obtain the docking data, wherein the docking data includes at least one of the docking data in the target system adaptation format, system identifier, interface identifier, and version management data.

2. The method according to claim 1, characterized in that, Before acquiring the data to be interfaced in the system to be interfaced and the configuration source data of the target system, the method further includes: Configure the template format of the input parameter template and output parameter template in the preset template according to the preset rules; The input parameter template and the output parameter template are tested using the detection data to determine whether the input parameter template and the output parameter template are usable templates; When the preset template is determined to be an available template, the input parameter template and the output parameter template are determined to be the preset template.

3. The method according to claim 2, characterized in that, The step of using detection data to detect the input parameter template and the output parameter template to determine whether the input parameter template and the output parameter template are usable templates includes: The detection data and the configuration source data are configured according to the format of the input parameter template to obtain the input parameter data, wherein the detection data includes one or more data to be connected to the system to be connected and one or more standard connection data corresponding to the one or more data to be connected; The input parameter data is parsed according to the format of the output parameter template to obtain multiple docking data; The multiple docking data and the one or more standard docking data are compared to obtain the comparison result; Based on the comparison results, determine whether the input parameter template and the output parameter template are usable templates.

4. The method according to claim 1, characterized in that, The configuration source data includes: The target system's system identifier, interface address, interface data, request method, request type, timeout, header configuration, and version management are at least one of the following:

5. The method according to claim 1, characterized in that, The step of parsing the data to be interfaced and the configuration source data according to a preset template to obtain interface data in a format compatible with the target system includes: The data to be connected and the configuration source data are parsed by script according to a preset template, and the parsing results are detected to obtain the detection results; If the detection result indicates successful parsing, the docking data is generated; If the detection result indicates that the parsing failed, an parsing error will be displayed and an alarm will be triggered.

6. The method according to claim 1, characterized in that, After transmitting the docking data to the target system, the method further includes: Record at least one of the following: the time of data transmission, the user requesting data transmission, the content of the data to be connected, and the content of the data to be connected.

7. A data transmission apparatus, characterized in that, include: The acquisition module is used to acquire the data to be connected in the system to be connected and the configuration source data of the target system. The system to be connected is one of multiple systems to be connected, the data formats of the multiple systems to be connected are different, and the data formats of the multiple systems to be connected are different from those of the target system. The parsing module is used to parse the data to be connected and the configuration source data according to a preset template to obtain the connection data in the target system adapted format. The preset templates for different systems to be connected have the same format, but the content configured in the preset templates for different systems to be connected is different. A transmission module is used to transmit the docked data to the target system; Preset templates, including input parameter templates and output parameter templates; The input parameter template includes at least one of the following: the target system's system identifier, interface identifier, input parameter template, and version management. The output parameter template includes at least one of the following: the target system's system identifier, interface identifier, output parameter template, and version management. The parsing module is specifically used for: storing the docking data and the configuration source data according to the input parameter template format to obtain input parameter template data, wherein the input parameter template data includes at least one of the following: docking data in a preset format, the system identifier of the target system, the interface identifier of the target system, and version management data; and parsing the input parameter template data according to the output parameter template format to obtain the docking data, wherein the docking data includes at least one of the following: docking data in the target system adaptation format, the system identifier, the interface identifier, and version management data.

8. An electronic device, characterized in that, include: A memory and a processor, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, include: A computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data processing method, device, electronic equipment and storage medium

    CN112860798A

  • Multi-platform docking method and device, electronic equipment and computer readable medium

    CN114721704A