Data integration method and device, equipment and readable storage medium
By obtaining API configuration requests, determining the integration field and intermediate table fields, generating the target API, and realizing data integration, it solves the problem of low API development efficiency in the existing technology and improves data integration efficiency, especially when integrating the two-open field. Fast API configuration and data integration are implemented.
Patent Information
- Application Number
- CN202411165047.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, when the source system integrates data to the target system, it is necessary to call different APIs of the target system and record the mapping relationship between business tables, resulting in low API development efficiency and low data integration efficiency.
By obtaining API configuration requests, determine the integration field, generate the intermediate table field, and generate the target API according to the intermediate table field, obtain the target integration data in response to the trigger of the target API, integrate the data into the intermediate table of the target API, and determine the target writing according to the scenario Interface, write data to target business tables, realizing fast API configuration and data integration.
It improves API development efficiency and data integration efficiency, especially when integrating two-open fields, it can quickly configure APIs to achieve rapid data integration, reducing the complexity of code development.
Smart Images

Figure CN119166701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data integration, and in particular to a data integration method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Data integration is one of the important means for modern enterprises to achieve data sharing and business collaboration. Through data integration, enterprises can use data resources more efficiently and improve business analysis and decision support capabilities. Application Programming Interface (API) is a set of predefined functions that aims to provide application and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism.
[0003] In the related art, when a source system integrates data into a target system, it is necessary to call different APIs of the target system to write data after the source system identifies scenarios such as addition, update, and deletion. In addition, it is necessary to record the mapping relationship between the business tables in the source system and the target system in the source system to distinguish between addition and update scenarios. When it comes to integration of two open fields, it is necessary to rewrite the code to develop the corresponding API. The API development efficiency is low, resulting in low data integration efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a data integration method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve data integration efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides a data integration method, comprising:
[0006] Get the API configuration request;
[0007] Determining integration fields according to the API configuration request;
[0008] Determine the intermediate table field of the intermediate table according to the integrated field;
[0009] Generate a target API corresponding to the API configuration request according to the intermediate table fields;
[0010] In response to triggering the target API, acquiring target integration data;
[0011] The target integrated data is integrated.
[0012] In one embodiment, determining the integration field according to the API configuration request includes:
[0013] Acquire a business entity table corresponding to the API configuration request; and determine the integration field according to the business entity table.
[0014] In one embodiment, determining the intermediate table field of the intermediate table according to the integrated field includes:
[0015] According to the field attribute corresponding to the integrated field, the intermediate table field of the intermediate table is determined.
[0016] In one embodiment, integrating the target integrated data includes:
[0017] Writing the target integration data into the intermediate table corresponding to the target API;
[0018] Determining a target scenario adapted to the target integrated data according to a field value of a target field in the intermediate table;
[0019] A corresponding target write interface is determined according to the target scenario, and the data written into the intermediate table is written into the target business table through the target write interface.
[0020] In one embodiment, determining the corresponding target writing interface according to the target scene includes:
[0021] Acquire a mapping relationship between a source system and a corresponding target business table; the source system is a system corresponding to the generation of the target integrated data;
[0022] Determining a target adapter according to the target scenario and the mapping relationship;
[0023] A corresponding target write interface is determined according to the target adapter.
[0024] In one embodiment, the method further comprises:
[0025] Generate data integration logs;
[0026] If the integration status in the data integration log is integration failure, the position corresponding to the integration failure is determined according to the intermediate table data.
[0027] In a second aspect, the present application also provides a data integration device, comprising:
[0028] A configuration request acquisition module is used to obtain an application programming interface API configuration request;
[0029] An integration field determination module, used to determine the integration field according to the API configuration request;
[0030] An intermediate table field determination module, used to determine the intermediate table field of the intermediate table according to the integrated field;
[0031] A target API generation module, used to generate a target API corresponding to the API configuration request according to the intermediate table fields;
[0032] An integrated data acquisition module, configured to acquire target integrated data in response to triggering the target API;
[0033] The data integration module is used to integrate the target integration data.
[0034] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the data integration method of the first aspect when executing the computer program.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the data integration method of the first aspect.
[0036] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the data integration method of the first aspect.
[0037] The above-mentioned data integration method, apparatus, computer equipment, computer-readable storage medium and computer program product obtain an API configuration request, determine the integration field according to the API configuration request, determine the intermediate table field of the intermediate table according to the integration field, generate a target API corresponding to the API configuration request according to the intermediate table field, and obtain the target integration data in response to the triggering of the target API. The target integration data is integrated, and the corresponding API can be generated by configuration, avoiding the development of API through complicated codes, and can improve the development efficiency of API. In the process of calling API for data integration, if the integration of two open fields is involved, the corresponding API can be quickly configured to realize the data integration of the two open fields, thereby improving the efficiency of data integration. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] FIG1 is an application environment diagram of a data integration method in one embodiment;
[0040] FIG2 is a schematic diagram of a flow chart of a data integration method in one embodiment;
[0041] FIG3 is a schematic diagram of a process of integrating target integrated data in one embodiment;
[0042] FIG4 is a schematic diagram of a target scenario adaptation process of personnel master data in one embodiment;
[0043] FIG5 is a schematic diagram of a target scenario adaptation process of job master data in one embodiment;
[0044] FIG6 is a schematic diagram of a flow chart of a data integration method in another embodiment;
[0045] FIG7 is a schematic diagram of a flow chart of a data integration method in another embodiment;
[0046] FIG8 is a block diagram of a data integration device in one embodiment;
[0047] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] The data integration method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. For example, the server 104 obtains the API configuration request sent by the terminal 102, the server 104 determines the integration field according to the API configuration request, determines the intermediate table field of the intermediate table according to the integration field, and generates a target API corresponding to the API configuration request according to the intermediate table field. The server 104 responds to the triggering of the target API, obtains the target integration data, and integrates the target integration data.
[0050] Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The data integration method provided in the embodiment of the present application is not limited to the application scenario in which the above-mentioned server interacts with the terminal, but can also be applied separately to the application scenario corresponding to the terminal or server, and can also be applied to the interaction scenario between the terminal and the terminal, or the interaction scenario between the server and the server.
[0051] In an exemplary embodiment, as shown in FIG2 , a data integration method is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps 202 to 212. Among them:
[0052] Step 202: Obtain an application programming interface (API) configuration request.
[0053] APIs are predefined functions that aim to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the internal working mechanism, and without involving the specific operations of the application during actual implementation.
[0054] In the case of an API configuration requirement, an API configuration request is initiated. Exemplarily, the API configuration request can be obtained by responding to a trigger of a configuration control. Optionally, the API configuration request includes the configuration requirement of the API, and the configuration requirement of the API includes, for example, a corresponding business entity, and the business entity includes a business entity table, which is a table that can represent a specific meaning.
[0055] Step 204: Determine the integration field according to the API configuration request.
[0056] Integration fields refer to fields that need to be integrated. Integration fields can be fields integrated during data integration through the corresponding API. The API configuration request can include fields that need to be integrated, and the integration fields can be obtained according to the API configuration request. In other words, the integration fields can be directly listed in the API configuration request or obtained according to the API configuration request.
[0057] Optionally, the API configuration request includes a business entity object, a corresponding business entity table is obtained according to the business entity object, and the integration field is determined according to the fields in the business entity table.
[0058] Step 206, determining the intermediate table field of the intermediate table according to the integrated field.
[0059] The intermediate table is the intermediate table corresponding to the configured target API, and the intermediate table is used to record the intermediate data when performing data integration. One target API corresponds to one intermediate table, that is, there is a one-to-one correspondence between the target API and the intermediate table. It can be understood that when configuring the API, the intermediate table field of the intermediate table is determined according to the integration field, so that when performing data integration, the integrated data is stored in the intermediate table according to the intermediate table field.
[0060] Optionally, you can filter out the intermediate table fields from the integrated fields according to the field attributes of the integrated fields. For example, you can use the integrated fields whose field attributes are target attributes as the intermediate table fields. You can also directly use the integrated fields as the intermediate table fields of the intermediate table.
[0061] Step 208: Generate a target API corresponding to the API configuration request according to the intermediate table fields.
[0062] After obtaining the intermediate table fields, the corresponding target API can be generated according to the intermediate table fields. One intermediate table field corresponds to one target API, that is, there is a one-to-one correspondence between the intermediate table fields and the target API. It can be understood that generating the target API corresponding to the API configuration request according to the intermediate table fields can be implemented in an existing manner, and no specific limitation is made here.
[0063] Optionally, after generating a target API corresponding to the API configuration request, the target API may also be published, and the target API may be published to a front end to facilitate users to call the target API.
[0064] Step 210: Responding to triggering the target API, obtaining target integration data.
[0065] Target integration data refers to the data integrated through the target API.
[0066] The user calls the API, and the server responds to the call trigger of the target API and obtains the target integrated data. The target integrated data can be the data input by the user, and the server obtains the target integrated data through the human-computer interaction interface. Among them, the target API can be any API.
[0067] In an optional application scenario, server A and server B are connected via a network. The system on server A calls a target API and sends target integration data to server B. Server B responds to the triggering of the target API, obtains the target integration data sent by server A, and can also obtain the address of the target integration data integrated into server B, such as a URL (Uniform Resource Locator) address.
[0068] Step 212, integrating the target integration data.
[0069] Integration can be understood as writing, integrating the target integrated data, that is, writing the target integrated data to the corresponding target address.
[0070] Optionally, the target integrated data may be first written into an intermediate table corresponding to the target API, and then a corresponding target write interface may be determined based on the intermediate table, and the data written into the intermediate table may be written into the target address based on the target write interface.
[0071] In the above data integration method, the integration field is determined through the API configuration request, the intermediate table field is determined according to the integration field, and then the target API corresponding to the API configuration request is generated according to the intermediate table field. In response to the triggering of the target API, the target integration data can be obtained and the target integration data can be integrated. That is, the corresponding API can be generated through field configuration, avoiding the development of API through complicated code, thereby improving the development efficiency of API. In the process of calling API for data integration, if the integration of two open fields is involved, the corresponding API can be quickly configured to realize the data integration corresponding to the two open fields, thereby improving the efficiency of data integration.
[0072] In some embodiments, step 204 of determining integration fields according to the API configuration request includes:
[0073] Get the business entity table corresponding to the API configuration request; determine the integration field based on the business entity table.
[0074] According to the API configuration request, the business entity table corresponding to the API configuration request is obtained, and the integration field is determined according to the field in the business entity table. In one example, the corresponding business entity table is obtained based on the API request, and the fields involved in the business entity table are used as integration fields. Among them, the business entity table is an entity object pre-stored in the server, and the corresponding integration field can be determined based on the corresponding entity object. The business entity table includes one or more tables. The business entity table can be input by the user, that is, the server obtains the business entity table from the human-computer interaction interface, or it can be obtained by responding to a user selection trigger.
[0075] By obtaining the business entity table corresponding to the API configuration request and determining the integration fields according to the business entity table, accurate and complete integration fields can be quickly obtained.
[0076] In an exemplary embodiment, step 206 of determining the intermediate table field of the intermediate table according to the integrated field includes:
[0077] Determine the intermediate table fields of the intermediate table based on the field attributes corresponding to the integrated fields.
[0078] In this embodiment, the integrated field may include multiple field attributes, and the intermediate table field of the intermediate table may be determined according to the target attribute of the integrated field, wherein the target attribute may be any one of the multiple field attributes.
[0079] In one example, the integrated field includes field attributes such as whether it is integrated, whether it is required, reference attributes, and whether to verify existence. The integrated field corresponding to the value of "yes" in the field attribute of "whether it is required" can be used as the intermediate table field of the intermediate table. As shown in Table 1 below, integrated fields such as administrative organization code, administrative organization name, department type, establishment date, and superior administrative organization in the integrated field can be used as intermediate table fields. In this example, "whether it is required" refers to whether the value of the corresponding integrated field is required; the reference attribute includes direct reference or coded reference. Direct reference refers to directly referencing the value corresponding to the integrated field when referencing, and coded reference refers to referencing the number corresponding to the integrated field when referencing; whether to verify existence refers to whether to verify the real existence of the corresponding integrated field.
[0080] Table 1
[0081]
[0082] It can be understood that the specific selected field attributes can be selected according to the actual application scenario, and different types of configuration requests can determine the corresponding intermediate table fields through different field attributes in the integrated field. For example, for type A configuration requests, the corresponding intermediate table fields can be determined by whether the field attributes in the integrated field are required; for type B configuration requests, the corresponding intermediate table fields can be determined by whether the field attributes are integrated and required.
[0083] In this embodiment, the intermediate table field of the intermediate table is determined according to the field attribute corresponding to the integrated field, and the integrated field that better matches the configuration request can be obtained as the intermediate table field, making the intermediate table field more accurate, thereby improving the accuracy of the API configuration.
[0084] In an exemplary embodiment, as shown in FIG. 3 , step 212 of integrating the target integrated data includes the following steps 302 to 306 , wherein:
[0085] Step 302: Write the target integration data into the intermediate table corresponding to the target API.
[0086] Among them, after the server obtains the target integration data, it writes the target integration data into the intermediate table according to the intermediate table fields corresponding to the target API. The intermediate table includes intermediate table fields, and the intermediate table fields are obtained based on the configuration fields during the configuration of the target API. Writing the target integration data into the intermediate table corresponding to the target API can be understood as selecting the values corresponding to the intermediate table fields from the target integration data and filling them in the intermediate table. One target API corresponds to one intermediate table, and the target API and the intermediate table are in a one-to-one correspondence.
[0087] Step 304: Determine a target scenario that is compatible with the target integrated data according to the field value of the target field in the intermediate table.
[0088] The target field can be any field in the intermediate table. The target field can be a field pre-specified by the user. For example, the target field can be an enable field, a parent field, or an identification field of the intermediate table. The target field can be set according to the actual application scenario. The target field can be different for different application scenarios. For example, if the target integrated data is personnel type data, the corresponding target field can be the employee number field. If the target integrated data is position type data, the corresponding target field can be the parent field. There can be multiple target fields. That is, the target scenario adapted to the target integrated data can be determined based on the field values of multiple target fields.
[0089] Optionally, the target scenario adapted to the target integrated data is determined based on the field value of the target field in the intermediate table. For example, if the target integrated data is personnel type data, it can be determined whether the employee number field has a value. If the employee number field has a value, it represents a scenario such as re-employment or intern conversion. If the employee number field has no value, the mapping relationship between the source system and the target business table is searched based on the source system. If the mapping relationship exists, it represents a job experience update scenario. If the mapping relationship does not exist, the mapping relationship is searched based on the new employee number. If the mapping relationship does not exist, it represents a new personnel scenario.
[0090] In one example, the target scenario adaptation process of personnel master data is shown in Figure 4. The source system calls the target API. The target system responds to the source system's call trigger on the target API and obtains the target integrated data sent by the source system. The target integrated data in this example is the personnel master data, and the personnel master data is written into the intermediate table. The server where the target system is located determines whether the old employee number in the intermediate table has a value. If the old employee number has a value, it means that the target scenario is a scenario such as re-employment or intern conversion. If the old employee number has no value, the mapping relationship between the source system and the target business table is searched according to the source system identifier. If the mapping relationship exists, it means that the target scenario is a job experience update scenario. In the scenario, the original four-layer person ID (identification) is used; if the mapping relationship does not exist, determine whether the mapping relationship exists based on the new work number. If the mapping relationship does not exist, it means that the target scenario is a new personnel scenario, and a new four-layer person ID needs to be constructed; if the mapping relationship exists, determine whether there is an in-service object based on the new work number. If there is an in-service object, it means that it is a new job experience scenario, and write the personnel master data into the target business table through the personal basic information maintenance interface, professional information maintenance interface, and job experience addition interface; if there is no in-service object, it means that it is a job number reuse scenario, and it is necessary to construct a natural person ID and an enterprise person ID, and recreate an organization person ID. Among them, the four-layer person ID includes the natural person ID, the enterprise person ID, the management scope ID, and the organization person ID.
[0091] In another example, the target scenario adaptation process of the position master data is shown in Figure 5. The new / update scenarios are distinguished according to the operation field in the intermediate table, the enable scenario and the disable scenario are distinguished according to the enable / disable field, and the superior change scenario or the information change scenario is distinguished according to the superior field. The corresponding adapted target scenarios include new addition scenario, deletion scenario, enable scenario, disable scenario, superior change scenario, information change scenario, enable + superior change scenario, enable + information change scenario, superior change + disable scenario, information change scenario, etc.
[0092] Step 306: determine the corresponding target write interface according to the target scenario, and write the data written in the intermediate table into the target business table through the target write interface.
[0093] In this embodiment, each target scenario corresponds to a corresponding target write interface. According to the correspondence between the target scenario and the target write interface, the corresponding target write interface can be determined based on the target scenario, so that the data written into the intermediate table can be written into the target business table through the target write interface. Among them, the target business table refers to the business table corresponding to the target integrated data, and the target business table is used to write the data written into the intermediate table. It can be understood that the correspondence between the target scenario and the target write interface can be stored in advance in the server. The target write interface is used to write the target integrated data written into the intermediate table to the target business table. The target business table refers to a basic table that can be used to implement business functions.
[0094] Optionally, the server may also obtain a mapping relationship between the source system and the target business table, and determine a corresponding target write interface according to the mapping relationship and the target scenario, thereby writing the target integrated data into the target business table through the target write interface.
[0095] In this embodiment, the target integration data is written into an intermediate table corresponding to the target API, the target scenario adapted to the target integration data is determined according to the field value of the target field in the intermediate table, the corresponding target write interface is determined according to the target scenario, and the data written into the intermediate table is written into the target business table through the target write interface, so as to integrate the target integration data through the configured API, thereby improving the integration efficiency, and matching the corresponding target scenario according to the field value of the intermediate table field, so as to determine the data integration interface according to the target scenario, so as to avoid recording the correspondence between the source system and the target business table in the source system, thereby reducing the memory space occupied by the source system and improving space utilization. At the same time, the corresponding integration interface is determined through scenario matching, which can improve the data integration efficiency.
[0096] In some embodiments, determining the corresponding target writing interface according to the target scenario in step 306 includes:
[0097] Obtain a mapping relationship between a source system and a corresponding target business table, where the source system is a system corresponding to the target integrated data; determine a target adapter according to the target scenario and the mapping relationship; and determine a corresponding target write interface according to the target adapter.
[0098] The mapping relationship between the source system and the target business table can be obtained from the server or terminal where the source system is located, or from the server for data integration. The source system is the system that generates the target integration data. In a possible application scenario, server A calls the target API and can initiate a call request for the target API, such as selecting and triggering the target API. Server A sends the target integration data of the source system to be integrated to server B. Then, server B responds to the triggering of the target API, obtains the target integration data corresponding to the source system, and integrates the target integration data into the target business table in the target system.
[0099] Optionally, there is a correspondence between the target scenario and the mapping relationship and the target adapter. According to the correspondence, after determining the target scenario and the mapping relationship, the corresponding target adapter can be determined. The target adapter is connected to the corresponding write interface. According to the target adapter, the corresponding target write interface can be determined. It can be understood that the mapping relationship between the source system and the target business table and the correspondence between the target scenario and the target adapter are pre-configured, and the correspondence between the adapter and the write interface is also pre-configured.
[0100] In this embodiment, by obtaining the mapping relationship between the source system and the corresponding target business table, determining the target adapter based on the mapping relationship and the target scenario, and determining the corresponding target write interface based on the target adapter, the efficiency of determining the target write interface can be improved, thereby improving data integration efficiency.
[0101] In an exemplary embodiment, the data integration method further includes: generating a data integration log; if the integration status in the data integration log is integration failure, determining a position corresponding to the integration failure according to the intermediate table data.
[0102] In this embodiment, a data integration log is generated for the process of data integration, that is, the data integration log can be used to record the process of data integration and the results of data integration. The data integration log may include information such as the integrated data, the source system of the integrated data, the business table corresponding to the integrated data, the integration time, and the integration status. The integration status may be in integration, integration exception, integration success, integration failure, full integration success, full integration failure, partial integration success, partial integration failure, etc., wherein, when the integration status is integration exception, it indicates that there may be a problem with the network service, and the cause of the exception is recorded. Optionally, if the integration status is integration exception, return to execute the step of writing the target integrated data into the intermediate table corresponding to the target API until the integration status is integration success, or the number of integrations reaches a preset number, but the integration status is still integration exception, and the data integration is stopped.
[0103] Optionally, the target integration data can be compared with the data in the target business table. If the two are inconsistent, it means that the data integration status is integration failure. If the integration status is integration failure, the intermediate table data and the target integration data, and the target integration data and the business table data are compared in turn to see if they are consistent. If the intermediate table data and the target integration data are inconsistent, it means that the integration failure is at the stage of writing the target integration data into the intermediate table. If the target integration data and the business table data are inconsistent, it means that the integration failure is at the stage from the intermediate table to the target business table.
[0104] Optionally, an intermediate table data log may be generated to record the processing of the intermediate table data. The intermediate table data log may include information such as data processing status, processing time, and log identifier. The data processing status refers to the status of synchronization to the target business table. The data processing status may be, for example, pending synchronization, synchronization success, synchronization failure, synchronization exception, and data discarded. If the data processing status is synchronization failure, the possible reasons for the failure are also included.
[0105] In this embodiment, by generating a data integration log and monitoring the data integration process, if the data integration status is integration failure, the location of the corresponding integration failure can be determined based on the intermediate table data, and then the corresponding cause of the failure can be found, which is conducive to solving the problem that caused the integration failure, thereby improving the success rate and accuracy of data integration.
[0106] In one example, as shown in FIG. 6 , the data integration method includes the following steps 602 to 618 .
[0107] Step 602: Get an API configuration request.
[0108] Step 604: According to the API configuration request, obtain the business entity table corresponding to the API configuration request.
[0109] Step 606, determining the integration field according to the business entity table.
[0110] Step 608, determining the intermediate table fields of the intermediate table according to the field attributes corresponding to the integrated fields.
[0111] Step 610: Generate a target API corresponding to the API configuration request according to the intermediate table fields.
[0112] Step 612: In response to triggering the target API, obtain target integration data.
[0113] Step 614: write the target integration data into the intermediate table corresponding to the target API.
[0114] Step 616, determining a target scenario that is compatible with the target integrated data according to the field value of the target field in the intermediate table.
[0115] Step 618: determine the corresponding target write interface according to the target scenario, and write the data written in the intermediate table into the target business table through the target write interface.
[0116] The above data integration method can realize the flexible configuration of the corresponding API according to the configuration request to meet the project customization requirements. In addition, the configuration process is simple, and the corresponding API can be quickly configured for the second open field, and the API can be quickly called. Then, the API is called for data integration, which can improve the efficiency of data integration.
[0117] In an exemplary embodiment, as shown in FIG7 , the source system and the target system are located on different servers. The target integrated data to be integrated by the source system includes Human Resources (HR) master data. HR master data refers to employee-related data that is widely shared within the enterprise, highly stable, and critical to business operations. HR master data may include personnel master data, position master data, organizational master data, performance master data, salary master data, etc. The source system calls the target API service for data integration. The target system responds to the source system's call trigger to the target API, obtains the HR master data sent by the source system, writes the HR master data into the intermediate table, and determines the target scenario that is compatible with the target integrated data based on the field value of the target field in the intermediate table. The corresponding target write interface is determined based on the target scenario, and the data in the intermediate table is written into the target business table based on the target write interface. If the integration of two open fields is involved, the server where the target system is located determines the integration field based on the API configuration request corresponding to the two open fields, determines the intermediate table field of the intermediate table based on the integration field, generates a target API corresponding to the API request based on the intermediate table field, and publishes the target API for the source system to call, so that the source system can call the target API to perform data integration corresponding to the two open fields.
[0118] In the above embodiment, there is no need for the source system to record the correspondence between the source system and the target business table to identify the corresponding scenario, and then call the corresponding API according to the identified application scenarios such as addition and update. Instead, the API corresponding to the master data is called, and then the adapted target scenario is determined based on the field value of the target field in the intermediate table. Then, the corresponding adapter is selected, and the corresponding write interface is determined according to the adapter. The integrated data is integrated into the business table through the write interface, which can improve the integration efficiency and the user experience. In addition, for the integration of two-open fields, an API that supports the integration of two-open fields can be quickly configured through interface configuration, thereby further improving data integration efficiency.
[0119] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0120] Based on the same inventive concept, the embodiment of the present application also provides a data integration device for implementing the data integration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data integration device embodiments provided below can refer to the limitations on the data integration method above, and will not be repeated here.
[0121] In an exemplary embodiment, as shown in FIG8 , a data integration device is provided, including: a configuration request acquisition module 802, an integration field determination module 804, an intermediate table field determination module 806, a target API generation module 808, an integration data acquisition module 810, and a data integration module 812, wherein:
[0122] Configuration request acquisition module 802, used to acquire application programming interface API configuration request;
[0123] An integration field determination module 804 is used to determine the integration field according to the API configuration request;
[0124] An intermediate table field determination module 806 is used to determine the intermediate table field of the intermediate table according to the integrated field;
[0125] The target API generating module 808 is used to generate a target API corresponding to the API configuration request according to the intermediate table fields.
[0126] The integrated data acquisition module 810 is used to acquire target integrated data in response to triggering the target API;
[0127] The data integration module 812 is used to integrate the target integration data.
[0128] In some embodiments, the integrated field determination module 804 is further used to obtain a business entity table corresponding to the API configuration request; and determine the integrated field according to the business entity table.
[0129] In some embodiments, the intermediate table field determination module 806 is further used to determine the intermediate table field of the intermediate table according to the field attribute corresponding to the integrated field.
[0130] In some embodiments, the data integration module 812 is also used to write the target integration data into the intermediate table corresponding to the target API; determine the target scenario adapted to the target integration data based on the field value of the target field in the intermediate table; determine the corresponding target write interface based on the target scenario, and write the data written into the intermediate table into the target business table through the target write interface.
[0131] In some embodiments, the data integration module 812 is also used to obtain the mapping relationship between the source system and the corresponding target business table; the source system is the system corresponding to the target integrated data; the target adapter is determined according to the target scenario and the mapping relationship; and the corresponding target write interface is determined according to the target adapter.
[0132] In some embodiments, the above-mentioned data integration device also includes an integration log generation module for generating a data integration log; if the integration status in the data integration log is integration failure, the position corresponding to the integration failure is determined according to the intermediate table data.
[0133] Each module in the above data integration device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0134] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data integration method is implemented.
[0135] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the data integration method in the above embodiment when executing the computer program.
[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data integration method in the above embodiment are implemented.
[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the data integration method in the above embodiment when executed by a processor.
[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0140] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0142] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data integration method, characterized in that: The method comprises: Get the API configuration request; Determining integration fields according to the API configuration request; Determine the intermediate table field of the intermediate table according to the integrated field; Generate a target API corresponding to the API configuration request according to the intermediate table fields; In response to triggering the target API, acquiring target integration data; The target integrated data is integrated.
2. The method according to claim 1, characterized in that The step of determining the integration field according to the API configuration request includes: Obtaining a business entity table corresponding to the API configuration request; The integration field is determined according to the business entity table.
3. The method according to claim 1, characterized in that The step of determining the intermediate table field of the intermediate table according to the integrated field comprises: According to the field attribute corresponding to the integrated field, the intermediate table field of the intermediate table is determined.
4. The method according to claim 1, characterized in that: The step of integrating the target integrated data comprises: Writing the target integration data into the intermediate table corresponding to the target API; Determining a target scenario adapted to the target integrated data according to a field value of a target field in the intermediate table; A corresponding target write interface is determined according to the target scenario, and the data written into the intermediate table is written into the target business table through the target write interface.
5. The method according to claim 4, characterized in that The determining a corresponding target writing interface according to the target scenario includes: Acquire a mapping relationship between a source system and a corresponding target business table; the source system is a system corresponding to the generation of the target integrated data; Determining a target adapter according to the target scenario and the mapping relationship; A corresponding target write interface is determined according to the target adapter.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Generate data integration logs; If the integration status in the data integration log is integration failure, the position corresponding to the integration failure is determined according to the intermediate table data.
7. A data integration device, characterized in that: The device comprises: A configuration request acquisition module is used to obtain an application programming interface API configuration request; An integration field determination module, used to determine the integration field according to the API configuration request; An intermediate table field determination module, used to determine the intermediate table field of the intermediate table according to the integrated field; A target API generation module, used to generate a target API corresponding to the API configuration request according to the intermediate table fields; An integrated data acquisition module, configured to acquire target integrated data in response to triggering the target API; The data integration module is used to integrate the target integration data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data processing method and data processing apparatus
CN105447200A
Method and device for realizing process control
CN111695840A
Database service interface publishing method and system, computer equipment and storage medium
CN114661803A
Data migration method and device, computer equipment and storage medium
CN115080540A
Data acquisition method and device, equipment and computer storage medium
CN116471183A
