Search

CN-122019528-A - PHP-based method for realizing dynamic storage of media asset cataloging metadata

CN122019528ACN 122019528 ACN122019528 ACN 122019528ACN-122019528-A

Abstract

The invention relates to the technical field of databases, in particular to a PHP-based method for dynamically storing media asset cataloging metadata, which comprises the steps of establishing a primary key ID field of a data table and setting a material index associated with media asset materials aiming at newly added metadata; and establishing an attribute table corresponding to the metadata according to the field information and organizing the attribute table into an attribute group table. Aiming at the problem that the metadata database in the prior art has poor performance in processing of multiple types of metadata, the effective organization of the metadata is realized by introducing the attribute table and the attribute group table, the dynamic configuration of the metadata structure is supported, the dynamic configuration of the metadata structure can be supported according to different service requirements without modifying codes, the support of the metadata structure of different types is improved, and the effective association of the metadata of multiple types is improved.

Inventors

  • PAN XINGYI

Assignees

  • 上海东方传媒技术有限公司

Dates

Publication Date
20260512
Application Date
20251217

Claims (9)

  1. 1. A method for dynamically storing media asset inventory metadata based on PHP, comprising a table creation process, wherein the table creation process comprises: A1, creating a main key ID field of a data table and setting a material index associated with media material aiming at newly added metadata; a2, extracting attribute information from the metadata, and configuring field information according to the attribute information; And A3, establishing an attribute table corresponding to the metadata according to the field information and organizing the attribute tables with similar attribute information into an attribute group table.
  2. 2. The method of claim 1, further comprising a table update process, the table update process comprising: Step B1, extracting the attribute information aiming at the newly added metadata, and sequentially matching the corresponding attribute group table and the attribute table according to the attribute information; step B2, extracting historical attribute configuration information from the original attribute table; And B3, modifying the historical attribute configuration information according to the attribute information, and storing the newly added metadata.
  3. 3. The method according to claim 1, wherein in the step A3, the attribute table includes an attribute ID, a field name, an attribute name, a data type, a component style, an attribute length, a controlled word ID, a creation time, and an update time; the attribute group table comprises an attribute group ID, an attribute group table name, an attribute group name, creation time and update time.
  4. 4. The method according to claim 1, wherein the step A2 comprises: a21, analyzing the metadata to obtain the attribute information; Step A22, creating corresponding service fields one by one according to the attribute information, and analyzing the data types corresponding to the service fields; and A23, adding the service field to the field information, and automatically mapping the corresponding field type according to the data type.
  5. 5. The method according to claim 1, wherein the step B3 comprises: b31, comparing the history attribute configuration information with the attribute information to confirm difference data; Step B32, matching corresponding updating strategies according to the difference data; the update strategy comprises a new attribute, a deletion attribute and a modification attribute; and step B33, modifying the difference data in turn according to the updating strategy, and storing the newly added metadata.
  6. 6. The method according to claim 5, wherein when the operation of deleting the attribute is triggered in the step B32, the step B33 includes: searching association information for the difference data, confirming whether the difference data has a sub-dependency relationship according to the association information, and deleting the difference data if the sub-dependency relationship does not exist; the child dependencies include whether referenced by any metadata category, contained by any property group, and whether there is a corresponding data record in the data table.
  7. 7. The method according to claim 2, wherein in the step B1, when matching to a plurality of the attribute group tables or the attribute tables, further comprising in performing the step B3: Step B031, opening a database transaction for the attribute group table or the attribute table and recording a modification action; step B032, after triggering the modification action, performing state check on the attribute group table or the attribute table, and retaining modification only when the operation result accords with the expectation; Step B033, returning to the step B032 until all the modification actions are executed.
  8. 8. The method of claim 1, further comprising a display process, the display process comprising: step C1, extracting the attribute information aiming at the attribute table, and matching corresponding controlled words from a controlled word dictionary according to the attribute information; Step C2, maintaining a controlled word list according to the controlled words, and establishing association relations between the controlled words and the attribute information; and step C3, generating a front-end label by adopting the controlled vocabulary and displaying the front-end label.
  9. 9. A storage medium comprising computer instructions which, when executed by a computer device, perform the method of any of claims 1-8.

Description

PHP-based method for realizing dynamic storage of media asset cataloging metadata Technical Field The invention relates to the technical field of databases, in particular to a PHP-based method for realizing dynamic storage of media asset inventory metadata. Background With the explosive growth of digital media content, media asset management systems have been widely used in the fields of broadcast television, new media, educational training, and the like. Metadata is used as core data for describing information such as media resource content, format, source and the like, and the management mode directly influences the flexibility and expandability of the whole system. With the explosive growth of digital media content, media asset management systems have been widely used in the fields of broadcast television, new media, educational training, and the like. Metadata is used as core data for describing information such as media resource content, format, source and the like, and the management mode directly influences the flexibility and expandability of the whole system. For example, patent document CN202211213840.7 discloses a metadata storage method, device and database. The method is applied to a database, the database comprises at least one storage group SG and a service interface, wherein the storage group SG is used for storing metadata, each SG is respectively paired with a plurality of storage nodes DSD, each SG comprises a main storage node, the main storage node is used for writing metadata sent by a client into the DSD paired with the SG, the method comprises the steps of determining storage service to which the metadata belong as target storage service, acquiring metadata storage consistency conditions set for the target storage service through the service interface, and sending a storage result used for representing that the metadata are successfully stored to the client through the main storage node if the metadata written into the DSD by the main storage node meet the metadata storage consistency conditions. The applicability of the database can be improved. As another example, patent document CN202080004394.1 discloses a system, method and apparatus for multi-level metadata organization in a database system. A system includes a plurality of shared storage devices that collectively store database data across a plurality of tables, each table including one or more micro-partitions that make up an immutable storage device. The system includes a resource manager configured to manage storage of database data stored in a table across one or more of the plurality of shared storage devices. The resource manager is configured to manage storage of metadata of the table. The metadata includes a column expression attribute having information about data stored in the column, a micro-partition expression attribute having information about data stored in the micro-partition, a packet expression attribute having information about data stored in two or more micro-partitions, and cumulative table metadata having global information about all micro-partitions of the table. However, in the practical implementation process, the inventor finds that the technical scheme affects the query performance aiming at the defects of inconsistent data, weak constraint of data types and the like of metadata with unfixed structure, large data quantity and various types. Disclosure of Invention Aiming at the problems existing in the prior art, a method for realizing dynamic storage of media asset inventory metadata based on PHP is provided. The specific technical scheme is as follows: a PHP-based method for implementing dynamic storage of media asset inventory metadata, comprising a table creation process, the table creation process comprising: A1, creating a main key ID field of a data table and setting a material index associated with media material aiming at newly added metadata; a2, extracting attribute information from the metadata, and configuring field information according to the attribute information; and A3, establishing an attribute table corresponding to the metadata according to the field information and organizing the attribute table into an attribute group table. In another aspect, a table update process is also included, the table update process comprising: Step B1, extracting the attribute information aiming at the newly added metadata, and sequentially matching the corresponding attribute group table and the attribute table according to the attribute information; step B2, extracting historical attribute configuration information from the original attribute table; And B3, modifying the historical attribute configuration information according to the attribute information, and storing the newly added metadata. On the other hand, in the step A3, the attribute table comprises an attribute ID, a field name, an attribute name, a data type, a component style, an attribute length, a controlled word ID, a creation time and