CN108563768B - Data conversion method, device, equipment and storage medium for different data models - Google Patents

Data conversion method, device, equipment and storage medium for different data models Download PDF

Info

Publication number
CN108563768B
CN108563768B CN201810358566.XA CN201810358566A CN108563768B CN 108563768 B CN108563768 B CN 108563768B CN 201810358566 A CN201810358566 A CN 201810358566A CN 108563768 B CN108563768 B CN 108563768B
Authority
CN
China
Prior art keywords
data
main system
data model
target
configuration file
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.)
Active
Application number
CN201810358566.XA
Other languages
Chinese (zh)
Other versions
CN108563768A (en
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201810358566.XA priority Critical patent/CN108563768B/en
Publication of CN108563768A publication Critical patent/CN108563768A/en
Application granted granted Critical
Publication of CN108563768B publication Critical patent/CN108563768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data conversion method, device, equipment and storage medium of different data models. According to the method, a main system determines a target data model corresponding to a subsystem according to data to be converted by receiving the data to be converted sent by the subsystem; searching a target configuration file corresponding to the target data model; the method comprises the steps of extracting target data conversion rules from a target configuration file, converting data to be converted according to the target data conversion rules, and obtaining target data, so that quick conversion of data formats among different data models is realized, data conversion operation is simplified, and development cost for carrying out data conversion on the different data models is reduced.

Description

Data conversion method, device, equipment and storage medium for different data models
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a data conversion method, apparatus, device, and storage medium for different data models.
Background
With the rapid development of internet technology, data sharing is also becoming an unblockable trend in the "internet+" age, taking the insurance industry as an example, the sales channel and sales mode of the core system are various, and in general, different systems in the mature period have different data models, but in order to enable the core system to quickly access various different external systems, the data model conversion between the external systems and the core system is necessary, so how to realize the rapid conversion of data between different data models becomes a problem to be solved urgently.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a data conversion method, device, equipment and storage medium for different data models, and aims to solve the technical problems of complex operation and high development cost when data conversion is carried out among different data models in the prior art.
To achieve the above object, the present invention provides a data conversion method for different data models, the method comprising the steps of:
the main system receives data to be converted sent by a subsystem and determines a target data model corresponding to the subsystem according to the data to be converted;
the main system searches a target configuration file corresponding to the target data model;
and the main system extracts the target data conversion rule from the target configuration file, and converts the data to be converted according to the target data conversion rule to obtain target data.
Preferably, the main system searches a target configuration file corresponding to the target data model, including:
the main system searches a configuration file corresponding to the target data model in a mapping relation, wherein the mapping relation stores the corresponding relation between the data model and the configuration file;
and the main system takes the searched configuration file as a target configuration file.
Preferably, after the host system searches the configuration file corresponding to the target data model in the mapping relationship according to the target data model, the method further includes:
when the main system does not find the configuration file corresponding to the target data model, marking the target data model as a data model to be added;
the main system acquires main system data model information corresponding to the main system;
the main system generates a configuration file to be added corresponding to the data model to be added according to the main system data model information;
and the main system adds the configuration file to be added and the data model to be added into the mapping relation.
Preferably, the generating, by the host system, a configuration file to be added corresponding to the data model to be added according to the host system data model information includes:
the main system determines a target data structure corresponding to each data item in a main system data model according to the main system data model information;
the main system determines a data structure to be configured corresponding to each data item in the data model to be added according to the data model to be added;
the main system establishes a data conversion rule between the target data structure and the data structure to be configured based on the target data structure, and generates a configuration file to be added corresponding to the data model to be added according to the established data conversion rule.
Preferably, the host system extracts the target data conversion rule from the target configuration file, converts the data to be converted according to the target data conversion rule, and after obtaining target data, the method further includes:
the main system acquires a conversion log file when converting the data to be converted;
when the main system detects that the conversion log file contains conversion error reporting information, the main system stores the conversion log file containing the conversion error reporting information;
and the main system responds to a viewing instruction input by a user and displays the conversion log file containing the conversion error reporting information.
Preferably, the method further comprises:
the method comprises the steps that a main system responds to a configuration file modification instruction input by a user, and a configuration file to be modified is determined according to the configuration file modification instruction;
the main system extracts a modification file and a modification command contained in the configuration file modification instruction;
and the main system modifies the configuration file to be modified according to the modification file based on the modification command and stores the modified configuration file.
Preferably, the main system receives data to be converted sent by a subsystem, and determines a target data model corresponding to the subsystem according to the data to be converted, including:
the main system receives data to be converted sent by a subsystem, and determines a system identifier corresponding to the subsystem according to the data to be converted;
and the main system searches a data model corresponding to the system identifier, and takes the searched data model as a target data model.
In addition, to achieve the above object, the present invention also proposes a data conversion device of different data models, the device comprising: the system comprises a model determining module, a file searching module and a data converting module;
the model determining module is used for receiving data to be converted sent by a subsystem and determining a target data model corresponding to the subsystem according to the data to be converted;
the file searching module is used for searching a target configuration file corresponding to the target data model;
the data conversion module is used for extracting the target data conversion rule from the target configuration file, and converting the data to be converted according to the target data conversion rule to obtain target data.
In addition, to achieve the above object, the present invention also proposes a data conversion device of different data models, the device comprising: the system comprises a memory, a processor and a data conversion program of different data models stored on the memory and capable of running on the processor, wherein the data conversion program of the different data models is configured to realize the steps of the data conversion method of the different data models.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a data conversion program of a different data model, which when executed by a processor, implements the steps of the data conversion method of a different data model as described above.
According to the method, a main system determines a target data model corresponding to a subsystem according to data to be converted by receiving the data to be converted sent by the subsystem; searching a target configuration file corresponding to the target data model; and extracting target data conversion rules from the target configuration file, and converting the data to be converted according to the target data conversion rules to obtain target data, so that the rapid conversion of data formats among different data models is realized, and the development cost of different system butt joints is reduced.
Drawings
FIG. 1 is a schematic diagram of a data conversion device of different data models of a hardware running environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data conversion method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a data conversion method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a data conversion method according to a different data model of the present invention;
FIG. 5 is a flowchart illustrating a data conversion method according to a fourth embodiment of the present invention;
fig. 6 is a block diagram illustrating a first embodiment of a data conversion device according to a different data model of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data conversion device of different data models of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the data conversion apparatus of the different data models may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the data conversion apparatus of the different data models, and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
As shown in fig. 1, the memory 1005, which is one type of storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and data conversion programs of different data models.
In the data conversion device of the different data models shown in fig. 1, the network interface 1004 is mainly used for data communication with a background server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the data conversion apparatus of the different data models of the present invention may be disposed in the data conversion apparatus of the different data models, and the data conversion apparatus of the different data models calls the data conversion program of the different data models stored in the memory 1005 through the processor 1001 and executes the steps of the data conversion method of the different data models provided by the embodiment of the present invention.
An embodiment of the present invention provides a data conversion method of different data models, and referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the data conversion method of different data models of the present invention.
In this embodiment, the method includes the steps of:
step S10: and the main system receives the data to be converted sent by the subsystem and determines a target data model corresponding to the subsystem according to the data to be converted.
It should be noted that, the main system may be a core system or platform capable of receiving data sent by different external systems (i.e. the subsystems), and analyzing, calculating, and processing the data, for example: an insurance system of an insurance company, a securities trading system of an securities company, an online payment system of a bank, etc. The subsystem may be an external system to which the host system interfaces, such as a system corresponding to a payment treasury, weChat, microblog or the like platform to which the insurance system interfaces, relative to the host system.
It should be understood that, since the external systems are often in a mature period when interfacing with the main system, the system data models corresponding to the external systems are different, so in order to enable normal information interaction between the main system and the subsystem, the data sent by the subsystem needs to be converted into a data format corresponding to the data model of the main system, so that subsequent operations or processing can be performed.
In a specific implementation, when the main system receives data to be converted transmitted by the subsystem, a data model corresponding to the subsystem for transmitting the data, namely the target data model, can be determined according to a data source of the data to be converted.
Step S20: and the main system searches a target configuration file corresponding to the target data model.
It should be noted that, in order to implement rapid data conversion and improve data conversion efficiency, before executing this step, a worker may set a data model base for storing data models of different external systems in a server where the main system is located or a storage space corresponding to the server in advance. The data model library correspondingly stores configuration files between each subsystem data model and the main system data model, wherein the configuration files contain data conversion basis or rules, such as: the data conversion rule [ a.cc.xxx=b.xxx ], where [ a.cc.xxx ] is the type of data to be converted sent by the subsystem, and [ b.xxx ] is the target data type applicable to the data model of the main system. The number of data conversion rules included in each configuration file may be according to the actual situation, which is not limited in the present embodiment.
In this embodiment, the target configuration file searching process may be implemented by establishing a mapping relationship, where a mapping end source of the mapping relationship is a data model type corresponding to the subsystem, and a destination end is a target configuration file, that is, the mapping relationship includes a correspondence between a data model and a configuration file. Therefore, the main system can quickly and accurately search the target configuration file through the mapping relation when determining the data model corresponding to the subsystem, so that the data conversion efficiency is improved. Specifically, the main system may search a configuration file corresponding to the target data model in a mapping relationship, where the mapping relationship stores a correspondence between the data model and the configuration file; and then taking the searched configuration file as a target configuration file.
Step S30: and the main system extracts the target data conversion rule from the target configuration file, and converts the data to be converted according to the target data conversion rule to obtain target data.
In a specific implementation, after the target configuration file is found, the main system can analyze the target configuration file, extract a corresponding data conversion rule, namely the target data conversion rule, and convert the data to be converted according to the target data conversion rule after the target conversion rule is obtained, so as to finally obtain target data meeting a main system data model.
In the embodiment, the main system determines a target data model corresponding to the subsystem according to data to be converted by receiving the data to be converted sent by the subsystem; searching a target configuration file corresponding to the target data model; and extracting target data conversion rules from the target configuration file, and converting the data to be converted according to the target data conversion rules to obtain target data, so that the rapid conversion of data formats among different data models is realized, and the development cost of different system butt joints is reduced.
Referring to fig. 3, fig. 3 is a flowchart illustrating a data conversion method according to a second embodiment of the present invention.
Based on the first embodiment, after step S20, the method further includes:
step S201: and when the configuration file corresponding to the target data model is not found, the main system marks the target data model as a data model to be added.
It should be understood that in actual situations, when the main system does not find the configuration file corresponding to the target data model, it indicates that the data model of the subsystem may be a new data model to be added, and at this time, the main system may perform subsequent operations according to the verification result after verifying whether the system source of the subsystem is valid, and if the subsystem is verified to be a valid system, mark the target data model corresponding to the subsystem as the data model to be added.
In a specific implementation, when the configuration file corresponding to the target data model is not found, the host system marks the target data model as a data model to be added.
Step S202: and the main system acquires main system data model information corresponding to the main system.
It will be appreciated that prior to generating rules for data conversion between the host system and the subsystem, the host system needs to refer to a data format corresponding to its own data model to generate a configuration file corresponding to the data model to be added, and thus, the host system needs to extract host system data model information, which includes, but is not limited to, information such as a data structure, a data operation, and/or a data constraint.
It should be noted that, the data structure is mainly used for describing types, contents, properties, links among data, and the like of data, and is a set of target types; the data operation is mainly used for describing the operation type and operation mode on the corresponding data structure, is a collection of operation operators and comprises a plurality of operation and reasoning rules, and is used for operating a database formed by effective examples of the target type; the data constraint is mainly used for describing grammar, word sense relation, constraint and dependency relation among data in a data structure and rules of dynamic change of the data so as to ensure the correctness, effectiveness and compatibility of the data.
Step S203: and the main system generates a configuration file to be added corresponding to the data model to be added according to the main system data model information.
In a specific implementation, after the main system obtains the data model information of the main system, the main system may generate a configuration file to be added corresponding to the data model to be added. Taking the data structure in the data model information as an example: the main system determines a target data structure corresponding to each data item in the main system data model according to the main system data model information; determining a data structure to be configured corresponding to each data item in the data model to be added according to the data model to be added; and establishing a data conversion rule between the target data structure and the data structure to be configured based on the target data structure, and generating a configuration file to be added corresponding to the data model to be added according to the established data conversion rule.
Step S204: and the main system adds the configuration file to be added and the data model to be added into the mapping relation.
After the configuration of the configuration file to be added is completed, in order to facilitate the subsequent quick search of the configuration file according to the data model, in this embodiment, the host system may further add the configuration file to be added and the data model to be added to the pre-established mapping relationship.
When the configuration file corresponding to the target data model is not found, the main system marks the target data model as a data model to be added; and acquiring the data model information of the main system corresponding to the data model information of the main system, generating a configuration file to be added corresponding to the data model to be added according to the data model information of the main system, and adding the configuration file to be added and the data model to be added into the mapping relation, so that the line-up speed of a new subsystem is ensured, and the input cost to the new system is reduced.
Referring to fig. 4, fig. 4 is a flowchart illustrating a data conversion method according to a third embodiment of the present invention.
Based on the above embodiments, in this embodiment, after step S30, the method further includes:
step S301: and the main system acquires a conversion log file when converting the data to be converted.
It is understood that in general, log files are recorded files or sets of files used to record system operational events, and can be divided into event logs and message logs. While event logs are generally used to record events that occur in the execution of a system in order to provide tracking that can be used to understand the activities and diagnostic problems of the system. In this embodiment, the conversion log file may be defined as a conversion event log.
In a specific implementation, in order to facilitate the subsequent understanding of the data conversion process by the staff and the tracking of the problem occurring in the conversion process, the main system may acquire a conversion event log, that is, the conversion log file, when converting the data to be converted.
Step S302: and when the main system detects that the conversion log file contains conversion error reporting information, the main system stores the conversion log file containing the conversion error reporting information.
It can be understood that, in general, the host system has huge workload per day, and the number of times of performing data conversion is hundreds of millions, so in order to avoid that the host system stores the conversion log file of each data conversion, excessive storage resources are occupied, and the input cost is increased. In this step, the host system may perform error reporting detection on each generated conversion log file, and save the conversion log file including the conversion error reporting information when detecting that the conversion log file includes the conversion error reporting information, so as to further save the storage space of the host system, and specifically, save the log files to a pre-established folder, so that the staff may check later.
Step S303: and the main system responds to a viewing instruction input by a user and displays the conversion log file containing the conversion error reporting information.
In a specific implementation, when the main system receives a log file viewing instruction input by a worker, the main system responds to the viewing instruction and displays a target conversion log file which is intended to be viewed by the worker and contains conversion error reporting information so as to carry out corresponding modification and adjustment.
The main system of the embodiment obtains a conversion log file when converting the data to be converted; when the conversion log file is detected to contain conversion error reporting information, the conversion log file containing the conversion error reporting information is stored; and responding to a viewing instruction input by a user, and displaying the conversion log file containing the conversion error-reporting information, so that the storage space of the main system is saved, and the workload of a worker for maintaining the main system is reduced.
Referring to fig. 5, fig. 5 is a flowchart illustrating a data conversion method according to a fourth embodiment of the present invention.
Based on the above embodiments, in this embodiment, the step S10 may specifically include:
step S101: and the main system receives the data to be converted sent by the subsystem, and determines the system identification corresponding to the subsystem according to the data to be converted.
It should be noted that, the system identifier may be identification information capable of distinguishing different external systems, for example: the identification information may be a number, a serial number, etc. configured according to a set numbering rule when the main system is first accessed by different subsystems, or may be an identification code determined according to a data source to be converted, for example: the data A is derived from the payment treasure system, and the main system can set the identification code corresponding to the payment treasure system as characters such as ZFB, zhifubao and the like. Of course, the specific system identifier may be set according to the actual situation, which is not limited in this embodiment.
In a specific implementation, a main system receives data to be converted sent by a subsystem, and then determines a system identifier corresponding to the subsystem according to a data source of the data to be converted.
Step S102: and the main system searches a data model corresponding to the system identifier, and takes the searched data model as a target data model.
In this embodiment, a second mapping relationship between a system identifier and a data model may be established in advance in the main system, so that when the main system determines the system identifier corresponding to the subsystem, the data model corresponding to the system identifier may be searched in the second mapping relationship, and the searched data model is used as the target data model, so as to implement rapid determination of the target data model.
Further, in practical situations, when the subsystem is updated, a worker may need to update or modify the configuration file corresponding to the subsystem. Specifically, when receiving a configuration file modification instruction input by a worker, a main system responds to the configuration file modification instruction and determines a configuration file to be modified according to the configuration file modification instruction; extracting a modification file and a modification command contained in the configuration file modification instruction; based on the modification command, the configuration file to be modified is modified according to the modification file, and the modified configuration file is stored, so that the configuration file is maintained in time, and the reliability and stability of data conversion between the main system and the subsystem are ensured.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores data conversion programs of different data models, and the data conversion programs among the different data models realize the steps of the data conversion method of the different data models in the embodiment.
Referring to fig. 6, fig. 6 is a block diagram illustrating a first embodiment of a data conversion device with a different data model according to the present invention.
As shown in fig. 6, the data conversion device of the present embodiment provides a data model, including: a model determination module 101, a file search module 102, and a data conversion module 103;
the model determining module 101 is configured to receive data to be converted sent by a subsystem, and determine a target data model corresponding to the subsystem according to the data to be converted;
it should be noted that, the model determining module 101 may be a core system or platform capable of receiving data sent by different external systems (i.e. the subsystems), and analyzing, calculating, and processing the data, for example: an insurance system of an insurance company, a securities trading system of an securities company, an online payment system of a bank, etc. The subsystem may be an external system to which the model determination module 101 interfaces, such as a system corresponding to a payment treasury, weChat, microblog, etc. platform to which an insurance system interfaces.
It should be understood that, since the external systems are often in maturity when interfacing with the model determination module 101, the system data models corresponding to these external systems are all different, so in order to enable normal information interaction between the model determination module 101 and the subsystem, the data sent by the subsystem needs to be converted into a data format corresponding to the data model of the model determination module 101, so as to enable subsequent operations or processing.
The file searching module 102 is configured to search a target configuration file corresponding to the target data model;
it should be noted that, in order to implement rapid data conversion and improve data conversion efficiency, before executing this step, a worker may set a data model base for storing data models of different external systems in the server where the model determining module 101 is located or a storage space corresponding to the server in advance. In the data model library, a configuration file between each subsystem data model and the model determining module 101 data model is correspondingly stored, and the configuration file includes data conversion basis or rules, for example: the data conversion rule [ a.cc.xxx=b.xxx ], where [ a.cc.xxx ] is the type of data to be converted sent by the subsystem, and [ b.xxx ] is the target data type applicable to the data model of the model determination module 101. The number of data conversion rules included in each configuration file may be according to the actual situation, which is not limited in the present embodiment.
In this embodiment, the target configuration file searching process may be implemented by establishing a mapping relationship, where a mapping end source of the mapping relationship is a data model type corresponding to the subsystem, and a destination end is a target configuration file, that is, the mapping relationship includes a correspondence between a data model and a configuration file. Therefore, the file searching module 102 can quickly and accurately search the target configuration file through the mapping relation when determining the data model corresponding to the subsystem, thereby improving the data conversion efficiency. Specifically, the file searching module 102 may search a configuration file corresponding to the target data model in a mapping relationship, where a correspondence between the data model and the configuration file is stored in the mapping relationship; and then taking the searched configuration file as a target configuration file.
The data conversion module 103 is configured to extract the target data conversion rule from the target configuration file, and convert the data to be converted according to the target data conversion rule, so as to obtain target data.
In a specific implementation, after the file searching module 102 searches the target configuration file, the data converting module 103 may parse the target configuration file, extract a corresponding data converting rule, that is, the target data converting rule, and convert the data to be converted according to the target data converting rule after obtaining the target converting rule, so as to finally obtain the target data that meets the data model of the model determining module 101.
According to the embodiment, the target data model corresponding to the subsystem is determined according to the data to be converted by receiving the data to be converted sent by the subsystem; searching a target configuration file corresponding to the target data model; and extracting target data conversion rules from the target configuration file, and converting the data to be converted according to the target data conversion rules to obtain target data, so that the rapid conversion of data formats among different data models is realized, and the development cost of different system butt joints is reduced.
Other embodiments or specific implementations of the data conversion device of different data models of the present invention may refer to the above method embodiments, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. A method of data conversion for different data models, the method comprising:
the method comprises the steps that a main system receives data to be converted sent by a subsystem, and a target data model corresponding to the subsystem is determined according to the data to be converted;
the main system searches a target configuration file corresponding to the target data model;
the main system extracts the target data conversion rule from the target configuration file, and converts the data to be converted according to the target data conversion rule to obtain target data;
the method comprises the steps that the main system receives data to be converted sent by a subsystem and determines a target data model corresponding to the subsystem according to the data to be converted, and the method comprises the following steps:
establishing a second mapping relation between a system identifier and a data model in the main system;
the main system receives data to be converted sent by a subsystem, and determines the system identification corresponding to the subsystem according to the data to be converted;
the main system searches a data model corresponding to the system identifier through the second mapping relation, and takes the searched data model as a target data model;
before the step of searching the target configuration file corresponding to the target data model, the main system further comprises:
setting a data model library for storing different subsystem data models in a server or a corresponding storage space where the main system is located, wherein configuration files between each subsystem data model and the main system data model are correspondingly stored in the data model library, and the configuration files comprise data conversion bases or data conversion rules.
2. The method of claim 1, wherein the host system looking up a target profile corresponding to the target data model comprises:
the main system searches a configuration file corresponding to the target data model in a mapping relation, wherein the mapping relation stores the corresponding relation between the data model and the configuration file;
and the main system takes the searched configuration file as a target configuration file.
3. The method of claim 2, wherein after the host system searches the mapping relationship for the configuration file corresponding to the target data model, the method further comprises:
when the main system does not find the configuration file corresponding to the target data model, marking the target data model as a data model to be added;
the main system acquires main system data model information corresponding to the main system;
the main system generates a configuration file to be added corresponding to the data model to be added according to the main system data model information;
and the main system adds the configuration file to be added and the data model to be added into the mapping relation.
4. The method of claim 3, wherein the generating, by the host system, a configuration file to be added corresponding to the data model to be added according to the host system data model information, comprises:
the main system determines a target data structure corresponding to each data item in the corresponding main system data model according to the main system data model information;
the main system determines a data structure to be configured corresponding to each data item in the data model to be added according to the data model to be added;
the main system establishes a data conversion rule between the target data structure and the data structure to be configured based on the target data structure, and generates a configuration file to be added corresponding to the data model to be added according to the established data conversion rule.
5. The method according to any one of claims 1 to 4, wherein the host system extracts the target data conversion rule from the target configuration file, converts the data to be converted according to the target data conversion rule, and further comprises, after obtaining target data:
the main system acquires a conversion log file when converting the data to be converted;
when the main system detects that the conversion log file contains conversion error reporting information, the main system stores the conversion log file containing the conversion error reporting information;
and the main system responds to a viewing instruction input by a user and displays the conversion log file containing the conversion error reporting information.
6. The method of claim 5, wherein the method further comprises:
the method comprises the steps that a main system responds to a configuration file modification instruction input by a user, and a configuration file to be modified is determined according to the configuration file modification instruction;
the main system extracts a modification file and a modification command contained in the configuration file modification instruction;
and the main system modifies the configuration file to be modified according to the modification file based on the modification command and stores the modified configuration file.
7. A data conversion device for different data models, the device comprising: the system comprises a model determining module, a file searching module and a data converting module;
the model determining module is used for receiving data to be converted sent by a subsystem and determining a target data model corresponding to the subsystem according to the data to be converted;
the file searching module is used for searching a target configuration file corresponding to the target data model;
the data conversion module is used for extracting the target data conversion rule from the target configuration file, and converting the data to be converted according to the target data conversion rule to obtain target data;
the model determining module is further used for establishing a second mapping relation between the system identifier and the data model in the main system; the main system receives data to be converted sent by a subsystem, and determines the system identification corresponding to the subsystem according to the data to be converted; the main system searches a data model corresponding to the system identifier through a second mapping relation, and takes the searched data model as a target data model;
the file searching module is further configured to set a data model library for storing different subsystem data models in a server or a corresponding storage space where the main system is located in advance, wherein a configuration file between each subsystem data model and the main system data model is correspondingly stored in the data model library, and the configuration file includes a data conversion basis or a data conversion rule.
8. A data conversion device of different data models, the device comprising: memory, a processor and a data conversion program of a different data model stored on the memory and executable on the processor, the data conversion program of the different data model being configured to implement the steps of the data conversion method of the different data model as claimed in any one of claims 1 to 6.
9. A storage medium having stored thereon a data conversion program of a different data model, which when executed by a processor, implements the steps of the data conversion method of a different data model as claimed in any one of claims 1 to 6.
CN201810358566.XA 2018-04-19 2018-04-19 Data conversion method, device, equipment and storage medium for different data models Active CN108563768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810358566.XA CN108563768B (en) 2018-04-19 2018-04-19 Data conversion method, device, equipment and storage medium for different data models

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810358566.XA CN108563768B (en) 2018-04-19 2018-04-19 Data conversion method, device, equipment and storage medium for different data models

Publications (2)

Publication Number Publication Date
CN108563768A CN108563768A (en) 2018-09-21
CN108563768B true CN108563768B (en) 2023-05-23

Family

ID=63535761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810358566.XA Active CN108563768B (en) 2018-04-19 2018-04-19 Data conversion method, device, equipment and storage medium for different data models

Country Status (1)

Country Link
CN (1) CN108563768B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635583B (en) * 2018-12-27 2021-07-27 中国电子科技集团公司第三十研究所 Information security sharing and exchanging method and system based on data security label
CN111193916B (en) * 2018-12-29 2022-03-29 中科寒武纪科技股份有限公司 Operation method
CN109831440A (en) * 2019-02-21 2019-05-31 中国联合网络通信集团有限公司 Interface packets conversion method, device and storage medium
CN110134669A (en) * 2019-05-09 2019-08-16 深圳美美网络科技有限公司 A kind of data model monitoring method
CN110297945B (en) * 2019-07-02 2021-07-30 中国工商银行股份有限公司 Data information processing method and system based on XBRL
CN110362630B (en) * 2019-07-19 2023-11-28 深圳前海微众银行股份有限公司 Data management method, device, equipment and computer readable storage medium
CN110825807B (en) * 2019-09-23 2023-07-25 平安科技(深圳)有限公司 Data interactive conversion method, device, equipment and medium based on artificial intelligence
CN110727646B (en) * 2019-10-10 2021-05-04 京东数字科技控股有限公司 Format conversion method and device for system log, electronic equipment and computer medium
CN110928598B (en) * 2019-11-11 2024-01-30 南方电网财务有限公司 System configuration method, device, computer equipment and storage medium
CN112671734B (en) * 2020-12-16 2023-06-09 中国平安人寿保险股份有限公司 Message processing method for multiple data sources and related equipment thereof
CN112671873B (en) * 2020-12-17 2022-11-15 用友网络科技股份有限公司 Data transmission method, data transmission device and readable storage medium
CN114500648A (en) * 2022-01-17 2022-05-13 徐工汉云技术股份有限公司 Tower crane data multi-form conversion forwarding method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710435A (en) * 2012-05-14 2012-10-03 中国电力科学研究院 System integration interface adapter based on common information model (CIM)
CN102750358A (en) * 2012-06-12 2012-10-24 中国电力科学研究院 Mapping method and system of system data model to common information model (CIM)
CN104007984A (en) * 2014-06-20 2014-08-27 中国银行股份有限公司 Data converting method and device
CN104216961A (en) * 2014-08-21 2014-12-17 北京奇艺世纪科技有限公司 Method and device for data processing
CN105868379A (en) * 2016-04-06 2016-08-17 浪潮通用软件有限公司 Heterogeneous model data conversion query tool based on dimensions
CN106708475A (en) * 2015-07-16 2017-05-24 中兴通讯股份有限公司 Northbound data conversion method and apparatus
CN107526806A (en) * 2017-08-22 2017-12-29 北京奇虎科技有限公司 The conversion method and device of data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9367597B2 (en) * 2013-11-18 2016-06-14 International Business Machines Corporation Automatically managing mapping and transform rules when synchronizing systems

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710435A (en) * 2012-05-14 2012-10-03 中国电力科学研究院 System integration interface adapter based on common information model (CIM)
CN102750358A (en) * 2012-06-12 2012-10-24 中国电力科学研究院 Mapping method and system of system data model to common information model (CIM)
CN104007984A (en) * 2014-06-20 2014-08-27 中国银行股份有限公司 Data converting method and device
CN104216961A (en) * 2014-08-21 2014-12-17 北京奇艺世纪科技有限公司 Method and device for data processing
CN106708475A (en) * 2015-07-16 2017-05-24 中兴通讯股份有限公司 Northbound data conversion method and apparatus
CN105868379A (en) * 2016-04-06 2016-08-17 浪潮通用软件有限公司 Heterogeneous model data conversion query tool based on dimensions
CN107526806A (en) * 2017-08-22 2017-12-29 北京奇虎科技有限公司 The conversion method and device of data

Also Published As

Publication number Publication date
CN108563768A (en) 2018-09-21

Similar Documents

Publication Publication Date Title
CN108563768B (en) Data conversion method, device, equipment and storage medium for different data models
CN109902105B (en) Data query system, method, device and storage medium for micro-service architecture
CN110263009B (en) Method, device and equipment for generating log classification rule and readable storage medium
CN108647355A (en) Methods of exhibiting, device, equipment and the storage medium of test case
CN112287009A (en) Interface calling and interface data warehousing method, device, equipment and storage medium
CN112287013B (en) Data conversion method and adapter
CN108664471B (en) Character recognition error correction method, device, equipment and computer readable storage medium
CN106126412B (en) The automatic Evaluation and Optimization of code quality based on Android API operating specification
CN112181804A (en) Parameter checking method, equipment and storage medium
CN110389941B (en) Database checking method, device, equipment and storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN113076104A (en) Page generation method, device, equipment and storage medium
CN111737334A (en) Data reporting method, device, equipment and storage medium
US10241957B2 (en) Workload patterns for realistic load recreation in performance testing
CN116560683A (en) Software updating method, device, equipment and storage medium
CN110362630B (en) Data management method, device, equipment and computer readable storage medium
CN114610608A (en) Test case processing method and device, electronic equipment and storage medium
CN114035789A (en) Log analysis template generation method, log analysis device and log analysis equipment
CN113657088A (en) Interface document analysis method and device, electronic equipment and storage medium
CN116700778B (en) Interface difference analysis method, device, storage medium and apparatus
CN117033309A (en) Data conversion method and device, electronic equipment and readable storage medium
CA3180833A1 (en) Flink sql statement verification method and device, computer equipment and storage medium
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
CN114492324A (en) Component data statistical method and device
CN112632211A (en) Semantic information processing method and equipment for mobile robot

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
GR01 Patent grant
GR01 Patent grant