Data management method and device, equipment and storage medium

By creating a time range version according to the preset period of the production task in industrial production data management, and managing the production data within a specific timestamp range, the problem of difficult data table management under complex production tasks is solved and refined management is achieved. and efficient query.

CN119336753APending Publication Date: 2025-01-21BEIJING WELLINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411329374.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the industrial production process, when the production tasks of the existing technology are relatively complex, when the data management is managed by establishing multiple data tables in the relational library table, there is a problem that data table management is difficult.

Method used

When the production data is added to the first historical data object, obtain the first time version of the preset period created according to the target production task contained in the historical data object, and the corresponding first -time stamp when the production data is added During the time when the start time and the end time, according to the first historical data object, the first time version version, and the first time stamp, the production data in the first time version is managed.

Benefits of technology

It achieves refined management of production data, reduces the difficulty of managing production data, and improves the efficiency of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336753A_ABST
    Figure CN119336753A_ABST
Patent Text Reader

Abstract

The invention provides a data management method and device, equipment and a storage medium, and relates to the technical field of digital information. The data management method responds to detection of adding production data to a first historical data object, and obtains a first time range version created according to a preset time period corresponding to a target production task contained in the first historical data object, and when the corresponding first timestamp when the production data is added is in the time period corresponding to the starting time and the ending time contained in the first time range version, the production data in the first time range version is managed according to the first historical data object, the first time range version and the first timestamp, so that fine management of the production data is realized, and the production efficiency is improved. And meanwhile, the management difficulty of the production data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital information technology, and in particular to a data management method, device, equipment and storage medium. Background Art

[0002] In the industrial production process, the organization and management of production data are usually related to production tasks such as job plans, production cycles, and production batches. Users need to classify and manage the corresponding production data according to these production tasks, such as the production data corresponding to the processing work order of product A in May, the production data corresponding to the sales order of product B in the first quarter, etc.

[0003] In the related art, the classification management of production data corresponding to historical data objects is achieved by establishing multiple data tables in the relational library table. Specifically, a corresponding data table can be established for each production task according to the operation plan and production batches in the production process, and the production data corresponding to the production task in the production process can be managed through the data table. However, this method has the problem of greater difficulty in data table management when the production tasks are more complex. Summary of the invention

[0004] The present application provides a data management method, device, equipment and storage medium to solve the problem in the related art that when the production task is more complicated, when data management is performed by establishing multiple data tables in the relational library table, there is a problem that data table management is difficult.

[0005] In a first aspect, the present application provides a data management method, comprising: in response to detecting that production data is added to a first historical data object, obtaining a first time range version, the first time range version being created based on a preset time period corresponding to a target production task contained in the first historical data object, the first time range version including a start time and an end time; when a first timestamp corresponding to the addition of production data is within the time period corresponding to the start time and the end time, managing the production data within the first time range version based on the first historical data object, the first time range version and the first timestamp.

[0006] In one possible implementation, production data within a first time range version is managed according to a first historical data object, a first time range version, and a first timestamp, including: determining a data storage area corresponding to the historical data object according to the first historical data object based on a mapping relationship between the historical data object and the data storage area; determining a data storage area corresponding to the first time range version according to the first time range version based on a mapping relationship between the time range version and the data storage slice; and storing the production data within the first time range version in the data storage slice according to the first timestamp.

[0007] In a possible implementation, according to the first timestamp, the production data within the first time range version is stored in the data storage slice, including: obtaining a first data storage block, the first data storage block is a storage unit in the data storage slice, and the size of the first data storage block is fixed; for each production data within the first time range version, the production data is stored in the first data storage block in sequence according to the order of the first timestamps corresponding to the production data, and when the first data storage block is full, the time range between the first timestamp corresponding to the start production data and the first timestamp corresponding to the end production data stored in the first data storage block is recorded.

[0008] In one possible implementation, the data management method further includes: if the first data storage block is full, obtaining a second data storage block, and storing the production data in the second data storage block in the order of the first timestamps corresponding to the production data not stored in the first time range version.

[0009] In one possible implementation, the data management method further includes: determining the data status of the data storage slice; if the data status is unpublished, allowing modification of the production data in the data storage slice; if the data status is published, refusing to modify the production data in the data storage slice.

[0010] In one possible implementation, the data management method further includes: in response to receiving a request to publish a first time range version, publishing the first time range version, changing the data status of the data storage slice to published, and changing the production data stored in the data storage slice to a read-only state.

[0011] In a possible implementation, the data management method also includes: obtaining a second timestamp, which is a timestamp contained in a second time range version of a second historical data object; based on a mapping relationship between the historical data object and the data storage area, determining the data storage area corresponding to the second historical data object according to the second historical data object; based on a mapping relationship between the time range version and the data storage slice, determining the data storage slice corresponding to the second time range version according to the second time range version; based on a mapping relationship between the data storage slice and the data storage block, determining a data storage block set according to the data storage slice; determining a third data storage block containing the second timestamp in the data storage block set, and querying the target production data from the third data storage block.

[0012] In a second aspect, the present application provides a data management device, comprising:

[0013] An acquisition module, configured to acquire a first time range version upon detecting that production data is added to the first historical data object, the first time range version being created according to a preset time period corresponding to a target production task included in the first historical data object, the first time range version including a start time and an end time;

[0014] The management module is used to manage the production data in the first time range version according to the first historical data object, the first time range version and the first timestamp when the first timestamp corresponding to the added production data is within the time period corresponding to the start time and the end time.

[0015] In one possible implementation, the management module is specifically used to: based on the mapping relationship between historical data objects and data storage areas, determine the data storage area corresponding to the historical data object according to the first historical data object; based on the mapping relationship between time range versions and data storage slices, determine the data storage slice corresponding to the first time range version in the data storage area according to the first time range version; based on the first timestamp, store the production data within the first time range version in the data storage slice.

[0016] In a possible implementation, the management module is also used to: obtain a first data storage block, which is a storage unit in the data storage slice and has a fixed size; for each production data within the first time range version, store the production data in the first data storage block in sequence according to the order of the first timestamps corresponding to the production data, and when the first data storage block is full, record the time range between the first timestamp corresponding to the start production data and the first timestamp corresponding to the end production data stored in the first data storage block.

[0017] In a possible implementation, the management module is further used to: when the first data storage block is full, obtain the second data storage block, and store the production data in the second data storage block in the order of the first timestamps corresponding to the production data not stored in the first time range version.

[0018] In one possible implementation, the data management device also includes a correction module (not shown), which is used to: determine the data status of the data storage slice; if the data status is unpublished, allow correction processing of the production data in the data storage slice; if the data status is published, refuse to correct the production data in the data storage slice.

[0019] In one possible implementation, the data management device also includes a publishing module (not shown), which is used to: when receiving a publishing request for a first time range version, publish the first time range version, change the data status of the data storage slice to published, and change the production data stored in the data storage slice to a read-only state.

[0020] In a possible implementation, the data management device also includes a query module (not shown), which is used to: obtain a second timestamp, which is a timestamp contained in a second time range version of the second historical data object; based on a mapping relationship between the historical data object and the data storage area, determine the data storage area corresponding to the second historical data object according to the second historical data object; based on a mapping relationship between the time range version and the data storage slice, determine the data storage slice corresponding to the second time range version according to the second time range version; based on a mapping relationship between the data storage slice and the data storage block, determine a data storage block set according to the data storage slice; determine a third data storage block containing the second timestamp in the data storage block set, and query the target production data from the third data storage block.

[0021] In a third aspect, the present application provides a data management device, including: at least one processor;

[0022] and a memory communicatively coupled to the at least one processor;

[0023] The memory is used to store instructions executable by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the data management method provided in the first aspect.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, which, when executed, are used to implement the data management method provided in the first aspect above.

[0025] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed, implements the data management method provided in the first aspect above.

[0026] The data management method, apparatus, device and storage medium provided by the present application respond to detecting that production data is added to a first historical data object, by acquiring a first time range version created according to a preset time period corresponding to a target production task contained in the first historical data object, and when a first timestamp corresponding to the addition of production data is within a time period corresponding to a start time and an end time contained in the first time range version, the production data in the first time range version is managed according to the first historical data object, the first time range version and the first timestamp, thereby achieving refined management of the production data and reducing the difficulty of managing the production data. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0028] Figure 1 A schematic diagram of the structure of a data management system provided in an embodiment of the present application;

[0029] Figure 2 The process of the data management method provided in the embodiment of the present application Figure 1 ;

[0030] Figure 3 The process of the data management method provided in the embodiment of the present application Figure 2 ;

[0031] Figure 4 The process of the data management method provided in the embodiment of the present application Figure 3 ;

[0032] Figure 5 A schematic diagram of the structure of a data management device provided in one embodiment of the present application;

[0033] Figure 6 A schematic diagram of the structure of a data management device provided in one embodiment of the present application.

[0034] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0036] In the related art, in order to solve the problem that existing database products lack the function of managing production data based on production characteristics such as production tasks in the industrial production process, a method of adding tag fields in the relational database table or establishing multiple database tables in the relational database table is adopted to realize the classification management of production data generated based on production tasks. Among them, time series databases usually organize data according to time series. Therefore, when the collected production data is time series data, it can only be classified and managed by establishing multiple database tables.

[0037] Specifically, by adding a tag field to the relational database table, the added tag field can provide users with the function of data classification and retrieval, and at the same time, to a certain extent, it can also meet the needs of users to manage production data according to different business plans and production tasks such as production batches. However, in this method, on the one hand, because the data files stored in the underlying database are not organized according to the tag field, when data management is performed based on this method, there are problems such as low efficiency of data management such as data storage and data retrieval. On the other hand, the tag field cannot define some physical meanings such as the start and end time of the job plan.

[0038] Regarding the method of establishing multiple database tables, on the one hand, since there are many production tasks such as job plans and production batches in the production process, and each production task may have multiple data types, when the production tasks are more complex, if a corresponding database table is created for each production task, the number of database tables will be very large and difficult to manage. At the same time, relational databases are also difficult to support the creation of a large number of database tables; on the other hand, some job plans are often temporarily added in the production process. If it is necessary to create new database tables in real time to handle them, it will increase the difficulty of managing the database tables.

[0039] Based on the technical problems existing in the related technologies, the embodiments of the present application target the same historical data object, create a time range version for the production task according to the time period corresponding to the production task contained in the historical data object, and manage the production data based on the time range version when the production data corresponding to the production task satisfies the timestamp falling within the time period corresponding to the start time and end time of the time range version, thereby achieving refined management of the production data and reducing the difficulty of managing the production data.

[0040] The following first explains the technical terms involved in the embodiments of the present application.

[0041] Historical data model: a historical data structure, which is a collection of parameters.

[0042] Model attributes: characteristic parameters of the model data itself.

[0043] Model member: User-defined personalized data, which can be of different types.

[0044] Historical data model copy: Created based on the historical data model, users can customize the initial values ​​of members as personalized parameters.

[0045] Historical data object: created based on the historical data model copy, it is an instantiation of the historical data model copy.

[0046] Historical data record: created based on the historical data object, used to store the historical data generated during the production process, and has the same member structure as its object model.

[0047] Time range version: A user-defined time range segment. A historical data object can define multiple time range versions, which is a further subdivision of the historical data records in the historical data object. The records in a certain time range version must meet the requirement that the timestamp falls between the start time and end time of the time range version.

[0048] Figure 1 This is a schematic diagram of the structure of the data management system provided in the embodiment of the present application. Figure 1 As shown, the data management system includes a historical data object and a data management unit. The historical data object includes at least one time range version, such as time range version 1, time range version 2, and time range version n. The data management unit includes a data storage area (Partion), a data storage slice (sharding), and a data storage block (block), and a data storage area can include multiple data storage slices such as data storage slice 1, data storage slice 2, etc., and a data storage slice can include multiple data storage blocks such as data storage block 1, data storage block 2, and data storage block 3. The size of the data storage block is fixed. Exemplarily, the size of the data storage block can be 2M.

[0049] It should be noted that the same historical data object can correspond to a data storage area, different time range versions in the same historical data object can respectively correspond to a data storage slice in the data storage area, and production data within the same time range version can be stored in different data storage blocks in the same data storage slice.

[0050] like Figure 1 As shown, when managing the production data in the time range version 1 in the historical data object, you can first determine the data storage area corresponding to the historical data object, further determine the data storage slice 1 corresponding to the time range version 1, and store the production data corresponding to the time range version 1 in the data storage block in the data storage slice 1.

[0051] Above Figure 1 The number and position relationship of the data storage areas, data storage slices, and data storage blocks in the data management unit shown in FIG. 1 are only examples, and the present application does not limit this.

[0052] The implementation of the data management method provided in the embodiment of the present application is described in detail below in conjunction with specific embodiments.

[0053] Figure 2 The process of the data management method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the specific implementation of the data management method may include the following steps:

[0054] S201, in response to detecting that production data is added to a first historical data object, a first time range version is obtained, where the first time range version is created based on a preset time period corresponding to a target production task included in the first historical data object, and the first time range version includes a start time and an end time.

[0055] First, the creation method of the first historical data object is explained:

[0056] Optionally, the first historical data object may be created in the following manner: creating a historical data model copy based on the historical data model, and further creating the first historical data object based on the historical data model copy.

[0057] Exemplarily, the historical data model can be obtained by modeling the historical data uploaded by a certain production equipment, that is, by defining the data structure of the historical data, such as data attributes and variables to be collected, etc., to obtain the historical data model corresponding to the historical data. Among them, the historical data model can include model attributes such as characteristic parameters of the model data itself, and model members such as user-defined personalized data. Exemplarily, the user-defined personalized data can be a variety of different types of data. It is understandable that in the industrial production process, the data structure corresponding to the same production equipment is fixed.

[0058] Exemplarily, the creation of the first historical data object is achieved by defining initial parameters for the data structure corresponding to the historical data model.

[0059] Exemplarily, the first historical data object provided in the embodiment of the present application can be understood as a production device whose data structure defines initialization parameters.

[0060] The following describes a method for creating a time range version included in the first historical data object.

[0061] It is understandable that a historical data object may contain multiple different production tasks. In the data management method provided in the embodiment of the present application, for each production task contained in the first historical data object, a time range version corresponding to the production task may be created according to the preset time period corresponding to the production task. That is, a time range version may be created for each production task, and a historical data object may contain multiple different time range versions.

[0062] Exemplarily, the number of time range versions included in the historical data object can be determined according to the number of production tasks included in the historical data object. In the data management method provided in the embodiment of the present application, the number of time range versions included in the historical data object is not limited and can be determined according to actual application requirements.

[0063] Exemplarily, the target production task may be any one of a production batch, a work plan, and a production cycle.

[0064] Exemplarily, the first time range version may include a version identifier (version ID), a version name, a start time, and an end time, etc.

[0065] Exemplarily, the production data may be data generated during the production process of the target production task contained in the first historical data object.

[0066] S202: When the first timestamp corresponding to the added production data is within the time period corresponding to the start time and the end time, the production data within the first time range version is managed according to the first historical data object, the first time range version and the first timestamp.

[0067] Exemplarily, when the first timestamp is greater than or equal to the start time, and less than or equal to the end time, it is determined that the first timestamp is within the time period corresponding to the start time and the end time; when the first timestamp is less than the start time, or greater than the end time, it is determined that the first timestamp is not within the time period corresponding to the start time and the end time.

[0068] Exemplarily, the production data in the first time range version may be data generated during the execution of the target production task.

[0069] In a possible implementation, the production data within the first time range version may be partitioned, fragmented, and stored in blocks according to the first historical data object, the first time range version, and the first timestamp.

[0070] In an embodiment of the present application, in response to detecting that production data is added to a first historical data object, a first time range version created according to a preset time period corresponding to a target production task contained in the first historical data object is obtained, and it is determined whether a first timestamp corresponding to when the production data is added is within the time period corresponding to the start time and the end time contained in the time range version. When the first timestamp is within the time period corresponding to the start time and the end time, the production data in the first time range version is managed according to the first historical data object, the first time range version and the first timestamp, thereby achieving refined management of the production data and reducing the difficulty of managing the production data.

[0071] It can be understood that, for any historical data object, the data management method provided in the embodiment of the present application can allow the user to create a time range version based on the time period in which the production and processing data in the historical data object is generated. These time periods can be the time periods corresponding to a shift, a job plan or a production cycle. The user can customize the start time and end time of the time range version, and the generated historical data needs to satisfy the timestamp falling within the time range, thereby enabling the user to manage the data in a refined manner.

[0072] Optionally, in one possible implementation, when adding production data, it is determined whether the first timestamp corresponding to the time of adding the production data is within the time period corresponding to the start time and the end time, and when the first timestamp is within the time period corresponding to the start time and the end time, the production data within the first time range version is managed according to the first historical data object, the first time range version and the first timestamp; when the first timestamp is not within the time period corresponding to the start time and the end time, a prompt message is output to indicate that the production data addition has failed.

[0073] Combine the following Figure 3 A specific implementation method of managing the production data within the first time range version according to the first historical data object, the first time range version and the first timestamp in step S202 is described in detail.

[0074] Figure 3 The process of the data management method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, according to the first historical data object, the first time range version and the first timestamp, a specific implementation method for managing the production data within the first time range version may include the following steps:

[0075] S301 : Determine a data storage area corresponding to a first historical data object based on a mapping relationship between historical data objects and data storage areas and according to a first historical data object.

[0076] Exemplarily, the mapping relationship between the historical data objects and the data storage areas may be a mapping relationship between historical data object identifiers and data storage area identifiers, such as historical data object 1 corresponds to data storage area 1, historical data object 2 corresponds to data storage area 2, and so on.

[0077] In a possible implementation, the data storage area corresponding to the first historical data object may be determined based on a mapping relationship between the historical data object and the data storage area and according to an identifier of the first historical data object.

[0078] The relationship between historical data objects and data storage areas is the same as above Figure 1 The above is similar to what is shown in the figure and will not be repeated here.

[0079] S302: Based on the mapping relationship between the time range version and the data storage slice, according to the first time range version, determine in the data storage area the data storage slice corresponding to the first time range version.

[0080] Exemplarily, the mapping relationship between the time range version and the data storage slice may be a mapping relationship between the time range version identifier and the data storage slice identifier, such as time range version 1 corresponds to data storage slice 1, time range version 2 corresponds to data storage slice 2, and so on.

[0081] In a possible implementation, based on a mapping relationship between time range versions and data storage slices and according to an identifier of the first time range version, a data storage slice corresponding to the first time range version may be determined in a data storage area corresponding to the first historical data object.

[0082] The relationship between the data store and the data store slice, and the relationship between the time range version and the data store slice are the same as above. Figure 1 The above is similar to what is shown in the figure and will not be repeated here.

[0083] S303: Store the production data in the first time range version in the data storage slice according to the first timestamp.

[0084] Exemplarily, the production data within the first time range version is sorted in the order of the corresponding first timestamps, and the production data is stored in the data storage blocks contained in the data storage slice in sequence, so that under the same historical data object, the production data within the same time range version is stored in the order of adjacent time, thereby achieving a clustered storage effect for the production data, and then achieving rapid location of the production data when querying the production data, thereby improving query efficiency.

[0085] The relationship between the data storage slice and the data storage block is as described above Figure 1 As shown, no further description is given here.

[0086] Optionally, in a possible implementation, a first data storage block is obtained, which is a storage unit in the data storage slice, and the size of the first data storage block is fixed; for each production data within the first time range version, the production data are stored in the first data storage block in sequence according to the chronological order of the first timestamps corresponding to the production data, and when the first data storage block is full, the time range between the first timestamp corresponding to the start production data and the first timestamp corresponding to the end production data stored in the first data storage block is recorded.

[0087] For example, the size of the data storage block may be 2 M. In the data management method provided in the embodiment of the present application, the size of the data storage block is not limited, and the specific size may be determined according to actual application requirements.

[0088] Exemplarily, the time range may be expressed as T0-T1.

[0089] Exemplarily, when the production data within the first time range version is stored in the data storage slice according to the first timestamp, the system will first apply for a data storage block to store the production data, and when the data storage block is full, record the range of the timestamp in the data storage block, and at the same time, apply for the next data storage block to continue storing the production data.

[0090] Optionally, if the first data storage block is full, the second data storage block is obtained, and the production data is stored in the second data storage block in the order of the first timestamps corresponding to the production data not stored in the time range version.

[0091] It can be understood that the production data within a time range version can be stored in adjacent different data storage blocks in chronological order, and the specific number of data storage blocks can be determined according to the size of the production data within the first time range version, which is not limited in the embodiments of the present application.

[0092] In the embodiment of the present application, based on the mapping relationship between the historical data object and the data storage area, according to the first historical data object, the data storage area corresponding to the first historical data object is determined, based on the mapping relationship between the time range version and the data storage slice, according to the first time range version, the data storage slice corresponding to the first time range version is determined in the data storage area, and according to the first timestamp, the production data within the first time range version is stored in the data storage slice. In the embodiment of the present application, by partitioning, slicing and storing the production data within the first time range version, refined management of production data is achieved, and the difficulty of managing production data is reduced; at the same time, by storing the production data within the time range version according to the order of the timestamps corresponding to when the production data is added, a clustered storage effect of the production data is achieved, thereby achieving rapid location of data when querying, and improving data query efficiency.

[0093] In the process of industrial production, on the one hand, the historical data of industrial production cannot be tampered with at will, and on the other hand, there is a need to review and correct the production data, and this review and correction process is usually carried out according to an operation plan or a production cycle. Compared with the related art, some databases provide the function that historical data cannot be modified, but most databases do not have this function, and can only be indirectly realized by configuring permissions or secondary development at the application layer. In the data management method provided in the embodiment of the present application, the function that historical data cannot be modified is realized by configuring the release function for the time range version contained in the historical data object. Optionally, a possible implementation method may be: determine the data status of the data storage slice, if the data status is unpublished, then allow the production data in the data storage slice to be corrected; if the response data status is published, refuse to correct the production data in the data storage slice.

[0094] It can be understood that the data storage slice is the above-mentioned data storage slice for storing production data within the first time range version.

[0095] Exemplarily, the system can maintain a publishing status for each time range version contained in the historical data object, and record the publishing status in the metadata in the data storage slice. When the user adds, deletes or modifies historical data, the system first determines the data status of the data storage slice where the historical data is located, and when the data status is unpublished, the system allows the user to add, delete or modify the production data in the data storage slice, so that the user can correct erroneous data during the review of production data; when the data status is published, the user is denied to modify the production data in the data storage slice.

[0096] It is understandable that after the user corrects the data in the data storage slice whose data status is unpublished, the user can choose to publish the time range version to change the data status of the corresponding data storage slice to published.

[0097] Optionally, in response to receiving a publishing request for a first time range version, the first time range version is published, and the data state of the data storage slice is changed to published, and the production data stored in the data storage slice is changed to a read-only state.

[0098] Optionally, the initial status of a newly created time range version can be set to unpublished.

[0099] It is understandable that in the data management method provided by the embodiment of the present application, by configuring the publishing function for the time range version included in the historical data object, the user can modify the production data within the unpublished time range version at will, and the production data within the published time range version cannot be modified at will. At the same time, for the production data within the unpublished time range version, after the user confirms that the production data is correct, the user can choose to publish the time range version, and after the time range version is published, the production data within the time version range cannot be modified, thereby realizing the function of not being able to modify historical data.

[0100] Combine the following Figure 4 In the data management method provided in the embodiment of the present application, the implementation method of the data query mechanism is described in detail.

[0101] Figure 4 The process of the data management method provided in the embodiment of the present application Figure 3 .like Figure 4 As shown, the specific implementation of the data management method may include the following steps:

[0102] S401: Obtain a second timestamp, where the second timestamp is a timestamp included in a second time range version of a second historical data object.

[0103] Exemplarily, the second timestamp may be a timestamp included in a second time range version of a second historical data object specified by a user when performing a data query.

[0104] Exemplarily, the second historical data object is created in a manner similar to that described above, which will not be described in detail here.

[0105] The relationship between the second historical data object and the second time range version is similar to the above and will not be repeated here.

[0106] S402: Determine a data storage area corresponding to the second historical data object based on a mapping relationship between the historical data object and the data storage area and according to the second historical data object.

[0107] The specific implementation method is similar to the above and will not be repeated here.

[0108] S403: Based on the mapping relationship between the time range version and the data storage slice, determine the data storage slice corresponding to the second time range version according to the second time range version.

[0109] The specific implementation method is similar to the above and will not be repeated here.

[0110] S404: Based on the mapping relationship between the data storage slices and the data storage blocks, determine a data storage block set according to the data storage slices.

[0111] It is understandable that a data storage slice may include multiple data storage blocks.

[0112] The data storage block set includes all data storage blocks used to store production data within the second time range version.

[0113] S405 , determining a third data storage block including a second timestamp in the data storage block set, and obtaining target production data by querying from the third data storage block.

[0114] It is understandable that when the production data is stored based on the data storage block, when the data storage block is full, the time range between the timestamp corresponding to the start production data and the timestamp corresponding to the end production data in the data storage block will be recorded. Therefore, when querying the production data, the third data storage block where the second timestamp is located can be determined according to the time range recorded in the data storage block, so as to read and parse the target production data from the third data storage block.

[0115] In an embodiment of the present application, by obtaining a second timestamp contained in a second time range version of a second historical data object, based on a mapping relationship between the historical data object and the data storage area, according to the second historical data object, the data storage area corresponding to the second historical data object is determined, based on a mapping relationship between the time range version and the data storage slice, according to the second time range version, the data storage slice corresponding to the second time range version is determined, based on a mapping relationship between the data storage slice and the data storage block, according to the data storage slice, a data storage block set is determined, a third data storage block containing the second timestamp is determined in the data storage block set, and the target production data is obtained by querying from the third data storage block. In an embodiment of the present application, when querying production data, by sequentially determining the data storage area according to the historical data object to be queried, determining the data storage slice according to the time range version to be queried, determining the data storage block set according to the data storage slice, and determining the data storage block by the timestamp to be queried, the data storage block to be queried is realized to quickly locate the data storage block where the production data to be queried is located, thereby improving data query efficiency.

[0116] In summary, the beneficial effects that can be achieved by the embodiments of the present application are as follows:

[0117] 1) By creating a time range version according to the preset time period of the production task contained in the historical data object, the production data under a historical data object can be divided and managed in a refined manner;

[0118] 2) By organizing and storing the production data of historical data objects in the production process according to the time range version of the historical data objects, the data within the same time range version can be clustered;

[0119] 3) By configuring the release function for the time range version and making the production data in the released time range version read-only, the function of preventing historical data from being modified is achieved.

[0120] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0121] Figure 5 This is a schematic diagram of the structure of a data management device provided in one embodiment of the present application. Figure 5 As shown, the data management device 50 provided in this embodiment includes an acquisition module 510 and a management module 520 .

[0122] The acquisition module 510 is used to acquire a first time range version upon detecting that production data is added to the first historical data object, where the first time range version is created according to a preset time period corresponding to the target production task included in the first historical data object, and the first time range version includes a start time and an end time;

[0123] The management module 520 is used to manage the production data in the first time range version according to the first historical data object, the first time range version and the first timestamp when the first timestamp corresponding to the added production data is within the time period corresponding to the start time and the end time.

[0124] In one possible implementation, the management module 520 is specifically used to: based on the mapping relationship between the historical data object and the data storage area, determine the data storage area corresponding to the historical data object according to the first historical data object; based on the mapping relationship between the time range version and the data storage slice, determine the data storage slice corresponding to the first time range version in the data storage area according to the first time range version; based on the first timestamp, store the production data within the first time range version in the data storage slice.

[0125] In a possible implementation, the management module 520 is also used to: obtain a first data storage block, which is a storage unit in the data storage slice and has a fixed size; for each production data in the first time range version, store the production data in the first data storage block in sequence according to the order of the first timestamps corresponding to the production data, and when the first data storage block is full, record the time range between the first timestamp corresponding to the start production data and the first timestamp corresponding to the end production data stored in the first data storage block.

[0126] In a possible implementation, the management module 520 is also used to: when the first data storage block is full, obtain the second data storage block, and store the production data in the second data storage block in the order of the first timestamps corresponding to the production data not stored in the first time range version.

[0127] In one possible implementation, the data management device also includes a correction module (not shown), which is used to: determine the data status of the data storage slice; if the data status is unpublished, allow correction processing of the production data in the data storage slice; if the data status is published, refuse to correct the production data in the data storage slice.

[0128] In one possible implementation, the data management device also includes a publishing module (not shown), which is used to: when receiving a publishing request for a first time range version, publish the first time range version, change the data status of the data storage slice to published, and change the production data stored in the data storage slice to a read-only state.

[0129] In a possible implementation, the data management device also includes a query module (not shown), which is used to: obtain a second timestamp, which is a timestamp contained in a second time range version of the second historical data object; based on a mapping relationship between the historical data object and the data storage area, determine the data storage area corresponding to the second historical data object according to the second historical data object; based on a mapping relationship between the time range version and the data storage slice, determine the data storage slice corresponding to the second time range version according to the second time range version; based on a mapping relationship between the data storage slice and the data storage block, determine a data storage block set according to the data storage slice; determine a third data storage block containing the second timestamp in the data storage block set, and query the target production data from the third data storage block.

[0130] The data management device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.

[0131] Figure 6 This is a schematic diagram of the structure of a data management device provided in one embodiment of the present application. Figure 6 As shown, the data management device 60 provided in this embodiment includes: at least one processor 601 and a memory 602 .

[0132] Optionally, the data management device 60 further includes a communication interface 603 and a system bus 604 .

[0133] The memory 602 and the communication interface 603 are connected to the processor 601 via the system bus 604 and communicate with each other. The memory 602 is used to store instructions, and the communication interface 603 is used to communicate with other devices.

[0134] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.

[0135] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0136] In the above-mentioned embodiment, it should be understood that the processor 601 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can be any conventional processor, etc. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0137] The memory 602 may include a high-speed memory (Random Access Memory, RAM for short), and may also include a non-volatile memory (NVM for short), such as at least one disk memory.

[0138] The system bus 604 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus 604 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the system bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0139] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0140] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0141] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0142] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0143] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0145] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0146] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0147] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0148] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A data management method, characterized in that: include: In response to detecting that production data is added to the first historical data object, obtaining a first time range version, the first time range version being created according to a preset time period corresponding to a target production task included in the first historical data object, the first time range version including a start time and an end time; When the first timestamp corresponding to the adding of the production data is within the time period corresponding to the start time and the end time, the production data within the first time range version is managed according to the first historical data object, the first time range version and the first timestamp.

2. The data management method according to claim 1, characterized in that: The managing the production data in the first time range version according to the first historical data object, the first time range version and the first timestamp includes: Based on the mapping relationship between the historical data objects and the data storage area, determining the data storage area corresponding to the first historical data object according to the first historical data object; Based on a mapping relationship between time range versions and data storage slices, according to the first time range version, determining in the data storage area a data storage slice corresponding to the first time range version; According to the first timestamp, the production data within the first time range version is stored in the data storage slice.

3. The data management method according to claim 2, characterized in that: The storing, according to the first timestamp, the production data within the first time range version in the data storage slice includes: Acquire a first data storage block, where the first data storage block is a storage unit in the data storage slice, and the size of the first data storage block is fixed; For each production data within the first time range version, the production data are stored in the first data storage block in sequence according to the chronological order of the first timestamps corresponding to the production data, and when the first data storage block is full, the time range between the first timestamp corresponding to the start production data and the first timestamp corresponding to the end production data stored in the first data storage block is recorded.

4. The data management method according to claim 3, characterized in that: Also includes: If the first data storage block is full, a second data storage block is obtained, and the production data is stored in the second data storage block in the order of the first timestamps corresponding to the production data not stored in the first time range version.

5. The data management method according to any one of claims 1 to 4, characterized in that: Also includes: Determine the data status of the data storage slice; If the data status is unpublished, it is allowed to modify the production data in the data storage chip; If the data status is in response to being released, the production data in the data storage chip is rejected for modification.

6. The data management method according to claim 5, characterized in that: Also includes: In response to receiving a publishing request for a first time range version, the first time range version is published, the data state of the data storage slice is changed to published, and the production data stored in the data storage slice is changed to a read-only state.

7. The data management method according to any one of claims 1 to 4, characterized in that: Also includes: Obtaining a second timestamp, where the second timestamp is a timestamp included in a second time range version of the second historical data object; Based on the mapping relationship between the historical data object and the data storage area, determining the data storage area corresponding to the second historical data object according to the second historical data object; Based on the mapping relationship between the time range version and the data storage slice, determine the data storage slice corresponding to the second time range version according to the second time range version; Based on a mapping relationship between a data storage slice and a data storage block, determining a data storage block set according to the data storage slice; A third data storage block including the second timestamp is determined in the data storage block set, and target production data is obtained by querying from the third data storage block.

8. A data management device, characterized in that: include: an acquisition module, configured to acquire a first time range version when detecting that production data is added to a first historical data object, wherein the first time range version is created according to a preset time period corresponding to a target production task included in the first historical data object, and the first time range version includes a start time and an end time; A management module is used to manage the production data within the first time range version according to the first historical data object, the first time range version and the first timestamp when the first timestamp corresponding to the added production data is within the time period corresponding to the start time and the end time.

9. A data management device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory is used to store instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed.