CN110633254A - Data interaction method and device - Google Patents

Data interaction method and device Download PDF

Info

Publication number
CN110633254A
CN110633254A CN201910887688.2A CN201910887688A CN110633254A CN 110633254 A CN110633254 A CN 110633254A CN 201910887688 A CN201910887688 A CN 201910887688A CN 110633254 A CN110633254 A CN 110633254A
Authority
CN
China
Prior art keywords
task
target
file
target system
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910887688.2A
Other languages
Chinese (zh)
Inventor
王立伟
李军超
雷冰
章天琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201910887688.2A priority Critical patent/CN110633254A/en
Publication of CN110633254A publication Critical patent/CN110633254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of computers, in particular to a data interaction method and device. The method comprises the following steps: receiving a task file to be interacted, and acquiring file information; determining a second target system to be subjected to data interaction based on the file information, and acquiring a task template; determining a target data type corresponding to a second target system, and judging whether the data type of the task data in the task file to be interacted is consistent with the target data type; if not, performing data type conversion to obtain a target task file; and the application task template sends the target task file to a second target system to complete data interaction. According to the method provided by the invention, the task template corresponding to the second target system is used for data type conversion, and the target task file is sent to the second target system, so that data interaction between the first target system and the second target system is realized, an interaction code does not need to be generated during each data interaction, the data interaction process is simplified, and the efficiency of data interaction between the systems is improved.

Description

Data interaction method and device
Technical Field
The invention relates to the technical field of computers, in particular to a data interaction method and device.
Background
With the advent of the big data age, the kinds of storage of data are increasing, and the data types of each data are as follows: the Hdfs, Oracle, MySQL, HBASE, MongoDB and the like are all applied to different data platforms, and the data types corresponding to the data platforms are different, so that the realized platform functions are also different.
However, with the increase of data types and the rapid development of computer technologies, data interaction between various data platforms is required. In the existing cross-platform data interaction process, data interaction codes corresponding to each data type are set for different data types. In general, even though different data interaction codes are set according to data types, when a data source changes in the process of data interaction, new data interaction codes need to be newly developed for the data source. When a large amount of data needs to be interacted with, the process of cross-platform data interaction becomes complicated, and thus the efficiency of data interaction is reduced.
Disclosure of Invention
In view of this, the present invention provides a data interaction method, by which efficiency of data interaction can be improved when a plurality of systems need to perform data interaction.
The invention also provides a data interaction device used for ensuring the realization and the application of the method in practice.
A data interaction method, comprising:
receiving a task file to be interacted sent by a first target system, and acquiring file information of the task file to be interacted;
determining a second target system for data interaction with the first target system based on the file information, and acquiring a preset task template corresponding to the second target system;
determining a target data type corresponding to the second target system, and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type;
if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type, triggering the task template to convert the data type of the task data to be interacted into the target data type, and obtaining a target task file;
and applying the task template to send the target task file to the second target system to complete the data interaction between the first target system and the second target system.
Optionally, the method for receiving the task file to be interacted sent by the first target system includes:
monitoring the running state of each preset data system in real time;
determining a data system with a running state as a to-be-interacted state as a first target system, starting a preset data interface to connect the first target system, and receiving a to-be-interacted task file generated by the first target system based on the to-be-interacted state.
Optionally, the method for determining a second target system performing data interaction with the first target system includes:
acquiring file identification information contained in the file information;
analyzing the file identification information to obtain a system identification number carried by the file identification information, wherein the system identification number is an identification number corresponding to the system specified by the first target system and interacted with the first target system;
and determining a second target system for data interaction with the first target system based on the system identification number.
Optionally, in the method, the sending the target task file to the second target system by applying the task template includes:
acquiring a preset task list in the task template;
packaging the target task file into the task list;
and sending the task list to the second target system so that the second target system obtains the target task file by analyzing the task list.
The above method, optionally, further includes:
and if the data type of the task data contained in the task file to be interacted is consistent with the target data type, applying the task template to send the task file to be interacted to the second target system.
A data interaction device, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a task file to be interacted sent by a first target system and acquiring file information of the task file to be interacted;
the determining unit is used for determining a second target system for data interaction with the first target system based on the file information and acquiring a preset task template corresponding to the second target system;
the judging unit is used for determining a target data type corresponding to the second target system and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type;
the triggering unit is used for triggering the task template to convert the data type of the task data to be interacted into the target data type to obtain a target task file if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type;
and the first sending unit is used for sending the target task file to the second target system by applying the task template to complete the data interaction between the first target system and the second target system.
The above apparatus, optionally, the receiving unit includes:
the monitoring subunit is used for monitoring the running state of each preset data system in real time;
the receiving subunit is configured to determine a data system with a running state being a to-be-interacted state as a first target system, start a preset data interface to connect to the first target system, and receive a to-be-interacted task file generated by the first target system based on the to-be-interacted state.
The above apparatus, optionally, the determining unit includes:
the acquiring subunit is used for acquiring file identification information contained in the file information;
the analysis subunit is configured to analyze the file identification information to obtain a system identification number carried by the file identification information, where the system identification number is an identification number corresponding to an interactive system specified by the first target system;
and the determining subunit is used for determining a second target system for performing data interaction with the first target system based on the system identification number.
The above apparatus, optionally, the first sending unit includes:
the acquiring subunit is used for acquiring a task list preset in the task template;
the packaging subunit is used for packaging the target task file into the task list;
and the sending subunit is configured to send the task list to the second target system, so that the second target system obtains the target task file by analyzing the task list.
The above apparatus, optionally, further comprises:
and the second sending unit is used for sending the task file to be interacted to the second target system by applying the task template if the data type of the task data contained in the task file to be interacted is consistent with the target data type.
A storage medium comprises stored instructions, wherein when the instructions are executed, a device where the storage medium is located is controlled to execute the data interaction method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the above-mentioned data interaction method.
Compared with the prior art, the invention has the following advantages:
the invention provides a data interaction method, which comprises the following steps: receiving a task file to be interacted sent by a first target system, and acquiring file information of the task file to be interacted; determining a second target system for data interaction with the first target system based on the file information, and acquiring a preset task template corresponding to the second target system; determining a target data type corresponding to the second target system, and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type; if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type, triggering the task template to convert the data type of the task data to be interacted into the target data type, and obtaining a target task file; and applying the task template to send the target task file to the second target system to complete the data interaction between the first target system and the second target system. According to the method provided by the invention, when the first target system needs to perform data interaction with the second target system, the task data in the task file to be interacted is subjected to data type conversion through the task template corresponding to the second target system and then is sent to the second target system, so that the data interaction process of the first target system and the second target system is completed, an interaction code does not need to be generated during each data interaction, the data interaction process is simplified, and the efficiency of the data interaction between the systems is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method of data interaction according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method of a data interaction method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method of a data interaction method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data interaction apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and the terms "comprises", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The embodiment of the invention provides a data interaction method which can be applied to various system platforms, and the execution main body of the method can be a computer terminal or a processor of various mobile devices. In the embodiment provided by the invention, the first target system and the second target system can be systems corresponding to the data platform actually. Wherein each data platform may correspond to a different data type. The method flow chart of the method is shown in fig. 1, and specifically includes:
s101: receiving a task file to be interacted sent by a first target system, and acquiring file information of the task file to be interacted;
in the embodiment of the invention, when any data system needs to perform data interaction, the data system is determined as the first target system. The first target system can store the task data to be interacted into a file corresponding to a preset file format, and trigger the data interaction process through the file, wherein the file is the task file to be interacted. And when the processor receives the task file to be interacted sent by the first target system, acquiring the file information of the task file to be interacted.
S102: determining a second target system for data interaction with the first target system based on the file information, and acquiring a preset task template corresponding to the second target system;
in the embodiment of the invention, before the first target system sends the task file to be interacted, the related information of the system needing corresponding interaction is stored in the file information of the task file to be interacted. And the processor determines a second target system of which the first target system needs to carry out data interaction according to the file information. Meanwhile, because the data types corresponding to each system are different, a task template corresponding to each different system is set according to each different system. And after a second target system needing data interaction is determined, acquiring a task template corresponding to the second target system.
It should be noted that the file information of the task file to be interacted may be recorded in the task template, and the task template stores the file information of the data interaction. The task template may be a server corresponding to each system or a scheduler provided on each system, and is used for converting data types and sending a task file for data interaction to a second target system corresponding to the task template.
S103: determining a target data type corresponding to the second target system, and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type;
in the embodiment of the invention, because the data types corresponding to each data system are not necessarily the same, after receiving the task file to be interacted, the data type of the task data contained in the task file to be interacted is determined. Meanwhile, after a second target system which needs to perform data interaction with the first target system is determined, a target data type corresponding to the second target system can be determined. And judging whether the data type of the task data is consistent with the target data type or not so as to ensure whether data type conversion is needed or not in the data interaction process.
It should be noted that the task file to be interacted may include a plurality of data, and each data included in the task file to be interacted is not all task data, so the task data in the embodiment of the present invention is data that needs to perform data interaction with the second target system.
S104: if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type, triggering the task template to convert the data type of the task data to be interacted into the target data type, and obtaining a target task file;
in the embodiment of the invention, if the data type of the task data is different from the target data type required in the second target system, the task template is triggered to perform data type conversion, the data type of the task data is converted into the target data type, and a target task file is obtained, so that the second target system can perform data operation according to the task data corresponding to the target data type and contained in the target task file.
S105: and applying the task template to send the target task file to the second target system to complete the data interaction between the first target system and the second target system.
In the embodiment of the invention, each system corresponds to one task template, so that the target task file can be sent to the second target system through the application template.
Optionally, before the target task file is sent to the second target system, file information of the target task file may be recorded and stored. When the data interaction information between the systems needs to be inquired by a dispatcher, the saved file information can be inquired.
In the data interaction method provided by the embodiment of the invention, an object required by a first target system to perform data interaction is determined according to a task file to be interacted sent by the first target system. Namely, the second target system needing data interaction is determined according to the file information of the task file to be interacted. Because each system is provided with the task template belonging to the system, after a second target system for data interaction is determined, the task template corresponding to the second target system can be obtained, and data transmission between the first target system and the second target system is realized through the task template. Before sending the task file to be interacted to the second target system, determining whether the data type of the task data contained in the task file to be interacted is consistent with the target data type corresponding to the second target system. If the data types of the task data are inconsistent with the target data types, the task template needs to be triggered to convert the data types of the task data, the task data with the data types being the target data types is obtained, and a target task file is obtained. And the target task file comprises the task data subjected to data type conversion. And after data conversion is carried out to obtain a target task file, the target task file is sent to a second target system by applying the task template, and thus, data interaction between the first target system and the second target system is completed.
Optionally, after the target task file is sent to the second target system, a trigger instruction corresponding to the target task file may be sent to the second target system to trigger the second target system to execute corresponding task scheduling or task operation according to the target task file.
Further, in the method provided by the present invention, the data interaction process may be that a first target system performs data interaction with a second target system; or a plurality of first target systems and a second target system carry out data interaction; meanwhile, one first target system and a plurality of second target systems can perform data interaction simultaneously. When a first target system and a second target system perform data interaction, a task file to be interacted, which is sent by the first target system, is sent to the second target system through a task template. When a plurality of first target systems perform data interaction with one first target system, the task template can simultaneously send the task files to be interacted sent by each first target system to the second target system, and can also sequentially send the task files to be interacted to the second target system according to the sequence of receiving the task files to be interacted. When a first target system performs data interaction with a plurality of second target systems simultaneously, according to file information of the task file to be interacted, determining each second target system needing to be interacted, acquiring a task template corresponding to each second target system, performing data conversion on task data in the task file to be interacted according to different types of target data corresponding to each second target system, acquiring a target task file corresponding to each second target system, and sending the target task file to the corresponding second target system through the task template corresponding to each second target system.
It should be noted that, if there is one target system performing data interaction with multiple second target systems, the task file to be interacted may include multiple sets of task data, where each set of task data corresponds to one second target system performing data interaction.
By applying the method provided by the invention, the first target system carries out data interaction with the second target system in the form of sending the task file. After receiving the task file to be interacted sent by the first target system, the processor performs data conversion through the task template to obtain a target task file, and sends the target task file to the second target system, so that new codes do not need to be developed, data interaction is performed in a file form, and the efficiency of data interaction is improved.
In the method provided in the foregoing embodiment, after the determining process in the foregoing step S103, the method specifically further includes:
and if the data type of the task data contained in the task file to be interacted is consistent with the target data type, applying the task template to send the task file to be interacted to the second target system.
In the method provided by the embodiment of the invention, if the data type of the task data in the task file to be interacted is consistent with the target data type, the task data does not need to be converted in the data type, and the task template is directly applied to send the task file to be interacted to the second target system. And the task template is used for receiving the task file to be interacted, wherein the task file to be interacted can be determined as a target task file, and the target task file is sent to a second target system through the task template. And after receiving the target task file, the second target task system can execute corresponding task scheduling or task operation according to the target task file.
Optionally, when a first target system performs data interaction with multiple second target systems simultaneously, determining each second target system to be interacted according to file information of the task file to be interacted, acquiring a task template corresponding to each second target system, determining a target data type corresponding to each second target system, if the data type corresponding to the second target system is inconsistent with the data type of the task data, performing data conversion on the data type of the task data according to the data type of each second target system, acquiring a target task file corresponding to a second target system with an inconsistent data type, if the data type corresponding to the second target system is consistent with the data type of the task data in the task file to be interacted, directly sending the task file to be interacted to the second target system with the consistent data type through the task template, no conversion of data types is required.
By applying the method provided by the embodiment of the invention, if the data type of the task data in the task file to be interacted is consistent with the target data type in the second target system, the task file to be interacted is directly sent to the second target system without data type conversion, and new codes do not need to be developed, so that the efficiency of data interaction is improved.
In the method provided in the embodiment of the present invention, based on the step S101, a process of receiving the task file to be interacted sent by the first target system is as shown in fig. 2, and specifically includes:
s201: monitoring the running state of each preset data system in real time;
in the embodiment of the invention, the processor monitors the states of a plurality of data systems which are currently set. And determining whether the data systems need to perform data interaction according to the operating state of each data system.
S202: determining a data system with a running state as a to-be-interacted state as a first target system, starting a preset data interface to connect the first target system, and receiving a to-be-interacted task file generated by the first target system based on the to-be-interacted state.
In the embodiment of the invention, in the process of monitoring the operation states of the data systems, if one or more operation states of the data systems are to be interacted, the data system with the operation state of the to-be-interacted is determined as the first target system. And meanwhile, after the processor confirms the first target system, starting a data interface to connect the first target system and receiving the task file of the text to be interacted. When the first target system needs to perform data interaction, the task data needing to perform data interaction is subjected to data interaction in a file triggering mode, namely, the task data is stored in the task file to be interacted, and the task file to be interacted is sent through a data interface connected with the processor to perform data interaction.
In the method provided by the embodiment of the invention, whether the data system needs to perform data interaction currently is determined by monitoring each data system. When the running state of one or more data systems is changed into the to-be-interacted state, the data system with the running state as the to-be-interacted state is the first target system. When the first target system needs to perform data interaction, the first target system stores the task data to be interacted in a preset task file, wherein the task file is the task file to be interacted. And connecting the task file to be interacted sent by the first target system through a preset data interface by the processor.
It should be noted that the data types contained in each data system are not necessarily the same. When a first target system needs to perform data interaction with a second target system, the sent task file to be interacted only contains task data of a data type corresponding to the first target system. If the corresponding data type in the second target system is different from the data type corresponding to the first target system, the data type needs to be converted. And the conversion of the data type is operated by a task template corresponding to a second target system for receiving the task file.
It should be further noted that, a specific implementation process of the data interaction method provided by the embodiment of the present invention may be implemented in a preset BFW framework. The BFW framework is a scripting language framework, and is used for monitoring each data system in the above embodiments and triggering the first target system to generate a task file to be interacted when the first target system needs to perform data interaction.
By applying the method provided by the embodiment of the invention, the running state of each data system is monitored, so that when the running state of the data system is changed into the state to be interacted, the data system is connected in time to receive the task file to be interacted, and the timeliness of data interaction is ensured.
In the method provided in the embodiment of the present invention, based on the step S102, the process of determining the second target system performing data interaction with the first target system is as shown in fig. 3, and specifically includes:
s301: acquiring file identification information contained in the file information;
in the embodiment of the invention, the file identification information contained in the file information is obtained according to the file information corresponding to the task file to be interacted. The file identification information may be a character string containing related information when data interaction is performed. Such as the system to which the task file to be interacted belongs, the content contained in the file, etc.
S302: analyzing the file identification information to obtain a system identification number carried by the file identification information, wherein the system identification number is an identification number corresponding to the system specified by the first target system and interacted with the first target system;
in the embodiment of the invention, the acquired file identification information is analyzed, and the system identification number of the second target system appointed to interact by the first target system is obtained from the analyzed file identification information.
It should be noted that the system identification number is an identification number of the second target system.
Optionally, when the first target system needs to perform data interaction with a plurality of second target systems, the file identification information includes an identification number of a system of each second target system to be interacted. And simultaneously, marking the system identification number in the task data contained in the task file to be interacted so as to determine which piece of task data in the task file to be interacted is sent to the second target system corresponding to the system identification number.
S303: and determining a second target system for data interaction with the first target system based on the system identification number.
In the embodiment of the invention, according to the system identification number, the first target system is determined to which system the first target system needs to perform data interaction with. Namely, the data system corresponding to the system identification number is the second target system.
In the data interaction method provided by the embodiment of the invention, the file identification information contained in the file information is acquired according to the acquired file information, and the system identification number is acquired after the file identification information is analyzed. The system identification number is the identification number of the second target system for which the first target system specifies an interaction. Thus, a second target system for data interaction with the first target system may be determined. Wherein the second target system may be one or more.
By applying the method provided by the embodiment of the invention, the second target system appointed to be interacted by the first target system is determined by analyzing the file identification information corresponding to the task file to be interacted, so that the correctness and timeliness of the interaction among all data systems in the data interaction process are ensured.
In the method provided in the embodiment of the present invention, based on step S105, the sending the target task file to the second target system by applying the task template includes:
acquiring a preset task list in the task template;
packaging the target task file into the task list;
and sending the task list to the second target system so that the second target system obtains the target task file by analyzing the task list.
In the data interaction method provided by the embodiment of the invention, in the process of sending the target task file by applying the task template, the task list preset in the task template is obtained firstly. The task list is used for packaging each file which needs to be sent to the second target system. And when the processor determines a second target system required to be interacted by the task file to be interacted, acquiring a task list in a task template corresponding to the second target system. And after the task data in the task file to be interacted is subjected to data type conversion to obtain a target task file, packaging the task file into the task list. And sending the target task file to a second target system in a mode of sending the task list. Because the target task file is encapsulated in the task list, after the second target system receives the task list, the task list needs to be analyzed to obtain the target task file.
Optionally, when there are multiple first target systems simultaneously performing data interaction with a second target system, all target task files sent by the first target systems and subjected to data conversion may be encapsulated in the task list according to the sending order. The task list may also be used to record interaction information for each data interaction with the second target system. The interaction information may include information of an object that initiates the interaction, i.e., information of the first target system, interaction time, task data information of the interaction, and the like.
By applying the method provided by the embodiment of the invention, the target task file is encapsulated through the task list, so that the second target system is triggered to acquire the target task file after the task list is sent to the second target system, and the target task file is processed in time, thereby ensuring the timeliness and the accuracy of data interaction.
Based on the method provided in the foregoing embodiment, optionally, when the first target system and the second target system perform data interaction, the user data interface may be connected, and after receiving the task file to be interacted sent by the first target system, the processor may determine whether the fixed parameter corresponding to the first target system exists according to file information of the task file to be interacted, and determine whether the user data interface currently has the customized parameter sent by the user. The fixed parameters and the user configuration parameters may be parameters for customizing the task file to be interacted. Such as a parameter to change the name of the file, a parameter to change the manner in which the file is opened, etc. If the fixed parameters and/or the user configuration parameters exist, the parameters of the task file to be interacted may be set according to the fixed parameters and/or the user configuration parameters, and after the parameters are set, the processes of the steps S102 to S105 are performed, which will not be described herein again. The specific implementation procedures and derivatives thereof in the above embodiments are within the scope of the present invention.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a data interaction apparatus, which is used for implementing the method in fig. 1 specifically, the data interaction apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the data interaction apparatus is shown in fig. 4, and specifically includes:
the receiving unit 401 is configured to receive a task file to be interacted sent by a first target system, and acquire file information of the task file to be interacted;
a determining unit 402, configured to determine, based on the file information, a second target system performing data interaction with the first target system, and obtain a preset task template corresponding to the second target system;
a determining unit 403, configured to determine a target data type corresponding to the second target system, and determine whether a data type of task data included in the task file to be interacted is consistent with the target data type;
a triggering unit 404, configured to trigger the task template to convert the data type of the task data to be interacted into the target data type to obtain a target task file if the data type of the task data included in the task file to be interacted is inconsistent with the target data type;
a first sending unit 405, configured to send the target task file to the second target system by applying the task template, so as to complete data interaction between the first target system and the second target system.
In the apparatus provided in the embodiment of the present invention, the receiving unit 401 includes:
the monitoring subunit is used for monitoring the running state of each preset data system in real time;
the receiving subunit is configured to determine a data system with a running state being a to-be-interacted state as a first target system, start a preset data interface to connect to the first target system, and receive a to-be-interacted task file generated by the first target system based on the to-be-interacted state.
In the apparatus provided in the embodiment of the present invention, the determining unit 402 includes:
the acquiring subunit is used for acquiring file identification information contained in the file information;
the analysis subunit is configured to analyze the file identification information to obtain a system identification number carried by the file identification information, where the system identification number is an identification number corresponding to an interactive system specified by the first target system;
and the determining subunit is used for determining a second target system for performing data interaction with the first target system based on the system identification number.
In the apparatus provided in the embodiment of the present invention, the first sending unit 405 includes:
the acquiring subunit is used for acquiring a task list preset in the task template;
the packaging subunit is used for packaging the target task file into the task list;
and the sending subunit is configured to send the task list to the second target system, so that the second target system obtains the target task file by analyzing the task list.
The device provided by the embodiment of the invention further comprises:
and the second sending unit is used for sending the task file to be interacted to the second target system by applying the task template if the data type of the task data contained in the task file to be interacted is consistent with the target data type.
For the specific working processes of the receiving unit 401, the determining unit 402, the judging unit 403, the triggering unit 404 and the first sending unit 405 in the data interaction apparatus disclosed in the above embodiment of the present invention, reference may be made to the corresponding contents in the data interaction method disclosed in the above embodiment of the present invention, and details are not described here.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the equipment where the storage medium is located is controlled to execute the data interaction method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 5, which specifically includes a memory 501 and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and are configured to be executed by one or more processors 503 to perform the following operations according to the one or more instructions 502:
receiving a task file to be interacted sent by a first target system, and acquiring file information of the task file to be interacted;
determining a second target system for data interaction with the first target system based on the file information, and acquiring a preset task template corresponding to the second target system;
determining a target data type corresponding to the second target system, and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type;
if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type, triggering the task template to convert the data type of the task data to be interacted into the target data type, and obtaining a target task file;
and applying the task template to send the target task file to the second target system to complete the data interaction between the first target system and the second target system.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both,
to clearly illustrate this interchangeability of hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for data interaction, comprising:
receiving a task file to be interacted sent by a first target system, and acquiring file information of the task file to be interacted;
determining a second target system for data interaction with the first target system based on the file information, and acquiring a preset task template corresponding to the second target system;
determining a target data type corresponding to the second target system, and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type;
if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type, triggering the task template to convert the data type of the task data to be interacted into the target data type, and obtaining a target task file;
and applying the task template to send the target task file to the second target system to complete the data interaction between the first target system and the second target system.
2. The method of claim 1, wherein the receiving the task file to be interacted sent by the first target system comprises:
monitoring the running state of each preset data system in real time;
determining a data system with a running state as a to-be-interacted state as a first target system, starting a preset data interface to connect the first target system, and receiving a to-be-interacted task file generated by the first target system based on the to-be-interacted state.
3. The method of claim 1, wherein determining a second target system for data interaction with the first target system comprises:
acquiring file identification information contained in the file information;
analyzing the file identification information to obtain a system identification number carried by the file identification information, wherein the system identification number is an identification number corresponding to the system specified by the first target system and interacted with the first target system;
and determining a second target system for data interaction with the first target system based on the system identification number.
4. The method of claim 1, wherein applying the task template to send the target task file to the second target system comprises:
acquiring a preset task list in the task template;
packaging the target task file into the task list;
and sending the task list to the second target system so that the second target system obtains the target task file by analyzing the task list.
5. The method of claim 1, further comprising:
and if the data type of the task data contained in the task file to be interacted is consistent with the target data type, applying the task template to send the task file to be interacted to the second target system.
6. A data interaction device, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a task file to be interacted sent by a first target system and acquiring file information of the task file to be interacted;
the determining unit is used for determining a second target system for data interaction with the first target system based on the file information and acquiring a preset task template corresponding to the second target system;
the judging unit is used for determining a target data type corresponding to the second target system and judging whether the data type of the task data contained in the task file to be interacted is consistent with the target data type;
the triggering unit is used for triggering the task template to convert the data type of the task data to be interacted into the target data type to obtain a target task file if the data type of the task data contained in the task file to be interacted is inconsistent with the target data type;
and the first sending unit is used for sending the target task file to the second target system by applying the task template to complete the data interaction between the first target system and the second target system.
7. The apparatus of claim 6, wherein the receiving unit comprises:
the monitoring subunit is used for monitoring the running state of each preset data system in real time;
the receiving subunit is configured to determine a data system with a running state being a to-be-interacted state as a first target system, start a preset data interface to connect to the first target system, and receive a to-be-interacted task file generated by the first target system based on the to-be-interacted state.
8. The apparatus of claim 6, wherein the determining unit comprises:
the acquiring subunit is used for acquiring file identification information contained in the file information;
the analysis subunit is configured to analyze the file identification information to obtain a system identification number carried by the file identification information, where the system identification number is an identification number corresponding to an interactive system specified by the first target system;
and the determining subunit is used for determining a second target system for performing data interaction with the first target system based on the system identification number.
9. The apparatus of claim 6, wherein the first sending unit comprises:
the acquiring subunit is used for acquiring a task list preset in the task template;
the packaging subunit is used for packaging the target task file into the task list;
and the sending subunit is configured to send the task list to the second target system, so that the second target system obtains the target task file by analyzing the task list.
10. The apparatus of claim 6, further comprising:
and the second sending unit is used for sending the task file to be interacted to the second target system by applying the task template if the data type of the task data contained in the task file to be interacted is consistent with the target data type.
CN201910887688.2A 2019-09-19 2019-09-19 Data interaction method and device Pending CN110633254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910887688.2A CN110633254A (en) 2019-09-19 2019-09-19 Data interaction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910887688.2A CN110633254A (en) 2019-09-19 2019-09-19 Data interaction method and device

Publications (1)

Publication Number Publication Date
CN110633254A true CN110633254A (en) 2019-12-31

Family

ID=68971844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910887688.2A Pending CN110633254A (en) 2019-09-19 2019-09-19 Data interaction method and device

Country Status (1)

Country Link
CN (1) CN110633254A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928672A (en) * 2020-02-17 2020-03-27 北京启迪区块链科技发展有限公司 Task arranging method, device and equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615385A (en) * 2015-02-13 2015-05-13 福州瑞芯微电子有限公司 Data interaction method
CN108768987A (en) * 2018-05-17 2018-11-06 中国联合网络通信集团有限公司 Data interactive method, apparatus and system
CN108965484A (en) * 2018-09-30 2018-12-07 深圳市酷达通讯有限公司 A kind of transmission method of internet of things data, system and terminal
CN109408247A (en) * 2018-09-17 2019-03-01 天津龙拳风暴科技有限公司 Interaction data processing method and device
CN109561104A (en) * 2018-12-28 2019-04-02 深圳市创梦天地科技有限公司 A kind of communication protocol conversion method and device
CN109660606A (en) * 2018-12-05 2019-04-19 新华三大数据技术有限公司 Internet message Proxy Method, apparatus and system
CN109947771A (en) * 2018-08-20 2019-06-28 中国平安人寿保险股份有限公司 Conversion method, device, equipment and the computer readable storage medium of file type

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615385A (en) * 2015-02-13 2015-05-13 福州瑞芯微电子有限公司 Data interaction method
CN108768987A (en) * 2018-05-17 2018-11-06 中国联合网络通信集团有限公司 Data interactive method, apparatus and system
CN109947771A (en) * 2018-08-20 2019-06-28 中国平安人寿保险股份有限公司 Conversion method, device, equipment and the computer readable storage medium of file type
CN109408247A (en) * 2018-09-17 2019-03-01 天津龙拳风暴科技有限公司 Interaction data processing method and device
CN108965484A (en) * 2018-09-30 2018-12-07 深圳市酷达通讯有限公司 A kind of transmission method of internet of things data, system and terminal
CN109660606A (en) * 2018-12-05 2019-04-19 新华三大数据技术有限公司 Internet message Proxy Method, apparatus and system
CN109561104A (en) * 2018-12-28 2019-04-02 深圳市创梦天地科技有限公司 A kind of communication protocol conversion method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928672A (en) * 2020-02-17 2020-03-27 北京启迪区块链科技发展有限公司 Task arranging method, device and equipment and storage medium
CN110928672B (en) * 2020-02-17 2020-08-18 北京启迪区块链科技发展有限公司 Task arranging method, device and equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109933522B (en) Test method, test system and storage medium for automatic case
US11667033B2 (en) Systems and methods for robotic process automation
CN106598835B (en) Application testing method, device and system
CN104838405B (en) The method and system of test frame for application program
CN111142884B (en) Version deployment method and device of applet, electronic equipment and storage medium
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN109902446B (en) Method and apparatus for generating information prediction model
CN107370804B (en) Software application processing method and device
CN110531962A (en) Development process method, equipment and the computer readable storage medium of small routine
US11740997B2 (en) Method and apparatus for debugging a device
CN110543297A (en) method and apparatus for generating source code
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN114564294A (en) Intelligent service arranging method and device, computer equipment and storage medium
CN114339470B (en) Data testing method and device based on satellite instruction, electronic equipment and medium
CN112433940A (en) Software development kit SDK testing method and related equipment
CN116755844A (en) Data processing method, device and equipment of simulation engine and storage medium
CN110633254A (en) Data interaction method and device
EP3879795A1 (en) Method and apparatus for acquiring information, device, medium and computer program product
CN111625291A (en) Automatic iteration method and device of data processing model and electronic equipment
CN108989428B (en) Bluetooth terminal upgrading method, server, computer readable storage medium and system
CN111324470A (en) Method and device for generating information
CN109144864B (en) Method and device for testing window
CN111142859A (en) Script generation method and device, electronic equipment and storage medium
CN109871560B (en) Method and device for operating target model
CN115016775A (en) Interface simulation method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191231

RJ01 Rejection of invention patent application after publication