CN114722109B - Data importing method, system, equipment and storage medium - Google Patents

Data importing method, system, equipment and storage medium Download PDF

Info

Publication number
CN114722109B
CN114722109B CN202210388409.XA CN202210388409A CN114722109B CN 114722109 B CN114722109 B CN 114722109B CN 202210388409 A CN202210388409 A CN 202210388409A CN 114722109 B CN114722109 B CN 114722109B
Authority
CN
China
Prior art keywords
data
service
business
updated
data carrier
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
CN202210388409.XA
Other languages
Chinese (zh)
Other versions
CN114722109A (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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210388409.XA priority Critical patent/CN114722109B/en
Publication of CN114722109A publication Critical patent/CN114722109A/en
Application granted granted Critical
Publication of CN114722109B publication Critical patent/CN114722109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a data importing method, a system, equipment and a storage medium, wherein the data importing method comprises the following steps: at least one business attribute value in business reference relations among different business data is read from a data carrier, a global identification is generated by adopting a business system algorithm to correspond to the business attribute value, an updated business reference relation is generated by utilizing the business reference relations among the different business data and the global identification, the global identification and the updated business reference relation are written into the data carrier, the updated data carrier is obtained, and business data in the updated data carrier are imported into a database. Before the data carrier is imported into the database, the key values at two ends of the updated business reference relation based on the global identification in the data carrier have uniqueness, so that the problem that the original business reference relation in the data carrier is not unique can be solved, the reference relation between the tables in the corresponding database also has uniqueness and citation, the constraint of the database is not required to be canceled, and the data quality can be kept not to be weakened.

Description

Data importing method, system, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data importing method, system, device, and storage medium.
Background
The data import is to import service data stored in a data carrier into a database system, and the "database" is a data set which is stored together in a certain manner, can be shared by a plurality of users, has a redundancy as small as possible, and is independent of an application program.
It should be noted that the information disclosed in the foregoing background section is only for enhancement of understanding of the background of the invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a data importing method, a system, equipment and a storage medium, which overcome the difficulties in the prior art and can improve the data quality in a database.
The embodiment of the invention provides a data importing method, which comprises the following steps:
reading at least one service attribute value in a service reference relation between different service class data from a data carrier;
generating a global identifier by adopting a service system algorithm to correspond to the service attribute value, and generating an updated service reference relationship by utilizing the service reference relationship and the global identifier among different service class data;
and writing the global identification and the updated service reference relation into the data carrier to obtain an updated data carrier, and importing service data in the updated data carrier into a database.
In an alternative embodiment, the data import method further comprises, before reading at least one service attribute value in the service reference relation between different service class data from the data carrier:
the data carrier is set as a namespace.
In an alternative embodiment, the business system algorithm is an algorithm that the business system uses in generating business class data in response to user input at the interface.
In an alternative embodiment, reading at least one service attribute value in a service reference relation between different service class data from a data carrier comprises:
traversing the service data in the data carrier one by one, and reading at least one service attribute value in the service reference relation between different service type data from the data carrier.
In an alternative embodiment, generating an updated business reference relationship using the business reference relationship and the global identity between different business class data includes:
traversing the service data in the data carrier one by one, and adding an updated service reference relation using the global identification in the service reference relation among different service class data.
In an alternative embodiment, importing the service data in the update data carrier into the database comprises:
and traversing and updating the service data in the data carrier one by one according to a designated sequence, and sequentially importing the service data into a database.
In an alternative embodiment, generating an updated business reference relationship using the business reference relationship and the global identity between different business class data includes:
and generating a global reference relation of the database by using the service reference relation and the global identification among different service class data.
In an alternative embodiment, generating a global business reference relationship of the database by using the business reference relationship and the global identification between different business class data includes:
and generating foreign key association based on the global identification by utilizing the global identification to the business reference relation among different business class data.
The embodiment of the disclosure also provides a data importing system, which comprises:
the data reading module reads at least one service attribute value in the service reference relation between different service type data from the data carrier;
the business reference relation updating module is used for generating a global identifier corresponding to the business attribute value by adopting a business system algorithm, and generating an updated business reference relation by utilizing the business reference relation and the global identifier among different business class data;
the writing module writes the global identifier and the updating business reference relation into the data carrier to obtain an updating data carrier;
and the importing module imports the business data in the updated data carrier into the data.
The embodiment of the invention also provides a data importing device, which comprises:
a processor;
a memory having stored therein executable instructions of a processor;
wherein the processor is configured to perform the steps of the data import method described above via execution of executable instructions.
The embodiment of the present invention also provides a computer-readable storage medium storing a program that when executed implements the steps of the above-described data import method.
The invention aims to provide a data importing method, a system, equipment and a storage medium, wherein at least one business attribute value in business quotation relations among different business types of data is read from a data carrier, a business system algorithm is adopted to correspond to the business attribute value to generate a global identifier, business quotation relations among different business types of data and the global identifier are utilized to generate an updated business quotation relation, the global identifier and the updated business quotation relation are written into the data carrier, the updated data carrier is obtained, and business data in the updated data carrier are imported into a database.
In the embodiment of the disclosure, the global identifier is a database key value. In importing data into a database, a business-level reference relationship between different business-class data is mapped into a reference relationship between a plurality of tables in the database. Before the data is imported into the database, the newly generated global identifier is written into the data carrier, so that the key values at two ends of the updated service reference relationship based on the global identifier in the data carrier are unique, and the problem that the original service reference relationship in the data carrier is not unique can be solved.
In this case, the reference relationships between tables in the database to which the updated reference relationships in the updated data carrier correspond also have uniqueness and referenceability, and the data carrier is kept consistent with the data in the database. The embodiment of the disclosure does not need to cancel the database constraint, so that the data quality can be kept not weakened.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings.
FIG. 1 is a flow chart of one embodiment of a data import method of the present invention;
FIG. 2 is a flow chart of a second embodiment of the data importing method of the present invention;
FIG. 3 is a block diagram of one embodiment of a data import system of the present invention;
FIG. 4 is a block diagram of a second embodiment of a data import system according to the present invention;
FIG. 5 is a schematic diagram of the operation of the data import system of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
The drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware forwarding modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Furthermore, the flow shown in the drawings is merely illustrative and not necessarily all steps are included. For example, some steps may be decomposed, some steps may be combined or partially combined, and the order of actual execution may be changed according to actual situations. The use of the terms "first," "second," and the like in the description herein do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. It should be noted that, without conflict, the embodiments of the present invention and features in different embodiments may be combined with each other.
The related art relates to the data importing situation of the same service class data and different service class data, and the service class refers to the object type described by the corresponding service data, such as user information, product information, order type, etc., which are not exemplified herein.
Different from the data for disclosing and importing the same service class, the service reference relation of the service level exists between the data of different service classes, so that if a batch of service data of different service types is imported into the database, the key values at two ends of the service reference relation are required to be ensured to exist and be unique.
In the related art, when different business data are imported, considering that the relations between tables are very complex, especially various foreign key relations exist, database constraint checks, such as a primary key constraint check and a foreign key constraint check, need to be temporarily canceled, and the database constraint is to make constraints on data of rows and columns of the tables, so that the integrity and uniqueness of the data in the tables are ensured.
However, since the constraint check of the database is canceled, the related art has a case that the key values at both ends of the business reference relationship of the business level in the database are not unique, resulting in a decrease in data quality.
The embodiment of the disclosure provides a data importing scheme aiming at the technical problems of related technologies, and the invention aims to generate a global identifier by adopting a service system algorithm to correspond to a service attribute value, generate an updated service reference relationship by utilizing a service reference relationship and the global identifier between different service types of data, write the global identifier and the updated service reference relationship into a data carrier to obtain the updated data carrier, and import service data in the updated data carrier into a database.
Wherein the service attribute value is located at one end of the service reference relationships of different service classes, and the service reference relationships in the data carrier refer to the service attribute value referenced by the corresponding data record. In the process of importing the database, the reference relation of the service level between different service class data is mapped into the reference relation among a plurality of tables in the database. Before the data are imported into the database, the uniqueness of the key values at two ends of the service reference relation between different service types of data is realized through the global identification, the reference relation between the corresponding tables in the database is uniqueness and referenceability, the data carrier is consistent with the data in the database, and the problem that the original service reference relation in the data carrier is not unique can be solved.
In this case, there is no need to cancel the database constraint, so that the data quality can be kept unchanged.
Fig. 1 is a flowchart of a data importing method according to an embodiment of the present disclosure, where, as shown in fig. 1, the data importing method includes the following steps:
step 110: reading at least one service attribute value in a service reference relation between different service class data from a data carrier;
step 120: generating a global identifier by adopting a service system algorithm to correspond to the service attribute value, and generating an updated service reference relationship by utilizing the service reference relationship and the global identifier among different service class data;
step 130: and writing the global identification and the updated service reference relation into the data carrier to obtain an updated data carrier, and importing service data in the updated data carrier into a database.
In the embodiment of the disclosure, the global identifier is a database key value. In importing data into a database, a business-level reference relationship between different business-class data is mapped into a reference relationship between a plurality of tables in the database. Before the data is imported into the database, the newly generated global identifier is written into the data carrier, so that the key values at two ends of the updated service reference relationship based on the global identifier in the data carrier are unique, and the problem that the original service reference relationship in the data carrier is not unique can be solved.
In this case, the reference relationships between tables in the database to which the updated reference relationships in the updated data carrier correspond also have uniqueness and referenceability, and the data carrier is kept consistent with the data in the database. The embodiment of the disclosure does not need to cancel the database constraint, so that the data quality can be kept not weakened.
In an embodiment of the present disclosure, service data in an update database is imported into the database, wherein the service data includes entity data and service reference relationships between the entity data, and the reference relationships between the entity data include update service reference relationships.
In the embodiment of the present disclosure, the data carrier may be an excel file, a csv file, or the like, which is not specifically limited herein. Wherein for the data carrier there is an import of the update service reference relationship based on the global identity at the current database import stage and exporting the data to the database.
In the embodiment of the disclosure, the data importing method receives entity data and reference relation data of service dimension organization, is beneficial to ensuring the readability and the understandability of service personnel on the data, and keeps the judgment of the correctness and the completeness of the service personnel on the data service.
In an embodiment of the present disclosure, before reading at least one service attribute value in a service reference relationship between different service class data from the data carrier, the data importing method further comprises:
the data carrier is set as a namespace.
Where namespaces (english: namespaces), also called namespaces, etc., represent a visible range of business attribute values (identifiers). A business attribute value may be defined in multiple namespaces, the meanings of which in the different namespaces are mutually exclusive. In this way, any business attribute values can be defined in a new namespace that do not conflict with any existing business attribute values, as the existing definitions are in other namespaces.
For example, let Bill be an employee of company X, work number 123, and John be an employee of company Y, work number 123. Since two persons work at different companies, each company represents a separate namespace, the same job number can be used for identification without confusion.
Thus, by setting the data carrier itself as a namespace, the uniqueness of a certain service property value (name or code) or of a combination of several service property values can be ensured within the namespace. The service level reference relation in the data carrier is to reference the service attribute value(s).
In the disclosed embodiments, the business system algorithm is an algorithm that the business system uses in generating business class data in response to user input at the interface. That is, the service data in the data carrier is generated by the service system for the content entered by the user at the interface using the service system algorithm. Thus, embodiments of the present disclosure utilize business system algorithms to generate a global identity that can be identified for a data carrier so that it can be written to the data carrier.
Wherein the global identity is also called global unique identifier (English: globally Unique Identifier, abbreviation: GUID), which is a unique identity generated by an algorithm, the main purpose of the GUID is to generate a completely unique number. The global identifier is a key value which is written into the data carrier and the database and used for generating an updated service reference relation, so that the uniqueness and the referenceability of the global identifier are utilized to realize normal reference between service data in the data carrier and the database and improve the data quality.
In an embodiment of the present disclosure, generating an updated business reference relationship using a business reference relationship and a global identifier between different business class data includes:
and generating a global business reference relation of a database by using the business reference relation and the global identification among different business class data, wherein the global business reference relation of the database is the updated business reference relation.
The embodiment of the disclosure generates a global reference relation of a database by combining the generated global identifier through the service reference relation using the one or more service attribute values. This enables the generation of a global reference relationship for the database based on the local business reference relationship for the database based on the business attribute values.
In this case, the global identifier and the global reference relationship of the database are written into the data carrier of the batch import export data, and the entity and the reference relationship are written into the database according to the appointed sequence.
In the embodiment of the present disclosure, generating a global service reference relationship of a database by using a service reference relationship and a global identifier between different service class data includes:
and generating foreign key association based on the global identification by utilizing the global identification to the business reference relation among different business class data.
Foreign key, one sentence summary: if the primary key of one table A is also present in another table B, then this end of the word in B may be the foreign key of Table A. Foreign key association is a specific way of business reference relationships for the database global.
Specifically, the global identifier in the data carrier is mapped to the database to form a primary key of one data table, while the global identifier is also present in another data table in the database, and then the global identifier in the subsequent table is used as an external key of the previous referenced data table, and the two keys form an external key association.
Fig. 2 is a flowchart of a data importing method according to another embodiment of the present disclosure, and as shown in fig. 2, the data importing method may include the following steps:
step 210: traversing the business data in the data carrier one by one, reading at least one business attribute value in business quotation relations among different business types of data from the data carrier, generating a global identifier by adopting a business system algorithm to correspond to the business attribute value, and generating an updated business quotation relation by utilizing the business quotation relations among different business types of data and the global identifier;
step 220: traversing the service data in the data carrier one by one, and adding updated service reference relations using global identifiers in the service reference relations among different service class data;
step 230: and traversing and updating the service data in the data carrier one by one according to a designated sequence, and sequentially importing the service data into a database.
With the present embodiment, a batch import of service data in the data carrier at a time can be achieved. Specifically, during batch import, a foreign key association based on a global identifier is generated by analyzing a service reference relationship, the foreign key association is the service reference relationship updated above, and the global identifier and the foreign key association are written into a data carrier.
The embodiment of the disclosure provides a means for batch import on the premise of ensuring consistent constraint strength, and improves the input efficiency.
Fig. 3 is a schematic block diagram of an embodiment of a data import system according to an embodiment of the present disclosure. As shown in fig. 3, the data import system of the present invention includes, but is not limited to:
a data reading module 310 for reading at least one service attribute value in a service reference relationship between different service class data from the data carrier;
the service reference relation updating module 320 generates a global identifier corresponding to the service attribute value by adopting a service system algorithm, and generates an updated service reference relation by utilizing the service reference relation and the global identifier among different service class data;
the writing module 330 writes the global identifier and the update service reference relationship to the data carrier, thereby obtaining an update data carrier, and importing service data in the update data carrier into the data.
The implementation principle of the above modules is referred to the related description in the data importing method, and will not be repeated here.
In the embodiment of the disclosure, when data is imported into a database, the reference relation of service levels among different service class data is mapped into the reference relation among a plurality of tables in the database. Before the data is imported into the database, the newly generated global identifier is written into the data carrier, so that the key values at two ends of the updated service reference relationship based on the global identifier in the data carrier are unique, and the problem that the original service reference relationship in the data carrier is not unique can be solved.
In this case, the reference relationships between tables in the database to which the updated reference relationships in the updated data carrier correspond also have uniqueness and referenceability, and the data carrier is kept consistent with the data in the database. The embodiment of the disclosure does not need to cancel the database constraint, so that the data quality can be kept not weakened.
Optionally, the business system algorithm is an algorithm that the business system uses in generating business class data in response to user input at the interface.
Optionally, the data reading module 310 is specifically configured to:
traversing the service data in the data carrier one by one, and reading at least one service attribute value in the service reference relation between different service type data from the data carrier.
Optionally, the service reference relation update module 320 is specifically configured to:
traversing the service data in the data carrier one by one, and adding an updated service reference relation using the global identification in the service reference relation among different service class data.
Optionally, the writing module 330 is specifically configured to:
and traversing and updating the service data in the data carrier one by one according to a designated sequence, and sequentially importing the service data into a database.
Optionally, the service reference relation update module 320 is specifically configured to:
and generating a global reference relation of the database by using the service reference relation and the global identification among different service class data.
Optionally, the service reference relation update module 320 is specifically further configured to:
and generating foreign key association based on the global identification by utilizing the global identification to the business reference relation among different business class data.
Optionally, unlike fig. 3, the data import system shown in fig. 4 further includes the following modules:
the namespace setting module 410 sets the data carrier as a namespace before reading at least one service attribute value in the service reference relationship between different service class data from the data carrier.
The embodiment of the invention also provides data importing equipment which comprises a processor. A memory having stored therein executable instructions of a processor. Wherein the processor is configured to perform the steps of the data import method via execution of the executable instructions.
As described above, the data importing apparatus according to the embodiment of the present disclosure can map, in importing data into a database, a reference relationship of a service level between different service class data into a reference relationship between a plurality of tables in the database. Before the data is imported into the database, the newly generated global identifier is written into the data carrier, so that the key values at two ends of the updated service reference relationship based on the global identifier in the data carrier are unique, and the problem that the original service reference relationship in the data carrier is not unique can be solved.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" platform.
Fig. 5 is a schematic diagram of the structure of the data import apparatus of the present invention. An electronic device 500 according to such an embodiment of the invention is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one memory unit 520, a bus 530 connecting the different platform components (including the memory unit 520 and the processing unit 510), a display unit 540, etc.
Wherein the storage unit stores program code that is executable by the processing unit 510 such that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the above data import method section of the present specification. For example, the processing unit 510 may perform the steps as shown in fig. 1-2.
The storage unit 520 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 521 and/or cache memory 522, and may further include Read Only Memory (ROM) 523.
The storage unit 520 may also include a program/utility 524 having a set (at least one) of program modules 525, such program modules 525 including, but not limited to: processing systems, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 530 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 570 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 500 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 550.
Also, electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via the bus 530. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage platforms, and the like.
The embodiment of the invention also provides a computer readable storage medium for storing a program, and the steps of the data importing method implemented when the program is executed. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the data import method section of this specification, when the program product is run on a terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out processes of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In summary, an object of the present invention is to provide a data importing method, system, device and storage medium, in importing data into a database, mapping a reference relationship of service levels between different service class data into a reference relationship between a plurality of tables in the database. Before the data is imported into the database, the newly generated global identifier is written into the data carrier, so that the key values at two ends of the updated service reference relationship based on the global identifier in the data carrier are unique, and the problem that the original service reference relationship in the data carrier is not unique can be solved.
In this case, the reference relationships between tables in the database to which the updated reference relationships in the updated data carrier correspond also have uniqueness and referenceability, and the data carrier is kept consistent with the data in the database. The embodiment of the disclosure does not need to cancel the database constraint, so that the data quality can be kept not weakened.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (11)

1. A data importing method, comprising:
reading at least one service attribute value in a service reference relation between different service class data from a data carrier;
generating a global identifier corresponding to the service attribute value by adopting a service system algorithm, and generating an updated service reference relationship by utilizing the service reference relationship among different service class data and the global identifier;
writing the global identification and the updated service reference relation into the data carrier to obtain an updated data carrier, and importing service data in the updated data carrier into a database, wherein the updated service reference relation is mapped into the reference relation among a plurality of tables in the database.
2. The data importing method according to claim 1, wherein before reading at least one service attribute value in a service reference relationship between different service class data from a data carrier, the data importing method further comprises:
the data carrier is set as a namespace.
3. The data importing method according to claim 1, wherein the service system algorithm is an algorithm used by a service system in generating service class data in response to an input of a user at an interface.
4. The data importing method according to claim 1, wherein reading at least one service attribute value in a service reference relationship between different service class data from the data carrier includes:
traversing the service data in the data carrier one by one, and reading at least one service attribute value in the service reference relation between different service type data from the data carrier.
5. The data importing method according to claim 4, wherein generating an updated service reference relation using the service reference relation between the different service class data and the global identity includes:
traversing the business data in the data carrier one by one, and adding the updated business reference relation using the global identification in the business reference relation among the different business class data.
6. The data importing method according to claim 5, wherein importing the service data in the updated data carrier into a database includes:
traversing the service data in the updated data carrier one by one according to a specified sequence, and sequentially importing the service data into the database.
7. The data importing method according to claim 1, wherein generating an updated service reference relationship using the service reference relationship between the different service class data and the global identifier includes:
and generating a global reference relation of the database by utilizing the service reference relation among the different service class data and the global identification.
8. The method of claim 7, wherein generating a database global service reference using the service reference between the different service class data and the global identity comprises:
and generating foreign key association based on the global identification by utilizing the global identification to the business reference relation among the different business class data.
9. A data import system, comprising:
the data reading module reads at least one service attribute value in the service reference relation between different service type data from the data carrier;
the business reference relation updating module is used for generating a global identifier corresponding to the business attribute value by adopting a business system algorithm, and generating an updated business reference relation by utilizing the business reference relation among different business class data and the global identifier;
the writing module writes the global identification and the updating service reference relation into the data carrier to obtain an updating data carrier;
and the importing module imports the business data in the updated data carrier into data, wherein the updated business reference relationship is mapped into a reference relationship among a plurality of tables in the database.
10. A data importing apparatus, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the data import method of any of claims 1 to 8 via execution of the executable instructions.
11. A computer-readable storage medium storing a program, wherein the program when executed by a processor implements the steps of the data import method of any of claims 1 to 8.
CN202210388409.XA 2022-04-13 2022-04-13 Data importing method, system, equipment and storage medium Active CN114722109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210388409.XA CN114722109B (en) 2022-04-13 2022-04-13 Data importing method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210388409.XA CN114722109B (en) 2022-04-13 2022-04-13 Data importing method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114722109A CN114722109A (en) 2022-07-08
CN114722109B true CN114722109B (en) 2024-02-06

Family

ID=82244582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210388409.XA Active CN114722109B (en) 2022-04-13 2022-04-13 Data importing method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114722109B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605782A (en) * 2013-11-29 2014-02-26 北京国双科技有限公司 Data insertion method and device for data table
CN104317974A (en) * 2014-11-21 2015-01-28 武汉理工大学 Reconfigurable multi-source data importing method in ERP system
CN104573100A (en) * 2015-01-29 2015-04-29 无锡江南计算技术研究所 Step-by-step database synchronization method with autoincrement identifications
CN104598610A (en) * 2015-01-29 2015-05-06 无锡江南计算技术研究所 Step-by-step database data distribution uploading and synchronizing method
CN107220266A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 It is a kind of to create Service Database, business datum storage and the method and device for determining business datum
CN107368593A (en) * 2017-07-25 2017-11-21 万帮充电设备有限公司 Data lead-in method, device and server
CN107870979A (en) * 2017-09-30 2018-04-03 平安科技(深圳)有限公司 Electronic installation, extract tables of data data method and storage medium
CN107908637A (en) * 2017-09-26 2018-04-13 北京百度网讯科技有限公司 The entity update method and system in a kind of knowledge based storehouse
WO2019096191A1 (en) * 2017-11-16 2019-05-23 四川长虹电器股份有限公司 Design method for xbrl standard-based master data management system
CN110555078A (en) * 2019-09-02 2019-12-10 上海摩库数据技术有限公司 Distributed ID generation
CN111538774A (en) * 2020-04-23 2020-08-14 上海携程商务有限公司 Data storage and display method, system, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605782A (en) * 2013-11-29 2014-02-26 北京国双科技有限公司 Data insertion method and device for data table
CN104317974A (en) * 2014-11-21 2015-01-28 武汉理工大学 Reconfigurable multi-source data importing method in ERP system
CN104573100A (en) * 2015-01-29 2015-04-29 无锡江南计算技术研究所 Step-by-step database synchronization method with autoincrement identifications
CN104598610A (en) * 2015-01-29 2015-05-06 无锡江南计算技术研究所 Step-by-step database data distribution uploading and synchronizing method
CN107220266A (en) * 2016-03-22 2017-09-29 阿里巴巴集团控股有限公司 It is a kind of to create Service Database, business datum storage and the method and device for determining business datum
CN107368593A (en) * 2017-07-25 2017-11-21 万帮充电设备有限公司 Data lead-in method, device and server
CN107908637A (en) * 2017-09-26 2018-04-13 北京百度网讯科技有限公司 The entity update method and system in a kind of knowledge based storehouse
CN107870979A (en) * 2017-09-30 2018-04-03 平安科技(深圳)有限公司 Electronic installation, extract tables of data data method and storage medium
WO2019096191A1 (en) * 2017-11-16 2019-05-23 四川长虹电器股份有限公司 Design method for xbrl standard-based master data management system
CN110555078A (en) * 2019-09-02 2019-12-10 上海摩库数据技术有限公司 Distributed ID generation
CN111538774A (en) * 2020-04-23 2020-08-14 上海携程商务有限公司 Data storage and display method, system, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Balkash, A. ; Waniss, A.M.Y. ; Moussa, A.A..Designing a Computer Program to Complete Final Exams In Saudi Universities using MS Excel. International Journal of Computer and Information Technology.2020,第99-107页. *
联机事务处理在电信经营中的应用;陈立;彭复员;;计算机时代(第03期);第32-34页 *

Also Published As

Publication number Publication date
CN114722109A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
JP6736173B2 (en) Method, system, recording medium and computer program for natural language interface to a database
CN110750654A (en) Knowledge graph acquisition method, device, equipment and medium
JP2006107466A (en) Method and system for merging data of a plurality of data sources to use in electronic document, and computer readable medium
CN111709527A (en) Operation and maintenance knowledge map library establishing method, device, equipment and storage medium
US9996521B2 (en) Validation of formulas with external sources
CN108921552B (en) Evidence verification method and device
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
CN111813804A (en) Data query method and device, electronic equipment and storage medium
CN114328574A (en) Data query method and device, electronic equipment and computer-readable storage medium
CN107015794B (en) Software-as-a-service reference flow extension verification framework
CN112612794A (en) Auxiliary generation method and device of relational database, computer equipment and storage medium
US10664653B2 (en) Automated structured cloud datatester
CN111782820B (en) Knowledge graph creation method and device, readable storage medium and electronic equipment
CN112039975A (en) Method, device, equipment and storage medium for processing message field
CN114722109B (en) Data importing method, system, equipment and storage medium
CN110765069A (en) Data migration method, device and system
US11556519B2 (en) Ensuring integrity of records in a not only structured query language database
CN114925050A (en) Data verification method and device based on knowledge base, electronic equipment and storage medium
WO2017072872A1 (en) Business program generation assistance system and business program generation assistance method
CN112114811A (en) Compiling method, device and equipment
CN112162922A (en) Method, device, server and storage medium for determining difference of new and old systems
CN112347122B (en) SQL workflow processing method, device, electronic equipment and storage medium
CN113722334B (en) Data processing method, device, electronic equipment and medium
CN115269627A (en) Method, system, apparatus and storage medium for operating database using Chinese instruction
CN116701221A (en) Method, system, device and storage medium for executing code merging comparison

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