CN-121979519-A - Data docking method and related equipment
Abstract
The application relates to the technical field of computers, and discloses a data docking method and related equipment, wherein the data docking method and related equipment can acquire a data file of a first platform under a first data structure model and acquire a template file matched with a second data structure model of a second platform; calling a docking script generation model, and generating a data docking script based on the data file and the template file, wherein the data docking script is used for converting the file of the first data structure model into the file of the second data structure model; and storing the relation information between the platform information of the first platform and the data docking script so as to dock the data based on the stored relation information. The data docking method provided by the application can adapt to complex service scenes and docking requirements, and the second platform can be compatible with different external first platforms, so that a larger service range is realized.
Inventors
- ZHANG FAN
Assignees
- 成都鸿合爱课堂科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251230
Claims (10)
- 1. A method of data interfacing, comprising: acquiring a data file of a first platform under a first data structure model, and acquiring a template file matched with a second data structure model of a second platform; Calling a docking script generation model, and generating a data docking script based on the data file and the template file, wherein the data docking script is used for converting the file of the first data structure model into the file of the second data structure model; And storing the relation information between the platform information of the first platform and the data docking script so as to dock the data based on the stored relation information.
- 2. The method according to claim 1, wherein the method further comprises: When detecting that a target first platform requests data docking to the second platform, acquiring platform information of the target first platform and a source file under the first data structure model, which is needed to be docked by the target first platform; determining a target data docking script corresponding to the target first platform based on the stored relation information and platform information of the target first platform, wherein the target first platform is any first platform; Processing the source file based on the target data and the script to generate a target file adapting to the second platform; and carrying out data importing processing of the target file to the second platform.
- 3. The method of claim 1, wherein the invoking the docking script generation model to generate a data docking script based on the data file and the template file comprises: constructing a script to generate prompt information; Calling a docking script generation model, generating prompt information based on the script, and identifying a data structure model for the data file and the template file; And performing differential analysis on the identified data structure model through the docking script generation model to generate a data docking script for the first platform.
- 4. The method of claim 1, wherein the invoking the docking script generation model, prior to generating the data docking script based on the data file and the template file, further comprises: Acquiring training data, wherein the training data comprises a sample source file of a reference platform; Generating a model through a docking script, and generating a docking script based on the sample source file and the template file; processing the sample source file based on the docking script to obtain an actual target docking file; and adjusting parameters of the docking script generation model according to the loss information between the actual target docking file and the template file to obtain a trained docking script generation model.
- 5. The method of claim 1, wherein the invoking the docking script generation model to generate a data docking script based on the data file and the template file comprises: performing abnormal content detection processing on the data file; setting a script to generate specification information after passing detection processing; And calling a docking script generation model, and generating a data docking script aiming at the first platform under the script generation specification information based on the data file and the template file.
- 6. The method of claim 1, wherein prior to storing the relationship information between the platform information of the first platform and the data docking script, further comprising: Performing script code execution operation on the data docking script to obtain an execution result; Checking the data docking script according to the execution result; the storing the platform information of the first platform and the relation information between the data docking script includes: and after the verification is passed, storing the platform information of the first platform and the relation information between the data docking script.
- 7. The method of claim 2, wherein storing the relationship information between the platform information of the first platform and the data docking script comprises: establishing relation information between the platform information and the data docking script; Based on a preset transmission protocol, storing the relation information in a preset database of the second platform; The determining, based on the stored relationship information and the platform information of the target first platform, a target data docking script corresponding to the target first platform includes: And searching a target data docking script corresponding to the target first platform in the preset database based on the platform information of the target first platform.
- 8. A data docking apparatus, comprising: The acquisition unit is used for acquiring a data file of the first platform under the first data structure model and acquiring a template file matched with the second data structure model of the second platform; the script generation unit is used for calling a docking script generation model, generating a data docking script based on the data file and the template file, wherein the data docking script is used for converting the file of the first data structure model into the file of the second data structure model; And the storage unit is used for storing the platform information of the first platform and the relation information between the data docking script so as to dock the data based on the stored relation information.
- 9. An electronic device comprising a memory storing an application and a processor for running the application in the memory to perform the operations in the data interfacing method of any one of claims 1 to 7.
- 10. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the data interfacing method of any one of claims 1 to 7.
Description
Data docking method and related equipment Technical Field The application relates to the technical field of computers, in particular to a data docking method and related equipment. Background In a business scenario, a business service platform often needs to interface with external platforms of other third parties. In the related art, a service platform is required to provide a data docking interface, and an external platform for docking can automatically conduct data import by using a program according to strict data providing format requirements. The data structure model of the interface provided by the service platform is generally fixed and is suitable for most service application scenes. However, due to the diversification of the external platforms for docking, the original data of many external platforms do not have the capability of directly docking with the service platform, which requires the related software engineers of the external platforms to modify the original data, and some platforms do not have the related capability personnel to process and improve the standard data required by the interface, which makes the docking limitation larger, wastes a great amount of manpower and material resources, limits the platform opening capability and the partner access wish, and is unfavorable for the development of the service platform. Disclosure of Invention The embodiment of the application provides a data docking method and related equipment, wherein the related equipment can comprise a data docking device, electronic equipment and a computer readable storage medium. The embodiment of the application provides a data docking method, which comprises the following steps: acquiring a data file of a first platform under a first data structure model, and acquiring a template file matched with a second data structure model of a second platform; Calling a docking script generation model, and generating a data docking script based on the data file and the template file, wherein the data docking script is used for converting the file of the first data structure model into the file of the second data structure model; And storing the relation information between the platform information of the first platform and the data docking script so as to dock the data based on the stored relation information. Correspondingly, an embodiment of the present application provides a data docking device, including: The acquisition unit is used for acquiring a data file of the first platform under the first data structure model and acquiring a template file matched with the second data structure model of the second platform; the script generation unit is used for calling a docking script generation model, generating a data docking script based on the data file and the template file, wherein the data docking script is used for converting the file of the first data structure model into the file of the second data structure model; And the storage unit is used for storing the platform information of the first platform and the relation information between the data docking script so as to dock the data based on the stored relation information. Optionally, in some embodiments of the present application, the data docking device may further include a data acquisition unit, a script determination unit, a generation unit, and an import unit, as follows: The data acquisition unit is used for acquiring platform information of the target first platform and a source file, which is needed to be docked by the target first platform, under the first data structure model when the target first platform requests data docking to the second platform; The script determining unit is used for determining a target data docking script corresponding to the target first platform based on the stored relation information and the platform information of the target first platform, wherein the target first platform is any first platform; the generating unit is used for processing the source file based on the target data and the script and generating a target file adapting to the second platform; And the importing unit is used for importing the data of the target file to the second platform. Optionally, in some embodiments of the present application, the script generating unit includes a hint building subunit, a data structure identifying subunit, and a script generating subunit, as follows: the prompt construction subunit is used for constructing a script to generate prompt information; the data structure identification subunit is used for calling a docking script generation model, generating prompt information based on the script, and identifying the data structure model for the data file and the template file; and the script generation subunit is used for performing difference analysis on the identified data structure model through the docking script generation model so as to generate the data docking script for the first platform. Optionally, in some embodiments