CN112068894A - Configuration object processing method and device - Google Patents

Configuration object processing method and device Download PDF

Info

Publication number
CN112068894A
CN112068894A CN201910443373.9A CN201910443373A CN112068894A CN 112068894 A CN112068894 A CN 112068894A CN 201910443373 A CN201910443373 A CN 201910443373A CN 112068894 A CN112068894 A CN 112068894A
Authority
CN
China
Prior art keywords
configuration object
data record
target
configuration
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910443373.9A
Other languages
Chinese (zh)
Inventor
王乃鑑
王先荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910443373.9A priority Critical patent/CN112068894A/en
Publication of CN112068894A publication Critical patent/CN112068894A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Abstract

The embodiment of the application provides a method and a device for processing a configuration object. The method comprises the following steps: and acquiring object description information of the source configuration object. And determining a first data record corresponding to the source configuration object from the data storage object corresponding to the target configuration object set associated with the source configuration object according to the first identifier contained in the object description information, and generating a second data record according to the first data record and the data record configuration information. And acquiring the structural description information corresponding to the target configuration object set, and generating a data record loading statement corresponding to the second data record according to the structural description information, the second data record and a preset data operation instruction set. And executing a data record loading statement to load a second data record into the data storage object so as to add the configuration object copy corresponding to the source configuration object in the target configuration object set. By adopting the embodiment of the application, the updating efficiency of the configuration object can be improved, and the maintenance cost of the software system can be reduced.

Description

Configuration object processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a configuration object.
Background
Configuration objects are ubiquitous in software systems, and particularly in large software systems, there may be a large number of configuration objects to implement different business functions. Generally, as a data entity, a configuration object corresponds to data in different data tables or files. For example, if a configuration object named as a commodity exists in a certain software system, the configuration object may include sub-configuration objects such as a commodity price, free resources, and the like, and sub-configuration objects such as a price matching rule, a price limit, and the like may exist under the sub-configuration object of the commodity price. For some large software systems, the number of the business functions provided by the software systems is large and there is an association relationship between the business functions, which results in that the number of configuration objects included in the software systems is large and the structure is complex. When some service functions in the software system change, it is often necessary to perform update operations such as change and modification on configuration objects associated with the service functions, and because the configuration objects have huge data and complex structures, how to reasonably complete the update operations such as change and modification of the configuration objects becomes one of the hot spots concerned by people.
In the prior art, when a certain configuration object needs to be changed or modified, a user is often required to actively modify program codes required by the configuration object in the copying and releasing processes according to needs to complete the change or modification of the configuration object. However, due to the characteristics of huge number and complex structure of the configuration objects, the processing method based on the active modification of the program code by the user has huge resource consumption such as manpower and material resources, which increases the maintenance cost of the software system and reduces the update efficiency of the configuration objects.
Content of application
The embodiment of the application provides a method and a device for processing a configuration object, which can improve the updating efficiency of the configuration object and reduce the maintenance cost of a software system.
In a first aspect, an embodiment of the present application provides a method for processing a configuration object. The method comprises the following steps: and acquiring object description information of the source configuration object. Here, the object description information includes a first identification of a target configuration object set associated with the source configuration object. And determining a first data record corresponding to the source configuration object from the data storage objects corresponding to the target configuration object set according to the first identifier, and generating a second data record according to the first data record and data record configuration information. And acquiring the structural description information corresponding to the target configuration object set, and generating a data record loading statement corresponding to the second data record according to the structural description information, the second data record and a preset data operation instruction set. And executing the data record loading statement to load the second data record into the data storage object so as to add the configuration object copy corresponding to the source configuration object in the target configuration object set.
In the embodiment of the application, the terminal device automatically generates the data record loading statement for generating the configuration object copy based on the object description information, the second data record and the data operation instruction set of the source configuration object, so that waste of manpower and material resources caused by manual modification of the data record loading statement by a user can be reduced, and the processing efficiency of the configuration object is improved.
With reference to the first aspect, in a possible implementation manner, the target configuration object set includes one or more configuration objects including the source configuration object. A configuration object processing request may be obtained first, where the configuration object processing request carries the second identifier. And then determining the configuration object marked by the second identifier from the one or more configuration objects, and determining the configuration object marked by the second identifier as a source configuration object. And finally, acquiring a target object description file corresponding to the target configuration object set from an object description file set according to the first identifier, and analyzing the target object description file to obtain the object description information of the source configuration object.
With reference to the first aspect, in a possible implementation manner, the first data record is backed up to obtain a third data record. And acquiring preset data record configuration information. Here, the data record configuration information includes a target identification, a target version type. And modifying a third identifier and a first version type of the source configuration object in the third data record, which correspond to the target configuration object set, to be the target identifier and the target version type, so as to obtain a second data record corresponding to the source configuration object.
With reference to the first aspect, in a possible implementation manner, a target data operation instruction for loading a data record into the data storage object is determined from a preset data operation instruction set. And determining a data loading parameter corresponding to the second data record according to the data structure description information and the second data record. And determining a data record loading statement corresponding to the second data record according to the data loading parameter and the target data operation instruction. The data record loading statement corresponding to the second data record is automatically generated through the structure description information, the second data record and the preset data operation instruction set, waste of manpower and material resources caused by manual modification of the data record loading statement by a user can be reduced, and processing efficiency of the configuration object can be improved.
With reference to the first aspect, in a possible implementation manner, the source configuration object includes a source root configuration object and a source child configuration object corresponding to the source root configuration object. The target configuration object set comprises a target root configuration object set to which the source root configuration object belongs and a target sub configuration object set to which the source sub configuration object belongs. The first identifier comprises a first root identifier corresponding to the target root configuration object set and a first sub identifier corresponding to the target sub configuration object set. The object description information further includes an association identifier for indicating an association relationship between a root configuration object in the target root configuration object set and a sub configuration object in the target sub configuration object set. The data records corresponding to the target root configuration object set can be determined from preset data storage objects according to the first root identifier, and the data records corresponding to the target sub configuration object set can be determined from the data storage objects according to the first sub identifier. Backing up a first root data record corresponding to the source root configuration object from the data records corresponding to the target root configuration object set, and backing up a first sub data record corresponding to the source sub configuration object from the data records corresponding to the target sub configuration object set according to the first root data record and the association identifier. And determining the first root data record and the first sub data record as a first data record corresponding to the source configuration object.
With reference to the first aspect, in a feasible implementation manner, the first root data record includes a second root identifier corresponding to the source root configuration object, and the first sub data record includes a second sub identifier corresponding to the source sub configuration object and a first association identifier used for indicating an association relationship between the source root configuration object and the source sub configuration object. The first root data record and the first child data record may be backed up to obtain a third root data record and a third child data record. And acquiring preset data record modification information. Here, the data record modification information includes a first target identifier, a second target identifier, and a target version type. And modifying the second root identifier and the first version type in the third data record to be the first target identifier and the target version type, and modifying the second sub identifier, the first version type and the first association identifier in the third sub data record to be the second target identifier, the target version type and the second target identifier, so as to obtain a second data record corresponding to the source configuration object.
With reference to the first aspect, in a feasible implementation manner, the configuration object copy may be modified based on the acquired configuration object modification information, so as to obtain a target configuration object and generate object description information of the target configuration object. And generating a first configuration object issue statement according to the object description information of the source configuration object and the data operation instruction set, and generating a second configuration object issue statement according to the object description information of the target configuration object and the data operation instruction set. Executing the first configuration object issuing statement and the second configuration object issuing statement to modify the version state of the source configuration object from a first version type to a second version type and modify the version state of the target configuration object from a target version type to the first version type. After the configuration object copy is modified according to the configuration object modification information to obtain the target configuration object, the issuing statements corresponding to the source configuration object and the target configuration object are automatically generated according to the object description information corresponding to the source configuration object and the target configuration object, so that the processing efficiency of the configuration object is further improved.
With reference to the first aspect, in a possible implementation manner, an object change record corresponding to the target configuration object may be determined. Here, the object change record includes an identification of the target configuration object, a creation time, a release time, an archive time, creation user information, release user information, and archive user information. And saving an object change record corresponding to the target configuration object. The object table of the target configuration object is stored, so that the terminal equipment can inquire the change information of the target configuration object at any time, and the data integrity of the database is guaranteed.
In a second aspect, an embodiment of the present application provides a configuration object processing apparatus, where the apparatus includes a unit configured to execute the configuration object processing method provided in any one of the possible implementation manners of the first aspect, so that the advantageous effects (or advantages) of the configuration object processing method provided in the first aspect can also be achieved.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the processor and the memory are connected to each other. The memory is used for storing a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the configuration object processing method provided by the first aspect, so that the beneficial effects of the configuration object processing method provided by the first aspect can also be achieved.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the instructions cause the computer to execute the configuration object processing method provided in any one of the possible implementation manners of the first aspect, and also can achieve the beneficial effects of the configuration object processing method provided in the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip system, where the chip system includes a processor, configured to support a terminal device to implement the functions related to the first aspect, for example, to generate or process information related to the configuration object processing method provided in the first aspect. In one possible design, the above chip system further includes a memory for storing program instructions and data necessary for the terminal. The chip system may be formed by a chip, and may also include a chip and other discrete devices.
In a sixth aspect, an embodiment of the present application provides a computer program product including instructions, where when the computer program product runs on a computer, the computer is enabled to execute the configuration object processing method provided in the first aspect, and beneficial effects of the configuration object processing method provided in the first aspect can also be achieved.
By implementing the embodiment of the application, the updating efficiency of the configuration object can be improved, and the maintenance cost of the software system can be reduced.
Drawings
Fig. 1 is a schematic flow chart of a configuration object processing method according to an embodiment of the present application;
FIG. 2 is a table comparison diagram provided in an embodiment of the present application;
fig. 3 is another schematic flow chart of a configuration object processing method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a configuration object processing apparatus according to an embodiment of the present disclosure;
fig. 5 is another schematic structural diagram of a configuration object processing apparatus according to an embodiment of the present application;
fig. 6 is another schematic structural diagram of a configuration object processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
To facilitate an understanding of the present application, some concepts related to the embodiments of the present application will be described first.
The configuration object referred to in the embodiments of the present application is a data entity, which is ubiquitous in various software systems. For a software system, it will typically contain one or more sets of configuration objects. Each configuration object set may include one or more configuration objects of the same category. Different configuration objects correspond to different business functions. It should be noted that some configuration objects may have a master-slave relationship, i.e. an association relationship between a root configuration object and a child configuration object. Therefore, a configuration object set comprising a plurality of configuration objects may be associated with one or more sub-configuration object sets, and a sub-configuration object set comprises a plurality of sub-configuration objects corresponding to the plurality of configuration objects. It is to be understood that the master-slave relationship between configuration objects may comprise one or more layers. For example, assume that there exists an item management software system that includes a configuration object set named "commodity" in which three configuration objects, namely commodity a, commodity B, and commodity C, are included. Further, the goods management system further includes a sub-configuration object set of "goods tariff" corresponding to the configuration object set of "goods". The sub-configuration object set of "commodity price" may include a sub-configuration object commodity price a ' corresponding to the configuration object commodity a (at this time, the configuration object commodity a may also be referred to as a root configuration object commodity a), a sub-configuration object commodity price B ' corresponding to the configuration object commodity B, and a sub-configuration object commodity price C ' corresponding to the configuration object commodity C. Similarly, the sub-configuration object commodity tariff a ', the sub-configuration object commodity tariff B ' and the sub-configuration object commodity tariff C ' may also correspond to a sub-configuration object.
Further, in particular implementations, the set of configuration objects will typically be stored in a data storage object of the software system. Here, the data storage object is used to refer to a storage space in which data of the software system is stored. The specific implementation form of the data storage object may include a database or a configuration file, which is not limited herein. When configuration objects are stored in the database, a configuration object set (hereinafter, the description is replaced by the configuration object set D for the convenience of understanding) corresponds to all data in one data table (hereinafter, the description is replaced by the data table E) in the database. One configuration object in the configuration object set D (hereinafter, the configuration object F is used to replace the description) corresponds to data stored in one row of the data table E, that is, one configuration object corresponds to one data record in the data table E. One data record may include one or more fields, each field corresponding to a different attribute of the configuration object F. For example, it is assumed that the configuration object of the article a corresponds to a data record in the data table E, and the data record may include three fields corresponding to three attributes of the article number, the unit price of the article, and the inventory amount of the article a. Each field stores a specific numerical value corresponding to each attribute. When the configuration object set is stored in the configuration file, the configuration object set D corresponds to all data in a specific configuration file (hereinafter, the configuration file G is used instead of the description). The configuration object F in the configuration object set D corresponds to a certain line or certain lines of data in the configuration file G. Of course, the configuration object may be embodied in other forms within the software system, and is not limited herein. The embodiment of the present application will be described by taking a database as a concrete implementation form of a data storage object as an example.
As can be seen from the foregoing, in order to implement different business functions, a software system is usually designed with a large number of configuration objects, and since there may exist one or more layers of master-slave relationships between configuration objects of different business functions, the configuration objects in the software system are of a large variety and complex structures. However, in the prior art, when one or more configuration objects in a software system need to be updated, a software system designer or a user needs to actively modify program codes required by the configuration objects in the copying and releasing processes, so as to complete the change or modification of the configuration objects. However, due to the characteristics of huge number and complex structure of the configuration objects, the resource consumption of manpower, material resources and the like is huge based on the updating mode of actively modifying the program codes by the user, the maintenance cost of the software system is increased, and the updating efficiency of the configuration objects is reduced.
The configuration object processing method provided by the embodiment of the present application may be executed by a terminal device with data processing capability, such as a desktop computer, a laptop computer, and the like, which is not limited herein. In the embodiment of the application, for example, the first and second identifiers before the first identifier and the second identifier are only used for distinguishing different identifiers, and do not have other limiting functions, and the first and second same principles before the names of the subsequent first root identifier, the first sub-identifier, and the like also do not have other limiting functions.
In order to solve the problems of waste of manpower and material resources and low updating efficiency of a configuration object caused by the fact that a user actively modifies a program code to update the configuration object, the embodiment of the application provides a configuration object processing method. Referring to fig. 1, fig. 1 is a flow chart illustrating a method for processing a configuration object according to an embodiment of the present disclosure. For convenience of understanding, the present embodiment will specifically describe the proposed configuration object processing method by taking a scenario in which the configuration object is stored in the database of the target software system as an example. As can be seen from fig. 1, the configuration object processing method provided in the embodiment of the present application includes the following steps:
s101, acquiring object description information of the source configuration object.
In some possible embodiments, the terminal device may first acquire the object description information of the source configuration object. Here, the source configuration object is a configuration object that needs to be modified. The object description information is mainly used for describing a specific structure of a target configuration object set to which the source configuration object belongs. The object description information may specifically include an identifier uniquely corresponding to the target configuration object set (for convenience of distinction and understanding, the description is replaced with the first identifier below). For example, the object description information may specifically include a table name of a data table corresponding to the configuration object set in the database. It is to be understood that, for the target software system involved in the present embodiment, one or more configuration object sets may exist at the same time, and are not limited herein. The target configuration object set is a configuration object set including the source configuration object in the target software system.
In a specific implementation, the terminal device may first detect a configuration object processing request. Here, the configuration object processing request carries an identifier (for convenience of distinction, the description is replaced with a second identifier below). The second identifier uniquely corresponds to a specific configuration object in a configuration object set in one or more configuration objects included in the target software system. For example, the second identifier may be [ a1, b1 ]. A1 is specifically a unique identifier of a certain configuration object set, such as a table name or an index number corresponding to the configuration object set, and is not limited herein. b1 is a unique identifier (hereinafter, described as a third identifier instead of the description) of a certain configuration object in the configuration object set, and the third identifier may specifically be a unique identification code or an object name of the configuration object in the configuration object set, which is not limited herein. The configuration object processing request is used for requesting the terminal device to modify or change the configuration object. Specifically, the terminal device may detect the configuration object processing request on a human-computer interaction interface included in the terminal device. Alternatively, the terminal device may further detect the configuration object processing request at another terminal device connected thereto. Here, the other terminal device may be connected to the terminal device in a wired or wireless manner, and is not limited herein. When the terminal device detects the configuration object processing request on the human-computer interaction interface or with other terminal devices, the configuration object processing request can be analyzed to obtain the second identifier. And then, the terminal equipment determines a configuration object matched with the second identifier from one or more configuration objects contained in the target software system, and determines the configuration object as a source configuration object.
After the source configuration object is determined, the terminal device may determine, according to the first identifier, a target object description file corresponding to the target configuration object set from an object description file set associated with the target software system. Here, the object description file records attribute information of the object configuration object set.
Optionally, in a case that the source configuration object does not include a child configuration object, the attribute information may include identification information, index information, and the like of the target configuration object set. For example, the target object description file may record a set name of the target configuration object set, a table name of a corresponding data table, a field name identified by a primary key (hereinafter, referred to as a primary key), and the like, which is not limited herein. For convenience of description, the field of the primary key identifier is hereinafter referred to as the primary key field. After the terminal device obtains the target object description file, the terminal device may extract the table name of the data table corresponding to the target configuration object set recorded in the target object description file, determine the table name as the first identifier of the target configuration object set, and generate the object description information of the source configuration object. Furthermore, in order to ensure the reliability of the object description information, the terminal device may also extract attribute information such as identification information and index information of the target configuration object set, and simultaneously use the attribute information as the object description information of the source configuration object.
TABLE 1-1
Figure BDA0002070335480000061
For example, please refer to table 1-1 above, where table 1-1 is a code implementation of an object description file corresponding to the target configuration object of the commodity provided in the embodiment of the present application. After acquiring the object description file shown in table 1-1, the terminal device may analyze the object description file and generate description information of the source configuration object including the first identifier "OFFERNG".
Optionally, in a case that the source configuration object includes a source root configuration object and a source sub configuration object corresponding to the source root configuration object, the target configuration object set may include a target root configuration object set and a target sub configuration object set. The target object description file records attribute information such as identification information and index information of a target root configuration object set and a target sub configuration object set, and also records an association identifier for indicating an association relationship between a root configuration object in the target root configuration object set and a sub configuration object in the target sub configuration object set. For example, the target object description file may record a set name of the target root configuration object set, a table name and a name of a primary key field of a data table (described below in place of the first data table), which corresponds to the set name of the target root configuration object set, a table name of a data table (described below in place of the second data table), which corresponds to the set name of the target child configuration object set, and a field name identified by a foreign key (described below in place of the foreign key) used for establishing an association relationship between the first data table and the second data table. For convenience of description, the field of foreign key identification is hereinafter simply referred to as a foreign key field. Here, it should be explained that, when the first data table is a master table of the second data table (in other words, the second data table is a slave table of the first data table), then the primary key field name of the first data table and the foreign key field name of the second data table are the same, that is, the primary key identification of the data record in the first data table and the primary key identification of the data record in the second data table are the same. After acquiring the target object description file, the terminal device may determine the first identifier of the target configuration object set from the identifier information (i.e., the table name of the first data table and the table name of the second data table) of the target root configuration object set and the target child configuration object set recorded in the target object description file. And then generating object description information corresponding to the source configuration object according to the first identifier and an association identifier (namely, the name of the primary key field or the name of the foreign key field) used for indicating the association relationship between the root configuration object in the target root configuration object set and the sub configuration objects in the target sub configuration object set. It can be understood here that the first identifier included in the object description information may include a first root identifier corresponding to the target root configuration object set and a first sub identifier corresponding to the target sub configuration object.
Tables 1 to 2
Figure BDA0002070335480000062
Figure BDA0002070335480000071
For example, please refer to table 1-2 above, where table 1-2 is another code implementation of the object description file corresponding to the target configuration object of the commodity provided in the embodiment of the present application. After acquiring the object description file shown in table 1-2, the terminal device may analyze the object description file, and determine that the description information of the source configuration object includes a first root identifier "offrng", a first sub identifier "OFFERING _ CHARGE", and an association identifier "OFFERING _ ID", that is, a table name of a data table corresponding to a root configuration object set to which a source root configuration object in the source configuration object belongs is OFFERNG, a table name of a data table corresponding to a sub configuration object set to which a source sub configuration object in the source configuration object belongs is OFFERING _ CHARGE, and the root configuration object set and the sub configuration object set are associated with each other through a field of OFFERING _ ID.
In a feasible implementation manner, the terminal device may analyze the configuration objects included in the database of the target software system in advance to obtain attribute information of a configuration object set to which each configuration object (here, including a root configuration object or a child configuration object) included in the database belongs and an association relationship between configuration object sets to which each configuration object belongs, and generate an object description file corresponding to each configuration object set according to the attribute information and the association relationship. The object description file is automatically generated through analyzing the database structure, so that waste of manpower and material resources caused by manually defining the object description file corresponding to each configuration object set can be saved. Moreover, the data recorded in the automatically generated object description file can be more accurate, convenience is brought to the subsequent configuration object processing process, and the efficiency of configuration object processing can be improved.
S102, according to the first identification contained in the object description information, a first data record corresponding to the source configuration object is determined from the data storage objects corresponding to the target configuration object set associated with the source configuration object, and a second data record is generated according to the first data record and the data record configuration information.
In some possible embodiments, after acquiring the first identifier from the object description information, the terminal device may determine, according to the first identifier, a first data record corresponding to the source configuration object from the data storage object corresponding to the target configuration object set. Then, the terminal device may obtain the preset data record configuration information, and generate a second data record according to the first data record and the data record configuration information.
Optionally, in a specific implementation in a scenario that the source configuration object does not include a sub configuration object, after the terminal device obtains the first identifier (i.e., a table name of a data table corresponding to the target configuration object set), all data records stored in the data table corresponding to the target configuration object set may be determined from a database of the target software system according to the table name. Then, the terminal device may query the data records corresponding to the source configuration from all the data records stored in the data table according to the third identifier corresponding to the source configuration object (for convenience of understanding and distinction, the description is replaced with the first data record below). For example, after acquiring the first identifier, the terminal device may detect a plurality of data tables in the database of the target software system, and when detecting that the table name of a certain data table matches the first identifier, may determine the certain data table as the data table corresponding to the target configuration object set. Then, the terminal device may detect the identifier field in each row of data records in the data table, and when it is detected that the data stored in the identifier field of a certain row of data records is consistent with the third identifier, may determine the row of data records as the first data record corresponding to the source configuration object. And when the terminal equipment determines the first data record corresponding to the source configuration object, the preset data record configuration information can be acquired. Here, the data record configuration information is used to re-assign some key fields in the data record, so that there is a difference between the configured data record and the data record before configuration. The key fields may include an identification field and a version type field. The above-mentioned identification field stores the third identification of the active configuration object in the whole target configuration object set, such as the above-mentioned unique identification code or the name of the active configuration object. It will be appreciated that the identification field may also be a primary key field of the data record, i.e. the third identifier may be a primary key identifier in the primary key field. Subsequently, in a scenario that the source configuration object does not include the sub configuration object, the identification field of the first data record is taken as the primary key field of the first data record for example to be described. In a specific implementation, the data record configuration information may include a target identifier and a target version type. After the terminal device obtains the data record configuration information, the terminal device may backup the first data record to obtain a third data record, then modify the primary key field of the third data record from the first third identifier to the target identifier, and modify the content of the version status field in the third data record from the first version type to the target version type, so as to obtain a second data record corresponding to the source configuration. It will be understood herein that the first version type described above may be embodied as a master version and the target version type described above may be embodied as a replica. It should be noted that the first data record and the second data record both include a category identifier with the same content, and the category identifier is used to indicate that the second data record is a copy of the first data record.
For example, suppose that the first data record corresponding to the source configuration object is specifically [1001, 2001, original, … ], where 1001 is the class identifier of the first data record, and is used to ensure the identifiability of its copy while being distinguished from other configuration objects in the target configuration object. The target is identified as 2003 and the target version type is a copy. The terminal device processes the backup of the first data record (i.e. the third data record) according to the data record configuration information to obtain a second data record [1001, 2003, copy, … ]. Here, reference numeral 1001 is used to indicate that the second data record is a copy of the first data record, and reference numeral 2003 is used to uniquely identify the second data record.
Optionally, in a scene that the source configuration object includes a source root configuration object and a source sub configuration object, the target configuration object set includes a target root configuration object set to which the source root configuration object belongs and a target sub configuration object set described by the source sub configuration object. The object description information includes a first root identifier corresponding to the target root configuration object set, a first sub identifier corresponding to the target sub configuration object set, and an association identifier for establishing an association relationship between the target root configuration object set and the target sub configuration object set. After the terminal device obtains the first root identifier and the first sub identifier, all data records stored in a first data table corresponding to a target root configuration object set can be inquired from a database of a target software system according to the first root identifier, and all data stored in a second data table corresponding to the target sub configuration object set can be inquired from the database according to the first sub identifier. Then, the terminal device may first query, according to the unique identifier of the source root configuration object (hereinafter, the third root identifier is used to replace the description), a data record corresponding to the source root configuration object (hereinafter, the first root data record is used to replace the description) from all data records of the first data table. Thereafter, the terminal device may obtain the data in the primary key field from the first root data record, which is assumed to be S here. The terminal device queries the foreign key field in each data record in the second data table, and when the terminal device queries that the content of the foreign key field in a certain data record in the second data table is S, it may be determined that the data record is the data record corresponding to the source sub-configuration object (hereinafter, the description is replaced with the first sub-data record). Finally, the terminal device may determine the first root data record and the first sub data record as the first data record corresponding to the source configuration object.
After the terminal device determines the first root data record corresponding to the source root configuration object and the first sub-data record corresponding to the source sub-configuration object, the first root data record and the first sub-data record may be copied to obtain a third root data record and a third sub-data record. It should be noted that the first root data record and the third root data record both include a third root identifier corresponding to the source root configuration object, and the first sub-data record and the third sub-data record both include a third sub-identifier corresponding to the source sub-configuration object and a first association identifier (i.e., a primary key identifier or a foreign key identifier) for indicating an association relationship between the source root configuration object and the source sub-configuration object. Then, the terminal device may acquire preset data record configuration information. Here, the data record configuration information is used to re-assign some key fields in the data record, so that there is a difference between the configured data record and the data record before configuration. Specifically, the key fields may include an identification field, a version type field, and a field corresponding to the association identifier (hereinafter referred to as an association identifier field). The identifier field in the first root data record and the identifier field in the third root data record store the identifier uniquely corresponding to the active root configuration object in the entire target root configuration object set, that is, the third root identifier. The identifier field in the first sub data record and the identifier field in the third sub data record store the identifier that is uniquely corresponding to the active sub configuration object in the entire target root configuration object set, that is, the third sub identifier described above. It can be understood that, since the first root data record and the third data record are data records corresponding to the root configuration object, the identification fields in the first data record and the third data record may also be fields of primary keys at the same time, that is, the third root identification is also the primary key identification of the first data record and the third data record at the same time. It is further understood that the third root identifier is also an association identifier for establishing an association relationship between the first root data record and the first sub data record. Similarly, because the first sub data record and the third sub data record are data records corresponding to the sub configuration object, fields corresponding to the identifier field and the foreign key identifier in the first sub data record and the third sub data record are different, that is, the identifier field and the foreign key field exist in the first sub data record and the third sub data record at the same time. And, the foreign key identification stored in the foreign key field is the same as the primary key identification stored in the primary key field. In a specific implementation, the data record configuration information obtained by the terminal device may include a first target identifier, a second target identifier, and a target version type. After the terminal device obtains the data record configuration information, the terminal device may modify the identifier field (i.e., the primary key field) of the third data record from the third identifier to the first target identifier, and may also modify the content of the field corresponding to the version status in the third data record (hereinafter, referred to as the version status field) from the first version type to the target version type. The terminal device may determine the configured third root configuration data as the second root record data corresponding to the source root configuration object. Similarly, the terminal device may modify the third sub identifier in the third sub data record to the second target identifier, may also modify the content of the associated identifier field in the third sub data record from the first third identifier to the first target identifier, and may also modify the content of the version status field in the third sub data record from the first version type to the target version type. The terminal device may determine the configured third sub data record as a second sub data record corresponding to the source sub configuration object. Finally, the terminal device may determine the second root data record and the second sub data record as a second data record corresponding to the source configuration object. It should be noted that the first root data record and the second root data record both include a category identifier with the same content, where the category identifier is used to indicate that the second root data record is a copy of the first root data record. It is also understood herein that the first version type described above may be embodied as a master version and the target version type described above may be embodied as a replica version.
For example, suppose the third data record is [1001, 2001, original, … ], the third sub-data record is [2001001, 2001, original, … ], where 1001 is the category identification code of the third data record, and 2001 is the third identification code (also called primary key) of the third data record. 2001001 is the third sub identifier of the third sub data record, and 2001 is the first associated identifier of the third sub data record. If the first object identifier is 2002, the second object identifier is 2001002, and the object version type is a duplicate, the terminal device configures the third data record and the third sub-data record according to the data record configuration information, and then obtains a second root data record of [1001, 2002, duplicate, … ], and a second sub-data record of [2001002, 2002, duplicate, … ]. The category identification code 1001 may indicate that the second root data record is a duplicate of the first root data record, the foreign key identification 2002 may indicate that the second sub data record is a child of the second root data record, and the identification 2001001 may be used to indicate that the second sub data record is a different data record than the first sub data record.
And S103, acquiring the structural description information corresponding to the target configuration object set, and generating a data record loading statement corresponding to the second data record according to the structural description information, the second data record and a preset data operation instruction set.
In some possible embodiments, after acquiring the second data record corresponding to the source configuration object, the terminal device may further extract preset structure description information corresponding to the target configuration object set. Here, the structure description information is used to describe the attribute of the data record corresponding to the target configuration object set. Specifically, the structure description information includes a table name of a data table corresponding to the target configuration object set, and a name, a data type, a field size, a field format, and the like of one or more fields included in each data record in the data table. Then, the terminal device may obtain a preset data operation instruction set, and determine a target data operation instruction for loading the data record into the database from the data operation instruction set. It should be noted that the data operation instruction set includes one or more instructions that can perform data operations such as data record insertion, data record deletion, and data record lookup on the configuration object set. In a specific implementation, the data operation instruction set may include one or more Structured Query Language (SQL) instructions with different functions. And finally, the terminal equipment can determine a data loading parameter corresponding to the second data record according to the data structure description information and the second data record, and then determine a data record loading statement corresponding to the second data record according to the data loading parameter and the target data operation instruction.
Optionally, in a specific implementation in a scenario that the source configuration object does not include a sub configuration object, after obtaining the second data record corresponding to the source configuration object and the structure description information corresponding to the target configuration object set, the terminal device may determine one or more SQL instructions for data record insertion from the data operation instruction set, and determine the one or more SQL instructions as the target data operation instructions. Then, the terminal device may analyze the structure description information to determine a structure of a data record corresponding to each configuration object in the target configuration object set. Here, it should be noted that, in the data table corresponding to the target configuration object set, one configuration object corresponds to each row data record of the table, and one field in the data record corresponds to each column of the table. After analyzing the structure description information, the terminal device can determine how many row data records the data table corresponding to the target configuration object set specifically contains, how many fields each row data record specifically contains, and description information such as the name, size, data type, and the like of each field. Then, the terminal device may determine, by combining the description information and the data in each field of the second data record, a data loading parameter required for inserting the second data record into the database. And after the terminal equipment acquires the data loading parameters corresponding to the second data record, substituting the data loading parameters corresponding to the second data record into the one or more SQL instructions, and generating a data record loading statement required for loading the second data record into the database through the one or more SQL instructions after parameter substitution. For example, assuming that the second data record is [1001, 2002, duplicate ], the terminal device may know, through the structure description information, that the first field in the data table is a field corresponding to the category identifier, the data type is integer, the second field in the data table is an identifier field, the data type is integer, the third field in the data table is a version type field, and the data type is integer. Then, the terminal device may determine a target row not storing data records in the data table, and determine the storage address and the data 1001 corresponding to the first column of the target row as the data loading parameters corresponding to the fields corresponding to the category identification codes. Similarly, the terminal device may continue to determine the data loading parameters corresponding to the identification field and the version type field. Then the terminal device can select an SQL instruction for inserting integer data, and respectively substitute the data loading parameter corresponding to the field corresponding to the category identification code, the data loading parameter corresponding to the identification field and the data loading parameter corresponding to the version type field into the SQL instruction, so as to obtain the SQL instruction with the substituted 3 parameters. The SQL instruction with the 3 parameters substituted can form [1001, 2002, copy ] data record loading statements corresponding to the data records.
Optionally, in a scenario where the source configuration object includes a source root configuration object and a source child configuration object, after acquiring the second root data record and the second child data record, the terminal device may acquire structure description information (for convenience of distinction, the description is replaced by the first structure description information hereinafter) corresponding to the target root configuration object set and structure description information (for convenience of understanding, the description is replaced by the second structure description information hereinafter) corresponding to the target child configuration object set. Then, the terminal device may determine one or more SQL instructions for data record insertion from a preset data operation instruction set, and determine a target data operation instruction from the one or more SQL instructions. Then, the terminal device may generate a root data record insertion statement required for inserting the second data record into the database according to the first structure description information, the second root data record and the target data operation instruction, and the process of generating the root data record insertion statement by the terminal device according to the first structure description information and the second root data record may refer to the process of generating a data record loading statement corresponding to the second data record according to the data record description information, the second data record and the target data operation instruction, which is not described herein again. Similarly, for the process of the terminal device generating the sub data record loading statement corresponding to the second sub data record according to the second structure description information, the target data operation instruction and the second sub data record, refer to the process of generating the root data record loading statement corresponding to the second root data record according to the first structure description information, the target data operation instruction and the second root data record, and are not described herein again. Finally, the terminal device may determine the root data record loading statement and the sub data record loading statement as a data record loading statement corresponding to the second data record.
The data record loading statement corresponding to the second data record is automatically generated through the structure description information, the second data record and the preset data operation instruction set, waste of manpower and material resources caused by manual modification of the data record loading statement by a user can be reduced, and processing efficiency of the configuration object can be improved.
And S104, executing the data record loading statement to load the second data record into the data storage object so as to add the configuration object copy corresponding to the source configuration object into the target configuration object set.
Optionally, in a scenario where the source configuration object does not include a sub-configuration object, in a specific implementation, after obtaining the data record loading statement corresponding to the second data record, the terminal device may directly execute the data record loading statement, so as to load the second data record into the database, so as to add the configuration object copy corresponding to the source configuration object in the target configuration object set. In other words, a second data record is added to the data table corresponding to the target configuration object set, and the second data record is a copy of the first data record in the data table.
Optionally, in a scenario where the source configuration object includes a source root configuration object and a source child configuration object, after obtaining the root data record loading statement and the child data record loading statement, the terminal device may execute the root data record loading statement and the child data record loading statement in batch, so as to load the second root data record and the second child data record into the database at the same time. Thus, the disorder of the file system function caused by the asynchronous generation of the root configuration object and the child configuration object copies can be avoided. Similarly, the second root data record and the second sub data record are loaded into the database, so that a second root data record is newly added to the data table corresponding to the source root configuration object, the second root data record is a copy of the first root data record, a second sub data record is newly added to the data table corresponding to the source root configuration object, and the second sub data record is a copy of the first sub data record. For example, please refer to fig. 2, and fig. 2 is a schematic diagram illustrating a data table comparison provided in an embodiment of the present application. As can be seen from the figure, the first data table corresponding to the target root configuration object includes a first root data record [1001, 2001, original ] and a fourth data record [1002, 2002, original ]. The target sub-configuration object set includes a first sub-data record [2001001, 2001, original ] and a fourth sub-data record [2001002, 2002, original ]. After the terminal device executes the root data record loading statement and the sub data record loading statement in batch, the first data table includes a first root data record [1001, 2001, original, a fourth data record [1002, 2002, original ] and a second root data record [1001, 2003, copy ]. The second data table includes a first sub data record [2001001, 2001, original ], a fourth sub data record [2001002, 2002, original ], and a second sub data record [2001003, 2003, duplicate ]. That is, a copy corresponding to the source root configuration object is generated in the target root configuration object set, and a copy corresponding to the source child configuration object is generated in the target child configuration object set.
Here, it should be noted that the nesting relationship between configuration objects referred to in the embodiments of the present application may include 3 layers or more, that is, the source configuration object includes a source root configuration object and a source child configuration object, and the source child configuration object may also have a child configuration object. However, for each specific configuration object, the generation process of the data record copy is the same as the process of the copy of the first data record (i.e., the second data record) corresponding to the source configuration object described in this application, and therefore, in this embodiment of the present application, the generation process of the data record copy in the scenario of 3-layer or more-layer nested relationships is not repeated.
In some feasible embodiments, after adding the configuration object replica corresponding to the source configuration object in the target configuration object set, the terminal device may feed back the second data record corresponding to the configuration object replica to the user initiating the configuration object processing request, and detect a configuration object modification instruction input by the user to obtain configuration modification information corresponding to the configuration object replica. Then, the terminal device may modify the configuration object copy based on the configuration modification information to obtain the target configuration object. Finally, the terminal device may perform a configuration object publishing operation on the source configuration object and the target configuration object, so that the version status of the source configuration object is modified from the first version type to a second version type, and the version status of the target configuration object is modified from the target version type to the first version type. In other words, the source configuration object is published to the software system as an old version of the configuration object, and the target configuration object is a genuine version of the configuration object, so that the software system can subsequently directly call the target configuration object.
It should be noted that the configuration object involved in the modification or release process described in the embodiment of the present application is not necessarily the target configuration object generated by the configuration object processing method described in the foregoing steps S101 to S104, and may also be the terminal device generating the configuration object by another method, which is not specifically limited in the embodiment of the present application. However, for convenience of understanding, the modifications and procedures of the configuration object proposed in the present application will be described below by taking the target configuration object generated by the configuration object processing method described in the foregoing steps S101 to S104 as an example.
The following describes the target configuration object obtained by modifying the terminal device and the publishing process of the target configuration object with reference to fig. 3. Fig. 3 is another schematic flow chart diagram of a configuration object processing method according to an embodiment of the present application, and as can be seen from fig. 3, the configuration object processing method further includes the following steps:
and S105, modifying the configuration object copy based on the acquired configuration modification information to obtain a target configuration object and generate object description information of the target configuration object.
In some possible embodiments, after adding the configuration object replica corresponding to the source configuration object in the target configuration object set, the terminal device may detect a configuration object modification instruction input by a user on a human-computer interaction interface included in the terminal device to obtain configuration object modification information corresponding to the configuration object replica. The configuration object modification information is used for modifying the second data record corresponding to the configuration object copy.
Optionally, in a scenario that the source configuration object does not include the sub-configuration object, after the terminal device obtains the configuration object modification information, the terminal device may modify the second data record corresponding to the configuration object copy according to the configuration object modification information to obtain a modified second data record, in other words, the terminal device modifies the configuration object copy according to the configuration object modification information to obtain the target configuration object. In addition, the terminal device may also determine the object description information corresponding to the source configuration object as the object description information corresponding to the target configuration object.
Optionally, in a scenario where the source configuration object includes a source root configuration object and a source child configuration object, the terminal device may first acquire configuration object modification information. Here, the configuration object modification information may be used to modify the source root configuration object and/or the source child configuration object. And the terminal equipment modifies the second root data record and/or the second sub data record corresponding to the source root configuration object and/or the source sub configuration object according to the configuration object modification information to obtain a target root configuration object and/or a target sub configuration object. In addition, the terminal device may further determine first object description information corresponding to the source root configuration object and second object description information corresponding to the source child configuration object as object description information corresponding to the target root configuration object and the target child configuration object.
And S106, generating a first configuration object issue statement according to the data operation instruction set and the object description information of the source configuration object, and generating a second configuration object issue statement according to the object description information of the target configuration object and the data operation instruction set.
In some possible embodiments, after acquiring the target configuration object and the object description information corresponding to the target configuration object, the terminal device may generate a first configuration object issue statement according to the data operation instruction set and the object description information of the source configuration object. The first configuration object issue statement is used for issuing the source configuration object. And then the terminal equipment can also generate a second configuration object issuing statement according to the object description information of the target configuration object and the data operation instruction set. The second configuration object issuance statement is used for issuing the target configuration object.
Optionally, specifically, in a scenario where the source configuration object does not include the sub configuration object, the terminal device may first select a data operation instruction with a data record updating function from the data operation instruction set. Specifically, the data operation instruction set may be an SQL instruction set. The terminal equipment can select one or more SQL commands with the data record updating function from the SQL command set. Then, the terminal device may obtain a storage address corresponding to the version type field in the first data record corresponding to the source configuration object, and substitute the storage address and the second version type as parameters into the one or more SQL instructions to generate a first configuration object issue statement corresponding to the source configuration object. Similarly, the terminal device may obtain a storage address corresponding to the version type field in the second data record corresponding to the target configuration object, and substitute the storage address and the first version type as parameters into the one or more SQL instructions to obtain a second configuration object issue statement corresponding to the target configuration object.
Optionally, specifically, in a scenario where the source configuration object includes a source root configuration object and a source sub-configuration object, the terminal device may generate, according to the data operation instruction set and the first object description information corresponding to the source root configuration object, a first root configuration object issue statement corresponding to the source root configuration object. The terminal device may further generate a first sub-configuration object issue statement corresponding to the source sub-configuration object according to the data operation instruction set and the second object description information corresponding to the source sub-configuration object. The process of generating the first root configuration object issue statement and the first sub-configuration object issue statement by the terminal device may refer to the process of generating the first configuration object issue statement described above, and is not described herein again. Similarly, the terminal device may generate a second root configuration object issue statement corresponding to the target root configuration object according to the data operation instruction set and the first object description information corresponding to the target root configuration object, and the terminal device may further generate a second sub-configuration object issue statement corresponding to the target sub-configuration object according to the data operation instruction set and the second object description information corresponding to the target sub-configuration object. The process of generating the second root configuration object issue statement and the second sub configuration object issue statement by the terminal device may specifically refer to the process of generating the second configuration object issue statement by the terminal device described above, which is not described herein again.
S107, executing the first configuration object issue statement and the second configuration object issue statement to modify the version state of the source configuration object from a first version type to a second version type, and modifying the version state of the target configuration object from a target version type to the first version type.
In some possible embodiments, after generating the first configuration object issue statement and the second configuration object issue statement, the terminal device may execute the first configuration object issue statement and the second configuration object issue statement in batch, so as to modify the version status of the source configuration object from the first version type to the second version type, and modify the version status of the target configuration object from the target version type to the first version type. In other words, the version status of the source configuration object is modified from the original to the old, and the version status of the target configuration object is modified from the copy to the original, so that the software system can directly call the target configuration object in subsequent operations without calling the source configuration object. In a specific implementation, when the source configuration object does not include a sub-configuration object, the terminal device may submit the first configuration object issue statement and the second configuration object issue statement in the same database transaction, thereby completing an issue operation on the source configuration object and the target configuration object. Or, when the source configuration object includes a source root configuration object and a source sub configuration object, the terminal device may submit the first root configuration object issue statement, the first sub configuration object issue statement, the second root configuration object issue statement, and the second sub configuration object issue statement in the same database transaction, thereby completing the issue operation on the source root configuration object, the source sub configuration object, the target root configuration object, and the target sub configuration object.
Optionally, after the terminal device completes the issuing operation of the source configuration object and the target configuration object, the object change record corresponding to the target configuration object may be obtained and stored. Here, the object change record may include information such as an identifier, a creation time, a distribution time, an archive time, creation user information, distribution user information, and archive user information of the target configuration object, which is not limited herein. The object table of the target configuration object is stored, so that the terminal equipment can inquire the change information of the target configuration object at any time, and the data integrity of the database is guaranteed.
In the embodiment of the application, the terminal device automatically generates the data record loading statement for generating the configuration object copy based on the object description information, the second data record and the data operation instruction set of the source configuration object, so that waste of manpower and material resources caused by manual modification of the data record loading statement by a user can be reduced, and the processing efficiency of the configuration object is improved. In addition, after the configuration object copy is modified according to the configuration object modification information to obtain the target configuration object, the terminal device can also automatically generate the issue statements corresponding to the source configuration object and the target configuration object according to the object description information corresponding to the source configuration object and the target configuration object, so that the processing efficiency of the configuration object is further improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a device for processing configuration objects according to an embodiment of the present disclosure. The device includes:
an obtaining unit 10, configured to obtain object description information of the source configuration object. Here, the object description information includes a first identification of a target configuration object set associated with the source configuration object.
A data record determining unit 20, configured to determine, according to the first identifier obtained by the obtaining unit 10, a first data record corresponding to the source configuration object from the data storage objects corresponding to the target configuration object set. And generating a second data record according to the first data record and the data record configuration information.
And a statement generating unit 30, configured to acquire structure description information corresponding to the target configuration object set. And generating a data record loading language corresponding to the second data record according to the structure description information, the second data record determined by the data record determining unit 20, and a preset data operation instruction set.
An executing unit 40, configured to execute the data record loading statement generated by the statement generating unit 30 to load the second data record into the data storage object so as to add a configuration object copy corresponding to the source configuration object in the target configuration object set.
In some possible embodiments, the target configuration object set includes one or more configuration objects including the source configuration object. The obtaining unit 10 is configured to obtain a configuration object processing request, where the configuration object processing request carries a second identifier. And determining the configuration object marked by the second identification from the one or more configuration objects, and determining the configuration object marked by the second identification as a source configuration object. And acquiring a target object description file corresponding to the target configuration object set from an object description file set according to the first identifier, and analyzing the target object description file to obtain object description information of the source configuration object.
In some possible embodiments, the data record generating unit 20 is configured to: and backing up the first data record to obtain a third data record. And acquiring preset data record configuration information. Here, the data record configuration information includes a target identification, a target version type. And modifying a third identifier and a first version type of the source configuration object in the third data record, which correspond to the target configuration object set, to be the target identifier and the target version type, so as to obtain a second data record corresponding to the source configuration object.
In some possible embodiments, the statement generating unit 30 is configured to determine a target data operation instruction for loading a data record into the data storage object from a preset data operation instruction set. And determining a data loading parameter corresponding to the second data record according to the data structure description information and the second data record generated by the data record generating unit 20. And determining a data record loading statement corresponding to the second data record according to the data loading parameter and the target data operation instruction.
In some possible embodiments, the source configuration object includes a source root configuration object and a source child configuration object corresponding to the source root configuration object. The target configuration object set comprises a target root configuration object set to which the source root configuration object belongs and a target sub configuration object set to which the source sub configuration object belongs. The first identifier obtained by the obtaining unit 10 includes a first root identifier corresponding to the target root configuration object set and a first sub identifier corresponding to the target sub configuration object set. The object description information further includes an association identifier for indicating an association relationship between a root configuration object in the target root configuration object set and a sub configuration object in the target sub configuration object set. The data record generating unit 20 is configured to: and determining data records corresponding to the target root configuration object set from preset data storage objects according to the first root identifier, and determining data records corresponding to the target sub configuration object set from the data storage objects according to the first sub identifier. And backing up a first root data record corresponding to the source root configuration object from the data record corresponding to the target root configuration object set. And backing up a first sub data record corresponding to the source sub configuration object from the data record corresponding to the target sub configuration object set according to the first root data record and the association identifier. And determining the first root data record and the first sub data record as a first data record corresponding to the source configuration object.
In some feasible embodiments, the first root data record includes a second root identifier corresponding to the source root configuration object, and the first sub data record includes a second sub identifier corresponding to the source sub configuration object and a first association identifier used for indicating an association relationship between the source root configuration object and the source sub configuration object. The data record generating unit 20 is configured to backup the first root data record and the first sub data record to obtain a third root data record and a third sub data record.
And acquiring preset data record modification information. Here, the data record modification information includes a first target identifier, a second target identifier, and a target version type. And modifying the second root identifier and the first version type in the third data record to be the first target identifier and the target version type, and modifying the second sub identifier, the first version type and the first association identifier in the third sub data record to be the second target identifier, the target version type and the second target identifier, so as to obtain a second data record corresponding to the source configuration object.
In some possible embodiments, please refer to fig. 5, and fig. 5 is a schematic structural diagram of another configuration object processing apparatus according to an embodiment of the present disclosure. As can be seen, the apparatus further includes:
a modifying unit 50, configured to modify the configuration object copy generated by the executing unit 40 based on the acquired configuration object modification information, obtain a target configuration object, and generate object description information of the target configuration object.
The statement generating unit 30 is further configured to generate a first configuration object issuing statement according to the object description information of the source configuration object and the set of data operation instructions, and generate a second configuration object issuing statement according to the object description information of the target configuration object and the set of data operation instructions generated by the modifying unit 50.
The executing unit 40 is further configured to execute the first configuration object issue statement and the second configuration object issue statement generated by the statement generating unit 30, so as to modify the version status of the source configuration object from the first version type to the second version type, and modify the version status of the target configuration object from the target version type to the first version type.
In some possible embodiments, please refer to fig. 6 together, fig. 6 is a schematic structural diagram of a configuration object processing apparatus according to an embodiment of the present application, and as can be seen from fig. 6, the apparatus further includes:
and an object change record storage unit 60 configured to identify an object change record corresponding to the target configuration object. Here, the object change record includes an identification of the target configuration object, a creation time, a release time, an archive time, creation user information, release user information, and archive user information.
The object change record storage unit 60 is further configured to store an object change record corresponding to the target configuration object.
In a specific implementation, the obtaining unit 10 may first obtain object description information corresponding to a source configuration object. The process of acquiring the object description information by the acquiring unit 10 may specifically refer to the process of acquiring the object description information described in step S101 in the first embodiment, and is not described herein again. Then, the data record determining unit 20 determines a first data record corresponding to the source configuration object from the data storage objects corresponding to the target configuration object set according to the first identifier included in the object description information acquired by the acquiring unit 10, and generates a second data record according to the first data record and the data record configuration information. For a specific process, reference may be made to the process of acquiring the second data record described in step S102 in the first embodiment, and details are not repeated here. Then, the statement generating unit 30 may generate a data record loading language corresponding to the second data record according to the structure description information, the second data record determined by the data record determining unit 20, and a preset data operation instruction set. For a specific process, reference may be made to the generation process of the data record loading statement described in step S103 in the first embodiment, and details are not described here again. Finally, the execution unit 40 may execute the data record loading statement to generate a configuration object copy corresponding to the source configuration object. For a specific process, reference may be made to the process of executing the data record loading statement described in step S104 in the first embodiment, and details are not described here again.
Optionally, after the execution unit 40 executes the data record loading statement to generate the configuration object copy, the modification unit 50 may obtain the configuration object modification information, and modify the configuration object copy according to the configuration object modification information to obtain the target configuration object, where the specific process may refer to the modification described in step S105 in the first embodiment, and details are not described here again. Thereafter, the statement generating unit 30 and the executing unit 40 may generate a first configuration object issue statement and a second configuration object issue statement corresponding to the target configuration object, and execute the first configuration object issue statement and the second configuration object issue statement to complete the issue operation of the target configuration object, and the specific process may refer to the process of generating and executing the first configuration object issue statement and the second configuration object issue statement described in step S106 and step S107 in the first embodiment, which is not described herein again.
Optionally, the object change record storage unit 60 may obtain and store the object change record corresponding to the target configuration object after the execution unit 40 issues the target configuration object, for a specific process, refer to the process of obtaining and storing the object change record corresponding to the target configuration object described in step S107 in the first embodiment, which is not described herein again.
In the embodiment of the application, the data record loading statement for generating the configuration object copy is automatically generated based on the object description information, the second data record and the data operation instruction set of the source configuration object, so that waste of manpower and material resources caused by manual modification of the data record loading statement by a user can be reduced, and the processing efficiency of the configuration object is improved. In addition, after the configuration object copy is modified according to the configuration object modification information to obtain the target configuration object, the issuing statements corresponding to the source configuration object and the target configuration object can be automatically generated according to the object description information corresponding to the source configuration object and the target configuration object, so that the processing efficiency of the configuration object is further improved.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device provided by the embodiment of the present application includes a processor 701, a memory 702, and a bus system 703. The processor 701 and the memory 702 are connected to each other via a bus system 703.
The memory 702 is used for storing programs. In particular, the program may include program code including computer operating instructions. The memory 702 includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM). Only one memory is shown in fig. 7, but of course, the memory may be provided in plural numbers as necessary.
The memory 702 may also be a memory in the processor 701, which is not limited herein.
The memory 702 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
and (3) operating instructions: including various operational instructions for performing various operations.
Operating the system: including various system programs for implementing various basic services and for handling hardware-based tasks.
The processor 701 controls the operation of the electronic device, and the processor 701 may be one or more Central Processing Units (CPUs). In the case where the processor 701 is one CPU, the CPU may be a single-core CPU or a multi-core CPU.
In a specific application, the various components of the electronic device are coupled together by a bus system 703, wherein the bus system 703 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For clarity of illustration, however, the various buses are labeled in fig. 7 as bus system 703. For ease of illustration, it is only schematically drawn in fig. 7.
The configuration object processing method disclosed in the embodiment of the present application may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities.
An embodiment of the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a computer, a configuration object processing method described in the first embodiment may be implemented.
The computer-readable storage medium may be an internal storage unit of the configuration object processing apparatus according to the second embodiment. The computer readable storage medium may also be an external storage device of the configuration object processing apparatus, such as a plug-in hard disk of the configuration object processing apparatus, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like. Further, the computer-readable storage medium may include both an internal storage unit and an external storage device of the configuration object processing apparatus. The computer-readable storage medium is used for storing the computer program and other programs and data required by the monitoring device. The above-described computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (18)

1. A method for processing a configuration object, the method comprising:
acquiring object description information of a source configuration object, wherein the object description information comprises a first identifier of a target configuration object set associated with the source configuration object;
determining a first data record corresponding to the source configuration object from data storage objects corresponding to the target configuration object set according to the first identifier, and generating a second data record according to the first data record and data record configuration information;
acquiring structure description information corresponding to the target configuration object set, and generating a data record loading statement corresponding to the second data record according to the structure description information, the second data record and a preset data operation instruction set;
and executing the data record loading statement to load the second data record into the data storage object so as to add the configuration object copy corresponding to the source configuration object in the target configuration object set.
2. The method of claim 1, wherein the target set of configuration objects includes one or more configuration objects including the source configuration object;
the obtaining of the object description information of the source configuration object includes:
acquiring a configuration object processing request, wherein the configuration object processing request carries a second identifier;
determining the configuration object marked by the second identification from the one or more configuration objects, and determining the configuration object marked by the second identification as a source configuration object;
and acquiring a target object description file corresponding to the target configuration object set from an object description file set according to the first identifier, and analyzing the target object description file to obtain object description information of the source configuration object.
3. The method of claim 1 or 2, wherein the generating a second data record according to the first data record and data record configuration information comprises:
backing up the first data record to obtain a third data record;
acquiring preset data record configuration information, wherein the data record configuration information comprises a target identifier and a target version type;
and modifying a third identifier and a first version type of the source configuration object in the third data record, which correspond to the target configuration object set, to be the target identifier and the target version type, so as to obtain a second data record corresponding to the source configuration object.
4. The method according to claim 3, wherein the determining, according to the data structure description information, the second data record, and a preset data operation instruction set, a copy creation statement corresponding to the source configuration object includes:
determining a target data operation instruction for loading a data record into the data storage object from a preset data operation instruction set;
determining a data loading parameter corresponding to the second data record according to the data structure description information and the second data record;
and determining a data record loading statement corresponding to the second data record according to the data loading parameter and the target data operation instruction.
5. The method according to claim 1, wherein the source configuration object includes a source root configuration object and a source sub-configuration object corresponding to the source root configuration object, the target configuration object set includes a target root configuration object set to which the source root configuration object belongs and a target sub-configuration object set to which the source sub-configuration object belongs, the first identifier includes a first root identifier corresponding to the target root configuration object set and a first sub-identifier corresponding to the target sub-configuration object set, and the object description information further includes an association identifier indicating an association relationship between a root configuration object in the target root configuration object set and a sub-configuration object in the target sub-configuration object set;
the backing up a first data record corresponding to the source configuration object from a data storage object corresponding to the target configuration object set according to the first identifier includes:
determining a data record corresponding to the target root configuration object set from a preset data storage object according to the first root identifier, and determining a data record corresponding to the target sub configuration object set from the data storage object according to the first sub identifier;
backing up a first root data record corresponding to the source root configuration object from the data records corresponding to the target root configuration object set, and backing up a first sub data record corresponding to the source sub configuration object from the data records corresponding to the target sub configuration object set according to the first root data record and the association identifier;
and determining the first root data record and the first sub data record as a first data record corresponding to the source configuration object.
6. The method according to claim 5, wherein the first root data record includes a second root identifier corresponding to the source root configuration object, and the first child data record includes a second child identifier corresponding to the source child configuration object and a first association identifier for indicating an association relationship between the source root configuration object and the source child configuration object;
the generating a second data record according to the first data record and the data record configuration information comprises:
backing up the first root data record and the first subdata record to obtain a third root data record and a third subdata record;
acquiring preset data record modification information, wherein the data record modification information comprises a first target identifier, a second target identifier and a target version type;
and modifying the second root identifier and the first version type in the third data record to be the first target identifier and the target version type, and modifying the second sub identifier, the first version type and the first association identifier in the third sub data record to be the second target identifier, the target version type and the second target identifier, so as to obtain a second data record corresponding to the source configuration object.
7. The method according to any one of claims 1-6, further comprising:
modifying the configuration object copy based on the acquired configuration object modification information to obtain a target configuration object and generate object description information of the target configuration object;
generating a first configuration object issue statement according to the object description information of the source configuration object and the data operation instruction set, and generating a second configuration object issue statement according to the object description information of the target configuration object and the data operation instruction set;
executing the first configuration object issuing statement and the second configuration object issuing statement to modify the version state of the source configuration object from a first version type to a second version type and modify the version state of the target configuration object from a target version type to the first version type.
8. The method of claim 7, further comprising:
determining an object change record corresponding to the target configuration object, wherein the object change record comprises an identifier, creation time, release time, filing time, creation user information, release user information and filing user information of the target configuration object;
and saving an object change record corresponding to the target configuration object.
9. A configuration object processing apparatus, characterized in that the apparatus comprises:
an obtaining unit, configured to obtain object description information of a source configuration object, where the object description information includes a first identifier of a target configuration object set associated with the source configuration object;
a data record determining unit, configured to determine, according to the first identifier obtained by the obtaining unit, a first data record corresponding to the source configuration object from data storage objects corresponding to the target configuration object set, and generate a second data record according to the first data record and data record configuration information;
a statement generating unit, configured to obtain structure description information corresponding to the target configuration object set, and generate a data record loading language corresponding to the second data record according to the structure description information, the second data record determined by the data record determining unit, and a preset data operation instruction set;
and the execution unit is used for executing the data record loading statement generated by the statement generation unit to load the second data record into the data storage object so as to add the configuration object copy corresponding to the source configuration object in the target configuration object set.
10. The apparatus according to claim 9, wherein the target configuration object set includes one or more configuration objects including the source configuration object, and the obtaining unit is configured to:
acquiring a configuration object processing request, wherein the configuration object processing request carries a second identifier;
determining the configuration object marked by the second identification from the one or more configuration objects, and determining the configuration object marked by the second identification as a source configuration object;
and acquiring a target object description file corresponding to the target configuration object set from an object description file set according to the first identifier, and analyzing the target object description file to obtain object description information of the source configuration object.
11. The apparatus according to claim 9 or 10, wherein the data record generating unit is configured to:
backing up the first data record to obtain a third data record;
acquiring preset data record configuration information, wherein the data record configuration information comprises a target identifier and a target version type;
and modifying a third identifier and a first version type of the source configuration object in the third data record, which correspond to the target configuration object set, to be the target identifier and the target version type, so as to obtain a second data record corresponding to the source configuration object.
12. The apparatus of claim 11, wherein the sentence generation unit is configured to:
determining a target data operation instruction for loading a data record into the data storage object from a preset data operation instruction set;
determining a data loading parameter corresponding to the second data record according to the data structure description information and the second data record generated by the data record generating unit;
and determining a data record loading statement corresponding to the second data record according to the data loading parameter and the target data operation instruction.
13. The apparatus according to claim 9, wherein the source configuration object includes a source root configuration object and a source sub-configuration object corresponding to the source root configuration object, the target configuration object set includes a target root configuration object set to which the source root configuration object belongs and a target sub-configuration object set to which the source sub-configuration object belongs, the first identifier obtained by the obtaining unit includes a first root identifier corresponding to the target root configuration object set and a first sub-identifier corresponding to the target sub-configuration object set, and the object description information further includes an association identifier indicating an association relationship between a root configuration object in the target root configuration object set and a sub-configuration object in the target sub-configuration object set;
the data record generating unit is used for:
determining a data record corresponding to the target root configuration object set from a preset data storage object according to the first root identifier, and determining a data record corresponding to the target sub configuration object set from the data storage object according to the first sub identifier;
backing up a first root data record corresponding to the source root configuration object from the data records corresponding to the target root configuration object set, and backing up a first sub data record corresponding to the source sub configuration object from the data records corresponding to the target sub configuration object set according to the first root data record and the association identifier;
and determining the first root data record and the first sub data record as a first data record corresponding to the source configuration object.
14. The apparatus according to claim 13, wherein the first root data record includes a second root identifier corresponding to the source root configuration object, and the first sub data record includes a second sub identifier corresponding to the source sub configuration object and a first association identifier indicating an association relationship between the source root configuration object and the source sub configuration object;
the data record generating unit is used for:
backing up the first root data record and the first subdata record to obtain a third root data record and a third subdata record;
acquiring preset data record modification information, wherein the data record modification information comprises a first target identifier, a second target identifier and a target version type;
and modifying the second root identifier and the first version type in the third data record to be the first target identifier and the target version type, and modifying the second sub identifier, the first version type and the first association identifier in the third sub data record to be the second target identifier, the target version type and the second target identifier, so as to obtain a second data record corresponding to the source configuration object.
15. The apparatus according to any one of claims 9-14, further comprising:
the modification unit is used for modifying the configuration object copy generated by the execution unit based on the acquired configuration object modification information to obtain a target configuration object and generate object description information of the target configuration object;
the statement generation unit is further configured to: generating a first configuration object issuing statement according to the object description information of the source configuration object and the data operation instruction set, and generating a second configuration object issuing statement according to the object description information of the target configuration object generated by a modification unit and the data operation instruction set;
the execution unit is further configured to:
executing the first configuration object issue statement and the second configuration object issue statement generated by the statement generation unit to modify the version status of the source configuration object from a first version type to a second version type, and modify the version status of the target configuration object from a target version type to the first version type.
16. The apparatus of claim 15, further comprising:
the object change record storage unit is used for determining an object change record corresponding to the target configuration object, wherein the object change record comprises an identifier, a creation time, a release time, an archiving time, creation user information, release user information and archiving user information of the target configuration object;
the object change record storage unit is further configured to store an object change record corresponding to the target configuration object.
17. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-8.
18. An electronic device, comprising a memory for storing program code, a processor for invoking the program code stored by the memory to perform the method of any of claims 1-8.
CN201910443373.9A 2019-05-23 2019-05-23 Configuration object processing method and device Pending CN112068894A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910443373.9A CN112068894A (en) 2019-05-23 2019-05-23 Configuration object processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910443373.9A CN112068894A (en) 2019-05-23 2019-05-23 Configuration object processing method and device

Publications (1)

Publication Number Publication Date
CN112068894A true CN112068894A (en) 2020-12-11

Family

ID=73658053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910443373.9A Pending CN112068894A (en) 2019-05-23 2019-05-23 Configuration object processing method and device

Country Status (1)

Country Link
CN (1) CN112068894A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744947A (en) * 2013-12-31 2014-04-23 金蝶软件(中国)有限公司 Version-ID-related (version-identity-related) data reference processing method and system
CN106484892A (en) * 2016-10-19 2017-03-08 凌云天博光电科技股份有限公司 Data manipulation method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744947A (en) * 2013-12-31 2014-04-23 金蝶软件(中国)有限公司 Version-ID-related (version-identity-related) data reference processing method and system
CN106484892A (en) * 2016-10-19 2017-03-08 凌云天博光电科技股份有限公司 Data manipulation method and device

Similar Documents

Publication Publication Date Title
US11782892B2 (en) Method and system for migrating content between enterprise content management systems
CN111104392B (en) Database migration method and device, electronic equipment and storage medium
CN102934114B (en) For the checkpoint of file system
US8887135B2 (en) Generating test cases for functional testing of a software application
US20140297592A1 (en) Computer-readable medium storing program and version control method
CN112036736A (en) Workflow creating method and device
US9009175B2 (en) System and method for database migration and validation
US10691556B2 (en) Recovering a specified set of documents from a database backup
CN111324610A (en) Data synchronization method and device
CN113032393A (en) Method and device for binding associated object
US8738569B1 (en) Systematic verification of database metadata upgrade
CN112416957A (en) Data increment updating method and device based on data model layer and computer equipment
CN112416710A (en) User operation recording method and device, electronic equipment and storage medium
CN111767266A (en) Entity contact model design method and device, computer equipment and storage medium
US10678864B2 (en) Analysis model preparing system, programming apparatus, and analysis model preparing method
CN110765078B (en) File management method and device and computer readable storage medium
CN111221698A (en) Task data acquisition method and device
US9111114B1 (en) Method of transforming database system privileges to object privileges
JP2006294019A (en) Generic software requirement analyzer
CN112068894A (en) Configuration object processing method and device
US11023361B1 (en) Intelligent automated way of baselining integration content using messages from historical tests to be used for regression testing
CN115617773A (en) Data migration method, device and system
CN113760600A (en) Database backup method, database restoration method and related device
CN111400396A (en) Method and device for generating data synchronization script and computer readable storage medium
CN112965706B (en) Description method, device and medium of data types

Legal Events

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

Application publication date: 20201211