CN115878589A - Version management method and device of structured data and related equipment - Google Patents

Version management method and device of structured data and related equipment Download PDF

Info

Publication number
CN115878589A
CN115878589A CN202111154746.4A CN202111154746A CN115878589A CN 115878589 A CN115878589 A CN 115878589A CN 202111154746 A CN202111154746 A CN 202111154746A CN 115878589 A CN115878589 A CN 115878589A
Authority
CN
China
Prior art keywords
version
data
structured data
difference
difference data
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
CN202111154746.4A
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 Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing 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 Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to CN202111154746.4A priority Critical patent/CN115878589A/en
Priority to PCT/CN2022/115326 priority patent/WO2023051125A1/en
Publication of CN115878589A publication Critical patent/CN115878589A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

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

Abstract

The embodiment of the application provides a version management method and device of structured data and related equipment, and is applied to the IT field of information technology. The method comprises the following steps: acquiring structured data of a first version, wherein the structured data comprises attributes of one or more elements and values corresponding to the attributes; obtaining difference data about the first version according to the structured data of the first version and the structured data of the previous version, wherein the difference data represents the difference between the structured data of the first version and the structured data of the previous version; recording the difference data corresponding to the first version. In the embodiment of the application, the change of the structured data can be recorded in an incremental storage mode, so that a user can conveniently check the direct iterative changes of different versions.

Description

Version management method and device of structured data and related equipment
Technical Field
The present application relates to the field of database technologies, and in particular, to a method and an apparatus for managing versions of structured data, and a related device.
Background
In the design and deployment process of the database, along with business adjustment and requirement change, the design can be completed only by modifying the database for multiple times and iterating versions. Therefore, the version of the database model is managed, and retrospective modification can be facilitated. However, the existing database design software cannot provide a backtracking function after modifying the database model structure. In some scenarios, through the code bin, the script file of the database model may be version managed. However, the code bin can only record the modification of the code and the data, the dependency relationship among the elements of the database is often complex, the version of the database model is difficult to backtrack by recording the script file, the unstructured text is not beneficial to a user to check the modification of the database structure, and the user experience is poor.
Therefore, how to solve the above problems is a hot spot being studied by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides a version management method and device for structured data and related equipment, and the change of the structured data can be recorded, so that a user can conveniently check the direct iterative changes of different versions.
In a first aspect, an embodiment of the present application provides a version management method for structured data, including:
acquiring structured data of a first version, wherein the structured data comprises attributes of elements and values corresponding to the attributes;
obtaining difference data about the first version according to the structured data of the first version and the structured data of the previous version, wherein the difference data about the first version characterizes the difference between the structured data of the first version and the structured data of the previous version, and the difference data about the first version comprises an identifier of the first version, an identifier of an element with a change and a change operation type;
recording the difference data with respect to the first version.
Alternatively, the above method may be applied to a server, and executed by the server or a component (e.g., a chip, a software module, or an integrated circuit) inside the server. Or the method may be applied to a database design system, for example, performed by a server side of the database design system.
In the embodiment of the application, the change of the structured data of different versions is recorded in an incremental storage mode, so that the change record of the structured data is realized. On one hand, the user can conveniently check the direct iterative changes of different versions, the version backtracking of the user is facilitated, and the visualization requirement on the change of the structured data is met. On the other hand, when the server records the structured data of different versions, the whole structured data does not need to be recorded, and the recording amount is reduced.
In addition, transverse backtracking and longitudinal backtracking can be conveniently and efficiently realized through the embodiment of the application, when a certain version is transversely backtracked, elements of the version can be conveniently calculated according to difference data, and the query speed is high and the efficiency is high. According to the embodiment of the application, the life cycle of the solution element can be known according to the identification and the difference data of the element, and the query speed and the query efficiency are high.
In a possible implementation manner of the first aspect, the structured data includes one or more items of database model data, JSON data, or extensible markup language (XML) data.
The database model data may include elements such as tables, fields, views, and the like, and the elements may respectively correspond to one or more attributes. By the method, incremental storage can be performed on the database model data, and the method has the advantages of being small in data storage capacity, high in storage speed, high in query speed and the like.
JavaScript object notation (JSON) data can be used to generally represent one or more objects or groups of objects in JSON data, where generally, an object is composed of "curly brackets" enclosed sections, each object generally includes one or more attributes and values corresponding to the attributes, and different attributes are separated by "or" from each other.
One or more nodes may be included in the XML data. The node can be viewed as an element of XML data.
In yet another possible implementation of the first aspect, the structured data comprises one or more modules; the obtaining difference data about the first version according to the first version of the structured data and the last version of the structured data comprises:
comparing the first version of the structured data with the last version of the structured data according to modules to obtain the difference data about the first version, wherein the difference data comprises the difference data corresponding to the one or more modules.
Optionally, when performing deduplication, deduplication operations may be performed according to the order of versions from new to old, so as to obtain the full elements of the current version.
Optionally, when performing a deduplication operation, the difference data of the latest version of an element of a certain ID is retained, and the element whose type of the deduplication operation contains "delete" (i.e., "DROP") is removed.
In yet another possible implementation of the first aspect, the method further comprises:
receiving first request information from user equipment, wherein the first request information is used for requesting the first version of structured data;
obtaining the structured data of the first version according to the difference data of the first version and the difference data of the previous version of the first version.
In yet another possible implementation of the first aspect, the method further comprises:
receiving second request information from user equipment, wherein the second request information is used for requesting a change record of a first element, and the first element belongs to the element;
and obtaining a change record of the first element according to the difference data of the first version, the difference data of the version before the first version and the information of the first element.
In yet another possible implementation manner of the first aspect, the change operation type includes one or more of adding, deleting, updating, or the like.
In yet another possible implementation of the first aspect, the structured data comprises one or more of database model data, JASON data, or extensible markup language XML data.
In yet another possible implementation of the first aspect, the structured data comprises database model data, and the elements comprise elements belonging to one or more of the following element classes: tables, fields, indexes, views, or relationships.
In a second aspect, an embodiment of the present application provides a version management apparatus, where the version management apparatus includes an obtaining unit and a processing unit, and the version management apparatus is configured to implement the method described in the first aspect or any one of the possible implementation manners of the first aspect.
In a possible implementation manner of the second aspect, the obtaining unit is configured to obtain a first version of structured data, where the structured data includes an attribute of an element and a value corresponding to the attribute;
the processing unit is configured to obtain difference data about the first version according to the structured data of the first version and the structured data of the previous version, where the difference data about the first version characterizes a difference between the structured data of the first version and the structured data of the previous version, and the difference data about the first version includes an identifier of the first version, an identifier of an element in which a change exists, and a change operation type;
the processing unit is further configured to record the difference data corresponding to the first version.
In yet another possible implementation of the second aspect, the structured data comprises one or more modules, each module comprising an attribute of a partial element and a value corresponding to the attribute of the partial element;
the processing unit is further configured to:
comparing the first version of the structured data with the last version of the structured data according to modules to obtain the difference data about the first version, wherein the difference data comprises the difference data corresponding to the one or more modules.
Optionally, when performing deduplication, the processing unit may perform deduplication operations according to a sequence from a new version to an old version to obtain full elements of a current version.
Optionally, when the processing unit performs the deduplication operation, the latest version of the difference data of the element of a certain ID may be retained, and the element whose operation type includes "delete" (i.e., "DROP") may be removed.
In yet another possible implementation manner of the second aspect, the obtaining unit is further configured to receive first request information from a user equipment, where the first request information is used to request the first version of the structured data;
the processing unit is further configured to obtain the structured data of the first version according to the difference data about the first version and the difference data about the version before the first version.
In yet another possible implementation manner of the second aspect, the obtaining unit is further configured to receive second request information from the user equipment, where the second request information is used to request a change record of a first element, where the first element belongs to the one or more elements;
the processing unit is further configured to obtain a change record of the first element according to the difference data about the first version, the difference data about the version before the first version, and the information about the first element.
In yet another possible implementation of the second aspect, the change operation type includes one or more of adding, deleting, updating, or the like.
In yet another possible implementation of the second aspect, the structured data comprises one or more of database model data, JSON data, or extensible markup language XML data.
In yet another possible implementation of the second aspect, the structured data comprises database model data, and the one or more elements comprise one or more of the following element classes: tables, fields, indexes, views, or relationships.
In a third aspect, embodiments of the present application provide a computing device comprising a processor and a memory; the memory has a computer program stored therein; when the processor executes the computer program, the computing device performs the method described in any of the first to fourth aspects.
It should be noted that the processor included in the data transmission device described in the eleventh aspect may be a processor dedicated to execute the methods (referred to as a special-purpose processor for convenience), or may be a processor that executes the methods by calling a computer program, such as a general-purpose processor. Optionally, at least one processor may also include both special purpose and general purpose processors.
Alternatively, the computer program may be stored in a memory. For example, the Memory may be a non-transitory (non-transitory) Memory, such as a Read Only Memory (ROM), which may be integrated with the processor on the same device or separately disposed on different devices, and the embodiment of the present application is not limited to the type of the Memory and the arrangement manner of the Memory and the processor.
In one possible implementation, the at least one memory is external to the computing device.
In yet another possible implementation, the at least one memory is located within the computing device.
In yet another possible implementation, a portion of the at least one memory is located within the computing device, and another portion of the memory is located outside of the computing device.
In this application, it is also possible that the processor and the memory are integrated in one device, i.e. that the processor and the memory are integrated together.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein instructions that, when executed on at least one processor, implement the method described in any of the first to fourth aspects.
In a fifth aspect, the present application provides a computer program product comprising computer instructions that, when run on at least one processor, implement the method described in any of the preceding first to fourth aspects.
Alternatively, the computer program product may be a software installation package, which may be downloaded and executed on a computing device in case it is desired to use the method described above.
The beneficial effects of the technical solutions provided in the second to fifth aspects of the present application may refer to the beneficial effects of the technical solutions of the first aspect, which are not described herein again.
Drawings
The drawings that are required to be used in the description of the embodiments will now be briefly described.
FIG. 1 is a schematic diagram illustrating a modification of a database model according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an architecture of a database design system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a version management method according to an embodiment of the present application;
fig. 4 is a schematic diagram of JSON data provided in an embodiment of the present application;
FIG. 5 is a block diagram of some possible difference data provided by embodiments of the present application;
FIG. 6 is a schematic diagram of multiple versions of structured data provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of difference data regarding multiple versions provided by an embodiment of the present application;
fig. 8 is a flowchart illustrating another version management method according to an embodiment of the present application;
FIG. 9 is a diagram illustrating multiple versions of information provided by an embodiment of the present application;
fig. 10 is a flowchart illustrating another version management method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a version management apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
For ease of understanding, the following description is given schematically and in part by reference to the concepts related to the embodiments of the present application.
1. Databases, tables, fields
A Database (DB) is a repository where data is organized, recorded and managed according to a data structure, and is an organized, sharable collection of large amounts of data recorded within a computer.
A table may record a particular type of data, such as student information, an institution directory, and the like. Each table has attributes such as a table ID, table name, comment, etc.
The table includes one or more columns (columns), each column is a field in the table, and each column records information of a certain part in the table. For example, the database may contain a table with the name "student", a column to record the student's student number (or student ID), and a column to record the student's name (name). A field may contain attributes such as field name, field type, etc.
Wherein, the database library, table, field, etc. can be regarded as the elements in the database. Of course, the elements in the database may also include elements such as indexes, views, relationships, etc., which are not described one by one here.
2. Database design system
The database design system is a visual database design and management tool, which is used for designing, building, using and maintaining a database. A user may create (or edit) a design view including elements and associations between elements in a database design system that is capable of recording the database design view created (or edited) by the user and may build a model of the database (or may also include recording data of the database).
It should be understood that a user in the present application may include a user of a database design system, including a user, manager, designer or developer of the database design system, and the like.
3. Version management, transverse backtracking and longitudinal backtracking
Version management refers to management of data changes such as code, document and model design in a development process, and is one of core ideas of process management in development iteration.
In a plurality of managed versions, any one historical version is randomly selected, and the total data of the version is obtained and is transversely backtracked.
In a plurality of managed objects (which can be objects in any version), one object is randomly selected, and the change condition of the object (and the sub-object of the object) in the whole version management life cycle is acquired, namely longitudinal backtracking.
The above exemplary description of the concepts may be applied in the following embodiments.
The structured data contains the attributes of the elements and the values corresponding to the attributes, changes of the structured data are difficult to record through a version management method based on texts, character strings and the like, backtracking is difficult to perform when a user iterates the structured data, and experience is poor. For example, database model data is structured data, one or more elements exist in a database (or database model), and an element may contain an attribute, a sub-attribute, or the like, even if there is an association relationship between elements. If version management is performed by a version management method based on texts, character strings and the like, and when the difference comparison is performed on databases (or database models) of different versions, a messy text block is seen, the difference is difficult to understand visually, and the experience is poor.
Furthermore, structured data such as JSON data, XML data, and the like all face the problem of version management.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a possible database model according to an embodiment of the present disclosure. As shown in part (a) of fig. 1, a student database model is shown, and in a design stage, a student table (student) and a teacher table (teacher) are added to the student database, corresponding to a student entity and a teacher entity respectively. Among them, the student table (student entity) may contain the following fields (attributes): school number (subsidiary _ ID), class number (class _ ID), start date (date), teacher table (teacher entity) may contain the following fields (attributes): teacher's job number (teacher _ ID), name (teacher _ name), gender (sex), and time of employment (period).
During the database design process, the requirements for the database may change at any time, and thus the database model may be modified. For example, as shown in part (b) of fig. 1, in the current design stage, a class entity needs to be newly added so that students can view teachers corresponding to their classes. The class table (class entity) may contain the following fields (attributes): class number (class _ ID), class name (class _ name), teacher name (teacher _ name). The class number in the class table is associated with the student number in the student table, and the teacher name in the class table is associated with the name in the teacher table.
As another example, attributes of a table (e.g., modified table name, or comments, etc.), attributes of an updated field (e.g., modified field name, modified field type), an updated view, an updated function, etc. are updated in the database.
Changes to the database model as shown above may occur many times during the database design process, and therefore, the version of the database model needs to be managed for retrospective modification. However, the existing database design software cannot provide a backtracking function after modifying the database model structure. Even if the record is modified through text comparison, the unstructured text is not beneficial to a user to check the modification of the database structure, and the user experience is poor.
In order to solve the foregoing problems, embodiments of the present application provide a method, an apparatus, and a related device for managing versions of structured data, which can record changes of the structured data, so that a user can conveniently check direct iterative changes of different versions.
The following describes the architecture of the embodiment of the present application, taking structured data as database model data as an example. It will be appreciated by those skilled in the art that for other forms of structured data, the system architecture for version management thereof can refer to the following structure.
The version management method provided by the embodiment of the application can be realized based on a database design system, and also can be realized based on other systems and equipment which can design, create and edit database model data. The database design system may include a hardware module, a software module (such as an application program, a component, and the like), a combination of a hardware module and a software module, and the like.
In one possible design, the database design system may include a client and a server. The client can be used for presenting an interface, a selection box, an input box and other components for interacting with the user, and the server is used for providing the structured data of the database model for the client or responding to the request of the user.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an architecture of a possible database design system according to an embodiment of the present disclosure. The system as shown in fig. 2 comprises at least one user equipment 201 and at least one server 202.
The user equipment 201 is an electronic device with data processing and data transceiving capabilities, and can implement the functions of the client. For example, it may be a stand-alone device such as a handheld terminal, a wearable device, a vehicle, a robot, etc., or it may be a component (e.g., a chip or an integrated circuit) included in a stand-alone device. For example, when the terminal device is a handheld terminal, it may be a mobile phone (mobile phone), a tablet computer (pad), a computer (e.g., a laptop, a palmtop, etc.), and the like.
The server 202 is a device having data processing and data transmitting/receiving capabilities, and can implement the functions of the server. It should be understood that the description herein is referred to as a server, and the specific form thereof may be a physical device such as a server, or a host, etc., or a virtual device such as a virtual machine, or a container, etc. Alternatively, the server 202 may be deployed in one device independently or in a distributed manner on multiple devices.
The server 202 may receive a request for creating a database, a request for modifying a database, and the like, and when the database is modified, the server may record difference data of two versions through the modified database model data and the currently recorded database model data, thereby implementing management on modification of structured data. Moreover, the whole database does not need to be recorded every time, and the storage capacity is reduced.
Therefore, by recording the difference data, a database of a certain version can be obtained according to the difference data of one or more versions during transverse backtracking; during longitudinal backtracking, the life cycle of a certain element can be longitudinally checked through operations such as creation, modification or deletion of the backtracking on the certain element. The user can conveniently go back to and vertically go back to, promotes user's use experience.
It should be understood that the link for communication between the server 202 and the user equipment 201 may be a wired link, a wireless link, or a combination of wired and wireless links. Further alternatively, communication may be achieved through one or more network technologies. The communication method between the server and the user equipment 201 is not limited in the present application.
In one possible design, the server 202 as shown in fig. 2 may be a cloud platform. The cloud platform includes a large amount of basic resources (including but not limited to computing resources, recording resources, or network resources, etc.) provided by a cloud service provider, wherein the computing resources may be a large number of computing devices (e.g., servers, virtual machines).
In a possible implementation scenario, the database design system can be provided to the user by a cloud service provider in a cloud platform abstracted as a database design. For example, after a user purchases a database design cloud service, the cloud platform creates a database design system instance on resources provided by a cloud service provider in response to a user-triggered database design system instance creation operation, and then provides a version management service of a database model to the user. Accordingly, the user device used by the user may present an interface, using the version management service.
The method for purchasing the database design cloud service may include: and (3) charging in advance and then settling according to the actual use condition of the final resource, or settling according to the time of using the cloud service or according to the purchased function or resource of the cloud service.
It should be noted that, in this embodiment of the present application, the cloud platform may be a cloud platform of a center cloud, a cloud platform of an edge cloud, or a cloud platform including a center cloud and an edge cloud, and this embodiment of the present application is not particularly limited thereto. Moreover, when the cloud platform is a cloud platform including a center cloud and an edge cloud, the database design system may be partially deployed in the cloud platform of the edge cloud and partially deployed in the cloud platform of the center cloud.
The method of the embodiments of the present application is described in detail below.
Referring to fig. 3, fig. 3 is a schematic flowchart of a version management method according to an embodiment of the present disclosure. Alternatively, the method may be applied to the version management system described above, such as the database design system shown in fig. 2.
The version management method as shown in fig. 3 includes at least steps S301 to S302. It should be understood that the present application is described by the order of S301 to S302 for convenience of description, and is not intended to limit execution by the above order. The embodiment of the present application does not limit the execution sequence, the execution time, the execution times, and the like of the one or more steps. The steps S301 to S302 are specifically as follows:
step S301: the server obtains a first version of structured data.
The server is a device having a data processing function. For convenience of description, the method is referred to as a server, and is not limited to be implemented by a server, and may be implemented by a virtual machine, a host, or the like.
Where structured data is data having a relatively fixed pattern. The structured data contains attributes of the elements and contains values corresponding to the attributes. The attribute in the structured data may be one or more. In some scenarios, a version of the structured data may also be null data, i.e., not containing attributes of the element.
Attributes in the structured data are associated with one or more elements (or objects) that the structured data indicates. For example, the attributes in the structured data may include attributes such as a name of a table, a comment of a table, a name of a field, a field type of a field, and the like, where a table, a field, and the like are elements (or called objects).
In one design, the structured data may obtain corresponding information through a key-value.
Optionally, the category of the structured data may belong to one or more of database model data, javaScript object notation (JSON) data, or extensible markup language (XML) data.
The database model data may include elements such as tables, fields, views, and the like, and the elements may respectively correspond to one or more attributes. By the method, incremental storage can be performed on the database model data, and the method has the advantages of being small in data storage capacity, high in storage speed, high in query speed and the like. JSON data, in general, can be used to represent one or more objects or arrays of objects. In JSON data, objects are typically made up of "curly brackets" enclosed sections, each object typically containing one or more attributes and values corresponding to the attributes, with "gaps" between different attributes. It should be understood that objects in JSON data can be viewed as elements. One or more nodes may be included in the XML data. The node can be viewed as an element of XML data.
For example, referring to fig. 1 (b), the database model data includes a plurality of tables, each corresponding to an entity. A table may contain a plurality of attributes, such as one or more attributes of a table name, field, etc. A field in a table may also be considered an element, and a field may also contain multiple attributes, such as field name, data format, field ID, and so on.
For another example, please refer to fig. 4, where fig. 4 is a schematic structural diagram of a possible JSON data provided in an embodiment of the present application. It can be seen that an object in the JSON format can contain multiple attributes, for example, an object with a table name "tb _ teacher" can contain multiple attributes such as a table name, a comment, a table ID, a field, etc. Optionally, the value of the field attribute may be an array including a plurality of objects, and each object in the array further includes a plurality of attributes. And are not specifically described.
Alternatively, the server may receive the first version of the structured data from the other device, thereby obtaining the first version of the structured data. For example, a user may create, edit, or delete one or more elements in the structured data, edit attributes of the elements, or the like in a user device, resulting in different versions of the structured data. The user saves or submits the first version of the structured data in the user equipment, and correspondingly, the server can receive the first version of the structured data from the user equipment.
Or alternatively, the server may generate the first version of the structured data itself. For example, the user may indicate his modification to the structured data by the indication information, and the server generates the first version of the structured data based on the original structured data and the indication information.
Step S302: the server obtains difference data about the first version according to the first version of the structured data and the last version of the structured data.
Wherein the last version refers to a previous version of the first version recorded in the server. And the first version of difference data characterizes a difference between the first version of structured data and the last version of structured data.
The difference data for the first version includes an identification of the first version, an identification of the elements for which changes exist, and a change operation type. The identifier of the first version may also be referred to as a version number or version information. For example, the first version may be the second time the structured data is modified, and the identification of the first version may be "version (or ver.) 2". The elements for which there are changes may be, for example, a table, or fields, as shown in FIG. 1, or a table named "tb _ teacher" object, as shown in FIG. 4, for example. The identification of an element is used to indicate the element, and may comprise, for example, one or more of an element ID, a number, and the like. The change operation type includes one or more operation types of addition, deletion, update, or the like. Furthermore, adding, deleting or modifying the attribute corresponding to the element can be further included.
Taking fig. 1 as an example, if the user adds a class table to the first version as compared with the previous version, the difference data includes the version number of the first version, the ID of the class table, and the operation of changing (i.e., adding). Further, the user adds fields of the class table in the first version, namely: the class number, the class name, and the teacher name field, the difference data further includes the version number of the first version, and the IDs and the changed operations (i.e., addition) of the class number, the class name, and the teacher name.
For ease of understanding, one possible first version of difference data is exemplified below. Referring to fig. 5, fig. 5 is a schematic structural diagram of some possible difference data provided in the embodiment of the present application. Referring to part (a) of fig. 5, the difference data includes a version identification (i.e., version is "2"), an identification of an element in which there is a change (i.e., table ID is "E03"), and a difference type (i.e., ACTION is "ADD"). Optionally, the difference data further includes one or more attributes of the class table, such as a name, or a comment.
Similarly, as shown in part (b) of FIG. 5, the difference data includes an identification of the version, an identification of the elements in which there is a change (i.e., field IDs "E08, E09, E10", respectively), and a difference type (i.e., ACTION is "ADD"). Optionally, the difference data further includes one or more attributes of the above elements, such as a field name, a field type, or the like.
Alternatively, the structured data may comprise one or more modules, each module comprising a portion of the data in the structured data. When the server obtains the difference data, the difference data may include difference data corresponding to the one or more modules.
In one design, the server divides the first version of structured data into one or more modules. And the last version of structured data also contains a plurality of modules. And the server compares the structured data of the first version with the structured data of the current version according to the modules to obtain difference data, wherein the difference data comprises the difference data corresponding to one or more modules.
Illustratively, the structured data as shown in part (b) of fig. 1 may contain data of two modules (referred to as a first module and a second module, respectively, for convenience of description). The first module contains table-related attributes, such as attributes of a student table (attributes such as table ID, table name, or comment), attributes of a teacher table, and the like. The second module contains field-related attributes, such as teacher job number field-related attributes (e.g., field ID, field name, or field type), teacher job number-related attributes, and so forth. The difference data includes difference data corresponding to the first module, for example, part (a) of fig. 5. The difference data also includes difference data corresponding to the second module, such as part (b) of fig. 5.
In one possible implementation, the modules may be obtained by hierarchical division. For example, each of the one or more modules corresponds to one (or more) level(s) of structured data. For example, the database model data middle table and the field are respectively two levels, and thus, the database model data as shown in part (b) of fig. 1 may be divided into two modules.
In yet another possible implementation, the modules may be obtained by hierarchical division of an array. For example, the data shown in FIG. 4, where the object with Table ID E01 belongs to an object in an array, and thus to a module. And the value of the field attribute of the object with the table ID of E01 is another array, so the field attribute can be used as another module.
Alternatively, the structured data of the previous version may be derived from the difference data regarding the previous version of the first version.
Optionally, when the server obtains the difference data through comparison, the server may perform comparison according to the identifiers of the elements to determine the identifier and the difference type of the element with the change. For example, if the last version of the structured version data contains the ID of element 1, but the first version of the structured data does not contain the ID of element 1, the operation type corresponding to element 1 in the first version is delete (i.e., DROP). Similarly, the last version of the structured version data does not contain the ID of element 2, but the first version of the structured data contains the ID of element 2, and the operation type corresponding to element 2 in the first version is new (i.e., ADD).
Similarly, the last version of structured data contains the ID of element 3, and the first version also contains the ID of element 3, at which point the corresponding attributes of element 3 may be compared. If the element 3 has inconsistent attributes in the two versions, the operation type of the element 3 corresponding to the first version is modified (namely CHANGE); if the element 3 does not have inconsistent attributes in the two versions, the element 3 is not changed, and correspondingly, the difference data does not contain the identifier corresponding to the element 3.
Optionally, the version management method shown in fig. 3 further includes step S303, which is specifically as follows:
step S303: the server records the difference data corresponding to the first version.
For example, the server records the first version of the difference data. Alternatively, the server adds the difference data for the first version to the total difference data, which contains difference data for one or more versions.
For example, please refer to fig. 6 and fig. 7, fig. 6 is a schematic diagram of a possible multiple versions of structured data provided in an embodiment of the present application, and fig. 7 is a schematic diagram of a possible multiple versions of difference data provided in an embodiment of the present application. As shown in part (1) of fig. 6, a teacher table and a student table are added to the structured data of version 1, and the difference part is shown in an area 601. In contrast, in the difference data shown in fig. 7, the difference data on version 1 includes the identification of version 1, the identifications of the teacher table and the student table (E01, E02, respectively), the type of difference, and the attributes of the teacher table and the student table.
As shown in part (2) of fig. 6, the annotation of the teacher table is changed from "teacher" to "teacher table" in the structured data of version 2, and the difference part of version 2 from version 1 is shown as an area 602. Whereas, in the difference data shown in FIG. 7, the difference data on version 2 contains the identification of version 2, the identification of the teacher table (i.e., E01), the type of difference (i.e., CHANGE), and the attributes of the teacher table.
As shown in part (3) of fig. 6, the annotation of the student table is changed from "student" to "student table" in the structured data of version 3, and the difference between version 3 and version 2 is shown in an area 603. Whereas in the difference data shown in FIG. 7, the difference data about version 3 contains the identification of version 3, the identification of the student table (i.e., E01), the type of difference (i.e., CHANGE), and the attributes of the student table.
As shown in part (4) of fig. 6, the following two difference parts are included in the structured data of version 4: (1) changing the table name of the teacher table from "teacher" to "db _ teacher", as shown in region 604; (2) the student table is deleted as shown in area 605. In contrast, in the difference data shown in fig. 7, the difference data on version 4 includes the identification of version 4, the identifications of the teacher table and the student table (E01, E02, respectively), the type of difference, and the attributes of the teacher table and the student table.
Similarly, as shown in part (5) of fig. 6, a class table is added to the structured data of version 5, and the difference between version 5 and version 5 is shown as an area 606. In contrast, in the difference data shown in fig. 7, the difference data regarding version 5 includes an identifier of version 4, an identifier of the class table (E03, respectively), a difference type, and an attribute of the class table.
It should be understood that fig. 6 and 7 illustrate a table module as an example, and are not intended to limit the present solution to a table only, and the same applies to other elements such as fields.
Optionally, when the first version is the first version of the structured data, the last version of the data may be default data or blank data. Further optionally, the server may obtain the default data by pre-configuring, pre-setting, or receiving user input.
In the embodiment shown in fig. 3, the server may record changes of different versions of the structured data in an incremental storage manner, so as to implement change recording of the structured data. On one hand, the user can conveniently check the direct iterative changes of different versions, the version backtracking of the user is facilitated, and the visualization requirement on the change of the structured data is met. On the other hand, when the server records the structured data of different versions, the whole structured data does not need to be recorded, and the recording amount is reduced.
In one possible design, the server may satisfy the user's lateral backtracking needs based on the difference data. Referring to fig. 8, fig. 8 is a flowchart illustrating another possible version method provided in the embodiment of the present application. Alternatively, the method may be applied to the database design system shown in fig. 2. It should be understood that the present application is described by the order shown in fig. 8 for convenience of description, and is not intended to limit execution by the order described above. The execution sequence, execution time, execution times and the like of one or more steps are not limited.
Optionally, the method embodiment shown in fig. 8 may include some or all of steps S801 to S803. The relevant description of step S801 to step S803 may refer to step S301 to step S303. And will not be described in detail herein.
Optionally, the embodiment of the method shown in fig. 8 may include step S804, which is specifically as follows:
step S804: the server receives first request information from the user equipment. Wherein the first request information is used for requesting the first version of the structured data.
For example, when a user device opens an interface, the latest version of structured data is obtained by default, while the first version is the latest version. In this case, the user device may send first request information to the server to request viewing of the first version of the structured data when opening a certain interface. Accordingly, the server receives the first request information from the user equipment.
For another example, the user device may present one or more versions of information to the user, and the user device receives a selection operation for the first version input by the user, thereby sending the first request information to the server. Accordingly, the server receives the first request information from the user equipment.
For example, please refer to fig. 9, fig. 9 is a schematic diagram of a possible multiple versions of information provided by an embodiment of the present application. The area 901 shows information of 3 versions, version 5, version 4, and version 3, respectively. The "submitter" is the user who submits the version of the structured data. The "creation time" describes the time at which the version of structured data was submitted, or the time at which the version of structured data was formed. "operation" is used to indicate an operation that can be performed on this version of structured data. For example, the components shown in area 902 are for a fallback version, or for indicating an interface to present a fallback version. For example, the current version is version 5, and the user can rollback to version 3 by clicking a rollback button corresponding to version 3. The components shown in area 903 are used to view one or more versions or to indicate that a presentation views structured data of a specified version. For example, clicking on the component shown in area 903 may present the version 5 of the structured data. The components shown in area 904 are used to view a specified version of the process information, such as reviewing process information for version 5. The audit flow information may include one or more of an auditor, a change difference visualization, or a database schema Definition language (Data Definition language).
The interface shown in fig. 9 may be presented by a user device. The user can select a certain version according to own requirements, and the service user equipment receives a selection operation for the first version, which is input by the user and indicates to view the structured data of the first version. In this way, the user equipment sends the first request message to the server to request the first version of the structured data.
The embodiment shown in fig. 8 at least includes step S805, which is as follows:
step S805: the server obtains the structured data of the first version according to the difference data of the first version and the difference data of the version before the first version.
Wherein the difference data may reflect a difference between the current version and the previous version. Thus, the difference data of the first version, and the difference data about the version before the first version, may result in the structured data of the first version.
In one design, the server determines, in the total difference data, difference data for the first version and difference data for versions prior to the first version. And the server performs deduplication operation according to the sequence from new to old to obtain the full elements of the current version.
Optionally, when performing the deduplication operation, the difference data of the latest version of the element of a certain ID may be specifically retained, and the element whose operation type includes "delete" (or "DROP") may be removed.
For example, taking the data shown in fig. 7 as the total difference data as an example, if the server needs to obtain the structured data of version 5. The server determines the difference data about version 5 and the difference data about version 4, version 3, version 2 and version 1, and performs deduplication operations according to the version from new to old. For example, with respect to the element in the difference data of version 5 (line 8), the element whose ID is "E03" is retained as the element in the structured data of version 5. For another example, regarding the element with ID "E02" in the difference data of version 4 (line 7), the element with ID "E02" is not included in the structured data of version 5 because its operation type includes "DROP". For another example, in the difference data regarding version 4 (line 6), the element with the ID "E01" is included, and the difference data of the latest version is related to version 4, so the element with the ID "E01" is included in the structured data of version 5. An element with an ID of "E01", whose attributes and values in version 5 are: the table name is "db _ teacher" and the annotation is "teacher table".
Similarly, taking the data shown in fig. 7 as the total difference data as an example, if the server needs to obtain the structured data of version 1. The server determines the difference data about version 1, and the version 1 does not have a corresponding version before, so the server obtains the structured data of version 1 according to the difference data of version 1. For example, the element shown in line 1 of FIG. 7 with an ID of "E01" is retained as an element in the structured data of version 1; the element with ID "E02" as shown in line 2 of fig. 7 is also retained as an element in the structured data of version 1.
Optionally, the server may send the first version of the structured data to the user device. Accordingly, the user device may receive a first version of structured data and thereby render the first version of structured data.
In one possible design, the server may obtain the last version of the structured data from the difference data regarding the version before the first version. Further, the server may obtain the first version of the structured data based on the difference data regarding the first version and the last version of the structured data.
In the embodiment shown in fig. 8, the server may obtain different versions of structured data according to one or more versions of difference data. The server can respond to the requirement to provide the structured data corresponding to different versions, the checking requirement of the structured data of different versions is met, and the use experience of a user is improved.
In one possible design, the server may satisfy the longitudinal backtracking requirement of the user based on the difference data. Referring to fig. 10, fig. 10 is a schematic flowchart of another possible version method provided in the embodiment of the present application. Alternatively, the method may apply to the database design system shown in fig. 2. It should be understood that the present application is described by the order shown in fig. 10 for convenience of description, and is not intended to limit execution by the order described above. The execution sequence, execution time, execution times and the like of one or more steps are not limited.
Alternatively, the embodiment of the method shown in fig. 10 may include some or all of steps S1001 to S1003. The description of step S1001 to step S1003 can refer to step S301 to step S303. And will not be described in detail herein.
Optionally, the embodiment of the method shown in fig. 10 may include step S1004, which is specifically as follows:
step S1004: the server receives second request information from the user equipment. The second request information is used for requesting the change record of the first element. Alternatively, the change record may also be referred to as a life cycle of the first element, history information, or the like.
Wherein the first element is at least one of the one or more elements indicated by the structured data.
For example, in the case of database model data, the database model data may include attributes of one or more elements, such as attributes of one or more tables, and attributes of one or more fields. The user may view the change record for one (or some) of the elements.
The change record may look at the creation, modification, etc. record that the element has undergone.
The embodiment shown in fig. 10 at least includes step S1005, which is as follows:
step S1005: and the server obtains the change record of the first element according to the difference data of the first version, the difference data of the version before the first version and the information of the first element.
For example, taking the difference data as the difference data shown in fig. 7 as an example, if the server needs to obtain the change record of the element with the ID "E01", the difference data corresponding to the element with the ID "E01" may be determined in the difference data shown in fig. 7, and specifically, the difference data may be corresponding to the 2 nd, 3 rd and 5 th lines. It can be seen that the difference data corresponding to the element of "E01" reflects the creation and modification process.
Optionally, the server may use the difference data corresponding to the first element as the change record of the first element. Or optionally, the server may further process the difference data corresponding to the first element to obtain a change record of the first element.
Optionally, the server may feed back the change record of the first element to the user. For example, the server may send the change record for the first element to the user device, and in response, the user device may receive the change record for the first element and present the change record for the first element.
In the embodiment shown in fig. 10, the server can implement longitudinal backtracking of the element according to the difference data, so that the user can know in which version the table a is created and in which version the table a is updated, the life cycle of the element is intuitively obtained, and the user experience is improved.
It should be noted that the above embodiments may be combined without mutual exclusion, and the present application does not exemplify the combining case.
The method of the embodiments of the present application is explained in detail above, and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a version management apparatus 110 according to an embodiment of the present disclosure, where the version management apparatus 110 may be a server or a user equipment, or may be a device in the server or the user equipment, for example, a chip, a software module, an integrated circuit, or the like. The version management apparatus 110 is configured to implement the version management method described above, for example, the version management method in the embodiment shown in fig. 3, fig. 8, or fig. 10.
In one possible implementation, the version management apparatus 110 may include an obtaining unit 1101 and a processing unit 1102.
In a possible design, the version management apparatus 110 may be a server in the foregoing embodiment.
In a possible implementation manner, the obtaining unit 1101 is configured to obtain a first version of structured data, where the structured data includes an attribute of an element and a value corresponding to the attribute;
the processing unit 1102 is configured to obtain difference data about the first version according to the structured data of the first version and the structured data of the previous version, where the difference data about the first version characterizes a difference between the structured data of the first version and the structured data of the previous version, and the difference data about the first version includes an identifier of the first version, an identifier of an element in which a change exists, and a change operation type;
the processing unit 1102 is further configured to record the difference data corresponding to the first version.
In yet another possible implementation, the structured data includes one or more modules, each module including an attribute of a partial element and a value corresponding to the attribute of the partial element;
the processing unit 1102 is further configured to:
comparing the first version of the structured data with the last version of the structured data according to modules to obtain the difference data about the first version, wherein the difference data comprises the difference data corresponding to the one or more modules.
Optionally, when performing deduplication, the processing unit 1102 may perform deduplication operations according to an order of versions from new to old, so as to obtain full elements of the current version.
Optionally, the processing unit 1102 may keep the latest version of the difference data of the element of a certain ID and remove the element whose operation type contains "delete" (i.e., "DROP") when performing the deduplication operation.
In yet another possible implementation manner, the obtaining unit 1101 is further configured to receive first request information from a user equipment, where the first request information is used to request the first version of the structured data;
the processing unit 1102 is further configured to obtain the structured data of the first version according to the difference data of the first version and the difference data of the version before the first version.
In yet another possible implementation manner, the obtaining unit 1101 is further configured to receive second request information from the user equipment, where the second request information is used to request a change record of a first element, where the first element belongs to the one or more elements;
the processing unit 1102 is further configured to obtain a change record of the first element according to the difference data about the first version, the difference data about the version before the first version, and the information about the first element.
In yet another possible implementation, the change operation type includes one or more of adding, deleting, updating, or the like.
In yet another possible implementation, the structured data comprises one or more of database model data, JSON data, or extensible markup language XML data.
In yet another possible embodiment, the structured data comprises database model data, and the one or more elements comprise data belonging to one or more of the following element classes: tables, fields, indexes, views, or relationships.
It should be understood that the related description may also refer to the description in the embodiment shown in fig. 3, fig. 8 or fig. 10, and the description is not repeated here.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a computing device 120 according to an embodiment of the present disclosure, where the computing device 120 may be a stand-alone device (e.g., one or more of a server, a user device, or the like), or may be a component (e.g., a chip, a software module, or a hardware module, or the like) inside the stand-alone device. The computing device 120 may include at least one processor 1201. Optionally, at least one memory 1203 may also be included. Further optionally, computing device 120 may also include a communications interface 1202. Still further optionally, a bus 1204 may be included, wherein the processor 1201, the communication interface 1202, and the memory 1203 are coupled via the bus 1204.
The processor 1201 is a module for performing arithmetic operation and/or logical operation, and may specifically be one or a combination of multiple processing modules, such as a Central Processing Unit (CPU), a picture processing Unit (GPU), a Microprocessor (MPU), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Complex Programmable Logic Device (CPLD), a coprocessor (assisting the central processing Unit to perform corresponding processing and Application), and a Micro Control Unit (MCU).
The communication interface 1202 may be used to provide information input or output to the at least one processor. And/or, the communication interface 1202 may be used for receiving and/or transmitting data from/to the outside, and may be a wired link interface such as an ethernet cable, and may also be a wireless link (Wi-Fi, bluetooth, general wireless transmission, vehicle-mounted short-range communication technology, other short-range wireless communication technology, and the like) interface. Optionally, the communication interface 1202 may also include a transmitter (e.g., a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled to the interface.
The memory 1203 is used for providing a recording space in which data such as an operating system and a computer program can be recorded. The memory 1203 may be one or a combination of Random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or portable read-only memory (CD-ROM), among others.
At least one processor 1201 in the computing device 120 is configured to perform the version management methods described above, such as the version management methods described in the embodiments illustrated in fig. 3, 8, or 10.
Alternatively, the processor 1201 may be a processor dedicated to performing the methods (referred to as a special purpose processor for convenience), or may be a processor such as a general purpose processor that invokes computer programs to perform the methods. Optionally, the at least one processor may also include both special purpose and general purpose processors. Optionally, in case the computing device comprises at least one processor 1201, the above mentioned computer programs may be stored in the memory 1203.
In one possible design, the computing device 120 may be a server in the foregoing embodiment.
In one possible implementation, the at least one processor 1201 in the computing device 120 is configured to execute calling computer instructions to:
acquiring structured data of a first version, wherein the structured data comprises attributes of elements and values corresponding to the attributes;
obtaining difference data about the first version according to the structured data of the first version and the structured data of the previous version, wherein the difference data about the first version characterizes the difference between the structured data of the first version and the structured data of the previous version, and the difference data about the first version comprises an identifier of the first version, an identifier of an element with a change and a change operation type;
recording the difference data corresponding to the first version.
In yet another possible implementation, the structured data includes one or more modules, each module including an attribute of a partial element and a value corresponding to the attribute of the partial element;
the processor 1201 is further configured to:
comparing the first version of the structured data with the last version of the structured data according to modules to obtain the difference data about the first version, wherein the difference data comprises the difference data corresponding to the one or more modules.
Optionally, when performing deduplication, the processor 1201 may perform deduplication operations in order from the new version to the old version to obtain full elements of the current version.
Optionally, the processor 1201 may perform a deduplication operation by keeping the latest version of the difference data of an element of a certain ID and removing an element whose operation type contains "delete" (i.e., "DROP").
In yet another possible implementation, the processor 1201 is further configured to:
receiving first request information from a user equipment through a communication interface 1202, the first request information being used for requesting the first version of structured data;
obtaining the structured data of the first version according to the difference data of the first version and the difference data of the version before the first version.
In yet another possible implementation, the processor 1201 is further configured to:
receiving second request information from the user equipment through the communication interface 1202, the second request information being used for requesting a change record of a first element, the first element belonging to the one or more elements;
and obtaining a change record of the first element according to the difference data of the first version, the difference data of the version before the first version and the information of the first element.
In yet another possible implementation, the change operation type includes one or more of adding, deleting, or updating.
In yet another possible implementation, the structured data comprises one or more of database model data, JSON data, or extensible markup language XML data.
In yet another possible embodiment, the structured data comprises database model data, and the one or more elements comprise data belonging to one or more of the following element classes: tables, fields, indexes, views, or relationships.
It should be understood that the related description can also refer to the description in the embodiment shown in fig. 3, fig. 8 or fig. 10, and the description is not repeated here.
The present application also provides a computer-readable storage medium having stored therein instructions that, when executed on at least one processor, implement a version management method as described previously, such as the version management method shown in fig. 3, 8 or 10.
The present application also provides a computer program product comprising computer instructions that, when executed by a computing device, implement the aforementioned version management method, such as the version management method shown in fig. 3, fig. 8 or fig. 10.
In the embodiments of the present application, the words "exemplary" or "such as" are used herein to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion.
In the present application, the embodiments refer to "at least one" and "a plurality" and two or more. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a. b, c, (a and b), (a and c), (b and c), or (a and b and c), wherein a, b and c can be single or multiple. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
And unless stated to the contrary, the ordinal numbers such as "first", "second", etc. are used in the embodiments of the present application to distinguish a plurality of objects and are not used to limit the sequence, timing, priority, or importance of the plurality of objects. For example, the first user equipment and the second user equipment are only for convenience of description, and do not indicate the difference in structure, importance degree, and the like of the first user equipment and the second user equipment, and in some embodiments, the first user equipment and the second user equipment may also be the same equipment.
As used in the above embodiments, the term "when 8230; \8230when" may be interpreted to mean "if 8230;" or "at 8230; \8230; after" or "in response to determining 8230;" 8230; or "in response to detecting 8230;" 8230; ", depending on the context. The above description is only exemplary of the present application and is not intended to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principles of the present application are intended to be included within the scope of the present application.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program is recorded in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Claims (16)

1. A method for managing versions of structured data, comprising:
acquiring structured data of a first version, wherein the structured data comprises attributes of elements and values corresponding to the attributes;
obtaining difference data about the first version according to the structured data of the first version and the structured data of the previous version, wherein the difference data about the first version characterizes the difference between the structured data of the first version and the structured data of the previous version, and the difference data about the first version comprises an identifier of the first version, an identifier of an element with a change and a change operation type;
recording the difference data with respect to the first version.
2. The method of claim 1, wherein the structured data comprises one or more modules, each module comprising an attribute of a partial element and a value corresponding to the attribute of the partial element;
obtaining difference data about the first version according to the structured data of the first version and the structured data of the previous version, including:
comparing the structured data of the first version with the structured data of the previous version according to modules to obtain the difference data related to the first version, wherein the difference data related to the first version comprises the difference data corresponding to one or more modules.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving first request information from user equipment, wherein the first request information is used for requesting the first version of structured data;
obtaining the structured data of the first version according to the difference data of the first version and the difference data of the version before the first version.
4. The method according to any one of claims 1-3, further comprising:
receiving second request information from user equipment, wherein the second request information is used for requesting a change record of a first element, and the first element belongs to the element;
and obtaining a change record of the first element according to the difference data of the first version, the difference data of the version before the first version and the information of the first element.
5. The method of any of claims 1-4, wherein the change operation type comprises one or more of an addition, a deletion, or an update.
6. The method according to any one of claims 1-5, wherein the structured data belongs to database model data, JSON data, or extensible markup language (XML) data.
7. The method of claim 6, wherein the structured data pertains to database model data,
the elements belong to one or more of the following element classes: tables, fields, indexes, views, or relationships.
8. A version management apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first version of structured data, and the structured data comprises attributes of elements and values corresponding to the attributes;
the processing unit is used for obtaining difference data related to the first version according to the structured data of the first version and the structured data of the previous version, wherein the difference data related to the first version represents the difference between the structured data of the first version and the structured data of the previous version, and the difference data related to the first version comprises the identification of the first version, the identification of the changed elements and the change operation type;
the processing unit is further configured to record the difference data corresponding to the first version.
9. The apparatus of claim 8, wherein the structured data comprises one or more modules, each module comprising an attribute of a partial element and a value corresponding to the attribute of the partial element;
the processing unit is further configured to:
comparing the structured data of the first version with the structured data of the previous version according to modules to obtain the difference data related to the first version, wherein the difference data comprises the difference data corresponding to one or more modules.
10. The apparatus according to any one of claims 8 or 9,
the obtaining unit is further configured to receive first request information from a user equipment, where the first request information is used to request the structured data of the first version;
the processing unit is further configured to obtain the structured data of the first version according to the difference data about the first version and the difference data about the version before the first version.
11. The apparatus according to any one of claims 8 to 10,
the obtaining unit is further configured to receive second request information from the user equipment, where the second request information is used to request a change record of a first element, and the first element belongs to the one or more elements;
the processing unit is further configured to obtain a change record of the first element according to the difference data about the first version, the difference data about the version before the first version, and the information about the first element.
12. The apparatus of any of claims 8-11, wherein the change operation type comprises one or more of an addition, a deletion, or an update.
13. The apparatus according to any one of claims 8-12, wherein the structured data comprises one or more of database model data, JSON data, or extensible markup language XML data.
14. The apparatus of claim 13, wherein the structured data comprises database model data,
the one or more elements include one or more of the following element classes: tables, fields, indexes, views, or relationships.
15. A computing device, wherein the computing device comprises a processor and a memory;
the memory has stored therein a computer program;
the computer program, when executed by the processor, causes the computing device to perform the method of any of the preceding claims 1 to 7.
16. A computer-readable storage medium having stored therein instructions which, when executed on at least one processor, implement the method of any one of claims 1 to 7.
CN202111154746.4A 2021-09-29 2021-09-29 Version management method and device of structured data and related equipment Pending CN115878589A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111154746.4A CN115878589A (en) 2021-09-29 2021-09-29 Version management method and device of structured data and related equipment
PCT/CN2022/115326 WO2023051125A1 (en) 2021-09-29 2022-08-27 Structured data version management method, apparatus, and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111154746.4A CN115878589A (en) 2021-09-29 2021-09-29 Version management method and device of structured data and related equipment

Publications (1)

Publication Number Publication Date
CN115878589A true CN115878589A (en) 2023-03-31

Family

ID=85756390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111154746.4A Pending CN115878589A (en) 2021-09-29 2021-09-29 Version management method and device of structured data and related equipment

Country Status (2)

Country Link
CN (1) CN115878589A (en)
WO (1) WO2023051125A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573199A (en) * 2024-01-16 2024-02-20 成都安世赛斯特软件技术有限公司 Model difference comparison analysis method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271480B (en) * 2023-11-20 2024-03-15 国能日新科技股份有限公司 Data processing method, device, electronic equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080071806A1 (en) * 2006-09-20 2008-03-20 Microsoft Corporation Difference analysis for electronic data interchange (edi) data dictionary
US7996364B2 (en) * 2007-10-05 2011-08-09 Canon Kabushiki Kaisha Information processing apparatus and control method thereof, and document verification apparatus and control method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573199A (en) * 2024-01-16 2024-02-20 成都安世赛斯特软件技术有限公司 Model difference comparison analysis method, device, equipment and medium
CN117573199B (en) * 2024-01-16 2024-04-16 成都安世赛斯特软件技术有限公司 Model difference comparison analysis method, device, equipment and medium

Also Published As

Publication number Publication date
WO2023051125A1 (en) 2023-04-06

Similar Documents

Publication Publication Date Title
CN109614424B (en) Page layout generation method, device, computing equipment and medium
CN115617327A (en) Low code page building system, method and computer readable storage medium
WO2023051125A1 (en) Structured data version management method, apparatus, and related device
EP3667493B1 (en) A method for a software development system
CN111444181A (en) Knowledge graph updating method and device and electronic equipment
WO2011062742A2 (en) Validation pipeline
CN110781658B (en) Resume analysis method, resume analysis device, electronic equipment and storage medium
US8924193B2 (en) Generating variants from file differences
US20230086854A1 (en) Dynamically controlling case model structure using case fragments
US9477724B2 (en) Framework for visualizing re-written queries to database
CN111435367A (en) Knowledge graph construction method, system, equipment and storage medium
CN111427577A (en) Code processing method and device and server
CN113094776B (en) Method and system for constructing visual component model data and electronic equipment
CN114237587A (en) Management and control method and system based on IDEA technical service SmartFlow
US20200349128A1 (en) Clustering within database data models
CN110889013B (en) Data association method, device, server and storage medium based on XML
CN114756224A (en) Activity execution method and device
US9633075B2 (en) Framework for re-writing database queries
CN113806327A (en) Database design method and device and related equipment
CN109871212B (en) Method, device and equipment for processing special topic page and storage medium
WO2023279752A1 (en) Version management method and apparatus for database model, and related device
CN111352747A (en) Cooperative operation method and device
CN113253991A (en) Task visualization processing method and device, electronic equipment and storage medium
CN117008890B (en) Extended application development system and method
CN113918576B (en) Metadata management platform and management method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication