A data query method, apparatus, device and storage medium

By storing metadata and content versions independently in the storage space and returning results by matching and combining them according to query conditions, the problem that low-code platforms cannot save multiple versions is solved, and historical version querying and display of metadata and content are realized.

CN117112652BActive Publication Date: 2026-05-26RENLIJIA NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
RENLIJIA NETWORK TECH CO LTD
Filing Date
2023-09-22
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Low-code platforms cannot save metadata and content for multiple versions, making it impossible to trace the content change process and query historical versions.

Method used

The system independently stores metadata and content versions in the storage space. By receiving data query requests, it matches the target metadata version and content version according to the query conditions and returns the combined version.

Benefits of technology

It enables the coexistence of historical versions of metadata and content, and allows for queries accurate to the effective date, ensuring accurate querying and display of metadata and content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117112652B_ABST
    Figure CN117112652B_ABST
Patent Text Reader

Abstract

This specification provides a data query method, apparatus, device, and storage medium. The method includes: receiving a data query request for a storage space, wherein the storage space stores metadata of multiple metadata versions and content of multiple content versions corresponding to at least one object; wherein the metadata of the multiple metadata versions corresponds to different metadata effective dates, and the content of the multiple content versions corresponds to different content effective dates; querying the storage space for metadata of a target metadata version and content of a target content version that match the query conditions indicated by the data query request; and combining and returning the metadata of the target metadata version and the content of the target content version.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a data query method, apparatus, device, and storage medium. Background Technology

[0002] Metadata typically refers to data that describes content. When content is manipulated, modified, or updated, the corresponding metadata also changes, resulting in multiple different versions of content and metadata. In other words, different versions of metadata and content record the modification history and contain different content and metadata. If content lacks a versioning concept, it's impossible to trace the content's change process; conversely, if metadata lacks a versioning concept, changes to metadata can lead to direct changes in the presentation layer even if the content itself remains unchanged.

[0003] Currently, many low-code platforms, while logging content changes, fail to store multiple versions of content because updated data overwrites earlier data. Furthermore, low-code platforms do not record metadata changes that occur alongside content updates, making it impossible to store multiple versions of metadata and content. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this specification provides a data query method, apparatus, device, and storage medium.

[0005] According to a first aspect of the embodiments of this specification, a data query method is provided, the method comprising:

[0006] Receive a data query request for a storage space, wherein the storage space stores metadata for at least one object in multiple metadata versions and content for multiple content versions; wherein the metadata for the multiple metadata versions corresponds to different metadata effective dates, and the content for the multiple content versions corresponds to different content effective dates;

[0007] Based on the query conditions indicated by the data query request, retrieve the metadata of the target metadata version and the content of the target content version that match the query conditions from the storage space;

[0008] Combine the metadata of the target metadata version and the content of the target content version and return them.

[0009] According to a second aspect of the embodiments of this specification, a data query apparatus is provided, the apparatus comprising:

[0010] A query unit is used to receive data query requests for a storage space, wherein the storage space stores metadata for at least one object in multiple metadata versions and content for multiple content versions; wherein the metadata for the multiple metadata versions corresponds to different metadata effective dates, and the content for the multiple content versions corresponds to different content effective dates;

[0011] The matching unit is used to query the target metadata version and the target content version from the storage space according to the query conditions indicated by the data query request.

[0012] The combination unit is used to combine the metadata of the target metadata version and the content of the target content version and return them.

[0013] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising:

[0014] processor;

[0015] Memory used to store processor-executable instructions;

[0016] The processor executes the executable instructions to implement the method described in the embodiments of the first aspect above.

[0017] According to a fourth aspect of the embodiments of this specification, a machine-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the embodiments of the first aspect above.

[0018] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:

[0019] In the embodiments of this specification, the storage space stores metadata for at least one object in multiple metadata versions and content for multiple content versions. The metadata for the multiple metadata versions corresponds to different metadata effective dates, and the content for the multiple content versions corresponds to different content effective dates. By receiving a data query request for the storage space, the storage space queries the metadata for the target metadata version and the content for the target content version that match the query conditions. The query results are then returned after being combined. This versioning of the metadata and content is accurate to the effective date, realizing the coexistence of historical versions of metadata and content, as well as the accurate querying of the metadata for the target metadata version and the content for the target content version.

[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0022] Figure 1 This is a flowchart illustrating a data query method according to an exemplary embodiment of this specification.

[0023] Figure 2 This is a schematic diagram illustrating the storage of metadata and content according to an exemplary embodiment of this specification.

[0024] Figure 3A This is a schematic diagram illustrating a version of metadata according to an exemplary embodiment of this specification.

[0025] Figure 3B This is a schematic diagram illustrating a version of the content of this specification according to an exemplary embodiment.

[0026] Figure 4 This is a schematic diagram illustrating combined data according to an exemplary embodiment of this specification.

[0027] Figure 5 This is a schematic diagram illustrating a secondary content display according to an exemplary embodiment of this specification.

[0028] Figure 6 This is a block diagram illustrating a data query device according to an exemplary embodiment of this specification.

[0029] Figure 7 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of this specification. Detailed Implementation

[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0031] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0032] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0033] First, the terms and concepts used in one or more embodiments of this specification will be explained in detail.

[0034] Metadata: refers to data that describes content.

[0035] Objects: can be data of any format or category (e.g., documents, applications, audio, video, or image files).

[0036] Multi-version metadata and multi-version content refer to the existence of multiple different versions of metadata and content after operations, changes, or updates.

[0037] For example, suppose we have an image. If the size of the image is 100*200, then "100*200" is the content of the image, and "image size" is the metadata describing the content "100*200". The image itself is an object.

[0038] If the image size is changed from "100*200" to "10*20", then the image content exists in two versions: the first version is the original "100*200" content, and the second version is the changed "10*20" content. The time of this change is called the effective time. If content does not have a versioning concept, it is impossible to trace the content change process; that is, after the content is modified, the changed content data will overwrite the original data, and the original data cannot be restored.

[0039] Similarly, if the metadata of an image is changed, for example, by adding metadata such as "image pixels" and correspondingly adding the content described by that metadata, then the image's metadata will have two versions. The first version contains the content of "image dimensions" before the change, and the second version contains the content of "image dimensions" and "image pixels" after the change. If the metadata does not have a versioning concept, the content will change directly in the presentation layer after the metadata is changed, even if the metadata itself has not been modified.

[0040] Using the example above, for the metadata and content of the first version of an object, there are metadata such as "image size" and "image pixels." The metadata "image size" contains content, but the metadata "image pixels" does not contain any description. That is, when restoring the metadata and content of the first version of the object, only the content is traced back, while changes to the metadata are retained in the data of every version of the object.

[0041] Currently, many low-code platforms can store metadata and content, but they can only record changes to content through logs, such as "on a certain day, '100*200' was changed to '10*20'." They cannot trace back to the content before the change, nor do they record changes to metadata that occur along with the content. They cannot save multiple versions of content and multiple versions of metadata at the same time, thus making it impossible to query metadata and content from previous versions.

[0042] Therefore, this specification provides a data query method that can solve the technical problems existing in related technologies.

[0043] The embodiments described in this specification will now be described in detail.

[0044] like Figure 1 As shown, Figure 1 This is a flowchart illustrating a data query method according to an exemplary embodiment, specifically including the following steps:

[0045] S101, Receive a data query request for the storage space, wherein the storage space stores metadata of multiple metadata versions corresponding to at least one object and content of multiple content versions; wherein the metadata of the multiple metadata versions corresponds to different metadata effective dates, and the content of the multiple content versions corresponds to different content effective dates.

[0046] In one exemplary embodiment, the storage space includes a metadata storage space and a content storage space that are independent of each other. The metadata storage space is used to store metadata for each version, and the content storage space is used to store content for each version. Specifically, the metadata and content for each version can be stored independently in two separate databases. By updating and storing the metadata and content for each version independently, version changes are accurately recorded.

[0047] In the embodiments of this specification, the storage space stores at least one object, which represents a concept without specific actual data, such as "employee" or "department". Conversely, the embodiments of this specification also propose the concept of an object instance, which is an instance of a certain object that possesses specific individual data, such as "employee A", "employee B", or "department 1", "department 2", etc.

[0048] In the storage space, the metadata or content of each object will be recorded separately for each new version of the metadata and content generated after the changes. The metadata and content are not stored together, but are stored separately as metadata of the metadata version and content of the content version.

[0049] Each version's metadata and content are associated with the effective date of their respective changes. Specifically, the metadata of each version is stored corresponding to its metadata effective date, and the metadata of multiple metadata versions corresponds to different metadata effective dates. Similarly, the content of each content version is stored corresponding to its content effective date, and the content of multiple content versions corresponds to different content effective dates.

[0050] Figure 2 This is a schematic diagram illustrating the storage of metadata and content according to an exemplary embodiment of this specification. In this embodiment, since the metadata of different object instances under the same object is identical when the metadata effective date is the same, they can be regarded as metadata of the same metadata version to save storage space. Figure 2 As shown in the metadata storage space section, the storage space stores metadata for multiple metadata versions corresponding to object A and object B under different metadata effective dates, rather than metadata for multiple metadata versions corresponding to specific object instances.

