CN116821089A - Version management method, device, equipment and storage medium - Google Patents

Version management method, device, equipment and storage medium Download PDF

Info

Publication number
CN116821089A
CN116821089A CN202310664068.9A CN202310664068A CN116821089A CN 116821089 A CN116821089 A CN 116821089A CN 202310664068 A CN202310664068 A CN 202310664068A CN 116821089 A CN116821089 A CN 116821089A
Authority
CN
China
Prior art keywords
version
attribute
digital twin
data
target
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
CN202310664068.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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202310664068.9A priority Critical patent/CN116821089A/en
Publication of CN116821089A publication Critical patent/CN116821089A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Abstract

The embodiment of the invention provides a version management method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a digital twin data base plate of a target version, wherein the digital twin data base plate comprises an attribute data table corresponding to at least one type of physical object; determining attribute identification values corresponding to a plurality of rows of attribute data in an attribute data table; establishing corresponding relations among attribute identification values, target versions and generation time of the target versions, which correspond to the attribute data in multiple rows; and determining target attribute identification values which are not stored in the database in the attribute identification values corresponding to the attribute data of the plurality of rows so as to store the target attribute identification values and the corresponding attribute data in the database. By the scheme, version management is performed on the digital twin data base plate, and storage resources occupied when the digital twin data base plate is stored and calculation resources used when calculation is performed based on the digital twin data base plate are saved.

Description

Version management method, device, equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a version management method, device, apparatus, and storage medium.
Background
Digital twinning (Digital Twin), also known as Digital mapping, digital mirroring, etc., is a technique for implementing Digital mapping of physical objects in real space to virtual space. In the process of digitally mapping a physical object, attribute data of the physical object in real space is generally required to be acquired based on various sensing means, so as to construct a digital twin data base plate corresponding to the real space.
Typically, attribute data of multiple types of physical objects contained in a certain real space together form a digital twin data backplane corresponding to the real space. In practical application, when the physical object changes, the corresponding modification operations such as adding, deleting or replacing are also required to be performed on the attribute data in the digital twin data base plate. Each time a data twinning data backplane is modified, a new digital twinning data backplane is created.
In order to meet the use requirement of a user, a plurality of digital twin data backplanes generated by a plurality of different correction operations are generally stored respectively, and when a calculation task is received, the same algorithm is deployed for the plurality of different digital twin data backplanes respectively to generate a plurality of calculation results. Therefore, not only is the storage resource and the calculation resource wasted, but also the data fusion calculation cannot be realized even if the digital twin data base plates correspond to physical objects in the same real space due to the mutual isolation among the digital twin data base plates.
Disclosure of Invention
The embodiment of the invention provides a version management method, device, equipment and storage medium, which are used for carrying out version management on a digital twin data base plate, so that storage resources occupied by the digital twin data base plate during storage and calculation resources used during calculation based on the digital twin data base plate are saved.
In a first aspect, an embodiment of the present invention provides a version management method, where the method includes:
acquiring a digital twin data base plate of a target version, wherein the digital twin data base plate comprises an attribute data table corresponding to at least one type of physical object;
determining attribute identification values corresponding to a plurality of rows of attribute data in the attribute data table;
establishing a corresponding relation among the attribute identification values corresponding to the multiple rows of attribute data, the target version and the generation time of the target version;
and determining target attribute identification values which are not stored in a database in the attribute identification values corresponding to the plurality of rows of attribute data respectively, so as to store the target attribute identification values and the corresponding attribute data into the database.
In a second aspect, an embodiment of the present invention provides a version management apparatus, including:
The acquisition module is used for acquiring a digital twin data base plate of a target version, wherein the digital twin data base plate comprises an attribute data table corresponding to at least one type of physical object; determining attribute identification values corresponding to a plurality of rows of attribute data in the attribute data table;
the processing module is used for establishing a corresponding relation among the attribute identification value corresponding to each of the plurality of rows of attribute data, the target version and the generation time of the target version;
and the storage module is used for determining target attribute identification values which are not stored in the database in the attribute identification values corresponding to the plurality of rows of attribute data so as to store the target attribute identification values and the corresponding attribute data into the database.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, a communication interface; wherein the memory has executable code stored thereon, which when executed by the processor, causes the processor to at least implement the version management method according to the first aspect.
In a fourth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to at least implement a version management method as described in the first aspect.
The scheme provided by the embodiment of the invention is used for carrying out version management on the digital twin data base plate of the target scene, wherein the digital twin data base plate comprises an attribute data table corresponding to at least one type of physical object in the target scene. After the digital twin data backplane of the target scene is generated, if the digital twin data backplane is modified, the digital twin data backplane before and after modification is distinguished by the versions, whereby one target scene corresponds to only one digital twin data backplane, which corresponds to a plurality of different versions. When the digital twin data base plate is stored, firstly, a digital twin data base plate of a target version is obtained, and the target version is any one of a plurality of versions corresponding to the digital twin data base plate; then, determining attribute identification values corresponding to a plurality of rows of attribute data in an attribute data table of the target version digital twin data base plate; and finally, establishing a corresponding relation among the attribute identification values corresponding to the attribute data of the plurality of rows, the target version and the generation time of the target version, and determining the target attribute identification value which is not stored in the database in the attribute identification values corresponding to the attribute data of the plurality of rows so as to store the target attribute identification value and the corresponding attribute data in the database.
In the scheme, when the digital twin data base plate of the target version is stored, only the attribute data corresponding to the target attribute identification value which is not stored in the database is stored in the database, so that the attribute data contained in the digital twin data base plate are stored in an increment mode each time, the database contains the full attribute data corresponding to the digital twin data base plates of different versions, and repeated attribute data are not contained, so that storage resources can be effectively saved. In addition, since one target scene corresponds to only one digital twin data base plate with multiple versions, and the corresponding relation among the attribute identification values corresponding to the multiple rows of attribute data in the digital twin data base plate of the target version, the target version and the generation time of the target version is established in advance, when a calculation task is executed, on one hand, the attribute data which belong to different versions and correspond to the calculation task can be determined based on the corresponding relation and the database, and cross-version fusion calculation is carried out based on the attribute data which correspond to different versions; on the other hand, when the processing algorithm is required to be executed on a digital twin data base plate of a certain version, the processing algorithm is only required to be deployed on the digital twin data base plate of the version to execute the calculation task, and the processing algorithm is not required to be deployed on the digital twin data base plate of all versions and a plurality of calculation results are produced, so that the calculation resources can be effectively saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a version management method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a digital twin data backplane according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another digital twin data backplane according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of another version management method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a correspondence relationship according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an attribute data table according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method for digital twin data backplane version switching according to an embodiment of the present invention;
FIG. 8 is a flowchart of a version management method according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a version management device according to an embodiment of the present invention;
Fig. 10 is a schematic structural diagram of an electronic device corresponding to the version management apparatus provided in the embodiment shown in fig. 9.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the embodiments of the present invention are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.
In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
The version management method provided by the embodiment of the invention can be executed by an electronic device, and the electronic device can be a terminal device such as a PC (personal computer), a notebook computer, a smart phone and the like, and can also be a server. The server may be a physical server comprising a separate host, or may be a virtual server, or may be a cloud server or a server cluster.
Fig. 1 is a flowchart of a version management method according to an embodiment of the present invention, as shown in fig. 1, may include the following steps:
101. a digital twin data base plate of a target version is obtained, wherein the digital twin data base plate comprises attribute data tables corresponding to at least one type of physical object.
102. And determining attribute identification values corresponding to the attribute data in the plurality of rows of the attribute data in the attribute data table.
103. And establishing corresponding relations among the attribute identification values, the target version and the generation time of the target version, which correspond to the attribute data in multiple rows.
104. And determining target attribute identification values which are not stored in the database in the attribute identification values corresponding to the attribute data of the plurality of rows so as to store the target attribute identification values and the corresponding attribute data in the database.
In this embodiment, the digital twin data backplane refers to a set of attribute data tables corresponding to at least one type of physical object in the target scene after being digitized. The attribute data table corresponding to each type of physical object includes attribute information of a plurality of different physical objects belonging to the type, for example: the attribute data table corresponding to the road in the target scene contains attribute information such as the width, length, number of lanes and the like of the road 1, and attribute information such as the width, length, number of lanes and the like of the road 2; the attribute information table corresponding to the traffic light in the target scene contains attribute information such as color switching time of the traffic light A and attribute information such as color switching time of the traffic light B. Optionally, each physical object and its corresponding attribute information are located in the same row in the attribute data table.
In fact, the physical objects in the physical world are dynamically changed, and when the physical objects are changed, attribute data in the digital twin data base plate need to be correspondingly changed; in addition, in the application process, when the mapping of the attribute data in the digital twin data base plate and the attribute information of the physical object is wrong, the attribute data in the digital twin data base plate also needs to be corrected.
Alternatively, the attribute data in the digital twin data backplane may be automatically updated at regular time or actively updated.
It will be appreciated that when an update occurs to attribute data in a digital twin data backplane, such as: the attribute data is added, deleted or revised, and the updated digital twin data backplane is equivalent to a new digital twin data backplane relative to the digital twin data backplane before updating. Aiming at the same target scene, after the digital twin data base plates corresponding to the target scene are updated for a plurality of times, a plurality of different digital twin data base plates are correspondingly generated.
In the related art, since version management of the digital twin data backplane does not exist, attribute information in the new digital twin data backplane is stored separately whenever a new digital twin data backplane is generated after updating, and an algorithm is deployed for the new digital twin data backplane to perform a computing task.
It can be understood that the new digital twin data base plate is obtained by changing the old digital twin data base plate, the same attribute data inevitably exists between the new digital twin data base plate and the old digital twin data base plate, and the plurality of digital twin data base plates are respectively and independently stored, so that not only can storage resources be wasted, but also mutual isolation among the attribute data corresponding to the plurality of digital twin data base plates can be caused; in addition, the digital twin data base boards respectively deploy algorithms and respectively execute computing tasks, and waste of computing resources is also caused.
In this embodiment, after version management is performed on the digital twin data backplane, each target scene corresponds to only one digital twin data backplane, and version information is given to the new digital twin data backplane generated by updating as a version of the digital twin data backplane corresponding to the target scene. In the implementation process, the digital twin data base plates before and after updating can be distinguished through version identification and the like.
Assuming that a version corresponding to the new digital twin data base plate is called a target version, when attribute information in the digital twin data base plate of the target version is stored, firstly, determining attribute identification values corresponding to multiple rows of attribute data in an attribute data table; and then, determining target attribute identification values which are not stored in the database in the attribute identification values corresponding to the attribute data of the plurality of rows, and storing the target attribute identification values and the corresponding attribute data in the database. Therefore, when the attribute data is stored, only the attribute data increment which is not stored in the database in the digital twin data base plate of the target version is stored in the database, so that the isolation problem between the attribute data corresponding to the digital twin data base plates of a plurality of versions is avoided, and the storage resource is effectively saved.
Optionally, when storing the attribute data in the database, the attribute data belonging to different types of physical objects may be respectively stored in an aggregated manner, that is, the attribute data of the physical objects in the same type are stored in the same data table in the database; the attribute data of all classes of physical objects may also be stored in the same data table within the database.
In addition, in this embodiment, a correspondence relationship between attribute identification values corresponding to multiple rows of attribute data in the digital twin data backplane of the target version, and generation time of the target version is also established, so as to obtain attribute data corresponding to the digital twin data backplane of multiple versions based on the calculation task, and perform fusion calculation, or perform a calculation task on the digital twin data backplane of the version related to the calculation task by using a deployment algorithm, thereby effectively saving calculation resources. The execution logic of the computing task will be developed in the following embodiment, in which the storage of attribute data in the digital twin data backplane is focused first.
Optionally, determining the attribute identification value corresponding to each of the plurality of rows of attribute data in the attribute data table includes: hash values corresponding to the attribute data in the plurality of rows in the attribute data table are determined.
For ease of understanding, for example, assume that the target scene corresponds to two different digital twin data backplanes, a first digital twin data backplane and a second digital twin data backplane, respectively. Wherein, the first digital twin data base plate contains an attribute data table of a physical object of class A, and each row of information in the attribute data table corresponds to the attribute data of one physical object belonging to class A; the second digital twin data backplane is an attribute data table in which a physical object of class B is added on the basis of the first digital twin data backplane, and similarly, each row of information corresponds to attribute data of one physical object belonging to class B in the attribute data table of the physical object of class B.
Fig. 2 is a schematic storage diagram of a digital twin data backplane according to an embodiment of the present disclosure. In the case where version management does not exist, the attribute data storage conditions of the first digital twin data backplane and the second digital twin data backplane are as shown in fig. 2, and when the attribute data in the digital twin data backplane are stored, the attribute data in different digital twin data backplanes are isolated from each other. Specifically, the attribute information table of the physical object of the class a corresponding to the first digital twin data backplane is stored in the first database, and the attribute information table of the physical object of the class a corresponding to the second digital twin data backplane and the attribute information table of the physical object of the class B are stored in the second database. For the target scene, the attribute information tables of the physical objects of the class A are repeatedly stored in two different databases, which causes waste of storage resources.
FIG. 3 is a schematic diagram of another digital twin data backplane according to an embodiment of the present disclosure. In case of version management, the first digital twin data backplane and the second digital twin data backplane are marked as different versions of the digital twin data backplane corresponding to the target scene, as shown in fig. 3, the first digital twin data backplane is marked as a first version, and the second digital twin data backplane is marked as a second version. When the attribute data in the digital twin data base plate are stored, the first version of the digital twin data base plate and the second version of the digital twin data base plate are both digital twin data base plates corresponding to the target scene, so that the attribute data corresponding to the first version of the digital twin data base plate and the second version of the digital twin data base plate are stored in the same target database.
In the development, when the first version of the digital twin data backplane (i.e. the first digital twin data backplane) is stored, first, attribute identification values corresponding to a plurality of rows of attribute data in an attribute information table of a type-a physical object are determined, for example: hash value, it is assumed that the attribute information table of the physical object of class a contains n rows of attribute data, and the hash values corresponding to the n rows of attribute data are hash (1), hash (2), … and hash (n), respectively. Thereafter, it is determined whether or not hashes (1) to (n) are stored in the target database. In this embodiment, assuming that any hash value and attribute data corresponding to the hash value are not stored in the target database, determining that hashes (1) to (n) are target attribute identification values, and storing the hashes (1) to (n) and the attribute data corresponding to the hashes (1) to (n) in the target database, that is, storing the attribute information of the physical object of the class a and the attribute identification values corresponding to each line of attribute information in the target database.
When the second version of the digital twin data backplane (i.e., the second digital twin data backplane) is stored, first, hash values corresponding to n rows of attribute data contained in the attribute information table of the physical object of the class a are determined: hash (1) to hash (n), and hash values corresponding to m rows of attribute data contained in the attribute information table of the physical object of the B class: hash (n+1), hash (n+2), …, hash (n+m). Thereafter, it is determined whether or not hashes (1) to (n) and hashes (n+1) to (n+m) are stored in the target database. Since the object database already stores the hashes (1) to (n), determining the hashes (n+1) to (n+m) as the object attribute identification values, and storing the attribute data corresponding to the hashes (n+1) to (n+m) and the hashes (n+1) to (n+m) into the object database, namely storing the attribute information of the physical object of the class B and the attribute identification values corresponding to each line of attribute information into the object database.
Optionally, a relational table containing attribute information of physical objects of different categories and corresponding attribute identification values thereof is arranged in the database, so as to obtain attribute data of the corresponding physical objects from the database based on the attribute identification values.
Based on the situation illustrated in fig. 3, in this embodiment, after version management is performed on the digital twin data backplane, by incrementally storing attribute data corresponding to different versions of the digital twin data backplane in the same target database, not only can full-scale storage be performed on the corresponding attribute data of multiple versions of the digital twin data backplane, but also repeated storage of the same attribute data in different versions of the digital twin data backplane can be avoided, and storage resources can be effectively saved.
It should be noted that the foregoing examples are merely illustrative, and in practical applications, the same target scene may correspond to a plurality of digital twin data backplanes, and the change between different digital twin data backplanes may correspond to various situations such as adding, deleting or modifying attribute information of a certain physical object in a certain category, which is not limited to the foregoing examples.
The value is stated that after version management is performed on the digital twin data base plate, the version can reflect whether the digital twin data base plate is revised or changed, so that the digital twin data base plate updating requirement in practical application can be met. When updating the digital twin data backplane, the digital twin data backplane may not be updated according to the actual physical object change condition of the physical world, for example: attribute information of a physical object which is desired to be set in a target scene in the future can be added to the digital twin data base plate of the current version to generate the digital twin data base plate of the new version for simulating the target scene in the future; or, modifying attribute information of a physical object which is contained in the digital twin data base plate and is wanted to be set in the future; or attribute information of the physical object that has been deleted in the target scene is added to the digital twin data backplane of the current version, etc.
In the scenario of version management, besides storing attribute data contained in digital twin data backplanes of different versions, a corresponding relationship among attribute identification values, target versions and generation time of the target versions, which are respectively corresponding to a plurality of rows of attribute data corresponding to the digital twin data backplanes of each version, is established, and the corresponding relationship is used for assisting in executing a computing task. The following description is made with reference to specific embodiments.
Fig. 4 is a flowchart of another version management method according to an embodiment of the present invention, as shown in fig. 4, may include the following steps:
401. and acquiring a digital twin data base plate of the target version, wherein the digital twin data base plate comprises attribute data tables corresponding to at least one type of physical object, and each row of attribute data comprises a corresponding physical object identifier.
402. And determining attribute identification values corresponding to the attribute data in the plurality of rows of the attribute data in the attribute data table.
403. And establishing corresponding relations among the attribute identification values, the target version and the generation time of the target version, which correspond to the attribute data in multiple rows.
404. And determining target attribute identification values which are not stored in the database in the attribute identification values corresponding to the attribute data of the plurality of rows so as to store the target attribute identification values and the corresponding attribute data in the database.
405. Receiving a calculation task, wherein the calculation task comprises a calculation time period, a calculation object identifier and a statistical index; and determining at least one version of the digital twin data backplane, wherein the version generation time of the version is matched with the calculation time period according to the corresponding relation.
406. And querying a database according to the attribute identification value and the calculated object identification corresponding to the at least one version respectively to determine at least one row of attribute data corresponding to the calculated object identification, wherein the physical object identification contained in the at least one row of attribute data is matched with the calculated object identification.
407. Acquiring index data to be calculated, which corresponds to a statistical index and a calculation time period and is calculated based on at least one line of attribute data respectively; and determining a statistical index according to the index data to be calculated.
The specific implementation process of steps 401, 402 and 404 may refer to the foregoing embodiments, and in this embodiment, a detailed description is omitted.
In practical applications, the calculation task may be based on the attribute data in a digital twin data backplane of a certain version, or may be based on the attribute data in a digital twin data backplane of a different version. For the former type of computing task, even without version management, the computing task can be completed by deploying algorithms on a plurality of different digital twin data backplanes, which simply results in a waste of computing resources. For the latter type of computing task, the attribute data of the plurality of digital twin data base plates are stored in an isolated manner under the condition of not carrying out version management, so that fusion computation cannot be carried out, and the latter type of computing task cannot be executed.
In this embodiment, through version management, on one hand, the two computing tasks can be executed, and on the other hand, computing resources can be effectively saved when the computing tasks are executed.
For ease of understanding, for example, assume that there are 3 versions of the digital twin data backplane corresponding to the target scenario, version 1, version 2, and version 3, respectively. The correspondence among the attribute identification values, versions and generation times of the versions corresponding to the multiple rows of attribute data corresponding to each version is shown in fig. 5, and fig. 5 is a schematic diagram of a correspondence provided by an embodiment of the present invention. The version generation time of the version 1 is 2023, 4 months and 1 days, and the corresponding attribute identification values are hash1 and hash2; version 2 has version generation time of 2023, 4 months and 11 days, and corresponding attribute identification values of hash3 and hash4; version 3 is generated by 2023, 5 and 1, and the corresponding attribute identification value is hash5.
Fig. 6 is a schematic diagram of an attribute data table provided in an embodiment of the present invention, as shown in fig. 6, a physical object identifier corresponding to each physical object and attribute information corresponding to each physical object are stored in the same row, and an attribute identifier value for identifying attribute data of the row is corresponding to the physical object identifier, for example: the road section x1 and the corresponding attribute information such as width, length, lane information and the like are stored in the same row and are marked by hsah 1.
Assume that the computing task is: and calculating the daily average traffic flow of the road section X from 1 day of 4 months of 2023 to 30 days of 4 months of 2023. Wherein, based on the association relation table between the pre-established physical objects, the following is known: road segment X1 and road segment X2 are combined into road segment X at month 11 of 2023. Thus, road segment X corresponds to two sub-road segments, road segment X1 and road segment X2, respectively, before 2023, 4, and 11 days.
Based on the above assumption, the calculation task includes a calculation period of time of: 2023, 4, 1 to 2023, 4, 30; the calculated object identification is as follows: road segment X1, road segment X2, and road segment X; the statistical indexes are as follows: daily traffic flow. The computing object identifiers included in the computing tasks correspond to the physical object identifiers in the attribute data table, and the statistical indexes included in the computing tasks, namely the computing targets corresponding to the computing tasks.
After receiving the computing task, at least one version of the version generation time within the computing time period, i.e., version 1 and version 2, is first determined from among version 1, version 2, and version 3. And then, according to the attribute identification values hash1 and hash2 corresponding to the version 1, the attribute identification values hash3 and hash4 corresponding to the version 2 and the calculated object identification road sections X1, X2 and X, determining 3 rows of attribute data corresponding to the road sections X1, X2 and X, namely the attribute data of the physical object identification road sections X1, X2 and X row corresponding to the hash1, the hash2 and the hash 3.
Optionally, any row of attribute data in the attribute data table may also be associated with a lifecycle. The life cycle describes the whole process from generation to destruction of any row of attribute data from the time dimension, and the life cycle comprises the creation time, the effective time, the failure time and the abandonment time of the row of attribute data, wherein the time period between the effective time and the failure time corresponding to any row of attribute data is the validity period of the row of attribute data, and the attribute data in the validity period can be used for executing calculation tasks. Typically, the creation time is the expiration time, and the discard time is the expiration time, such as: in fig. 6, the creation time and the validation time of the attribute data of the line of the road section x1 are 2023, 4 months and 1 day, and the discard time and the failure time are 2023, 4 months and 10 days. In some scenes where the attribute data is not required to be validated immediately or in scenes where the attribute data is required to be validated within a set period of time, the attribute data may be created first and the validation time and the expiration time thereof may be set.
According to the scheme, the life cycle is associated with any row of attribute data in the attribute data table, so that the effective time and the failure time of each row of attribute data in the attribute data table can be flexibly configured on one hand; on the other hand, when executing the computing task, at least one row of attribute data with the life cycle matched with the computing task can be screened from the attribute data table according to the computing time period corresponding to the computing task, so as to be used for determining the statistical index corresponding to the computing task, thereby effectively avoiding the influence of some attribute data which are not matched with the computing task on the statistical index, such as: attribute data which is not validated after creation or not destroyed after failure, namely the creation time and the discarding time are matched with the calculation time period of the calculation task, but the influence of the attribute data in the validity period of the calculation task on the statistical index is not achieved.
The life cycle of a certain row of attribute data is matched with the calculation time period of the calculation task, which can be understood as that the validity period of the row of attribute data is matched with the calculation time period of the calculation task. Specifically, if there is a target time period with time overlapping between a time period corresponding to the effective time and the failure time of a certain line of attribute data and a computing time period corresponding to a computing task, the life cycle or the validity period of the line of attribute data is considered to be matched with the computing time period of the computing task, and the attribute data corresponding to the target time period with time overlapping is the attribute data for executing the computing task.
When the plurality of rows of attribute data included in the attribute data table are respectively associated with the lifecycle information, the version management method in the embodiment shown in fig. 4 further includes: and storing the life cycle information respectively associated with the plurality of rows of attribute data into a database. In the implementation process, optionally, in step 404, the target attribute identification value and the corresponding attribute data are stored in a database, including: and storing the target attribute identification value and the corresponding attribute data, and storing life cycle information associated with the attribute data into a database.
Based on this, the database is queried according to the attribute identification values corresponding to the version 1 and the version 2 and the calculated object identification values, and the determined 3 rows of attribute data corresponding to the calculated identification road segments X1, X2 and X also match with the calculated time period. Specifically, the life cycle (2023, 4, 1, to 2023, 4, 10) corresponding to the attribute data information of the line where the link X1 and the link X2 are located includes a time period (2023, 4, 11, to 2023, 5, 30) overlapping with the calculation time period (2023, 4, 11, to 2023, 4, 30) between the life cycle (2023, 4, 11, to 2023, 5, 30) corresponding to the attribute data information of the line where the link X is located within the calculation time period (2023, 4, 1, to 2023, 4, 30).
After determining 3 lines of attribute data corresponding to the calculation object identification section X1, the section X2, and the section X, the daily traffic information of a plurality of different lanes is screened out from the database storing the daily traffic information of the plurality of different lanes according to attribute information contained in the 3 lines of attribute data, such as physical object identification, lane information (including lane identification, number of lanes, and the like): daily traffic flow of at least one lane corresponding to the road segment X1 from 1 month 4 to 10 months 2023, daily traffic flow of at least one lane corresponding to the road segment X2 from 1 month 4 to 10 months 2023, and daily traffic flow of at least one lane corresponding to the road segment X from 11 months 2023 to 30 months 4.
Then, the daily traffic flow of at least one lane corresponding to each road section on the same day is summed up to obtain the daily traffic flow of the road section on the same day. Such as: assuming that the road section x1 corresponds to 3 lanes, summing the daily traffic flows of the 3 lanes corresponding to the road section x1 of the 4 th month of 2023 and the 1 st day of 2023, so as to determine the traffic flow of the road section x1 of the 4 th month of 2023, wherein the traffic flow is used as an index to be calculated corresponding to the road section x1 of the 4 th month of 2023 for determining the statistical index.
Similarly, the daily traffic flow of the road section X1 from 1 st 4 th year to 10 th year 2023 (index 1 to be calculated), the daily traffic flow of the road section X2 from 1 st 4 th year 2023 to 10 th year 4 month (index 2 to be calculated), and the daily traffic flow of the road section X from 11 th year 2023 to 30 th year 4 month (index 3 to be calculated) can be determined. And finally, summing and averaging the index 1 to be calculated, the index 2 to be calculated and the index 3 to be calculated, and determining the average daily traffic flow of the road section X from 1 day of 4 months of 2023 to 30 days of 4 months of 2023.
In this embodiment, since version management is performed on the digital twin data backplane, when a computing task needs to be executed, the attribute identification values corresponding to at least one version of the digital twin data backplane and at least one version of the digital twin data backplane related to the computing task can be determined based on the pre-established correspondence between the attribute identification values, versions and generation times of the versions, which correspond to the plurality of rows of attribute data included in the digital twin data backplane. And then, acquiring at least one row of attribute data matched with the calculation task identifier and the calculation time period from the database based on the determined attribute identifier value and the calculation task identifier, and using the attribute data to be calculated corresponding to the calculated statistical index of the calculation task and the calculation time period to further determine the statistical index. In this embodiment, by version management, the acquisition of attribute data corresponding to the digital twin data base boards of different versions is realized, and fusion calculation can be performed on the attribute data corresponding to the digital twin data base boards of different versions.
It can be understood that in this embodiment, in the case of version management, if the calculation task is based on the attribute data in a digital twin data backplane of a certain version, the calculation task can be directly executed for the deployment algorithm of the digital twin data backplane of the version, and the deployment algorithm is not needed for the digital twin data backplane of other versions, so that the calculation unrelated to the calculation task can be effectively reduced, and the calculation resources are saved.
In the practical application scenario, there may be a need for a digital twin data backplane that needs to restore a historical version, for example: the current algorithm is deployed on the digital twin data base plate of the historical version, and error information checking is performed by comparing the calculation results after the current algorithm is deployed on the digital twin data base plate of different versions.
It is easy to understand that in the related art, under the condition of not performing version management, it is not actually known which digital twin data backplane is the historical digital twin data backplane, and further, the historical digital twin data backplane cannot be restored. In this embodiment, under the condition of version management, not only the digital twin data base plate of the historical version can be restored, but also flexible switching between the digital twin data base plates can be realized, and the following is developed in connection with fig. 7.
Fig. 7 is a flowchart of a method for switching versions of a digital twin data backplane according to an embodiment of the present invention, where the versions of the digital twin data backplane include a first version and a second version, and the second version is obtained after updating the first version, as shown in fig. 7, and may include the following steps:
701. And determining a plurality of attribute identification values corresponding to the first version and a plurality of attribute identification values corresponding to the second version.
The first version corresponds to a plurality of attribute identification values, and can be determined based on the established correspondence relationship among the attribute identification values corresponding to the plurality of rows of attribute data in the digital twin data base plate of the first version, the first version and the generation time of the first version. Similarly, the second version corresponds to a plurality of attribute identification values, and may be determined based on a correspondence relationship among the attribute identification values, the second version, and a generation time of the second version, which each correspond to a plurality of rows of attribute data in the established digital twin data backplane of the second version.
702. And determining attribute identification value change information of the plurality of attribute identification values corresponding to the first version and the plurality of attribute identification values corresponding to the second version.
Wherein the attribute identification value change information includes: deletion of attribute identification values, addition of attribute identification values, and the like. Such as: the attribute identification values corresponding to the first version are hash1 and hash2, the attribute identification values corresponding to the second version are hash1, hash2 and hash3, and then the attribute identification value change information of the attribute identification values corresponding to the first version and the attribute identification values corresponding to the second version is hash3.
703. And generating an upgrade package for describing the updating operation from the first version to the second version according to the attribute identification value change information.
Following the above example, the update operation that the first version described in the upgrade package changes to the second version is: and adding attribute data corresponding to the hash3 to the digital twin data base plate of the first version.
After determining an upgrade package for an update operation in which the first version changes to the second version, the upgrade package is applied to the digital twin data backplane of the first version to obtain the digital twin data backplane of the second version.
Similarly, it is also possible to do an upgrade package of the operation of the second version to the first version, and apply the upgrade package to the digital twin data backplane of the second version to obtain the digital twin data backplane of the first version.
In this embodiment, based on the attribute identifier value corresponding to each version, the upgrade packages of the mutual transformation between the digital twin data backplanes of different versions can be determined, so as to implement the restoration of the digital twin data backplanes of the historical version and the flexible switching between the digital twin data backplanes of different versions.
It will be appreciated that the same digital twin data backplane may correspondingly generate a plurality of different versions of the digital twin data backplane by updating different content. In practical applications, there is a need to correct attribute data in the digital twin data backplane, and in order to improve the convenience of correcting attribute data of different versions of the digital twin data backplane, the upgrade package in the embodiment shown in fig. 7 may be used to correct the digital twin data backplane of the current version, in addition to implementing switching between different versions of the digital twin data backplane.
For example, assume that a digital twin data backplane comprises: the system comprises a first version, a second version and a third version, wherein the second version is obtained by correcting the first version, and the third version is obtained by updating the first version. When it is desired to make the same revision to the third version as the second version, an upgrade package for describing an update operation to change from the first version to the second version may be performed to the third version of the digital twin data chassis to obtain a fourth version of the digital twin data chassis. Wherein the fourth version of the digital twin data backplane has been modified with respect to the first version of the digital twin data backplane with respect to the attribute data in the first version of the digital twin data backplane.
In the scheme, the mode of modifying the attribute data in the digital twin data base plate is expanded through the upgrade package, so that the modification of the digital twin data base plate is more flexible and convenient in the use process.
Fig. 8 is a flowchart of another version management method provided in an embodiment of the present invention, where a version of a digital twin data backplane includes a first version and a second version, and the second version is obtained after updating the first version, as shown in fig. 8, and may include the following steps:
801. A first processing algorithm executing on a first version of the digital twin data backplane is determined.
802. When the first version is updated to the second version, switching to executing the first processing algorithm on the digital twin data backplane of the second version.
803. And if the second processing algorithm is executed depending on the calculation result of the first processing algorithm, controlling the second processing algorithm to execute based on the target calculation result of the first processing algorithm, wherein the target calculation result is the calculation result obtained by executing the first processing algorithm on the digital twin data base plate of the second version.
In this embodiment, when a new version of the digital twin data backplane is generated, a corresponding processing algorithm is executed on the new version of the digital twin data backplane. And if the second processing algorithm which has a dependency relationship or cascade relationship and corresponds to the first processing algorithm executed on the digital twin data base plate, when the first processing algorithm is switched to be executed on the digital twin data base plate of the new version, controlling the second processing algorithm to be executed based on the output result of the first processing algorithm corresponding to the new version. By incorporating the output result of the processing algorithm into version management, the downstream algorithm can trace back to the output result of the upstream algorithm during calculation, and when the version of the digital twin data base plate corresponding to the data result of the upstream algorithm changes, the output result of the downstream algorithm is updated in time, so that the calculation results corresponding to the processing algorithms are all based on the digital twin data base plate of the current version.
Version management devices of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these means may be configured by the steps taught by the present solution using commercially available hardware components.
Fig. 9 is a schematic structural diagram of a version management device according to an embodiment of the present invention, as shown in fig. 9, where the device includes: an acquisition module 11, a processing module 12 and a storage module 13.
An obtaining module 11, configured to obtain a digital twin data backplane of a target version, where the digital twin data backplane includes an attribute data table corresponding to at least one type of physical object; and determining attribute identification values corresponding to the attribute data of the plurality of rows in the attribute data table.
And the processing module 12 is configured to establish a correspondence relationship among the attribute identifier values corresponding to the multiple rows of attribute data, the target version, and the generation time of the target version.
And the storage module 13 is configured to determine a target attribute identification value that is not stored in the database in the attribute identification values corresponding to the plurality of rows of attribute data, so as to store the target attribute identification value and the corresponding attribute data in the database.
Optionally, each row of attribute data contains a corresponding physical object identifier, and the device further comprises a calculation module, which is used for receiving a calculation task, wherein the calculation task comprises a calculation time period, a calculation object identifier and a statistical index; determining at least one version of the digital twin data backplane with version generation time matched with the calculation time period according to the corresponding relation; querying the database according to the attribute identification value and the calculated object identification corresponding to the at least one version respectively to determine at least one row of attribute data corresponding to the calculated object identification, wherein physical object identifications contained in the at least one row of attribute data are matched with the calculated object identification; acquiring index data to be calculated, which corresponds to the statistical index and the calculation time period and is calculated based on the at least one row of attribute data respectively; and determining the statistical index according to the index data to be calculated.
Optionally, the plurality of rows of attribute data are respectively associated with life cycle information, and the storage module 13 is specifically configured to store the life cycle information in the database.
Optionally, the life cycle information respectively associated with at least one row of attribute data determined by the calculation module is matched with the calculation time period.
Optionally, the version of the digital twin data backplane includes a first version and a second version, where the second version is obtained by updating the first version, and the apparatus further includes a version switching module, where the version switching module is configured to determine a plurality of attribute identification values corresponding to the first version and a plurality of attribute identification values corresponding to the second version; determining attribute identification value change information of a plurality of attribute identification values corresponding to the first version and a plurality of attribute identification values corresponding to the second version; and generating an upgrade package for describing the updating operation from the first version to the second version according to the attribute identification value change information.
Optionally, the version of the digital twin data backplane further includes a third version updated by the first version, and the version switching module is further configured to execute the upgrade package on the digital twin data backplane of the third version to obtain a digital twin data backplane of a fourth version.
Optionally, the version of the digital twin data backplane includes a first version and a second version, the second version being obtained by updating the first version, and the apparatus further includes an updating module configured to determine a first processing algorithm executed on the digital twin data backplane of the first version; and when the first version is updated to the second version, switching to execute the first processing algorithm on the digital twin data backplane of the second version.
Optionally, the updating module is further configured to control, if there is a second processing algorithm executed depending on a calculation result of the first processing algorithm, the second processing algorithm to be executed based on a target calculation result of the first processing algorithm, where the target calculation result is a calculation result obtained by executing the first processing algorithm on the digital twin data backplane of the second version.
The apparatus shown in fig. 9 may perform the steps described in the foregoing embodiments, and detailed execution and technical effects are referred to in the foregoing embodiments and are not described herein.
In one possible design, the configuration of the version management device shown in fig. 9 may be implemented as an electronic device, as shown in fig. 10, where the electronic device may include: memory 21, processor 22, communication interface 23. Wherein the memory 21 has stored thereon executable code which, when executed by the processor 22, causes the processor 22 to at least implement the version management method as provided in the previous embodiments.
Additionally, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to at least implement a version management method as provided in the previous embodiments.
The apparatus embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A version management method, comprising:
acquiring a digital twin data base plate of a target version, wherein the digital twin data base plate comprises an attribute data table corresponding to at least one type of physical object;
determining attribute identification values corresponding to a plurality of rows of attribute data in the attribute data table;
establishing a corresponding relation among the attribute identification values corresponding to the multiple rows of attribute data, the target version and the generation time of the target version;
and determining target attribute identification values which are not stored in a database in the attribute identification values corresponding to the plurality of rows of attribute data respectively, so as to store the target attribute identification values and the corresponding attribute data into the database.
2. The method of claim 1, wherein each row of attribute data includes a corresponding physical object identifier, the method further comprising:
receiving a calculation task, wherein the calculation task comprises a calculation time period, a calculation object identifier and a statistical index;
determining at least one version of the digital twin data backplane with version generation time matched with the calculation time period according to the corresponding relation;
querying the database according to the attribute identification value and the calculated object identification corresponding to the at least one version respectively to determine at least one row of attribute data corresponding to the calculated object identification, wherein physical object identifications contained in the at least one row of attribute data are matched with the calculated object identification;
acquiring index data to be calculated, which corresponds to the statistical index and the calculation time period and is calculated based on the at least one row of attribute data respectively;
and determining the statistical index according to the index data to be calculated.
3. The method of claim 2, wherein the plurality of rows of attribute data are each associated with lifecycle information; the method further comprises the steps of:
and storing the life cycle information into the database.
4. A method according to claim 3, wherein the lifecycle information associated with each of the at least one row of attribute data matches the calculation time period.
5. The method of claim 1, wherein the version of the digital twin data backplane comprises a first version and a second version, the second version being updated from the first version; the method further comprises the steps of:
determining a plurality of attribute identification values corresponding to the first version and a plurality of attribute identification values corresponding to the second version;
determining attribute identification value change information of a plurality of attribute identification values corresponding to the first version and a plurality of attribute identification values corresponding to the second version;
and generating an upgrade package for describing the updating operation from the first version to the second version according to the attribute identification value change information.
6. The method of claim 5, wherein the version of the digital twin data backplane further comprises a third version updated from the first version, the method further comprising:
and executing the upgrade package on the third version of the digital twin data base plate to obtain a fourth version of the digital twin data base plate.
7. The method of claim 1, wherein the version of the digital twin data backplane comprises a first version and a second version, the second version being updated from the first version; the method further comprises the steps of:
determining a first processing algorithm executing on the first version of the digital twin data backplane;
and when the first version is updated to the second version, switching to execute the first processing algorithm on the digital twin data backplane of the second version.
8. The method of claim 7, wherein the method further comprises:
and if a second processing algorithm executed depending on the calculation result of the first processing algorithm exists, controlling the second processing algorithm to execute based on a target calculation result of the first processing algorithm, wherein the target calculation result is obtained by executing the first processing algorithm on the digital twin data base plate of the second version.
9. A version management apparatus, comprising:
the acquisition module is used for acquiring a digital twin data base plate of a target version, wherein the digital twin data base plate comprises an attribute data table corresponding to at least one type of physical object; determining attribute identification values corresponding to a plurality of rows of attribute data in the attribute data table;
The processing module is used for establishing a corresponding relation among the attribute identification value corresponding to each of the plurality of rows of attribute data, the target version and the generation time of the target version;
and the storage module is used for determining target attribute identification values which are not stored in the database in the attribute identification values corresponding to the plurality of rows of attribute data so as to store the target attribute identification values and the corresponding attribute data into the database.
10. An electronic device, comprising: a memory, a processor, a communication interface; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the version management method of any of claims 1 to 8.
11. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the version management method of any of claims 1 to 8.
CN202310664068.9A 2023-06-06 2023-06-06 Version management method, device, equipment and storage medium Pending CN116821089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310664068.9A CN116821089A (en) 2023-06-06 2023-06-06 Version management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310664068.9A CN116821089A (en) 2023-06-06 2023-06-06 Version management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116821089A true CN116821089A (en) 2023-09-29

Family

ID=88123281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310664068.9A Pending CN116821089A (en) 2023-06-06 2023-06-06 Version management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116821089A (en)

Similar Documents

Publication Publication Date Title
US11100501B1 (en) Modular, configurable smart contracts for blockchain transactions
US10466998B2 (en) Model based upgrade campaign generation
US20220179642A1 (en) Software code change method and apparatus
CN106528071B (en) The choosing method and device of object code
US9582510B2 (en) Live Upgrade
CN116415206B (en) Operator multiple data fusion method, system, electronic equipment and computer storage medium
CN113420026B (en) Database table structure changing method, device, equipment and storage medium
CN105320681A (en) Database content combination method and device
CN110865806B (en) Code processing method, device, server and storage medium
CN114461217A (en) Code compiling method and device, electronic equipment and storage medium
CN112256672B (en) Database change approval method and device
CN106095511A (en) A kind of server updating method and apparatus
WO2024011994A1 (en) Methods and systems for updating an algorithm package
JP5537599B2 (en) Version upgrade management method in business system
CN112101889A (en) Metadata-based business flow control method and device
CN116821089A (en) Version management method, device, equipment and storage medium
US9092472B1 (en) Data merge based on logical segregation
CN112817931B (en) Incremental version file generation method and device
WO2017072872A1 (en) Business program generation assistance system and business program generation assistance method
CN113094345A (en) Method and equipment for importing table data file
CN113157934A (en) Knowledge graph origin processing method and system, electronic device and storage medium
CN108614838B (en) User group index processing method, device and system
CN112860284B (en) SP upgrade package generation method and device for equipment remote upgrade and computer equipment
CN113468187B (en) Multi-party data integration method and device, computer equipment and storage medium
CN113434359B (en) Data traceability system construction method and device, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination