Method and apparatus for recording and playing back digital twin data

By generating batch numbers and playback cursors, the problems of large memory usage and limited viewing angle in digital twin data recording and playback are solved, achieving smaller memory usage and more comprehensive data playback, and supporting multiple playback modes.

CN117271830BActive Publication Date: 2025-11-28BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311214818.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-11-28
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

Existing methods for recording and playing back digital twin data consume a lot of computer memory, the recorded video footage is inflexible, and the viewing angle is limited during playback.

Method used

The target digital twin data is determined by generating a start batch number and an end batch number, and a playback cursor is created. Data playback is performed based on the playback cursor, and data management is carried out using batch number storage and an index table.

Benefits of technology

It reduces computer memory usage, enables more comprehensive data playback, and is not limited by recording angle, supporting flexible playback modes such as normal speed, speed adjustment, progress jump, and progress rewind.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271830B_ABST
    Figure CN117271830B_ABST
Patent Text Reader

Abstract

The application discloses a digital twin data recording and playback method and device, and relates to the technical field of communication. The method comprises the following steps: in the case that the digital twin system completes recording, in response to a playback instruction input by a user, generating a starting batch number and an ending batch number, the playback instruction comprising a playback start time and a playback end time, the starting batch number being a batch number corresponding to the playback start time, and the ending batch number being a batch number corresponding to the playback end time; determining target digital twin data in a database according to the starting batch number and the ending batch number, the database comprising digital twin data recorded by the digital twin system and batch numbers, adjacent batch numbers being different by a preset fixed time period, and the target digital twin data being data recorded by the digital twin system from the starting batch number to the ending batch number; creating a play cursor associated with the target digital twin data; and playing the target digital twin data based on the play cursor.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of communication, and particularly relates to a digital twin data recording and playback method and device, equipment and a storage medium. BACKGROUND

[0002] In modern port management, in order to simulate the real-time operation of the port, the data generated during the operation of the port can be recorded and played back in the digital twin three-dimensional system of the port. The existing digital twin data recording and playback method is similar to video recording, but such recording and playback method occupies a large amount of computer memory space, consumes a large amount of performance during recording, and the picture of the recorded video is not flexible, and the playback angle is limited. SUMMARY

[0003] The embodiments of the application provide a digital twin data recording and playback method, device, equipment and storage medium, which can occupy a small amount of computer memory space, and the playback digital twin data is more comprehensive and is not limited by the recording angle.

[0004] In a first aspect, the embodiments of the application provide a digital twin data recording and playback method, which comprises the following steps:

[0005] In the case that the digital twin system completes recording, a start batch number and an end batch number are generated in response to a playback instruction input by a user, the playback instruction comprises a playback start time and a playback end time, the start batch number is a batch number corresponding to the playback start time, and the end batch number is a batch number corresponding to the playback end time;

[0006] Target digital twin data is determined in a database according to the start batch number and the end batch number, the database comprises digital twin data recorded by the digital twin system and batch numbers, adjacent batch numbers differ by a preset fixed time period, and the target digital twin data is data recorded by the digital twin system from the start batch number to the end batch number;

[0007] A play cursor associated with the target digital twin data is created;

[0008] The target digital twin data is played based on the play cursor.

[0009] In a second aspect, the embodiments of the application provide a digital twin data recording and playback device, which comprises the following steps:

[0010] The generating module is configured to, in response to a user input playback instruction, generate a start batch number and an end batch number in a case where the digital twin system completes recording, the playback instruction including a playback start time and a playback end time, the start batch number being a batch number corresponding to the playback start time, and the end batch number being a batch number corresponding to the playback end time;

[0011] The determining module is configured to determine target digital twin data in a database according to the start batch number and the end batch number, the database including digital twin data recorded by the digital twin system and batch numbers, adjacent batch numbers being different by a preset fixed time period, and the target digital twin data being data recorded by the digital twin system corresponding to the start batch number to the end batch number;

[0012] The creating module is configured to create a play cursor associated with the target digital twin data.

[0013] The playing module is configured to play the target digital twin data based on the play cursor.

[0014] In a third aspect, an electronic device is provided, and the device includes a processor and a memory storing computer program instructions; the processor implements the recording and playback method of digital twin data as described in any one of the above aspects when executing the computer program instructions.

[0015] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions; the computer program instructions are executed by a processor to implement the recording and playback method of digital twin data as described in any one of the above aspects.

[0016] The digital twin data recording and playback method, device, equipment and storage medium provided by the embodiment of the present application can, in the case that the digital twin system completes recording, generate a starting batch number and an ending batch number in response to a playback instruction input by a user, the playback instruction including a playback start time and a playback end time, the starting batch number being a batch number corresponding to the playback start time, and the ending batch number being a batch number corresponding to the playback end time; determine target digital twin data in a database according to the starting batch number and the ending batch number, the database including digital twin data recorded by the digital twin system and batch numbers, adjacent batch numbers being different by a preset fixed time period, and the target digital twin data being data recorded by the digital twin system from the starting batch number to the ending batch number; create a play cursor associated with the target digital twin data; and play the target digital twin data based on the play cursor. In this way, in the embodiment, the target digital twin data is determined according to the playback instruction, the scene at which playback starts in the digital twin system is restored, the target digital twin data is played based on the play cursor according to the batch number of the target digital twin data, the computer memory space occupied is small, and the digital twin data played is more comprehensive and is not limited by the recording angle. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0018] Figure 1 is a flowchart of the digital twin data recording and playback method provided by the embodiment of the present application;

[0019] Figure 2 is a recording stage schematic diagram provided by the embodiment of the present application;

[0020] Figure 3 is one of the playback stage schematic diagrams provided by the embodiment of the present application;

[0021] Figure 4 is another of the playback stage schematic diagrams provided by the embodiment of the present application;

[0022] Figure 5 is a normal speed play schematic diagram provided by the embodiment of the present application;

[0023] Figure 6 is a progress jump schematic diagram provided by the embodiment of the present application;

[0024] Figure 7 is a progress return schematic diagram provided by the embodiment of the present application;

[0025] Figure 8is a structural schematic diagram of a digital twin data recording and playback device provided by another embodiment of the present application;

[0026] Figure 9 is a structural schematic diagram of an electronic device provided by yet another embodiment of the present application. DETAILED DESCRIPTION

[0027] The features and exemplary embodiments of various aspects of the present application will be described in detail below with reference to the drawings. To make the purposes, technical solutions, and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of the specific details by those skilled in the art. The following description of the embodiments is only intended to provide a better understanding of the present application by showing examples of the present application.

[0028] It should be noted that, in this document, relational terms such as first and second and the like can only be used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that any such order or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or other elements inherent in such a process, method, article, or apparatus. Without more limitations, the elements defined by the statement "comprising" do not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the elements defined by the statement "comprising".

[0029] In modern port management, in order to simulate the real-time operation of the port, the data generated during the operation of the port can be recorded and played back in the digital twin three-dimensional system of the port. The existing digital twin data recording and playback method is similar to video recording. However, such recording and playback method has large computer memory space occupation for recording video storage, large performance consumption for recording process, and limited view angle for playback due to inflexible recording video screen.

[0030] To solve the problems in the prior art, the embodiments of the present application provide a digital twin data recording and playback method, device, equipment, and storage medium. First, the digital twin data recording and playback method provided by the embodiments of the present application will be introduced.

[0031] Figure 1 The flowchart of the digital twin data recording and playback method provided by one embodiment of the present application is shown. As shown in FIG. 1, the digital twin data recording and playback method provided by one embodiment of the present application includes the following steps. Figure 1As shown, a recording and playback method of digital twin data can include the following steps S101 to S104.

[0032] S101, in the case of completing recording of the digital twin system, a starting batch number and an ending batch number are generated in response to a playback instruction input by a user. The playback instruction includes a playback start time and a playback end time, the starting batch number is a batch number corresponding to the playback start time, and the ending batch number is a batch number corresponding to the playback end time.

[0033] S102, according to the starting batch number and the ending batch number, target digital twin data is determined in the database. The database includes digital twin data recorded by the digital twin system and batch numbers, the difference between adjacent batch numbers is a preset fixed time period, and the target digital twin data is data recorded by the digital twin system from the starting batch number to the ending batch number.

[0034] S103, a play cursor associated with the target digital twin data is created.

[0035] S104, the target digital twin data is played based on the play cursor.

[0036] The recording and playback method of digital twin data of the embodiment of the application can generate a starting batch number and an ending batch number in response to a playback instruction input by a user in the case of completing recording of the digital twin system, the playback instruction includes a playback start time and a playback end time, the starting batch number is a batch number corresponding to the playback start time, and the ending batch number is a batch number corresponding to the playback end time; according to the starting batch number and the ending batch number, target digital twin data is determined in the database, the database includes digital twin data recorded by the digital twin system and batch numbers, the difference between adjacent batch numbers is a preset fixed time period, and the target digital twin data is data recorded by the digital twin system from the starting batch number to the ending batch number; a play cursor associated with the target digital twin data is created; and the target digital twin data is played based on the play cursor. In this embodiment, according to the playback instruction, the target digital twin data is determined, the scene at the playback start in the digital twin system is restored, the target digital twin data is played based on the play cursor according to the batch number of the target digital twin data, the computer memory space is small, and the playback digital twin data is more comprehensive and is not limited by the recording perspective.

[0037] In S101, the above-mentioned digital twin system can be a system that transmits the running data, actual running state and scene of equipment and facilities in the physical world to a three-dimensional virtual space in real time through a wireless or wired network, and analyzes the running through multi-dimensional and multi-attribute data driven business logic.

[0038] The above-mentioned playback instruction can specifically include a playback start time and a playback end time.

[0039] The start batch number is a batch number corresponding to the playback start time, and the end batch number is a batch number corresponding to the playback end time.

[0040] The start batch number and the end batch number are generated in response to the playback instruction input by the user. For example, the start batch number can be generated according to the playback start time in the format of “YYYYMMDDhhmmss” (Y: year, M: month, D: day, h: hour, m: minute, and s: second), and the end batch number can be generated according to the playback end time in the same format.

[0041] In S102, the database can include digital twin data recorded by the digital twin system and batch numbers, wherein the adjacent batch numbers differ by a preset fixed time period.

[0042] The target digital twin data can be data recorded by the digital twin system corresponding to the start batch number and the end batch number.

[0043] The target digital twin data is determined in the database according to the start batch number and the end batch number. For example, the digital twin data corresponding to the start batch number and the end batch number can be found in the database (the database includes digital twin data recorded by the digital twin system and batch numbers).

[0044] In S103, the play cursor can be a private structured query language workspace, that is, a memory area used to temporarily store data affected by a structured query language statement. It can be understood that the affected data is temporarily placed in a virtual table in a memory area, and the virtual table is the cursor.

[0045] The play cursor associated with the target digital twin data is created based on the last batch number in the target digital twin data.

[0046] In S104, the play cursor can be moved in descending order of batch numbers to play the target digital twin data.

[0047] As an implementation manner of the present application, in order to realize the playback of the target digital twin data, the following steps can be further included before S101:

[0048] Classify the objects in the port to determine the first type of objects and the second type of objects.

[0049] Obtain digital twin data and corresponding batch numbers of each first type of object, and digital twin data and corresponding batch numbers of the second type of object.

[0050] In response to the start recording instruction, the digital twin data of each first object and the digital twin data of the second object are stored in the database according to the batch number.

[0051] The digital twin system completes recording.

[0052] The first object can be an object with a large number and a large dynamic in the port, for example, a container. The second object can be an object with a small number and a large dynamic, for example, a bridge crane, a vehicle, a ship, and a worker. Static objects in the port, such as houses, can be classified as third objects, which do not participate in recording and playback in the embodiment of the application.

[0053] The digital twin data of the first object can include basic data and dynamic data. The basic data can be important field information of the container in the port container master table corresponding to the container to be stored, such as box number, berth, and box type. The dynamic data can be data after the state of the container changes.

[0054] The digital twin data of the second object can include basic data, such as the basic data of the shore crane, the yard crane, the worker, the manned container truck, the unmanned container truck, the barrier gate, and the traffic light at the corresponding time of each batch number.

[0055] The digital twin data of each first object and the digital twin data of the second object and the corresponding batch number can be collected by the digital twin system at the corresponding time of each batch number.

[0056] In response to the start recording instruction, the digital twin data of each first object and the digital twin data of the second object are stored in the database according to the batch number. In response to the start recording instruction, the basic data of the first object and the corresponding batch number can be stored in the first object state snapshot table according to the first period, and the batch number can be stored in the first period batch index table. The basic data of the second object and the corresponding batch number can be stored in the second object state snapshot table according to the second period, and the batch number can be stored in the second period batch index table. The first period is greater than the second period. The dynamic data of the first object and the corresponding batch number can be stored in the first object dynamic information table according to the second period. The database includes the first period batch index table, the second period batch index table, and the first object dynamic information table.

[0057] In the embodiment, by classifying each object in the port and collecting the classified digital twin data, the digital twin system is recorded by storing the data in the database according to the batch number, without collecting the digital twin data of static objects, reducing the data amount stored in the database and reducing the computer memory pressure.

[0058] In some embodiments, the digital twin data can specifically include basic data and dynamic data, and the digital twin data of each first-type object and the digital twin data of the second-type object are stored in the database according to the batch number in response to the start recording instruction, which can specifically include:

[0059] In response to the start recording instruction, the basic data of the first-type object and the corresponding batch number are stored in the first-type object state snapshot table according to the preset first period, and the batch number is stored in the first-period batch index table.

[0060] The basic data of the second-type object and the corresponding batch number are stored in the second-type object state snapshot table according to the preset second period, and the batch number is stored in the second-period batch index table, and the first period is greater than the second period.

[0061] The dynamic data of the first-type object and the corresponding batch number are stored in the first-type object dynamic information table according to the second period.

[0062] The database includes the first-period batch index table, the second-period batch index table, and the first-type object dynamic information table.

[0063] The first period is greater than the second period, and the first period can be in units of hours or days, and the second period can be in units of seconds.

[0064] The first-type object state snapshot table includes the basic data of the first-type object and the corresponding batch number recorded according to the first period. The first-period batch index table includes the batch number of the first-type object recorded according to the first period.

[0065] The second-type object state snapshot table includes the basic data of the second-type object and the corresponding batch number recorded according to the second period. The second-period batch index table includes the batch number of the second-type object recorded according to the second period.

[0066] The first-type object dynamic information table includes the dynamic data of the first-type object and the corresponding batch number recorded according to the second period.

[0067] In the embodiment, the size period storage method can reduce the data amount of the basic data of the first-type object, thereby saving computer resources.

[0068] As another implementation manner of the present application, in order to improve the accuracy of determining the target digital twin data in the database, before the above S102, the following can also be included:

[0069] In the first period batch index table, the batch number with the minimum positive time difference from the starting batch number is determined as the initialization batch number, and the time difference is the difference between each batch number in the first period batch index table and the starting batch number.

[0070] The above S102 can specifically include:

[0071] In the first type object state snapshot table, the basic data corresponding to the initialization batch number is determined as the first target basic data.

[0072] The dynamic data of the target batch number in the first type object dynamic information table is determined as the target dynamic data, and the target batch number is the batch number between the initialization batch number and the starting batch number in the second period batch index table.

[0073] In the second type object state snapshot table, the basic data corresponding to the last batch number in the target batch number is determined as the second target basic data.

[0074] The above initialization batch number is the batch number with the minimum positive time difference from the starting batch number in the first period batch index table.

[0075] In the present embodiment, the digital twin data is determined according to the size period, which can enhance the time consistency of data reading, thereby reducing the difficulty of data playback acceleration and progress jumping.

[0076] In some embodiments, the above S104 can specifically include:

[0077] Based on the playback cursor, the target digital twin data is played in a target playback mode, and the target playback mode includes any one of the following: normal speed playback, fast speed playback, progress jumping and progress returning.

[0078] The above normal speed playback can exemplarily be that the playback period of the playback cursor is set to be equal to a preset period, and the following operations are performed in each playback period: moving the playback cursor by a preset period, and loading the digital twin data equal to the batch number corresponding to the playback cursor in the database into the scene to realize normal speed playback of the target digital twin data.

[0079] The above fast speed playback can exemplarily be that a multiple is set, and the preset period is divided by the multiple to obtain a new playback period, and the same operation in the normal speed playback is performed in each period according to the new playback period, so as to realize accelerated playback.

[0080] The progress jump can exemplarily be that a target time position is specified, a playing cursor before the jump is recorded, all target batch numbers between the playing cursor before the jump and the target time position are screened out in the database, target digital twin data equal to the target batch numbers in the database are obtained, and the scene is loaded, so as to jump to the scene at the time point, and finally the playing cursor is updated.

[0081] The progress return can exemplarily be that a target time position is specified, a target batch number is calculated according to the target time position, target digital twin data corresponding to the target batch number are obtained, digital twin data in all digital twin systems are emptied, the target digital twin data are loaded into the scene, and finally the playing cursor is updated.

[0082] In this embodiment, the target playing mode includes normal playing, speed playing, progress jump and progress return, so that the playing time can be flexible when the target digital twin data are played based on the playing cursor, thereby meeting different playing requirements of users.

[0083] In some embodiments, when the target playing mode is normal playing, the S104 can specifically include:

[0084] The target digital twin data are played based on the playing cursor at a fixed time period.

[0085] The fixed time period is a time period that is set by a user and cannot be changed at will.

[0086] In this embodiment, the target digital twin data are played based on the playing cursor at a fixed time period, so that the working condition of the port in the digital twin system can be truly restored, thereby helping users to simulate and practice port working.

[0087] In some embodiments, when the target playing mode is speed playing, the S104 can specifically include:

[0088] The fixed time period is divided by a preset multiple to determine a target playing period;

[0089] The target digital twin data are played based on the playing cursor at the target playing period.

[0090] The multiple can be a multiple set by a user and is not limited to a certain fixed multiple, but can be modified to meet the speed playing requirements of the user. For example, when the multiple is 1, it means that the playing period is equal to the fixed time period. When the multiple is greater than 1, the target digital twin data are played at a speed faster than the fixed time period. When the multiple is less than 1, the target digital twin data are played at a speed slower than the fixed time period.

[0091] In this embodiment, the target digital twin data is played in the target playing mode of playing at a speed, the target digital twin data can be played at different speeds, so as to help improve the efficiency of the port operation simulation exercise or facilitate careful observation of the port operation simulation exercise.

[0092] In some embodiments, in the case where the target playing mode is progress jumping, the S104 can specifically include:

[0093] In the target digital twin data, the first target digital twin data corresponding to the batch number at the first target time position to which the playing cursor jumps from the current position is determined.

[0094] The digital twin system is controlled to load the first target digital twin data, and the playing cursor is moved to the first target time position.

[0095] The time corresponding to the first target time position is greater than the time corresponding to the current position.

[0096] In this embodiment, compared with playing at a constant speed or playing at a speed to the first target time position, playing the target digital twin data in the target playing mode of progress jumping can quickly jump to the first target time position, which is convenient for the port operation simulation exercise.

[0097] In some embodiments, in the case where the target playing mode is progress jumping, the S104 can specifically include:

[0098] In the target digital twin data, the second target digital twin data corresponding to the batch number at the second target time position from the starting batch number is determined.

[0099] The digital twin data in the digital twin system is emptied.

[0100] The digital twin system is controlled to load the second target digital twin data, and the playing cursor is moved to the second target time position.

[0101] The time corresponding to the second target time position is less than the time corresponding to the current position.

[0102] In this embodiment, compared with playing at a constant speed or playing at a speed to the second target time position, playing the target digital twin data in the target playing mode of progress jumping can quickly jump to the second target time position, which is convenient for the port operation simulation exercise.

[0103] In order to facilitate the understanding of the recording and playback method of the digital twin data in the embodiments of the present application, the actual application process of the recording and playback method of the digital twin data is described as follows:

[0104] The embodiment takes a digital twin three-dimensional system of a port as an example for illustration, of course, not limited to the port application scenario, but also can be a warehouse or an airport scenario, and the like, which is not specifically limited herein.

[0105] In the recording and storage, the batch number and the batch number index table are used for faster searching of the data required in the playback. The input information required in the embodiment is summarized as follows:

[0106] (1) A port container general table (equivalent to the above-mentioned first type of object state snapshot table), in which important information such as the box number, berth, and box type of all containers is stored;

[0107] (2) A port container dynamic information incremental table (equivalent to the above-mentioned first type of object dynamic information table), for example, a record table of change information after the state of a container in a yard changes;

[0108] (3) A real-time dynamic table of other data of the port (equivalent to the above-mentioned second type of object state snapshot table), such as a storage table of information such as a shore crane, a yard crane, a staff, a manned container truck, an unmanned container truck, a gate barrier, and a traffic light;

[0109] (4) A playback instruction (including a playback start time and a playback end time);

[0110] (5) An operation instruction in the playback process (such as a pause, acceleration, and deceleration instruction in the playback process).

[0111] The implementation process of the embodiment is divided into three stages of a preparation stage, a recording stage, and a playback stage, and there are different steps for the three stages.

[0112] 1. For the preparation stage, the specific steps are as follows:

[0113] Step S1, classifying the objects in the scene. According to objective information such as the size of the port digital twin scene, the total number of objects, and the yard capacity, the types of objects that can appear in the digital twin three-dimensional scene are divided into three categories:

[0114] (1) Objects with a large number and a large dynamic, referred to as “A type of objects” (i.e., the above-mentioned first type of objects), for example, containers.

[0115] (2) Objects with a small number and a large dynamic, referred to as “B type of objects” (i.e., the above-mentioned second type of objects), for example, cranes, vehicles, ships, and staff.

[0116] (3) Static objects (i.e., the above-mentioned third type of objects), for example, houses, wherein the third type of objects does not participate in the recording and playback.

[0117] Step S2, define the large deposit period (i.e. the first period described above). According to the size of the port area, the capacity of the container yard, the expected effect of the playback required, set the large deposit period. The large deposit period will be used to record the "state snapshot" of "class A objects". Usually, the large deposit period is in hours or days.

[0118] Step S3, define the small deposit period (i.e. the second period described above). According to the carrying capacity of the server design, set the fixed small deposit period time. This small deposit period will be used to record the "incremental event" of "class A objects" and the "state snapshot" of "class B objects". Usually, the small deposit period is in seconds, the larger the period, the larger the amount of data.

[0119] Step S4, prepare the storage container. Create an "A object state snapshot table" (i.e. the first class object state snapshot table described above), a "large period batch index table" (i.e. the first period batch index table described above), an "A object incremental information table" (i.e. the first class object dynamic information table described above), a "B object state snapshot table" (i.e. the second class object state snapshot table described above), and a "small period batch index table" (i.e. the second period batch index table described above) in the database.

[0120] Step S5, start the recording module, and the recording module starts recording after starting. The recording module is a resident module and always runs.

[0121] 2. For the recording phase, see Figure 2 , the specific steps are as follows:

[0122] Step S1, generate the "state snapshot" of "class A objects" according to the large deposit period, and store it in the "A object state snapshot table". The "state snapshot" is composed of the "basic data" of "class A objects" (such as the important field information of the corresponding container in the port container table that needs to be stored) and the "batch number". The "batch number" is a series of numbers generated by the current time in the format of "YYYYMMDDhhmmss" (Y: year, M: month, D: day, h: hour, m: minute, s: second). At the same time, the "batch number" is stored in the "large period batch index table".

[0123] Step S2, generate the "batch number" of the period according to the small deposit period, if there is "incremental event" data of "class A objects", store the "batch number" of the "incremental event" in the "A object incremental information table". If not, do not store. Then, store the "basic data" and "batch number" of "class B objects" in the "B object state snapshot table" together. Store the "batch number" in the "small period batch index table".

[0124] 3. For the playback phase, the specific steps are as follows:

[0125] Step S1, seeFigure 3 , receiving the playback instruction, trace back to the latest "initial batch number". The playback instruction contains the playback start time and the playback end time. According to the "playback start time", a "start batch number" is generated in the format of "YYYYMMDDhhmmss". According to the date information contained in the number, all batch numbers stored in the "large cycle batch index table" on the day are traversed, and the "minimum positive time difference" corresponding to the "batch number" is obtained by subtracting the "start batch number" from each "batch number" on the day. The "batch number" is the "initial batch number" of the playback start. According to the playback end time, the "end batch number" is calculated.

[0126] Step S2, see Figure 4 , initialization, that is, restore to the scene exactly equal to the playback start time of the playback instruction. According to the "initial batch number", take the data in the "A object state snapshot table" with the "batch number" equal to the "initial batch number", save the data to the "local temporary storage area", and input the data into the three-dimensional scene to generate a corresponding number and position of "A objects". Traverse the "small cycle batch index table" to find all "small cycle batch numbers" between the "initial batch number" and the "start batch number" in the index table. According to the "small cycle batch number" obtained just now, find all the A object increment information corresponding to the "small cycle batch number" from the "A object increment information table", and input it into the scene. Find the B object snapshot data in the "B object state snapshot table" with the "batch number" equal to the last "batch number" in the "small cycle batch number", and input the group of B object snapshot data into the scene. At this point, the scene is restored to the scene exactly equal to the playback start time of the playback instruction.

[0127] Step S3, see Figure 4 , create a play cursor. According to the value of the last "batch number" in the "small cycle batch number" obtained in S2, create a play cursor. The play cursor can move forward.

[0128] Step S4, play, for playing, there are many different playing modes. Such as: normal speed, times speed, progress jump, progress return, the specific steps are as follows:

[0129] (1) normal speed, see Figure 5 , set "play cycle" equal to "small storage cycle". Each "play cycle" performs the following operations: move the "play cursor" backward by a "small storage cycle". Take the data in the "A object increment information table" and the "B object state snapshot table" equal to the "play cursor", and load it into the scene.

[0130] (2) Speed play, set the multiple. "Small cycle" divided by "multiple" equals the new "play cycle". According to the new time, the same operation in normal speed play is executed in each cycle. That is, accelerated play.

[0131] (3) Progress jump, see Figure 6 , specify a "target time position". Record the "play cursor" before the jump. Filter all "batch numbers" between the "play cursor" before the jump and the "target time position" in the "small cycle batch index table". Take the data equal to the "play cursor" in the "A object delta information table" and the "B object state snapshot table", and load the scene. That is, jump to the time point. Finally, set the new play cursor.

[0132] (4) Progress back, see Figure 7 , specify a "target time position". Calculate the nearest "small cycle batch number" according to the "target time position". Load the corresponding "B object state snapshot" of the "batch number" into the scene. Empty all "A objects", load the "A data" stored in the "local temporary storage area" at initialization, calculate all "small cycle batch numbers" within this time period according to the "initialization batch number" calculated in step S1 of the playback stage and the currently specified "target time position", and load all A object delta information corresponding to the "small cycle batch numbers" into the scene. Finally, set the new play cursor.

[0133] Step S4, end, when the play cursor reaches the end batch number, the playback ends.

[0134] The embodiment differentiates the information in the port scene, respectively records the input events and takes the state snapshots, reduces the data amount in the recording stage and the data loading amount in the playback stage, realizes small storage data amount and flexible playback time start point. The batch storage and reading method speeds up the data retrieval speed, reduces the query cost, and reduces the error probability. The large and small cycle access mode enhances the time consistency of the data, reduces the difficulty of playback acceleration and progress bar, and the embodiment can be applied to the port digital twin system with more dynamic objects and more input instructions.

[0135] Based on the recording and playback method of digital twin data provided in the above embodiment, correspondingly, a specific implementation mode of a recording and playback device of digital twin data is also provided. It can be understood that the related description in each device embodiment below can refer to the foregoing method embodiments, and for brevity, will not be repeated. Please refer to the following embodiments.

[0136] Please refer to Figure 8The digital twin data recording and playback device 800 provided by the embodiment of the present application can include the following modules: a generation module 801, a first determination module 802, a creation module 803, and a playback module 804.

[0137] The generation module 801 is configured to, in response to a playback instruction input by a user, generate a start batch number and an end batch number in a case where recording of the digital twin system is completed, the playback instruction including a playback start time and a playback end time, the start batch number being a batch number corresponding to the playback start time, and the end batch number being a batch number corresponding to the playback end time.

[0138] The first determination module 802 is configured to determine target digital twin data in a database according to the start batch number and the end batch number, the database including digital twin data recorded by the digital twin system and batch numbers, adjacent batch numbers being different by a preset fixed time period, and the target digital twin data being data recorded by the digital twin system from the start batch number to the end batch number.

[0139] The creation module 803 is configured to create a playback cursor associated with the target digital twin data.

[0140] The playback module 804 is configured to play the target digital twin data based on the playback cursor.

[0141] The digital twin data recording and playback device of the embodiment of the present application can, in response to a playback instruction input by a user, generate a start batch number and an end batch number in a case where recording of the digital twin system is completed, the playback instruction including a playback start time and a playback end time, the start batch number being a batch number corresponding to the playback start time, and the end batch number being a batch number corresponding to the playback end time; determine target digital twin data in a database according to the start batch number and the end batch number, the database including digital twin data recorded by the digital twin system and batch numbers, adjacent batch numbers being different by a preset fixed time period, and the target digital twin data being data recorded by the digital twin system from the start batch number to the end batch number; create a playback cursor associated with the target digital twin data; and play the target digital twin data based on the playback cursor. In this way, in the embodiment, the target digital twin data is determined according to the playback instruction, the scene at which playback starts in the digital twin system is restored, the target digital twin data is played based on the playback cursor according to the batch number of the target digital twin data, the computer memory space occupied is small, and the playback digital twin data is more comprehensive and is not limited by the recording perspective.

[0142] As an implementation manner of the present application, in order to realize playback of the target digital twin data, the above device 800 can further include:

[0143] The classification module is configured to classify objects in the port to determine first-type objects and second-type objects.

[0144] The acquisition module is configured to acquire digital twin data of each first object and a corresponding batch number, and digital twin data of a second object and a corresponding batch number.

[0145] The recording module is configured to, in response to a start recording instruction, store the digital twin data of each first object and the digital twin data of the second object in the database according to the batch numbers.

[0146] The digital twin system completes recording.

[0147] In some embodiments, the digital twin data includes basic data and dynamic data.

[0148] The recording module can specifically include:

[0149] The first storage unit is configured to, in response to a start recording instruction, store the basic data of each first object and the corresponding batch number in the first object state snapshot table according to a preset first period, and store the batch number in the first period batch index table.

[0150] The second storage unit is configured to store the basic data of the second object and the corresponding batch number in the second object state snapshot table according to a preset second period, and store the batch number in the second period batch index table, the first period being greater than the second period.

[0151] The third storage unit is configured to store the dynamic data of each first object and the corresponding batch number in the first object dynamic information table according to the second period.

[0152] The database includes the first period batch index table, the second period batch index table, and the first object dynamic information table.

[0153] As another implementation manner of the present application, in order to improve the accuracy of determining target digital twin data in the database, the apparatus 800 can further include:

[0154] The second determination module is configured to determine, in the first period batch index table, the batch number with the minimum positive time difference as the initialization batch number, the time difference being the difference between each batch number in the first period batch index table and the starting batch number.

[0155] The first determination module 802 can specifically include:

[0156] The first determination unit is configured to determine, in the first object state snapshot table, the basic data corresponding to the initialization batch number as the first target basic data.

[0157] The second determining unit is configured to determine dynamic data of a target batch number in the first type object dynamic information table as target dynamic data, the target batch number being a batch number between the initialization batch number and the starting batch number in the second period batch index table;

[0158] The third determining unit is configured to determine, in the second type object state snapshot table, basic data corresponding to a last batch number in the target batch number as second target basic data.

[0159] In some embodiments, the playing module 804 described above can be specifically configured to play the target digital twin data in a target playing mode based on the playing cursor, the target playing mode including any one of the following: normal speed playing, speed playing, progress jumping, and progress returning.

[0160] In some embodiments, when the target playing mode is normal speed playing, the playing module 804 described above can specifically include:

[0161] The first playing unit is configured to play the target digital twin data in a fixed time period based on the playing cursor.

[0162] In some embodiments, when the target playing mode is speed playing, the playing module 804 described above can specifically include:

[0163] The fourth determining unit is configured to divide the fixed time period by a preset multiple to determine a target playing period;

[0164] The second playing unit is configured to play the target digital twin data in the target playing period based on the playing cursor.

[0165] In some embodiments, when the target playing mode is progress jumping, the playing module 804 described above can specifically include:

[0166] The fifth determining unit is configured to determine, in the target digital twin data, first target digital twin data corresponding to a batch number to which the playing cursor jumps from a current position to a preset first target time position;

[0167] The first control unit is configured to control the digital twin system to load the first target digital twin data, and move the playing cursor to the first target time position.

[0168] In some embodiments, when the target playing mode is progress returning, the playing module 804 described above can specifically include:

[0169] The sixth determining unit is configured to determine, in the target digital twin data, second target digital twin data corresponding to a batch number from the starting batch number to a preset second target time position;

[0170] The emptying unit is configured to empty digital twin data in the digital twin system.

[0171] The second control unit is configured to control the digital twin system to load the second target digital twin data and play the cursor to move to the second target time position.

[0172] Based on the recording and playing method of the digital twin data provided in the above embodiments, the application further provides a specific implementation of an electronic device. Please refer to the following embodiments.

[0173] Figure 9 A hardware structure schematic diagram of the electronic device provided by the embodiments of the application is shown.

[0174] The electronic device can include a processor 901 and a memory 902 having computer program instructions stored therein.

[0175] Specifically, the processor 901 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the application.

[0176] The memory 902 can include a mass storage for data or instructions. By way of example and not limitation, the memory 902 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 902 can include removable or non-removable (or fixed) media. Where appropriate, the memory 902 can be internal or external to the integrated gateway disaster recovery device. In certain embodiments, the memory 902 is non-volatile, solid-state memory.

[0177] In certain embodiments, the memory 902 can include read-only memory (ROM), random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (e.g., by one or more processors), is operable to perform operations described with reference to the methods according to an aspect of the present disclosure.

[0178] The processor 901 reads and executes computer program instructions stored in the memory 902 to implement any of the digital twin data recording and playback methods in the above embodiments.

[0179] In one example, the electronic device may also include a communication interface 903 and a bus 910. Wherein, as... Figure 9 As shown, the processor 901, memory 902, and communication interface 903 are connected through bus 910 and complete communication with each other.

[0180] The communication interface 903 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0181] Bus 910 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 910 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0182] The electronic device can execute the digital twin data recording and playback method described in the embodiments of this application, thereby achieving a combination of Figure 1 and Figure 8 The method and apparatus described herein are for recording and playing back digital twin data.

[0183] Furthermore, in conjunction with the digital twin data recording and playback methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the digital twin data recording and playback methods in the above embodiments.

[0184] It is to be understood that the application is not limited to particular configurations and processes described herein and shown in the drawings. The detailed description is not to be taken as limiting the application. In the above embodiments, several specific steps are described and illustrated in order to provide a thorough understanding of the application. However, the application can be practiced with fewer or additional steps, and in a different order. The application is not limited to the described and illustrated embodiments.

[0185] The functions shown in the structural block diagrams described above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transfer information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.

[0186] It is also to be understood that the example embodiments described in this application are based on a series of steps or apparatuses to describe some methods or systems. However, the application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.

[0187] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0188] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and the corresponding processes in the foregoing method embodiments can be referred to, which will not be described herein again. It should be understood that the protection scope of the present application is not limited in this way, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered in the protection scope of the present application.

Claims

1. A method for recording and playing back digital twin data, characterized in that, include: Once the digital twin system has completed recording, in response to a playback command input by the user, a start batch number and an end batch number are generated. The playback command includes a playback start time and a playback end time. The start batch number is the batch number corresponding to the playback start time, and the end batch number is the batch number corresponding to the playback end time. The digital twin system completes recording by classifying various objects in the port, collecting the classified digital twin data, and storing it in a database according to the batch number. Based on the starting batch number and the ending batch number, target digital twin data is determined in the database. The database includes digital twin data recorded by the digital twin system and batch numbers. Adjacent batch numbers are separated by a preset fixed time period. The target digital twin data is the data recorded by the digital twin system from the starting batch number to the ending batch number. Create a playback cursor associated with the target digital twin data; Based on the playback cursor, the target digital twin data is played.

2. The method according to claim 1, characterized in that, Before generating the start batch number and end batch number in response to a user-inputted playback command after the digital twin system has completed recording, the process further includes: Classify the objects in the port to determine the first category and the second category. Obtain the digital twin data and corresponding batch number of each of the first type of objects, and the digital twin data and corresponding batch number of the second type of objects; In response to the start recording command, the digital twin data of each of the first type of objects and the digital twin data of the second type of objects are stored in the database according to the batch number; The digital twin system completed the recording.

3. The method according to claim 2, characterized in that, The digital twin data includes basic data and dynamic data; In response to the start recording command, the digital twin data of each of the first type of objects and the digital twin data of the second type of objects are stored in the database according to the batch number, including: In response to the start recording command, the basic data and corresponding batch number of the first type of object are stored in the first type of object status snapshot table according to the preset first cycle, and the batch number is stored in the first cycle batch index table. According to the preset second cycle, the basic data and corresponding batch number of the second type of object are stored in the second type of object status snapshot table, and the batch number is stored in the second cycle batch index table, where the first cycle is longer than the second cycle; According to the second cycle, the dynamic data and corresponding batch number of the first type of object are stored in the dynamic information table of the first type of object; The database includes the first periodic batch index table, the second periodic batch index table, and the first type of object dynamic information table.

4. The method according to claim 3, characterized in that, Before determining the target digital twin data in the database based on the start batch number and the end batch number, the method further includes: In the first periodic batch index table, the batch number with the smallest positive time difference is determined as the initial batch number, where the time difference is the difference between each batch number in the first periodic batch index table and the starting batch number; The step of determining the target digital twin data in the database based on the starting batch number and the ending batch number includes: In the first type of object state snapshot table, the basic data corresponding to the initialization batch number is determined as the first target basic data; The dynamic data of the target batch number in the first type of object dynamic information table is determined as the target dynamic data. The target batch number is the batch number in the second periodic batch index table that is between the initial batch number and the starting batch number. In the second type of object state snapshot table, the basic data corresponding to the last batch number in the target batch number is determined as the second target basic data.

5. The method according to claim 1, characterized in that, Playing the target digital twin data based on the playback cursor includes: Based on the playback cursor, the target digital twin data is played in a target playback mode, which includes any one of the following: normal speed playback, accelerated speed playback, progress jump, and progress rollback.

6. The method according to claim 5, characterized in that, When the target playback mode is the normal speed playback, playing the target digital twin data in the target playback mode based on the playback cursor includes: Based on the playback cursor, the target digital twin data is played at the fixed time period.

7. The method according to claim 5, characterized in that, When the target playback mode is the specified playback speed, playing the target digital twin data in the target playback mode based on the playback cursor includes: Divide the fixed time period by a preset multiple to determine the target playback period; Based on the playback cursor, the target digital twin data is played at the target playback period.

8. The method according to claim 5, characterized in that, When the target playback mode is the progress jump, playing the target digital twin data in the target playback mode based on the playback cursor includes: In the target digital twin data, determine the first target digital twin data corresponding to the batch number of the playback cursor jumping from the current position to the preset first target time position; The system controls the digital twin system to load the first target digital twin data, and the playback cursor moves to the first target time position.

9. The method according to claim 5, characterized in that, When the target playback mode is progress rewind, playing the target digital twin data in the target playback mode based on the playback cursor includes: In the target digital twin data, determine the second target digital twin data corresponding to the batch number from the starting batch number to the preset second target time position of the playback cursor; Clear the digital twin data in the aforementioned digital twin system; The system controls the digital twin system to load the second target digital twin data, and the playback cursor moves to the second target time position.

10. A device for recording and playing back digital twin data, characterized in that, The device includes: The generation module, upon completion of recording by the digital twin system, generates a start batch number and an end batch number in response to a playback command input by the user. The playback command includes a playback start time and a playback end time. The start batch number is the batch number corresponding to the playback start time, and the end batch number is the batch number corresponding to the playback end time. The digital twin system completes recording by classifying objects in the port, collecting the classified digital twin data, and storing it in a database according to the batch number. The determination module is used to determine the target digital twin data in the database based on the starting batch number and the ending batch number. The database includes the digital twin data recorded by the digital twin system and the batch number. Adjacent batch numbers are separated by a preset fixed time period. The target digital twin data is the data recorded by the digital twin system from the starting batch number to the ending batch number. A creation module is used to create a playback cursor associated with the target digital twin data; The playback module is used to play the target digital twin data based on the playback cursor.

Citation Information

Patent Citations

  • Methods and systems for industrial processes

    CA3048298A1

  • Recording and broadcasting course generation method and device, equipment and storage medium

    CN115604416A