CN112711629B - Data and associated data import and export method, device, equipment and storage medium - Google Patents

Data and associated data import and export method, device, equipment and storage medium Download PDF

Info

Publication number
CN112711629B
CN112711629B CN202011644632.3A CN202011644632A CN112711629B CN 112711629 B CN112711629 B CN 112711629B CN 202011644632 A CN202011644632 A CN 202011644632A CN 112711629 B CN112711629 B CN 112711629B
Authority
CN
China
Prior art keywords
module
objects
source
data
export
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
CN202011644632.3A
Other languages
Chinese (zh)
Other versions
CN112711629A (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.)
Zhongkong Technology Co ltd
Original Assignee
Zhejiang Supcon 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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202011644632.3A priority Critical patent/CN112711629B/en
Publication of CN112711629A publication Critical patent/CN112711629A/en
Application granted granted Critical
Publication of CN112711629B publication Critical patent/CN112711629B/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/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
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models

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)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method, a device, equipment and a storage medium for importing and exporting data and associated data, wherein the method comprises the following steps: s1: adding an object on the configured module according to the operation information of the user, determining an associated object of the object, recording the reference relation between the object and the associated object, storing the data of the object and the data of the associated object in the original environment database, and storing the reference relation in an associated relation table of the original environment database. The original environment database comprises a plurality of modules, and each module comprises a plurality of objects. S2: and determining an export object needing to be exported in the objects according to the operation of the user. S3: and determining an associated object of the export object according to the reference relation between the export object and the export object, and exporting the export object and the associated object according to module classification. The method and the device automatically record the reference relation between the object and the associated object, can lead the derived object and the associated object to a new environment when the object is derived, lead the derived data to be complete and can not generate redundant data.

Description

Data and associated data import and export method, device, equipment and storage medium
Technical Field
The invention relates to the field of computers, in particular to a method, a device, equipment and a storage medium for importing and exporting data and associated data.
Background
In a typical manufacturing execution system, there are many configuration data, and the data between modules is often strongly correlated. For example, the most critical program templates are modules that configure a specific workflow in a production process, and the templates are usually associated with other module data such as materials, scripts, or recipes. Each program used in the production environment must first be verified in the test environment to be safe from use. The configuration data needs to be migrated to other environments for use. If the program template data is to be migrated to other environments for use, the common way is direct database migration or the system provides data import and export function, obviously, the latter interface operation is more convenient for users or engineers. In order to allow the configuration data imported into the new environment to be used directly, all the associated data must be imported together. Generally, the export is divided into two categories, namely module-based export and all-data export, and although the export of data of some irrelevant modules can be avoided, the risk of incomplete data export exists; all data exports will then export most of the garbage data, so that the new environment needs to be manually removed after importing.
Disclosure of Invention
Technical problem to be solved
The invention provides a method, a device, equipment and a storage medium for importing and exporting data and associated data, and aims to solve the problems that exported data is in incomplete risk and most useless data are exported in the prior art.
(II) technical scheme
In order to solve the above problem, the present invention provides a method for importing and exporting data and associated data, the method comprising:
s1: adding an object on a configured module according to operation information of a user, determining an associated object of the object, recording a reference relation between the object and the associated object, storing data of the object and the associated object into an original environment database, and storing the reference relation in an associated relation table of the original environment database;
the original environment database comprises a plurality of modules, and each module comprises a plurality of objects;
s2: determining an export object needing to be exported in the objects according to the operation of a user;
s3: and determining an associated object of the export object according to the reference relation between the export object and the export object, and exporting the export object and the associated object according to module classification.
Preferably, after S3, the method further comprises:
s4: and receiving the data of the exported object, the data of the associated object and the reference relation of the exported object, storing the data of the associated object and the reference relation of the exported object in a new environment database, and adding the reference relation into an associated relation table of the new environment database.
Preferably, after the deriving the derived object and the associated object according to the module classification in S3, the method further includes:
and serializing the exported data into a binary file, and packaging the binary file and the reference relation into a packaged file.
Preferably, before S4 and after S3, the method further includes:
loading the packed file, generating a screened export object according to the screening operation of the user on the export data, and determining an associated object of the screened export object according to the reference relationship between the screened export object and the screened export object;
s4 specifically comprises the following steps: and receiving the data of the screened export objects and the data of the associated objects of the screened export objects, storing the data of the associated objects of the screened export objects into a new environment database according to module classification, and adding the reference relation of the screened export objects into an associated relation table of the new environment database.
Preferably, in S1, the reference relationship includes a direct reference relationship and an indirect reference relationship.
Preferably, S3 specifically includes:
s310: layering all objects in an original environment database according to modules, dividing a module where the exported object is located into a first layer, dividing a module where the object which has a direct reference relation with the exported object is located into a second layer, dividing a module where the object which has an indirect reference relation with the exported object is located into a third layer, and establishing a set for each module;
s311: storing the export object as a first source object in a set corresponding to a module where the export object is located;
s312: searching the associated object of the first source object in all the modules in the first layer according to the obtained first source object and the direct reference relation of the first source object, removing the weight of the searched associated object, then removing the object which is the same as the first source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S314; otherwise, executing S313;
s313: storing the rest associated objects as first source objects in a set corresponding to the module where the associated objects are located, and returning to S312;
s314: according to the first source object and the direct reference relation of the first source object, searching the associated object of the first source object in all the modules in the second layer, removing the weight of the searched associated object, and storing the rest associated objects serving as second source objects in a set corresponding to the module where the associated object is located;
s315: according to the obtained second source object and the direct reference relation of the second source object, searching the associated object of the second source object in all the modules of the second layer, removing the weight of the searched associated object, then removing the object which is the same as the second source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S317; otherwise, executing S316;
s316: taking the rest associated objects as second source objects to be stored in a set corresponding to the module where the associated objects are located, and returning to S315;
s317: according to the second source object and the direct reference relation, searching all the related objects of the second source object in all the modules in the third layer, removing the weight of the searched related objects, and storing the rest related objects as third source objects in a set corresponding to the module where the related objects are located;
s318: according to the third source object and the direct reference relation of the third source object, searching the associated object of the third source object in all the modules of the third layer, removing the weight of the searched associated object, then removing the object which is the same as the third source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if so, finishing the searching, removing the first source object which is the same as the derived object from all the first source objects, and determining the remaining first source object, the second source object and the third source object as the associated object of the derived object; otherwise, go to S319;
s319: and storing the rest associated objects as source objects in the set corresponding to the module where the associated objects are positioned, and returning to the step S318.
Preferably, the reference relationship is unidirectional.
Preferably, the present invention further provides a device for importing and exporting data and associated data, the device comprising:
the data editing and writing module is used for adding an object on a configured module according to the operation information of a user, determining an associated object of the object, recording the reference relationship between the object and the associated object, storing the data of the object and the data of the associated object in an original environment database, and storing the reference relationship in an associated relationship table of the original environment database;
the export object determining module is used for determining an export object needing to be exported in the objects according to the operation of a user;
and the association module is used for determining an associated object of the export object according to the reference relation between the export object and the export object.
Preferably, the present invention also provides an apparatus comprising:
a processor;
a memory storing instructions for the processor to control the method steps as described above.
Preferably, the present invention also provides a storage medium having stored thereon computer-executable instructions, characterized in that the executable instructions, when executed by a processor, implement the method steps as described above.
(III) advantageous effects
According to the method and the system, when the user edits the object in the old database environment, the reference relation of the object is automatically recorded, and then the reference relation is stored in the association relation table, so that when the user needs to export data, the system can find the associated object according to the exported object and the reference relation, and the associated object is used for describing the attribute of the exported object or is in process association with the exported object, so that the exported object, the associated object and the reference relation are exported together, the integrity of the exported data is ensured, redundant data cannot be generated, and the exported data can be directly used in a new environment.
Drawings
FIG. 1 is a flow chart of a method for importing and exporting data and associated data according to the present invention;
FIG. 2 is a flow chart of S3 in the present invention;
FIG. 3 is a layer-by-layer view of the module of example 1 of the present invention;
FIG. 4 is a schematic structural diagram of a data importing and exporting apparatus according to the present invention;
FIG. 5 is a schematic diagram of an internal structure of a computer system of an apparatus according to the present invention.
[ description of reference ]
100: a data editing and writing module; 110: an export object determination module; 120: a correlation module;
400: a computer system; 401: a central processing unit; 402: a read-only memory; 403: a memory; 404: a bus; 405: an I/O interface; 406: an input section; 407: an output section; 408: a storage section; 409: a communication section; 410: a driver; 411: a removable media.
Detailed Description
For the purpose of better explaining the present invention and to facilitate understanding, the present invention will be described in detail by way of specific embodiments with reference to the accompanying drawings.
It should be noted that all directional indicators (such as up, down, left, right, front, and back \8230;) in the embodiments of the present invention are only used to explain the relative positional relationship between the components, the motion situation, etc. in a specific posture (as shown in the attached drawings), and if the specific posture is changed, the directional indicators are changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise explicitly stated or limited, the terms "connected", "fixed", and the like are to be understood broadly, for example, "fixed" may be fixedly connected, may be detachably connected, or may be integrated; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
The invention provides a method for importing and exporting data and associated data, which is shown in figure 1: the invention discloses a flow chart of a data and associated data import and export method, which comprises the following steps:
s1: adding an object on the configured module according to the operation information of the user, determining an associated object of the object, recording the reference relation between the object and the associated object, storing the data of the object and the data of the associated object in the original environment database, and storing the reference relation in an associated relation table of the original environment database. The original environment database comprises a plurality of modules, and each module comprises a plurality of objects.
In actual production, the associated object is used to describe the attribute of the corresponding object or there is a technological relationship between the object and the associated object.
For example: the program management module contains a program with the code of '001' and the version of 1, and the code and the version are globally unique in the program management module. When a user writes the program, a feeding step is added, and the equipment object coded as '101' in the equipment module is set as the equipment needing feeding. At this time, the system will add a reference relationship record to the association table of the database for the code 001 in the program module, the program of version 1, and the device of the code 101 in the device module. Or, a material is added in the storage module, at the moment, the system provides a plurality of pull-down boxes to enable a user to select corresponding information to describe the attribute of the material, and after the user operation is finished. The system will add a reference relationship to the object of the material with the information selected by the user.
Wherein the reference relationship is unidirectional, that is, object A references object B, and object B cannot reference object A. The reference relation comprises a direct reference relation and an indirect reference relation, and in the invention, if the associated object of the object A comprises an object B, an object C and an object D, and the reference relation between the object A and the object B is the direct reference relation, namely the object A directly references the object B; the reference relationship between the object B and the object C is a direct reference relationship, the reference relationship between the object C and the object D as well as the object A is an indirect reference relationship at this time, and if the object D and the object E have a direct reference relationship, the object E is also an associated object of the object A at this time, and the object A and the object E have an indirect reference relationship.
S2: determining an export object needing to be exported in the objects according to the operation of a user;
when the fact that the user needs to export data is detected, the system classifies the objects according to the modules, then all the objects are displayed on an interface for the user to select, and full selection or partial selection can be conducted according to the requirements of the user.
S3: and determining an associated object of the export object according to the reference relationship between the export object and the export object, exporting the reference relationship, and exporting the export object and the associated object according to module classification.
According to the data and associated data import and export method provided by the invention, data to be exported, all data or part of data are arbitrarily selected according to modules, and all associated objects are automatically identified and are imported and exported together. The operation is more convenient, rapid and safe. When a user edits data in an old database environment, the reference relation of the objects is automatically recorded, and then the reference relation is stored in the association relation table, so that when the user needs to export the data, the system can find the associated objects according to the export objects and the reference relation, and the associated objects are used for describing the attributes of the export objects or are in process association with the export objects, so that the export objects, the associated objects and the reference relation are exported together, the integrity of the export data is ensured, redundant data cannot be generated, and the exported data can be directly and accurately used after being imported into a new environment.
As shown in fig. 2: as shown in the flowchart of S3 in the present invention, fig. 2 already shows a step of finding an associated object of an export object according to an export object and a reference relationship, that is, S3 specifically includes:
s310: layering all objects in an original environment database according to modules, dividing a module where an exported object is located into a first layer, dividing a module where an object which has a direct reference relation with the exported object is located into a second layer, and dividing a module where an object which has an indirect reference relation with the exported object is located into a third layer; and a set is established for each module.
S311: storing the exported object as a first source object in a set corresponding to a module where the exported object is located;
s312: searching the associated object of the first source object in all the modules in the first layer according to the obtained first source object and the direct reference relation of the first source object, removing the weight of the searched associated object, then removing the object which is the same as the first source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S314; otherwise, executing S313;
s313: storing the rest associated objects serving as first source objects in a set corresponding to the module where the associated objects are located, and returning to S312;
s314: according to the first source object and the direct reference relation of the first source object, searching the associated object of the first source object in all the modules in the second layer, removing the weight of the searched associated object, and storing the rest associated objects serving as second source objects in a set corresponding to the module where the associated object is located;
s315: according to the obtained second source object and the direct reference relation of the second source object, searching the associated object of the second source object in all the modules of the second layer, removing the weight of the searched associated object, then removing the object which is the same as the second source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S317; otherwise, executing S316;
s316: taking the rest associated objects as second source objects to be stored in a set corresponding to the module where the associated objects are located, and returning to S315;
s317: according to the second source object and the direct reference relation, searching all the related objects of the second source object in all the modules in the third layer, removing the weight of the searched related objects, and storing the rest related objects as third source objects in a set corresponding to the module where the related objects are located;
s318: according to the direct reference relation of the third source object and the third source object, searching the associated object of the third source object in all the modules of the third layer, removing the weight of the searched associated object, then removing the object which is the same as the third source object in the set corresponding to the module in which the associated object is positioned in the associated object, judging whether the associated object is empty or not, if so, finishing the searching, removing the first source object which is the same as the derived object from all the first source objects, and determining the remaining first source object, the second source object and the third source object as the associated object of the derived object; otherwise, go to S319;
s319: and storing the rest associated objects as third source objects in the set corresponding to the module where the associated objects are located, and returning to the step S318.
The method for establishing the set specifically comprises the steps of establishing a Map set, and storing each module data (namely a first source object, a second source object and a third source object) needing to be exported according to a module, wherein the Map storage mode is as follows: and the key corresponding module and the value corresponding module need to derive the set of the object. The objects to be exported in S318 are the objects stored by the submodules in the Map set, i.e. the first source object, the second source object and the third source object in the set.
In the method, after the data are layered according to the modules, the related objects are searched layer by layer, so that the searching efficiency is higher. In the process of searching the associated objects in each layer, only the associated objects which have direct reference relation with the source objects obtained in the previous step are searched in each searching process, and then the searched associated objects are compared with the source objects in the corresponding module set, so that the problem of infinite circular searching caused by circular reference in the process of searching the associated objects is solved. And meanwhile, the searched associated objects are stored in different set sets according to modules, so that classification during subsequent exporting is facilitated, and a user can conveniently search the objects.
Example 1:
as shown in FIG. 3: the hierarchical condition of the module of embodiment 1 shows that, in this embodiment, the step of determining the associated object from the derived object includes:
s310: module a is divided into a first layer, modules B and C into a second layer, and module D and the other modules into a third layer.
In this embodiment, the object in module a may refer to the object in its module, or may refer to the objects in module B and module C directly, and module B may refer to the object in module C, module D or more modules directly. And preparing a Map set, storing each module data to be exported according to the module, wherein the Map storage mode is a key corresponding module, and a value corresponding module needs to export a set of the object.
S311: storing the object 1 in the module A in a set of the module A;
s312-1 (indicating that this step of S312 is performed for the first time): and searching for an associated object having a direct reference relationship with the first source object (at this time, the first source object is the object 1) in the first layer to obtain an object 2, wherein the associated object is not empty, and executing S313.
S313: storing the object 2 in the set of the module A, and executing S312 for the second time;
s312-2 (indicating that this step of S312 is performed a second time): and searching for an associated object having a direct reference relationship with the first source object (at this time, the first source object is the object 2) in the first layer to obtain an object 3, wherein the associated object is not empty at this time, and executing S313.
S313: storing the object 3 in the set of the module A, and executing S312 for the third time;
s312-3 (representing the third execution of step S312): and searching for an associated object having a direct reference relationship with the first source object (at this time, the first source object is object 3) in the first layer, if the associated object is not found, and if the associated object is empty, executing S314.
S314: searching for associated objects which have direct reference relations with the first source objects (at this time, the first source objects are the object 1, the object 2 and the object 3) in all the modules in the second layer to obtain an object 4, an object 6 and an object 7, storing the object 4 and the object 6 in a set of the module B, and storing the object 7 in a set of the module C;
s315-1 (indicating that this step of S315 is performed for the first time): searching for an associated object having a direct reference relationship with the second source object (at this time, the second source object is the object 4, the object 6 and the object 7) in the second layer to obtain an associated object 7, and since the object 7 belongs to the module C and the object 7 exists in the set of the module C, removing the object 7 from the associated object obtained this time, if the associated object obtained this time is empty, executing S317;
s317: searching for associated objects which have direct reference relations with second source objects (at the moment, the second source objects are the object 4, the object 6 and the object 7) in all the modules in the third layer to obtain an object 8 and an object 9, and respectively storing the object 8 and the object 9 in a set of the corresponding module;
s318-1 (indicating the first execution of the step S318): and searching for an associated object having a direct reference relationship with a third source object (the third source object is the object 8 and the object 9 at this time) in the third layer to obtain that the associated object is empty, and ending the search if the associated object obtained this time is empty. The resulting set of corresponding sets is classified by module, i.e. the associated objects of object 1 (derived object) are object 1 in module a, object 2, object 3, object 4 in module B, object 6, object 7 in module C, object 8 in module D and object 9 in the other modules.
Further, after the export object and the associated object are exported according to module classification in S3, the method further includes: and serializing the exported data into a binary file, and packaging the binary file and the reference relation into a packaged file. And the exported data is serialized into a binary file, so that the exported data cannot be tampered, the integrity of the data is ensured, and the data imported into a new environment can be directly and accurately used.
Still further, after S3, the method further comprises:
s4: and receiving the data of the export object, the data of the associated object and the reference relation of the export object, storing the data of the associated object and the reference relation of the export object to the new environment database, and adding the reference relation to the associated relation table of the new environment database.
Before S4, after S3, further comprising:
loading a packed file, generating a screened export object according to the screening operation of a user on export data, and determining an associated object of the screened export object according to the reference relationship between the screened export object and the screened export object; S310-S319 may be referred to in the following, for determining the related objects of the filtered export object according to the filtered export object and the reference relationship of the filtered export object.
S4 specifically comprises the following steps: and receiving the data of the screened export objects and the data of the correlation objects of the screened export objects, storing the data of the correlation objects of the screened export objects into the new environment database according to module classification, and adding the reference relation of the screened export objects into the correlation relation table of the new environment database.
When the packed file is loaded, the system analyzes the file when the packed file is loaded, analyzes the environment information, the data version and other authentication information to confirm whether the data is successfully authenticated, and after the authentication is passed, the system imports an operation interface to display information of each module contained in the file. And then the system presents an interface for the user to screen the exported objects, the exported objects are presented on the interface according to the module classification, and after the user finishes screening, the system finds out all the associated objects of the selected objects according to the reference relation table and lists and informs the user. And finally, the system imports the screened export object and the related object according to the modules, deserializes the binary file into object data, stores the object data into a new environment database, and adds the reference relation of the imported data into the new environment database.
In summary, the data and associated data import/export method provided by the present invention automatically records the relationship between the object and the associated object when the object is written, so that the export object, the associated object and the reference relationship can be directly exported to a new environment when the object is exported, the exported data is complete, no redundant data is generated, and the exported data can be directly used in the new environment. In the same invention, the export data is in the unit of module object, not database table data. The data of an object is not exported in a database table structure, and since the object data may be recorded in multiple tables, exporting the object data needs to contain all the information of the object. The per-module derivation enables the data to be complete.
The invention also provides a device for importing and exporting data and associated data, as shown in fig. 4: the invention discloses a structure diagram of a data and associated data import and export device, which comprises:
the data editing and writing module 100 is configured to add an object to the configured module according to the operation information of the user, determine an associated object of the object, record a reference relationship between the object and the associated object, store the data of the object and the data of the associated object in the original environment database, and store the reference relationship in an associated relationship table of the original environment database. The original environment database comprises a plurality of modules, and each module comprises a plurality of objects.
And an export object determination module 110, configured to determine an export object to be exported from the objects according to a user operation.
And the association module is used for determining an associated object of the export object according to the reference relation between the export object and the export object.
The functions of each module in the apparatus are described in the above method embodiments, and are not described again here.
In another aspect, the present disclosure also provides an electronic device, including a processor and a memory, where the memory stores operating instructions for the processor to control the following method:
s1: adding an object on a configured module according to the operation information of a user, determining an associated object of the object, recording a reference relation between the object and the associated object, storing the data of the object and the data of the associated object in an original environment database, and storing the reference relation in an associated relation table of the original environment database;
the original environment database comprises a plurality of modules, and each module comprises a plurality of objects;
s2: determining an export object needing to be exported in the objects according to the operation of a user;
s3: and determining an associated object of the export object according to the reference relation between the export object and the export object, and exporting the export object and the associated object according to module classification.
Referring now to FIG. 5, shown is a block diagram of a computer system 400 suitable for use in implementing the apparatus of an embodiment of the present application. The device shown in fig. 5 is only an example, and should not bring any limitation to the function and the use range of the embodiments of the present application.
As shown in fig. 5, the computer system 400 includes a Central Processing Unit (CPU) 401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 407 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as needed, so that a computer program read out therefrom is mounted in the storage section 408 as needed.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The above-described functions defined in the system of the present application are executed when the computer program is executed by a Central Processing Unit (CPU) 401.
It should be noted that the storage media described herein can be either computer-readable signal media or computer-readable media or any combination of the two. A computer readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable 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. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable medium and 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The units described may also be provided in a processor, where the names of the units do not in some cases constitute a limitation of the units themselves.
In another aspect, the present disclosure also provides a storage medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The storage medium carries one or more programs which, when executed by a device, cause the device to include the method steps of:
s1: adding an object on a configured module according to the operation information of a user, determining an associated object of the object, recording a reference relation between the object and the associated object, storing the data of the object and the data of the associated object in an original environment database, and storing the reference relation in an associated relation table of the original environment database;
the original environment database comprises a plurality of modules, and each module comprises a plurality of objects;
s2: determining an export object needing to be exported in the objects according to the operation of a user;
s3: and determining an associated object of the export object according to the reference relation between the export object and the export object, and exporting the export object and the associated object according to module classification.
It should be understood that the above description of specific embodiments of the present invention is only for the purpose of illustrating the technical lines and features of the present invention, and is intended to enable those skilled in the art to understand the contents of the present invention and to implement the present invention, but the present invention is not limited to the above specific embodiments. It is intended that all such changes and modifications as fall within the scope of the appended claims be embraced therein.

Claims (8)

1. A method for importing and exporting data and associated data, which is characterized by comprising the following steps:
s1: adding an object on a configured module according to operation information of a user, determining an associated object of the object, recording a reference relation between the object and the associated object, storing data of the object and the associated object into an original environment database, and storing the reference relation in an associated relation table of the original environment database;
the original environment database comprises a plurality of modules, and each module comprises a plurality of objects;
s2: determining an export object needing to be exported in the objects according to the operation of a user;
s3: determining an associated object of the export object according to the reference relation between the export object and the export object, and exporting the export object and the associated object according to module classification so as to realize direct use of exported data in a new environment of a production manufacturing execution system;
in S1, the reference relationship comprises a direct reference relationship and an indirect reference relationship;
s3 specifically comprises the following steps:
s310: layering all objects in an original environment database according to modules, dividing a module where the exported object is located into a first layer, dividing a module where the object which has a direct reference relation with the exported object is located into a second layer, dividing a module where the object which has an indirect reference relation with the exported object is located into a third layer, and establishing a set for each module;
s311: storing the export object as a first source object in a set corresponding to a module where the export object is located;
s312: searching the associated object of the first source object in all the modules in the first layer according to the obtained first source object and the direct reference relation of the first source object, removing the weight of the searched associated object, then removing the object which is the same as the first source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S314; otherwise, S313 is performed;
s313: storing the rest associated objects as first source objects in a set corresponding to the module where the associated objects are located, and returning to S312;
s314: according to the first source object and the direct reference relation of the first source object, searching the associated object of the first source object in all the modules in the second layer, removing the weight of the searched associated object, and storing the rest associated objects serving as second source objects in a set corresponding to the module where the associated objects are located;
s315: according to the obtained second source object and the direct reference relation of the second source object, searching the associated object of the second source object in all the modules of the second layer, removing the weight of the searched associated object, then removing the object which is the same as the second source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S317; otherwise, executing S316;
s316: taking the rest associated objects as second source objects to be stored in a set corresponding to the module where the associated objects are located, and returning to S315;
s317: according to the second source object and the direct reference relation, searching all the related objects of the second source object in all the modules in the third layer, removing the weight of the searched related objects, and storing the rest related objects as third source objects in a set corresponding to the module where the related objects are located;
s318: according to the third source object and the direct reference relation of the third source object, searching the associated object of the third source object in all the modules of the third layer, removing the weight of the searched associated object, then removing the object which is the same as the third source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if so, finishing the searching, removing the first source object which is the same as the derived object from all the first source objects, and determining the remaining first source object, the second source object and the third source object as the associated object of the derived object; otherwise, go to S319;
s319: storing the rest associated objects serving as source objects in a set corresponding to the module where the associated objects are located, and returning to the step S318;
the method for establishing the set comprises the following steps: firstly, establishing a Map set, and storing each module data needing to be exported according to a module, wherein each module data comprises a first source object, a second source object and a third source object; the Map is stored in the following way: the key corresponding module is used for exporting the set of the object; and the objects needing to be exported in S318 are the objects stored by the submodules in the Map set, i.e. the first source object, the second source object and the third source object in the set.
2. The method for importing and exporting data and associated data according to claim 1, further comprising after S3:
s4: and receiving the data of the export object, the data of the associated object and the reference relation of the export object, storing the data of the associated object and the reference relation of the export object in a new environment database, and adding the reference relation to an associated relation table of the new environment database.
3. The method for importing and exporting data and associated data according to claim 2, wherein after the exporting object and the associated object are exported according to module classification in S3, the method further comprises:
and serializing the exported data into a binary file, and packaging the binary file and the reference relation into a packaged file.
4. The method for importing and exporting data and associated data according to claim 3, wherein before S4 and after S3, the method further comprises:
loading the packed file, generating a screened export object according to the screening operation of the user on the export data, and determining an associated object of the screened export object according to the reference relationship between the screened export object and the screened export object;
s4 specifically comprises the following steps: and receiving the data of the screened export objects and the data of the associated objects of the screened export objects, storing the data of the associated objects of the screened export objects into a new environment database according to module classification, and adding the reference relation of the screened export objects into an associated relation table of the new environment database.
5. The data and associated data import-export method of claim 1 wherein the reference relationships are unidirectional.
6. An apparatus for importing and exporting data and associated data, the apparatus comprising:
the data editing and writing module is used for adding an object on a configured module according to the operation information of a user, determining an associated object of the object, recording the reference relationship between the object and the associated object, storing the data of the object and the data of the associated object in an original environment database, and storing the reference relationship in an associated relationship table of the original environment database;
the export object determining module is used for determining an export object needing to be exported in the objects according to the operation of a user;
the association module is used for determining an associated object of the export object according to the reference relation between the export object and the export object so as to realize direct use of the exported data in a new environment of a production manufacturing execution system;
wherein the reference relationship comprises a direct reference relationship and an indirect reference relationship;
the association module is specifically configured to: s310: layering all objects in an original environment database according to modules, dividing a module where the exported object is located into a first layer, dividing a module where the object which has a direct reference relation with the exported object is located into a second layer, dividing a module where the object which has an indirect reference relation with the exported object is located into a third layer, and establishing a set for each module; s311: storing the export object as a first source object in a set corresponding to a module where the export object is located; s312: searching the associated object of the first source object in all the modules in the first layer according to the obtained first source object and the direct reference relation of the first source object, removing the weight of the searched associated object, then removing the object which is the same as the first source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S314; otherwise, S313 is performed; s313: storing the rest associated objects serving as first source objects in a set corresponding to the module where the associated objects are located, and returning to S312; s314: according to the first source object and the direct reference relation of the first source object, searching the associated object of the first source object in all the modules in the second layer, removing the weight of the searched associated object, and storing the rest associated objects serving as second source objects in a set corresponding to the module where the associated object is located; s315: according to the obtained second source object and the direct reference relation of the second source object, searching the associated object of the second source object in all the modules of the second layer, removing the weight of the searched associated object, then removing the object which is the same as the second source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if yes, executing S317; otherwise, executing S316; s316: taking the rest associated objects as second source objects to be stored in a set corresponding to the module where the associated objects are located, and returning to S315; s317: according to the second source object and the direct reference relation, searching all the related objects of the second source object in all the modules in the third layer, removing the weight of the searched related objects, and storing the rest related objects as third source objects in a set corresponding to the module where the related objects are located; s318: according to the third source object and the direct reference relation of the third source object, searching the associated object of the third source object in all the modules of the third layer, removing the weight of the searched associated object, then removing the object which is the same as the third source object in the set corresponding to the module where the associated object is located in the associated object, judging whether the associated object is empty or not, if so, finishing the searching, removing the first source object which is the same as the derived object from all the first source objects, and determining the remaining first source object, the second source object and the third source object as the associated object of the derived object; otherwise, executing S319; s319: storing the rest associated objects serving as source objects in a set corresponding to the module where the associated objects are located, and returning to the step S318;
a set establishment module configured to: firstly, establishing a Map set, and storing each module data needing to be exported according to a module, wherein each module data comprises a first source object, a second source object and a third source object; the Map is stored in the following way: the key corresponding module is used for exporting the set of the object; and the objects to be exported in S318 are the objects stored by the submodules in the Map set, that is, the first source object, the second source object and the third source object in the set.
7. An apparatus, comprising:
a processor;
memory storing instructions for the processor to control the method steps according to any one of claims 1-5.
8. A storage medium having stored thereon computer-executable instructions which, when executed by a processor, perform the method steps of any one of claims 1-5.
CN202011644632.3A 2020-12-30 2020-12-30 Data and associated data import and export method, device, equipment and storage medium Active CN112711629B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011644632.3A CN112711629B (en) 2020-12-30 2020-12-30 Data and associated data import and export method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011644632.3A CN112711629B (en) 2020-12-30 2020-12-30 Data and associated data import and export method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112711629A CN112711629A (en) 2021-04-27
CN112711629B true CN112711629B (en) 2022-10-21

Family

ID=75548094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011644632.3A Active CN112711629B (en) 2020-12-30 2020-12-30 Data and associated data import and export method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112711629B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303458B (en) * 2023-03-17 2023-10-13 北京信源电子信息技术有限公司 Management method for data objects in handle system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004092976A2 (en) * 2003-04-18 2004-10-28 International Business Machines Corporation System and method in a data table for exporting and importing recursive scalable templates
US9367582B2 (en) * 2009-08-07 2016-06-14 International Business Machines Corporation Systems and methods involving information objects
US20110191304A1 (en) * 2010-01-29 2011-08-04 Software Ag, Inc. System and method for export and import of metadata located in metadata registries
CN102148844B (en) * 2010-02-09 2014-08-27 深圳市金蝶中间件有限公司 Memory leak positioning method, server, client and system
CN103714062B (en) * 2012-09-28 2017-05-31 国际商业机器公司 The method and system of entity relationship model data is imported based on dependence
CN107967205B (en) * 2016-10-18 2020-12-29 阿里巴巴(中国)有限公司 Memory analysis method, device and system and computing equipment
CN108845934A (en) * 2018-05-24 2018-11-20 深圳市腾讯网络信息技术有限公司 The localization method and device in memory overflow source, storage medium, electronic device
CN109189374B (en) * 2018-06-22 2020-08-28 北京大学 Object structure code generation method and system based on object reference chain
CN111736980B (en) * 2019-03-25 2024-01-16 华为技术有限公司 Memory management method and device
CN110196889A (en) * 2019-05-30 2019-09-03 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and storage medium
CN111427865A (en) * 2020-03-18 2020-07-17 北京明略软件系统有限公司 Method and device for managing objects of database
CN111858339B (en) * 2020-07-22 2023-11-28 腾讯科技(成都)有限公司 Memory analysis method, device and system, computing device and computer readable storage medium

Also Published As

Publication number Publication date
CN112711629A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
US10095698B2 (en) Managing changes to one or more files via linked mapping records
US9020906B2 (en) Method for intelligent storing and retrieving in an enterprise data system
CN109255112A (en) A kind of report automatic generation method and system
CN111125027B (en) Aviation interface control file management system
CN109978565B (en) Product packaging data management method and device, terminal equipment and readable storage medium
CN107301179A (en) The method and apparatus of data base read-write separation
CN112711629B (en) Data and associated data import and export method, device, equipment and storage medium
CN110889263A (en) Document backlog generation method, device, equipment and storage medium
CN114510478A (en) General data entry method, device, equipment and medium based on data model
CN111061733B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN113742018A (en) Archive model adjusting method, computer device and computer readable storage medium
CN113157336A (en) C # language-based gripper configuration system, method, device and storage medium
CN106777097B (en) Merging method for metadata layering extension
CN114860699A (en) Data quality detection method, device, equipment and storage medium
CN110889013A (en) Data association method, device, server and storage medium based on XML
CN112328680A (en) Electronic component data processing method, data interface and management system
CN111798126A (en) Process flow creation method, computer device, and storage medium
CN115525778A (en) Enterprise document processing method, device and storage medium
CN113806526B (en) Feature extraction method, device and storage medium
CN110399396A (en) Efficient data processing
CN110618991A (en) Method, system, equipment and storage medium for automatically inputting parameter values
CN117056343B (en) Multi-source data management method and system in power grid field and electronic equipment
CN112506944B (en) Data standard conversion access method, device, equipment and medium between service systems
CN118312161A (en) Method and device for building model and electronic equipment
JP2000250744A (en) Software request definition supporting device

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
CP01 Change in the name or title of a patent holder

Address after: 310053 No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Zhongkong Technology Co.,Ltd.

Address before: 310053 No. 309 Liuhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: ZHEJIANG SUPCON TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder