CN110688343A - Method and device for converting data format - Google Patents

Method and device for converting data format Download PDF

Info

Publication number
CN110688343A
CN110688343A CN201910787298.8A CN201910787298A CN110688343A CN 110688343 A CN110688343 A CN 110688343A CN 201910787298 A CN201910787298 A CN 201910787298A CN 110688343 A CN110688343 A CN 110688343A
Authority
CN
China
Prior art keywords
data
format
conversion
converting
model
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.)
Granted
Application number
CN201910787298.8A
Other languages
Chinese (zh)
Other versions
CN110688343B (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.)
Tianjin Xinkai Life Technology Co Ltd
Tianjin Happy Life Technology Co Ltd
Original Assignee
Tianjin Xinkai Life Technology Co Ltd
Tianjin Happy Life Technology Co 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 Tianjin Xinkai Life Technology Co Ltd, Tianjin Happy Life Technology Co Ltd filed Critical Tianjin Xinkai Life Technology Co Ltd
Priority to CN201910787298.8A priority Critical patent/CN110688343B/en
Publication of CN110688343A publication Critical patent/CN110688343A/en
Application granted granted Critical
Publication of CN110688343B publication Critical patent/CN110688343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion

Abstract

The invention discloses a method, a device, a computer readable medium and an electronic device for converting data formats, wherein the method comprises the following steps: acquiring a data conversion format identifier; selecting a conversion model according to the data conversion format identifier; and searching a data source according to the conversion model, and performing format conversion on the data source according to the conversion model. According to the invention, by acquiring the data conversion format identifier, the conversion model meeting the data submission requirement can be accurately selected, and the data conversion format identifier is directly assigned and replaced by searching the data source through the conversion model, so that a user only needs to fill in data once, the data is not required to be repeatedly filled in when submitting a report, only needs to self-define and configure the required conversion model according to an interface, select the data source needing to be submitted and directly convert the data source into the customized data format, and the submission success rate and the submission convenience are greatly improved.

Description