[0051] In the embodiments of this specification, the content contained in different objects is stored and recorded independently. Different objects correspond to different content records, which can be recorded using methods such as memory tables, to store all content versions of all object instances corresponding to the object. Figure 2 As shown in the content storage space section, the storage space independently stores the content of objects A and B. Specifically, the content records for objects A and B respectively store multiple content versions corresponding to object instances A1, A2 and B1, B2. The content records for objects A and B can be a table, a folder, or other storage space that can centrally store multiple content versions; this specification does not impose any limitations on this.

[0052] Figure 3AThis is a schematic diagram illustrating a metadata version according to an exemplary embodiment of this specification. A metadata version stores data description information of an object as of a certain effective date, along with corresponding attribute information, content restoration formulas, and type information. Each metadata version stores the effective date corresponding to that metadata version. For example, such as... Figure 3A The metadata version shown is specifically employee metadata version 1, with the object being employees and the effective date being 2023-07-07. Figure 3A It can be seen that the object "employee" has six data description information items, which correspond to different attribute information, content restoration formulas, and type information. Among them, the data description information is used to describe the data values ​​in the content of the target content version, the attribute information is used to combine the metadata of the target metadata version and the content of the target content version, the content restoration formula is used to calculate the final data value, and the type information is used to distinguish the types of data values ​​and to perform data format conversion.

[0053] Figure 3B This is a schematic diagram illustrating content versions according to an exemplary embodiment of this specification. In this embodiment, the same object corresponds to multiple different object instances, and the different content versions corresponding to the object instances are all centrally stored in the content record corresponding to the object. A content version stores the data value of an object instance on a certain effective date and the attribute information corresponding to the data value, wherein each object instance has a unique identifier, i.e., ID. Simultaneously, each content version stores the content effective date corresponding to that content version. For example, such as... Figure 3B As shown, Figure 3B The system stores three different content versions, specifically including two object instances corresponding to the object "Employee": "Employee A" and "Employee B". "Employee A" stores two versions of content data, each corresponding to a different effective date. The object instances "Employee A" and "Employee B" are respectively assigned unique identifiers "Employee_AAA" and "Employee_BBB", with a prefix in the unique identifier pointing to the object corresponding to that instance. In this embodiment, some data values ​​need to be combined and calculated using a content restoration formula. Therefore, there are cases where some data values ​​are not displayed in the content versions, such as attribute B not being displayed because the data is yet to be calculated; and cases where only the initial data values ​​are displayed, such as attribute F displaying the original object instance ID because the content has not been restored.

[0054] As can be seen from the foregoing, the storage space contains metadata for multiple metadata versions and content for multiple content versions corresponding to different effective dates. Specifically, when a user modifies the metadata for a certain metadata version or the content for a certain content version of an existing object, a new version of metadata or content corresponding to the effective date will be added to the storage space when the modification takes effect. Every modification to metadata or content is recorded in the storage space, thereby enabling the coexistence of multiple metadata versions and multiple content versions.

[0055] In an exemplary embodiment, the granularity of the effective date corresponding to the metadata version and the content version can be accurate to a certain day. If a user makes two consecutive modifications to the metadata of a certain metadata version or the content of a certain content version on the same day, the storage space will store the new metadata of the new metadata version or the content of the new content version corresponding to the two modifications, and record the effective date as the same day. That is, the same object can also store multiple versions of metadata or content under the same effective date.

[0056] In one exemplary embodiment, taking the addition of a new metadata version as an example, before the user makes an edit, the metadata in the metadata version that the user wants to edit is copied. Then, the user modifies the metadata in the copied metadata version, and the new metadata version is obtained after modification. The user sets the effective date of the new metadata version. When the effective date is reached, the metadata of the new metadata version is stored in the storage space, corresponding to the effective date. The effective date can be set by the user according to their needs.

[0057] When a user modifies a version of content, such as Figure 3B As shown, assuming a user changes the data value of attribute D in employee A's content version 1 from "2000" to "2001" on the date 2023-07-08, a new content version 2 of employee A with the modified data value will be added to the content record of the employee object. Since the specific process of adding a content version is the same as the process of adding a metadata version, it will not be described in detail here.

[0058] It should be noted that in the embodiments described in this specification, since the metadata and content are not stored together, the metadata and content will not affect each other when a new version is added after editing. That is, if only the metadata is edited, the metadata will have a new version, while the version of the content will not change.

[0059] Through the above scheme, the embodiments of this specification realize the coexistence of multiple versions of metadata and multiple versions of content. The versioned data can be accurate to the specific effective date, making the stored metadata and content more comprehensive.

[0060] S102, based on the query conditions indicated by the data query request, query the storage space for the metadata of the target metadata version and the content of the target content version that match the query conditions.

[0061] In one exemplary embodiment, the query conditions include at least one of the following: information about the target object instance, and the target time. In the storage space, metadata from multiple metadata versions and content from multiple content versions can be associated through the object corresponding to each metadata or content version, or the effective date of the change. The query processes corresponding to different query conditions are not the same.

[0062] If the query conditions include information about the target object instance, then the metadata of the target metadata version includes the metadata of all metadata versions corresponding to the effective date of the target object instance, and the content of the target content version includes the content of all versions belonging to the target object instance. Querying the target object instance involves two cases:

[0063] (1) Query all object instances corresponding to the target object instance.

[0064] For example, if the information of the target object instance is the information of the object "employee", then it is necessary to query the metadata of the target metadata version and the content of the target content version of all object instances under the object "employee".

[0065] Specifically, in one exemplary embodiment, the user can specify a target object in the query interface to send a data query request. For example, the query interface can be set up with an option pool containing all objects, and the target object can be selected by scrolling through the query; or the target object can be directly selected by setting up a menu bar containing all objects in the main interface. This specification does not limit this approach.

[0066] When a user specifies a target object, the server obtains the target object's information, queries the target object from the metadata storage space, retrieves the metadata of all metadata versions of the target object under all effective dates, and selects the metadata of the metadata version with the latest effective date as the metadata of the target metadata version.

[0067] The content storage space is queried for content versions of all object instances corresponding to the target object with different effective dates. All content versions stored in the content record of the target object in the content storage space are retrieved. If an object instance has multiple content versions for the same effective date, the latest content version is selected as the target content version for that object instance on the current effective date.

[0068] by Figure 2 For example, assuming the target object is object A, the metadata of the target metadata version of object A obtained by querying is the metadata of the latest effective date among the metadata versions 1 to 4 of object A in the metadata storage space; the target content version of object A obtained by querying is the content versions 1 to 2 of object instance A1 and the content versions 1 to 2 of object instance A2 in the content records of object A.

[0069] (2) Query one or more object instances corresponding to a target object, wherein the plurality of objects is less than the total number of object instances corresponding to the target object.

[0070] For example, if the information of the target object instance is the information of the object instance "Employee A", then it is necessary to query the metadata of the target metadata version and the content of the target content version of the object instance "Employee A".

[0071] Specifically, in an exemplary embodiment, a user can send a data query request by inputting the unique identifier information of an object instance, wherein the prefix in the unique identifier information can be used to point to the object corresponding to the object instance.

[0072] When a user enters the unique identifier of an object instance, the server obtains the information of the target object corresponding to the target object instance, queries the target object from the metadata storage space, obtains the metadata of all effective dates of the target object, and selects the metadata of the latest effective date of the metadata version as the metadata of the target metadata version.

[0073] The content storage space is queried for different effective dates of the target object instance to obtain the content of the content version corresponding to different effective dates of the target object instance, and this content is used as the content of the target content version. If there is more than one content version corresponding to a certain effective date, the content of the content version with the latest modification time is selected as the content of the target content version under that effective date.

[0074] by Figure 2 For example, assuming the target object instance is object instance A1, the metadata of the target metadata version of object instance A1 obtained by querying is the metadata of the latest effective date among the metadata versions 1 to 4 of object A metadata in the metadata storage space; the target content version of object instance A1 obtained by querying is the content version 1 to 2 of object instance A1 in the content record of object A.

[0075] If the query condition includes a target time, then the metadata of the target metadata version includes metadata whose effective date is closest to but not later than the target time, and the content of the target content version includes content whose effective date is not later than the target time.

[0076] For example, when the query conditions include time information, such as "2023-07-09", the query needs to retrieve the metadata of all objects with an effective date of "2023-07-09" and the content of all object instances with an effective date of "2023-07-09". If no metadata or content version corresponding to the effective date exists in the storage space, the metadata and content of the metadata version closest to but not later than the target time will be used as the metadata of the target metadata version and the content of the target content version. For instance, if the query finds that no metadata version corresponding to the target time "2023-07-09" exists in the metadata storage space, the target time will be pushed back to "2023-07-08" for further querying until the metadata of the corresponding metadata version with the same effective date as the target time is found.

[0077] Specifically, in an exemplary embodiment, a user can specify a target time in the query interface, for example, by selecting the target time in a search bar that includes year, month, and day options, with the time specified down to a specific day. Specifying the target time enables the sending of a data query request.

[0078] When the user specifies a target time, the system queries the metadata storage space for the target time, retrieves the metadata of the metadata version with the same effective date as the target time, and uses it as the metadata of the target metadata version.

[0079] The content storage space is queried for the target time, and the content of the corresponding version with the same effective date as the target time is retrieved. Based on the object corresponding to the content version, the content of all retrieved content versions is split into multiple content records corresponding to the object, and these are used as the content of the target content version.

[0080] Assuming the storage space only stores things like Figure 3A and Figure 3B The metadata version and content version shown are given. If the target time is "2023-07-07", then the metadata of the target metadata version is employee metadata version 1; the content of the target content version is employee A content version 1 and employee B content version 1.

[0081] In an exemplary embodiment, the data query request may simultaneously include the information of the target object instance and the target time, used to query the metadata and content corresponding to the target object instance at any given time. Specifically, firstly, the metadata of multiple metadata versions and the content of multiple content versions corresponding to the target object instance are queried. From the query results, the metadata of the target metadata version and the content of the target content version with the same effective date as the target time are then queried again. The specific processes for querying based on the target object instance and querying based on the target time are detailed in the aforementioned method and will not be repeated here.

[0082] In one exemplary embodiment, the metadata of the target metadata version and the content of the target content version can be correlated and queried through the connector, thereby enabling the backtracking of historical metadata versions and content versions, and allowing for quick querying of metadata in historical metadata versions and content in historical content versions.

[0083] In an exemplary embodiment, if the query conditions include information about a target object instance, the data query request further includes target data description information and target data value conditions, wherein the target data description information is any data description information in the metadata of the target metadata version corresponding to the target object instance;

[0084] Based on the target data description information, content versions whose data values ​​match the target data value conditions are selected as the target content version content, wherein the target data value conditions are the same as the attribute information corresponding to the target data description information.

[0085] In the embodiments of this specification, when it is necessary to query data that meets the data value conditions corresponding to a certain data description information, such as querying data of employees aged 18, a search engine is needed to query the content. The query conditions can be combined according to user needs. When multiple versions of content are stored in the database, a duplicate is stored in the search engine. Therefore, the search engine stores all versions of content, and each object has a corresponding content record.

[0086] Specifically, assuming the query satisfies the condition that the value corresponding to the data description information "age" is "=18", the user first specifies "employee" as the target object. When the search engine receives the query condition, it retrieves the metadata of the target metadata version from the metadata storage space, and obtains the attribute information, content restoration formula, and type information related to the data description information to be queried. The obtained information is "Attribute B", "Attribute E-Attribute D", and "Number" type. Based on the attribute information, the search engine determines the data value of each content version corresponding to "Attribute B" from the content records corresponding to "employee", performs content formula calculations to obtain field values, compares the obtained field values ​​of "Attribute B" corresponding to multiple content versions with the condition "=18", filters and records the content version IDs that meet the condition. The content version IDs are used to find the content of the target content version.

[0087] In one exemplary embodiment, the search engine may be a platform such as Elasticsearch or Solr used to implement search queries, and this specification does not limit this.

[0088] S103, combine the metadata of the target metadata version and the content of the target content version and return them.

[0089] After obtaining the metadata of the target metadata version and the content of the target content version that match the query conditions, the metadata of the target metadata version and the content of the target content version are combined, and the combined data is fed back to the user.

[0090] In one exemplary embodiment, such as Figure 3A As shown, in metadata versions, data description information and attribute information are corresponding; therefore, it can be deduced that the metadata of the target metadata version includes data description information and attribute information corresponding to the data description information. For example... Figure 3B As shown, in the content version, the data values ​​and attribute information are also corresponding. Therefore, it can be deduced that the content of the target content version includes data values ​​and attribute information corresponding to the data values.

[0091] Since the data description information and attribute information correspond in the metadata of the target metadata version, and the data values ​​and attribute information also correspond in the content of the target content version, the metadata of the target metadata version and the content of the target content version are grouped according to the attribute information, wherein each group of data contains data description information and data values ​​corresponding to the same attribute.

[0092] For example, such as Figure 3A As shown, the employee metadata version 1 includes attribute information, namely attribute A to attribute F, each attribute corresponding to different data description information; such as Figure 3BAs shown, each content version also includes attribute information, namely attributes A to F. Each attribute corresponds to a different data value. Assuming the target metadata version is employee metadata version 1 and the target content version is employee A content version 1, the data restoration information "name" and the data value "Zhang San" corresponding to attribute A in employee metadata version 1 and employee A content version 1 are combined respectively. Similarly, the data restoration information and data values ​​corresponding to the remaining attribute information are combined to obtain the following results: Figure 4 The combined data shown Figure 4 This is a schematic diagram illustrating combined data according to an exemplary embodiment of this specification. It should be noted that... Figure 4 The middle part is omitted Figure 3B The data obtained by combining content version 1 of employee B and content version 2 of employee A will be uniformly and centrally displayed in the actual display interface, taking the data values ​​from the multiple target content versions after being restored by the formula.

[0093] Specifically, in an exemplary embodiment, when any set of data, namely data reconstruction information and data values, is combined, it can be divided into the following two cases:

[0094] (1) If the data description information in any set of data does not contain the content restoration formula, then the data description information in any set of data is used as a field and the data value in any set of data is used as the field value for combination.

[0095] (2) If the data description information in any set of data contains a content restoration formula, then the data values ​​involved are determined from the content of the target content version according to the content restoration formula and calculated, and the data description information in any set of data is used as a field and the calculation result is used as a field value for combination.

[0096] The content restoration formula is used to calculate the final display result of the data values ​​during combination. Specifically, assuming the target metadata version is employee metadata version 1 and the target content version is employee A content version 1, then... Figure 3A It can be seen that the data description information corresponding to attributes A, C, and D does not include the content restoration formula, therefore... Figure 4 As shown, the field values ​​corresponding to attributes A, C, and D are... Figure 3B The data values ​​in the two datasets are the same.

[0097] In contrast, Figure 3AIn this context, if the data description information corresponding to attributes B, E, and F contains a content restoration formula, then the field values ​​need to be calculated using the content restoration formula before being combined. For example, when setting the data description information for "Supervisor," since the restored data description information is of object type, the data value stores a unique identifier corresponding to the object instance. Therefore, it is necessary to restore the data value of attribute A of the object instance, that is, to display the data value corresponding to attribute A of employee B, and the final field value is "Li Si". Then, by calculating the data values ​​corresponding to the two data description information "Current Year" and "Age", the following can be obtained: Figure 4 The specific field values ​​corresponding to attributes B, E, and F are shown. Users can set the content restoration formula according to their own needs; this manual does not impose restrictions on this.

[0098] By combining target metadata and target content, complete combined data is obtained. The final field values ​​are adjusted using content restoration formulas to accurately calculate data, eliminating the need for users to perform comparison calculations or manually input multiple data values ​​during storage, thus greatly improving the user experience.

[0099] In one exemplary embodiment, the user can specify display fields on the display interface to hide certain fields and their values, thereby centrally displaying the data that needs to be shown. Specifically, this can be achieved by setting a hide option for each field or by setting an option pool for fields and selecting the fields to be hidden. This specification does not limit the specific implementation scheme.

[0100] In one exemplary embodiment, the metadata includes type information corresponding to the data description information. This type information includes categories such as numbers, text, dates, options, files, and objects, which can be selected by the user. If any data description information in the metadata of the target metadata version is of type object, a unique identifier for that object is determined in the content of the target content version. This unique identifier is used as a query condition, and the query result is used as the secondary content corresponding to the group to which the data description information belongs. The secondary content is displayed after the field value corresponding to the group to which the data description information belongs is triggered.

[0101] For example, Figure 5 This is a schematic diagram illustrating a secondary content display according to an exemplary embodiment of this specification. For example... Figure 5As shown, in the combined data of object instance employee A (Zhang San), the field "Supervisor" before combination corresponds to object type data description information. The corresponding field value, before being restored to "Li Si," stores the unique identifier of object instance employee B. By performing a correlation query on the target metadata version and target content version of object instance employee B, the combined data of employee B can be obtained. This data can be specifically displayed on the data interface by triggering a details page. Users can trigger the employee B details information interface by clicking "Details" or moving the cursor to "Details." This achieves the function of quickly querying the specific data of related object instances without repeatedly entering conditions, improving the user experience.

[0102] In one exemplary embodiment, based on the type information corresponding to the data description information, different types of metadata and their corresponding content are processed in a logic processor, the data is restored using a content restoration formula, and the corresponding type format is converted by a converter for display.

[0103] In an exemplary embodiment, when displaying combined data, for each effective date corresponding to each displayed object instance, the historical and ineffective combined data of that object instance can be associated with the displayed combined data. Specifically, this can be stored as secondary content in the field values ​​of the displayed combined data. By triggering details, the combined data of a certain object instance under other effective dates can be viewed. Each associated combined data is a combination of metadata from the metadata version and content from the content version of that object instance under the same effective date. Specifically, combined data corresponding to an effective date can be displayed by allowing the user to specify the effective date.

[0104] In an exemplary embodiment, a user can input data description information and a sorting rule to arrange the retrieved combined data according to the sorting rule. For example, suppose the current interface displays combined data of all object instances of the object "Employee" under a certain effective date. When the user inputs the data description information "Name" and sets the corresponding sorting rule to "A to Z", the combined data of all object instances displayed on the current page will be rearranged according to the sorting rule for "Name", making the data more organized and easier for the user to browse.

[0105] It should be noted that the presentation format in the accompanying drawings is only one of the many presentation formats that can be implemented in the embodiments described herein. It can also be presented in the form of documents or other means. Those skilled in the art can choose the appropriate presentation format according to their needs, and this specification does not limit it.

[0106] In the embodiments of this specification, the storage space stores metadata for at least one object in multiple metadata versions and content for multiple content versions. The metadata for the multiple metadata versions corresponds to different metadata effective dates, and the content for the multiple content versions corresponds to different content effective dates. By receiving a data query request for the storage space, the storage space queries the metadata for the target metadata version and the content for the target content version that match the query conditions. The query results are then returned after being combined. This versioning of the metadata and content is accurate to the effective date, realizing the coexistence of historical versions of metadata and content, as well as the accurate querying of the metadata for the target metadata version and the content for the target content version.

[0107] Corresponding to the embodiments of the methods described above, this specification also provides embodiments of the apparatus.

[0108] like Figure 6 As shown, Figure 6 This is a block diagram illustrating a data query apparatus according to an exemplary embodiment of this specification, the apparatus comprising:

[0109] The query unit 601 is used to receive a data query request for a storage space, wherein the storage space stores metadata of multiple metadata versions corresponding to at least one object and content of multiple content versions; wherein the metadata of the multiple metadata versions corresponds to different metadata effective dates, and the content of the multiple content versions corresponds to different content effective dates;

[0110] The matching unit 602 is used to query the metadata of the target metadata version and the content of the target content version that match the query conditions indicated by the data query request from the storage space.

[0111] The combination unit 603 is used to combine the metadata of the target metadata version and the content of the target content version and return them.

[0112] In one exemplary embodiment, the storage space includes a metadata storage space and a content storage space that are independent of each other. The metadata storage space is used to store metadata for each version, and the content storage space is used to store content for each version.

[0113] In an exemplary embodiment, the query conditions include at least one of the following: information about the target object instance, and the target time; wherein:

[0114] If the query conditions include information about the target object instance, then the metadata of the target metadata version includes the metadata of all versions belonging to the target object instance, and the content of the target content version includes the content of all versions belonging to the target object instance.

[0115] If the query condition includes a target time, then the metadata of the target metadata version includes metadata whose effective date is closest to but not later than the target time, and the content of the target content version includes content whose effective date is not later than the target time.

[0116] In one exemplary embodiment, the metadata of the target metadata version includes data description information and attribute information corresponding to the data description information, and the content of the target content version includes data values ​​and attribute information corresponding to the data values;

[0117] The step of combining the metadata of the target metadata version and the content of the target content version includes:

[0118] The metadata of the target metadata version and the content of the target content version are grouped according to attribute information, wherein each group of data contains data description information and data values ​​corresponding to the same attribute;

[0119] Combine the data from each group separately.

[0120] In an exemplary embodiment, if the query conditions include information about a target object instance, the data query request further includes target data description information and target data value conditions, wherein the target data description information is any data description information in the metadata of the target metadata version corresponding to the target object instance;

[0121] Based on the target data description information, content versions whose data values ​​match the target data value conditions are selected as the target content version content, wherein the target data value conditions are the same as the attribute information corresponding to the target data description information.

[0122] In one exemplary embodiment, combining any set of data includes:

[0123] If the data description information in any set of data does not contain a content restoration formula, then the data description information in any set of data is used as a field and the data value in any set of data is used as a field value for combination.

[0124] If the data description information in any set of data contains a content restoration formula, then the data values ​​involved are determined from the content of the target content version according to the content restoration formula, and the data description information in any set of data is used as a field and the calculation result is used as a field value for combination.

[0125] In one exemplary embodiment, the metadata includes type information corresponding to the data description information, and the method further includes:

[0126] If any data description information in the metadata of the target metadata version is of type object, then a unique identifier for that object is determined in the content of the target content version. The unique identifier is used as the query condition to perform a query, and the query result is used as the secondary content corresponding to the group to which the data description information belongs.

[0127] The secondary content is displayed after the field value corresponding to the group to which any of the data description information belongs is triggered.

[0128] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0129] Figure 7 This is a schematic diagram illustrating the structure of an electronic device according to an exemplary embodiment of this specification. (Reference) Figure 7 At the hardware level, the electronic device includes a processor 701, an internal bus 702, a network interface 703, memory 704, and non-volatile memory 705, and may also include other hardware required for business operations. The processor 701 reads the corresponding computer program from the non-volatile memory 705 into the memory 704 and then runs it. Of course, in addition to software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0130] The apparatus or module described in the above embodiments can be implemented by a computer chip or entity, or by a product with a certain function. A typical implementation device is a computer, which can be a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0131] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a data query method as shown in any of the foregoing embodiments.

[0132] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0133] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0134] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0136] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A data query method, characterized in that, include: The system receives data query requests for storage space, which includes independent metadata storage space and content storage space. The storage space stores metadata for at least one object in multiple metadata versions and content for multiple content versions. The metadata for the multiple metadata versions corresponds to different metadata effective dates, and the content for the multiple content versions corresponds to different content effective dates. Based on the query conditions indicated by the data query request, the metadata of the target metadata version and the content of the target content version matching the query conditions are retrieved from the storage space. The metadata of the target metadata version includes data description information and attribute information corresponding to the data description information. The content of the target content version includes data values ​​and attribute information corresponding to the data values. A metadata version stores data description information of an object on a certain effective date, attribute information corresponding to the data description information, content restoration formula, and type information. Each metadata version stores the effective date corresponding to the metadata version. The data description information is used to describe the data values ​​in the content of the target content version. The attribute information is used to combine the metadata of the target metadata version and the content of the target content version. The content restoration formula is used to calculate the final data values. The type information is used to distinguish the types of data values ​​and to perform data format conversion. A content version stores data values ​​of an object instance on a certain effective date and attribute information corresponding to the data values. Each content version stores the effective date corresponding to the content version. Combining and returning the metadata of the target metadata version and the content of the target content version includes: grouping the metadata of the target metadata version and the content of the target content version according to attribute information, wherein each group of data contains data description information and data values ​​corresponding to the same attribute; combining each group of data separately; combining any group of data includes: if the data description information in any group of data does not contain a content restoration formula, then combining the data description information in any group of data as a field and the data values ​​in any group of data as field values; if the data description information in any group of data contains a content restoration formula, then calculating the relevant data values ​​from the content of the target content version according to the content restoration formula, and combining the data description information in any group of data as a field and the calculation result as field values.

2. The method according to claim 1, characterized in that, The metadata storage space is used to store metadata for each version, and the content storage space is used to store content for each version.

3. The method according to claim 1, characterized in that, The query conditions include at least one of the following: information about the target object instance, and the target time; wherein: If the query conditions include information about the target object instance, then the metadata of the target metadata version includes the metadata of all versions belonging to the target object instance, and the content of the target content version includes the content of all versions belonging to the target object instance. If the query condition includes a target time, then the metadata of the target metadata version includes metadata whose effective date is closest to but not later than the target time, and the content of the target content version includes content whose effective date is not later than the target time.

4. The method according to claim 1, characterized in that, If the query conditions include information about the target object instance, the data query request also includes target data description information and target data value conditions, wherein the target data description information is any data description information in the metadata of the target metadata version corresponding to the target object instance; Based on the target data description information, content versions whose data values ​​match the target data value conditions are selected as the target content version content, where the target data value conditions are the same as the attribute information corresponding to the target data description information.

5. The method according to claim 1, characterized in that, The metadata includes type information corresponding to the data description information, and the method further includes: If any data description information in the metadata of the target metadata version is of type object, then a unique identifier for that object is determined in the content of the target content version. The unique identifier is used as the query condition to perform a query, and the query result is used as the secondary content corresponding to the group to which the data description information belongs. The secondary content is displayed after the field value corresponding to the group to which any of the data description information belongs is triggered.

6. A data query device, characterized in that, include: A query unit is used to receive data query requests for a storage space, the storage space including a metadata storage space and a content storage space that are independent of each other. The storage space stores metadata of multiple metadata versions corresponding to at least one object and content of multiple content versions. The metadata of the multiple metadata versions corresponds to different metadata effective dates, and the content of the multiple content versions corresponds to different content effective dates. A matching unit is used to query the metadata of a target metadata version and the content of a target content version that match the query conditions indicated by the data query request from the storage space. The metadata of the target metadata version includes data description information and attribute information corresponding to the data description information. The content of the target content version includes data values ​​and attribute information corresponding to the data values. A metadata version stores data description information of an object on a certain effective date, attribute information corresponding to the data description information, content restoration formula, and type information. Each metadata version stores the effective date corresponding to the metadata version. The data description information is used to describe the data values ​​in the content of the target content version. The attribute information is used to combine the metadata of the target metadata version and the content of the target content version. The content restoration formula is used to calculate the final data values. The type information is used to distinguish the types of data values ​​and to perform data format conversion. A content version stores data values ​​of an object instance on a certain effective date and attribute information corresponding to the data values. Each content version stores the effective date corresponding to the content version. A combination unit is used to combine and return the metadata of the target metadata version and the content of the target content version, including: grouping the metadata of the target metadata version and the content of the target content version according to attribute information, wherein each group of data contains data description information and data values ​​corresponding to the same attribute; combining each group of data respectively; combining any group of data includes: if the data description information in any group of data does not contain a content restoration formula, then combining the data description information in any group of data as a field and the data values ​​in any group of data as field values; if the data description information in any group of data contains a content restoration formula, then calculating the relevant data values ​​from the content of the target content version according to the content restoration formula, and combining the data description information in any group of data as a field and the calculation result as field values.

7. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-5 by executing the executable instructions.

8. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-5.