Method and device for converting data format
Technical Field
The present invention relates to the field of data conversion technology application, and in particular, to a method and an apparatus for converting a data format.
Background
The national adverse drug reaction monitoring center reports the drug in an R3xml format. R3xml complies with the HL7 version 3(v3) information standard, a specification that facilitates interoperability between systems, for storing and sharing information electronically across platforms. In the technical field, a plurality of sets of application programs need to be developed for generating a report national report, and an adverse reaction report in an xml format needs to be reported in a mail attachment form or is reported in a pure manual input mode, so that the operation process is time-consuming and labor-consuming. Moreover, because the reporting platform is updated frequently, the requirement for submitting the data format is changed correspondingly, so that the development cost for developing a plurality of sets of application programs is high, the maintenance and the program modification of a subsequent system are not facilitated, the development amount is large, and the flexibility is poor.
Therefore, when data is reported in the national adverse drug reaction monitoring center at present, the problem of format conversion is always faced, and the data submission efficiency is low.
Disclosure of Invention
The invention provides a method and a device for converting a data format, a computer readable medium and electronic equipment, which are used for solving the problem of format conversion during data reporting of the existing national adverse drug reaction monitoring center, thereby improving the data submission efficiency, reducing the development cost of a data submission application program and improving the flexibility of program modification and maintenance.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
In a first aspect, an embodiment of the present invention provides a method for converting a data format, including:
acquiring a data conversion format identifier;
selecting a conversion model according to the data conversion format identifier;
and searching a data source according to the conversion model, and performing format conversion on the data source according to the conversion model.
In a second aspect, an embodiment of the present invention provides an apparatus for converting a data format, including:
the acquisition module is used for acquiring the data conversion format identifier;
the model selection module is used for selecting a conversion model according to the data conversion format identifier;
and the format conversion module is used for searching a data source according to the conversion model and converting the format of the data source according to the conversion model.
In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for converting a data format as described in the first aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus; the memory is configured to store a computer program, the processor is connected to the memory through the bus, and when the electronic device is running, the processor executes the computer program of the memory, so that the processor executes the method for converting a data format as described in the first aspect.
The method, the device, the computer readable medium and the electronic equipment for converting the data format provided by the embodiment of the invention at least have the following beneficial effects:
by acquiring the data conversion format identifier, the conversion model meeting the data submission requirement can be accurately selected, and the conversion model is used for searching the data source and directly carrying out assignment replacement on the data conversion format identifier, so that a user only needs to fill in data once, the data is not required to be repeatedly filled in during submission of a report, the required conversion model is only required to be configured according to an interface in a self-defining way, the data source needing to be submitted is selected and directly converted into a customized data format, and the submission success rate and the submission convenience are greatly improved.
Drawings
In order to more clearly illustrate the embodiments or the prior art solutions of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic flow chart illustrating a method for converting a data format according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for converting data formats according to another embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating a process of acquiring a data conversion format identifier in a method for converting a data format according to an embodiment of the present invention;
FIG. 4 is a schematic flowchart illustrating a method for converting a data format according to a conversion model selected according to a data conversion format identifier according to an embodiment of the present invention;
fig. 5 is a schematic flowchart illustrating a process of searching for a data source replacement data conversion format identifier according to a conversion model in the method for converting a data format according to an embodiment of the present invention;
FIG. 6 is a block diagram illustrating an apparatus for converting data format according to an embodiment of the present invention;
FIG. 7 is a block diagram illustrating an apparatus for converting data format according to another embodiment of the present invention;
fig. 8 is a block diagram schematically illustrating a structure of an obtaining module in the apparatus for converting a data format according to an embodiment of the present invention;
FIG. 9 is a block diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail and completely with reference to the following embodiments and accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
As shown in fig. 1, an embodiment of the present invention provides a method for converting a data format, and in a specific embodiment, the method may be used in an application system for uploading an adverse reaction report to a national adverse reaction monitoring center, where the application is referred to as a report uploading system for the following detailed description of each embodiment. The specific flow of the implementation mode is shown in fig. 1, and comprises the following steps:
s101, acquiring a data conversion format identifier.
As a specific implementation manner, this step may specifically include that after the user enters the data to be reported, the data is stored and uploaded to a server of the report uploading system to send a data uploading instruction, and after the system receives the entered data of the user, the system correspondingly returns a prompt check box/radio box to the user to prompt the user to select a target platform to be submitted, where the target platform is a data receiving platform of one department of the national adverse drug reaction monitoring center that receives a drug report. The user selects the platform to be submitted according to the user actually, identifies the data uploading format required by the platform according to the selection result of the user, and converts the data uploading instruction of the user into the data conversion format identifier corresponding to the data format required by the platform.
And S102, selecting a conversion model according to the data conversion format identifier.
In this embodiment, when the server receives the data conversion format identifier, a conversion model conforming to the data conversion format identifier is selected according to the data conversion format identifier, and a data upload instruction corresponding to the data conversion format identifier is input to the conversion model. The conversion model in this embodiment may include at least three types, which are: directly carrying out an online submission model, a PDF format offline submission model and an E2Bxml format online submission model on a national system report interface. It should be noted that the conversion model in practical application is not limited to the above three types, and the conversion model may be configured by self-definition according to the delivery requirement of the receiving platform.
S103, searching a data source according to the conversion model, and performing format conversion on the data source according to the conversion model.
The data uploading instruction of the user can include information of a data type to be reported, a receiving platform to be reported and the like, a data source is searched according to a selected conversion model to obtain original data meeting the reporting requirement, specifically, a json data structure can be traversed by a cyclic recursion to search the original data, the original data is assigned to a data conversion format identifier, format conversion is carried out on the original data according to the conversion model, and a data format meeting the submitting requirement finally is generated.
According to the method for converting the data format, the conversion model meeting the data submission requirements can be accurately selected by obtaining the data conversion format identifier, the data source is searched through the conversion model, assignment and replacement are directly carried out on the data conversion format identifier, so that a user only needs to fill data once, the data does not need to be repeatedly filled when submitting the report, the required conversion model is only needed to be configured according to interface customization, the data source needing to be submitted is selected and the customized data format is directly converted, the submission success rate and the submission convenience are greatly improved, meanwhile, conversion of one report based on a json data structure to multiple data formats can be achieved, and the data uploading requirements of different report receiving platforms are met.
As a specific implementation manner, as shown in fig. 2, in another embodiment of the present invention, a method for converting a data format further includes, on the basis of the embodiment shown in fig. 1:
s201, collecting a data source, and storing the data source by adopting a json data structure;
step S202, json data structure node information is configured, and at least one data format of the intermediate stage is generated.
In particular, the data source includes data information from users entered on other platforms associated with the reporting platform. For example, in the present embodiment, the HLT medication alert system related to the national ADM realizes a data submission communication relationship with the national ADM. An authorized user can log in the HLT drug warning system, follow the data entry requirement of the system and input the related information of the drug in an html grammar visualization interface in a manual entry mode of a form text box, a drop-down box, a check box and the like to serve as original data. The entry field may include: reporter information, patient basis information, medication information, related fields of adverse events. For example, the following input methods can be specifically adopted: after the batch of drugs (batch _ num) is entered: 1033239112, respectively; selection after the acquisition country (obatain _ count): china, entering behind a pharmaceutical ingredient (formulation): magnesium stearate, and the like. In addition, the frames related to the disease codes can be automatically supplemented and completed, and the form is submitted to store data and uploaded to the server after the input is completed. If a tumor is entered in the disease box, the corresponding medically encoded value 10028980 for the complete tumor is automatically supplemented. All the recorded data are used as data sources and stored by adopting a json data structure, and specifically, the storage format of the recorded data is as follows: a key-value structured json data structure (raw input) is generated. Continuing with the above example, 3 indices to be entered: the method comprises the steps of preparing medicine batches, obtaining countries and medicine components, setting a json tree structure node, and uniformly setting a storage structure corresponding to medicine information, wherein the storage structure corresponding to the medicine information is medicine information, namely { medicine batch: 1033239112, respectively; the acquisition country: china; the medicine components are as follows: magnesium stearate }.
According to the requirement of a user or the format requirement of a submission platform on submission data, json data structure node information can be configured in a user-defined manner, and at least one intermediate-stage data format is generated, wherein the intermediate-stage json data format described in the embodiment includes: ADR (json), SAE (json), E2B (json). Specifically, necessary fields are extracted from hundreds of fields included in the data source, and the server configures in the background, based on these fields, access paths in the formats of adr (json), sae (json), E2B (json), and the like as json in the intermediate stage. Examples are as follows:
taking ADR (json) as an example, the structure of the ADR (json) data format may be set by itself or strictly according to the national standard, the data format is used to obtain the medicine information required by the ADR report, and the structure of the ADR (json) data format may be expressed as:
Figure BDA0002178477200000061
the specific implementation manner of selecting the access path containing the adr (json) data format to search the data source can be expressed as follows:
1. acquiring the batch number of the medicine information, and configuring an ADR (json) data format with a data format of: "batch _ num": icsr _ content.product _ information.product _ information.batch _ lot _ number.default value }.
2. Acquiring the medicine components of the ADR medicine, and configuring an ADR (json) data format with a data format of: "transformation" -icsr-content.product-information.product-information.transformation.transformation.DefaultValue }
And if nodes with deeper layers need to be configured, adding and configuring corresponding data formats according to the nodes of the json tree structure.
It should be noted that, in this embodiment, the data format of each intermediate stage may perform constraint model matching according to a requirement for a user to enter data or a requirement for a data delivery format of a report receiving platform, and the constraint model of the data format may be configured in a self-defined manner in a key-value group (key-value pair group) manner, which is exemplified by configuring a constraint model of a messagetype, and the configuration form of the constraint model of the messagetype is as follows: according to the form, { "name", "message type", "type" "," string "," length ": 1", "acceptance range", "from 1 to 4(["1","2","3","4 "])", according to the form, if other constraint models need to be configured, corresponding requirements can be added, for example, configuration value range verification is added, and page configuration field types and value range are verified in corresponding value ranges. If the constraint configuration of the reporttype field type can be implemented according to the requirement, the type requires that the constraint model must be a string, and the acceptable range is 1-4.
In the embodiment, original data are collected and stored in a json data structure as a data source, and json (such as adr (json), sae (json), E2B (json)) and a constraint model thereof in an intermediate stage can be configured according to data uploading requirements by configuring json data structure node information, so that the flexibility of data format conversion is improved, and the technical effect of automatically converting json into various data formats in real time is realized. It should be noted that the data source collection and the configuration of the json data structure may be performed before the step of acquiring the data conversion format identifier in step S101 shown in fig. 1, or may be performed at any subsequent step, which is understood by those skilled in the art as a process of dynamic continuity of data preparation and data update.
As a specific implementation manner, as shown in fig. 3, the process of acquiring the data conversion format identifier in step S101 in fig. 1 may specifically include:
s311, receiving a data conversion instruction;
s312, determining a submission format required by output data according to the data conversion instruction;
and S313, converting the data conversion instruction into a corresponding data conversion format identifier according to the submission format.
In this embodiment, after the user enters the data to be reported, the user saves and uploads the data to the server of the report uploading system to select the receiving platform to be uploaded, where the receiving platform may be one of the departments in which the national adverse drug reaction monitoring center receives the drug report, and submits the data report to the department. The uploading system receives a data format conversion instruction of a user, the user actually selects according to the data format conversion instruction, the data delivery format required by the platform is identified according to the platform to be delivered selected by the user, the delivery format required by the data of the final output report is determined, and the data uploading instruction of the user is converted into a data conversion format identifier corresponding to the delivery format according to the determined delivery format.
In the embodiment, the user data conversion instruction is converted into the corresponding data conversion format identifier, so that the original data can be accurately searched during data conversion, and the accuracy of data format conversion is ensured.
As a specific implementation manner, as shown in fig. 4, the process of selecting a conversion model according to the data conversion format identifier in step S102 in fig. 1 may specifically include:
s421, judging whether a submission format in a conversion model contains the data conversion format identifier or not;
s422, if the submission format in the conversion model contains the data conversion format identification, selecting to input the data conversion instruction corresponding to the data conversion format identification into the conversion model.
The conversion model in this example may be composed of an access path and a delivery format, where the access path is composed of at least one intermediate stage data format, for example, one access path may be any one of json (ADRjson, SAEjson, E2Bjson), json (ADRjson), json (SAEjson), json (E2Bjson), json (ADRjson, SAEjson), and one access path is selected according to the requirement of the delivery format actually required to be converted. After receiving a data conversion instruction of a user, matching a pre-configured conversion model according to a data conversion format identifier, specifically determining which conversion model can meet the data conversion requirement of the user by judging whether the conversion model contains a corresponding data conversion format identifier, converting the data meeting the requirement of the user into the data meeting the delivery format requirement through the conversion model, and uploading the data to a delivery platform appointed by the user.
As a specific implementation manner, as shown in fig. 5, the process of finding a data source according to the conversion model to replace the data conversion format identifier in step S103 in fig. 1 may be implemented by the following steps:
s531, searching a data source in a json data structure according to the access path in the conversion model;
and S532, assigning the data conversion format identification bit by the data source to generate data meeting the submission format, and submitting the data to a corresponding reporting system.
In order to make this embodiment clearer, 3 examples are listed below to describe a specific process of finding a data source according to a conversion model to replace a data conversion format identifier, and completing data conversion and submission.
1) Requesting format conversion before submitting a user, confirming a data reporting system to be submitted by the user, and matching a corresponding conversion model for the user according to the selection of the user as follows: directly docking a national system reporting interface to carry out an on-line submission model, wherein the data format conversion path of the conversion model is as follows: json (raw input) - > json (ADRjson, SAEjson, E2 bjson). According to a data mapping path preset in the conversion model, after paths are separated according to decimal points, original data stored in a json data structure are sequentially and recursively searched according to path fields until a final node is found, a node value is taken out and assigned to a data conversion format identification bit corresponding to a json structure in an intermediate stage in a selected access path, preferably, the legality of the data is verified while the assignment is carried out, a user is prompted to modify illegal data, the data verified to be legal is previewed and stored, reported data can be submitted on line, a national reporting system can be directly connected, and a submitting result can be fed back in real time.
2) Requesting format conversion before submitting a user, confirming a data reporting system to be submitted by the user, and matching a corresponding conversion model for the user according to the selection of the user as follows: the PDF format offline submission model comprises the following data format conversion paths: json (original input) - > json (ADRjson, SAEjson) - > html- > pdf. Original data are searched according to the conversion model, data conversion format identification bits are made on a text to be replaced in a html template file developed in advance, then the whole html content is read, the data conversion format identification bits are sequentially replaced into corresponding data sources in a character string replacement mode, finally corresponding language components are called, (for example, an application component package pdfkit developed by python) is used for converting html into a PDF data format, and then a user can download offline PDF according to the requirement to achieve offline delivery.
3) Requesting format conversion before submitting a user, confirming a data reporting system to be submitted by the user, and matching a corresponding conversion model for the user according to the selection of the user as follows: through an E2Bxml format online submission model, the data format conversion path of the conversion model is as follows: json (original input) - > json (E2Bjson) - > E2B (R2xml) - > E2B (R3 xml). The conversion model needs to be subjected to multi-layer conversion, firstly, found original json data are converted into an E2Bjson data format, then the E2Bjson data are converted into an E2B (R2xml) file in a key-value mode, if a receiving platform of the current submission model only accepts E2B (R3xml) (note that R3xml follows HL7 version 3(v3) information standard, the specification of interoperability among systems is facilitated, and the information is used for cross-platform electronic storage and sharing), an xsl style sheet needs to be configured, the file is mainly used for formatting an xml document language, the syntax of the xsl document can refer to a w3 cscchool document writing specification, corresponding functions are provided for elements, attributes and values, and finally, the E2B (R3xml) is generated, and the R3xml file can be directly submitted to a national E2Bjson line 2B department.
Based on the same concept as the above embodiments of the method of the present invention, the following describes an example json-to-multiple-data-format conversion apparatus provided in the embodiments of the present invention, and the apparatus for converting data format described below and the method for converting data format described above may be referred to correspondingly.
Referring to fig. 6, an embodiment of the present invention provides an apparatus for converting a data format, including an obtaining module 601, a model selecting module 602, and a format converting module 603.
The obtaining module 601 is configured to obtain a data conversion format identifier; a model selection module 602, configured to select a conversion model according to the data conversion format identifier; and the format conversion module 603 is configured to search for a data source according to the conversion model, and perform format conversion on the data source according to the conversion model.
Referring to fig. 7, another embodiment of the present invention provides an apparatus for converting a data format, which includes a model configuration module 701, an obtaining module 702, a model selection module 703 and a format conversion module 704. In this embodiment, the model configuration module 701 is configured to configure a conversion model, and specifically includes: the data source collecting unit is used for collecting data sources and storing the data sources by adopting a json data structure; and the configuration unit is used for configuring the json data structure node information and generating at least one intermediate-stage data format.
Referring to fig. 8, in the framework structure of any one of the embodiments of fig. 6 to 7, another embodiment of the present invention provides an apparatus for converting a data format, and the obtaining module may include: an instruction receiving unit 801, an instruction identifying unit 802, and an instruction converting unit 803. The instruction receiving unit 801 is configured to receive a data conversion instruction; an instruction identification unit 802, configured to determine, according to the data conversion instruction, a delivery format required by the output data; the instruction converting unit 803 is configured to convert the data conversion instruction into a corresponding data conversion format identifier according to the delivery format.
FIG. 9 is a block diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention. On the hardware level, the electronic device comprises a processor and optionally an internal bus, a network interface and a memory. The memory may include a memory, such as a Random-access memory (RAM), and may further include a non-volatile memory, such as at least one disk memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (industry standard architecture) bus, a PCI (Peripheral component interconnect) bus, an EISA (Extended industry standard architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
A memory for storing a computer program. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
In a possible implementation manner, the processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program, and the corresponding computer program can also be acquired from other equipment so as to form the purchase and delivery information interactive entry system on a logic level. And the processor executes the program stored in the memory so as to realize the method for converting the data format provided by any embodiment of the invention through the executed program.
The apparatus for converting data formats according to the embodiments of the present invention shown in fig. 6 to 8 to perform the method according to one embodiment of fig. 1 to 5 may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or any conventional processor or the like.
The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform the method for converting a data format provided in any embodiment of the present invention.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units or modules by function, respectively. Of course, the functionality of the units or modules may be implemented in the same one or more software and/or hardware when implementing the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, systems, and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should also be noted that 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 like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments of the present invention are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. A method of converting a data format, comprising:
acquiring a data conversion format identifier;
selecting a conversion model according to the data conversion format identifier;
and searching a data source according to the conversion model, and performing format conversion on the data source according to the conversion model.
2. The method of converting a data format according to claim 1, wherein the obtaining a data conversion format identifier comprises:
receiving a data conversion instruction;
determining a submission format required by output data according to the data conversion instruction;
and converting the data conversion instruction into a corresponding data conversion format identifier according to the submission format.
3. The method of converting data formats of claim 1, wherein the conversion model comprises an access path and a delivery format, the access path comprising at least one intermediate stage of data formats.
4. A method of converting a data format according to claim 3, comprising:
collecting data sources, and storing the data sources by adopting a json data structure;
and configuring json data structure node information to generate a data format of the at least one intermediate stage.
5. The method of converting a data format according to claim 4, wherein said selecting a conversion model based on said data conversion format identification comprises:
judging whether a submission format in a conversion model contains the data conversion format identifier or not;
and if the submission format in the conversion model contains the data conversion format identifier, selecting a data conversion instruction corresponding to the data conversion format identifier to be input into the conversion model.
6. The method of converting a data format according to claim 4, wherein the searching for a data source according to the conversion model and converting the format of the data source according to the conversion model comprises:
searching a data source in a json data structure according to the access path in the conversion model;
and assigning the data conversion format identifier by using the data source to generate data meeting the submission format.
7. An apparatus for converting a data format, comprising:
the acquisition module is used for acquiring the data conversion format identifier;
the model selection module is used for selecting a conversion model according to the data conversion format identifier;
and the format conversion module is used for searching a data source according to the conversion model and converting the format of the data source according to the conversion model.
8. The apparatus for converting data format according to claim 7, wherein the apparatus for converting data format further comprises a model configuration module for configuring a conversion model, the model configuration module comprising:
the data source collection unit is used for collecting data sources and storing the data sources by adopting a json data structure;
and the configuration unit is used for configuring the json data structure node information and generating at least one intermediate-stage data format.
9. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of converting a data format according to any one of claims 1 to 6.
10. An electronic device, comprising: a processor, a memory, and a bus; the memory is used for storing a computer program, the processor is connected with the memory through the bus, when the electronic device runs, the processor executes the computer program of the memory, so that the processor executes the method for converting the data format according to any one of claims 1 to 6.
CN201910787298.8A 2019-08-26 2019-08-26 Method and device for converting data format Active CN110688343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910787298.8A CN110688343B (en) 2019-08-26 2019-08-26 Method and device for converting data format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910787298.8A CN110688343B (en) 2019-08-26 2019-08-26 Method and device for converting data format

Publications (2)

Publication Number Publication Date
CN110688343A true CN110688343A (en) 2020-01-14
CN110688343B CN110688343B (en) 2023-04-28

Family

ID=69108679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910787298.8A Active CN110688343B (en) 2019-08-26 2019-08-26 Method and device for converting data format

Country Status (1)

Country Link
CN (1) CN110688343B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552731A (en) * 2020-05-09 2020-08-18 广州佳圣信息科技有限公司 Water meter flow data unifying method and device, computer equipment and storage medium
CN111597390A (en) * 2020-03-17 2020-08-28 用友网络科技股份有限公司 Data format conversion framework
CN112016276A (en) * 2020-10-29 2020-12-01 广州欧赛斯信息科技有限公司 Graphical user-defined form data acquisition system
CN112217896A (en) * 2020-10-13 2021-01-12 北京思特奇信息技术股份有限公司 JSON message conversion method and related device
CN113127226A (en) * 2021-03-12 2021-07-16 创业慧康科技股份有限公司 Method for generating data conversion model, data conversion method and device
CN113239057A (en) * 2021-05-24 2021-08-10 量子数聚(北京)科技有限公司 Enterprise data updating method and device
CN113836255A (en) * 2021-11-26 2021-12-24 中智行科技有限公司 Map format conversion method and device and electronic equipment
CN114004196A (en) * 2021-12-30 2022-02-01 云账户技术(天津)有限公司 Method and device for converting single data format of table
CN114328698A (en) * 2022-03-07 2022-04-12 宜科(天津)电子有限公司 Data conversion system
CN114500648A (en) * 2022-01-17 2022-05-13 徐工汉云技术股份有限公司 Tower crane data multi-form conversion forwarding method and system
CN116522871A (en) * 2023-07-05 2023-08-01 鹏城实验室 Data format conversion method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130311546A1 (en) * 2012-05-21 2013-11-21 Martin Fischer Parameter driven data format conversion in client/server architectures
CN104765947A (en) * 2015-03-02 2015-07-08 大连理工大学 Method for mining potential adverse drug reaction data from big data
CN106649428A (en) * 2016-08-09 2017-05-10 广州视睿电子科技有限公司 Analyzing method and apparatus of storage files
CN108021661A (en) * 2017-12-04 2018-05-11 北京锐安科技有限公司 A kind of conversion method of data format and system
CN108052474A (en) * 2018-01-02 2018-05-18 上海壹账通金融科技有限公司 Conversion method of data format, device, equipment and computer readable storage medium
CN109634681A (en) * 2018-11-15 2019-04-16 福建星云电子股份有限公司 A kind of method and device uploading data to manufacturing execution system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130311546A1 (en) * 2012-05-21 2013-11-21 Martin Fischer Parameter driven data format conversion in client/server architectures
CN104765947A (en) * 2015-03-02 2015-07-08 大连理工大学 Method for mining potential adverse drug reaction data from big data
CN106649428A (en) * 2016-08-09 2017-05-10 广州视睿电子科技有限公司 Analyzing method and apparatus of storage files
CN108021661A (en) * 2017-12-04 2018-05-11 北京锐安科技有限公司 A kind of conversion method of data format and system
CN108052474A (en) * 2018-01-02 2018-05-18 上海壹账通金融科技有限公司 Conversion method of data format, device, equipment and computer readable storage medium
CN109634681A (en) * 2018-11-15 2019-04-16 福建星云电子股份有限公司 A kind of method and device uploading data to manufacturing execution system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597390A (en) * 2020-03-17 2020-08-28 用友网络科技股份有限公司 Data format conversion framework
CN111552731A (en) * 2020-05-09 2020-08-18 广州佳圣信息科技有限公司 Water meter flow data unifying method and device, computer equipment and storage medium
CN112217896A (en) * 2020-10-13 2021-01-12 北京思特奇信息技术股份有限公司 JSON message conversion method and related device
CN112016276A (en) * 2020-10-29 2020-12-01 广州欧赛斯信息科技有限公司 Graphical user-defined form data acquisition system
CN113127226A (en) * 2021-03-12 2021-07-16 创业慧康科技股份有限公司 Method for generating data conversion model, data conversion method and device
CN113239057A (en) * 2021-05-24 2021-08-10 量子数聚(北京)科技有限公司 Enterprise data updating method and device
CN113836255A (en) * 2021-11-26 2021-12-24 中智行科技有限公司 Map format conversion method and device and electronic equipment
CN114004196A (en) * 2021-12-30 2022-02-01 云账户技术(天津)有限公司 Method and device for converting single data format of table
CN114500648A (en) * 2022-01-17 2022-05-13 徐工汉云技术股份有限公司 Tower crane data multi-form conversion forwarding method and system
CN114328698A (en) * 2022-03-07 2022-04-12 宜科(天津)电子有限公司 Data conversion system
CN116522871A (en) * 2023-07-05 2023-08-01 鹏城实验室 Data format conversion method, device, equipment and storage medium
CN116522871B (en) * 2023-07-05 2024-01-09 鹏城实验室 Data format conversion method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110688343B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN110688343A (en) Method and device for converting data format
CN106104472A (en) Specify logic checking rule and logic checking rule is applied to data
CN104391934A (en) Data calibration method and device
CA2994831A1 (en) Building and managing data-processing attributes for modeled data sources
US9304746B2 (en) Creating a user model using component based approach
CN113268336B (en) Service acquisition method, device, equipment and readable medium
CN110661665B (en) Alarming method based on Internet of things cloud platform, computer storage medium and equipment
CN111427559A (en) Method for realizing form customized service, form generation method, device and system
CN112800730A (en) Report form filling method and device
CN111581920A (en) Document conversion method, device, equipment and computer storage medium
CN106708965A (en) Data processing method and apparatus
CN110321283A (en) Interface testing case generation method, device, computer installation and storage medium
CN113254455B (en) Dynamic configuration method and device of database, computer equipment and storage medium
CN110019177A (en) The method and apparatus of rule storage
CN109284268A (en) A kind of method, system and the electronic equipment of fast resolving log
CN114048194A (en) Data management method and device and electronic equipment
US20130343226A1 (en) Timeslot interoperability between communicating platforms
CN112733516B (en) Method, device, equipment and storage medium for processing quick message
US11340918B2 (en) Knowledge engine auto-generation of guided flow experience
WO2022001269A1 (en) Configuration data merging method and apparatus, system, electronic device and medium
CN117875885A (en) Project declaration data processing method, device, equipment and storage medium
CN115238660B (en) Form dynamic generation method, device, equipment and storage medium
CN114595664A (en) Method and device for generating form and electronic equipment
CN117221074A (en) Communication message backtracking method and device based on path mapping and electronic equipment
CN116306537A (en) Data acquisition method, device, equipment and storage medium

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