Metadata and code bidirectional conversion method and system

By constructing a bidirectional conversion model and monitoring data packet optimization, the consistency and flexibility issues in metadata and code conversion were resolved, achieving efficient and accurate bidirectional conversion and reducing system maintenance costs.

CN121832944APending Publication Date: 2026-04-10HUANENG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUANENG INFORMATION TECH CO LTD
Filing Date
2025-11-07
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the bidirectional conversion between metadata and code suffers from problems such as synchronization failure, information loss, difficulty in ensuring consistency, and insufficient flexibility and scalability, resulting in high system maintenance complexity and cost.

Method used

By constructing a bidirectional conversion model, including a forward conversion model, a reverse conversion model, and an intermediate mapping layer, and by using the aggregation processing of metadata and code parameters, a precise mapping between code and metadata is generated. Furthermore, by monitoring data packets to optimize and update the model, conversion efficiency and accuracy are improved.

Benefits of technology

It achieves efficient and accurate bidirectional conversion between metadata and code, reduces manual intervention, lowers system maintenance complexity and cost, and adapts to the needs of rapid iteration and frequent evolution of meta-models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832944A_ABST
    Figure CN121832944A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of metadata, in particular to a metadata and code bidirectional conversion method and system. Comprising the steps that a bidirectional conversion model is constructed, and the bidirectional conversion model comprises a forward conversion model, a reverse conversion model and a middle mapping layer; the forward conversion model generates a code correction strategy according to the first-class difference packet, and the reverse conversion model generates a metadata correction strategy according to the second-class difference packet; and obtaining a monitoring data packet according to the preset updating time node, and judging and generating an updating instruction of the bidirectional conversion model according to the monitoring data packet. According to the method, metadata parameters and code parameters are respectively subjected to aggregation processing, various metadata sets and code sets are constructed, and corresponding analysis and recognition models are constructed according to feature categories in different sets, so that an intermediate mapping layer is constructed, accurate mapping between codes and metadata is realized, and the accuracy of analysis and recognition is improved. And the bidirectional conversion efficiency and conversion precision of the metadata and the codes are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of metadata, in particular to a metadata and code bidirectional conversion method and system. BACKGROUND

[0002] In software engineering, especially in low-code / no-code platforms, model-driven architecture and domain-specific language development, there is a core challenge of how to efficiently and accurately manage the mapping and synchronization between metadata and underlying code. Traditional development modes usually use hard coding or semi-automatic scripting to handle metadata, resulting in a serious coupling between its definition, storage and implementation code.

[0003] The existing technical solutions mainly have the following limitations: first, they are mostly one-way conversion, or require a lot of manual coding after generating a code framework from metadata, resulting in synchronization failure; or they are reverse parsing of metadata from code, which is complex and information is easy to lose, making it difficult to ensure bidirectional consistency. Second, there is a lack of unified and standard bidirectional conversion mechanism, changes cannot be automatically transmitted, and developers need to manually maintain two places of logic, which is prone to out-of-sync, logic conflicts and human errors, greatly increasing the complexity and cost of system maintenance. Third, the existing solutions lack flexibility and scalability, making it difficult to adapt to the rapid iteration and frequent evolution of modern application development requirements. SUMMARY

[0004] The purpose of the present application is to solve the above technical problems, and the present application provides a metadata and code bidirectional conversion method and system, aiming to improve the bidirectional conversion efficiency and conversion accuracy of metadata and code.

[0005] In some embodiments of the present application, by aggregating metadata parameters and code parameters respectively, multiple metadata sets and code sets are constructed, corresponding parsing and recognition models are constructed according to the feature categories in different sets, and an intermediate mapping layer is constructed, thereby realizing accurate mapping between code and metadata, improving the bidirectional conversion efficiency and conversion accuracy of metadata and code.

[0006] In some embodiments of the present application, the conversion accuracy of the bidirectional conversion model is analyzed by periodically acquiring monitoring data packets, and the internal structure is optimized and updated in a timely manner, thereby ensuring the bidirectional conversion efficiency and conversion accuracy of metadata and code.

[0007] In some embodiments of the present application, a metadata and code bidirectional conversion method is provided, comprising: constructing a bidirectional conversion model, the bidirectional conversion model comprising a forward conversion model, a reverse conversion model and an intermediate mapping layer; the forward conversion model generates a code correction strategy according to a type of difference packet, and the reverse conversion model generates a metadata correction strategy according to a type of difference packet; The monitoring data packets are obtained according to the preset update time nodes, and the update instructions for the bidirectional conversion model are generated based on the monitoring data packets.

[0008] In some embodiments of this application, a bidirectional conversion model is constructed, including: Iterate through the metadata parameters to generate multiple metadata sub-components; Create a metadata sub-array A, A=(a1, a2…a…) i …a n ), where a i This represents the i-th metadata sub-component; n is the number of metadata sub-components. Aggregate all metadata sub-components and generate multiple metadata sub-component sets based on the aggregation results; Construct a metadata subset set sequence W, W=(w1, w2…w i …w n1 ), where w i Let n be the i-th metadata subset; n1 is the number of metadata subsets; and n > n1; Based on the metadata subset sequence W, set w sequentially. i For the target metadata; Define the parsing sub-model and code output model for the target component set; Generate a forward sub-model of the target component set based on the parsing sub-model and the code data model; Generate forward sub-models for each metadata subset in sequence, and generate a forward transformation model based on all forward sub-models.

[0009] In some embodiments of this application, constructing a bidirectional conversion model further includes: Iterate through the code parameters to generate multiple code components; Create a sequence of code sub-components B, B=(b1,b2…b…). i …b m ), where b i Let m be the i-th code sub-component; m is the number of code sub-components. Aggregate all code components and generate multiple sets of code components based on the aggregation results; Establish a sequence of code component sets P, P=(p1,p2…p i …p m ), where p i Let m be the i-th code subset; m1 be the number of code subsets; and m > m1; Based on the sequence P of code component sets, p is set sequentially. i For the target code set; Define the identification sub-model and data correction model for the target code set; The inverse sub-model of the target code set is set based on the identification sub-model and the data correction model; The reverse sub-models of each code component set are set sequentially, and the reverse conversion model is generated based on all the reverse sub-models.

[0010] In some embodiments of this application, constructing a bidirectional conversion model further includes: Based on the metadata sub-component sequence A, set a sequentially. i For target metadata sub-components; The first-level substructure of the target metadata component is generated through a forward transformation model; The first-level intermediate structure of each metadata sub-component is generated sequentially; b is set sequentially according to the code component set sequence B. i For target code sub-components; The secondary substructure of the target code component is generated through a reverse transformation model; An intermediate mapping layer is generated based on all first-level substructures and all second-level substructures.

[0011] In some embodiments of this application, the forward conversion model generates a code correction strategy based on a type of difference package, including: Generate a first-level association value for a class of difference packages and each metadata subset; Establish a first-level related value sequence C, C=(c1,c2…c i …c n1 ), where c i n1 represents the first-level association value between a type of difference package and the i-th metadata subset; n1 is the number of metadata subsets. Preset the first-level correlation threshold C1; If c i >C1, Generate a single code output instruction based on the positive sub-model of the i-th metadata subset and the first-level difference package; Generate a code correction strategy based on all code output instructions.

[0012] In some embodiments of this application, the reverse transformation model generates a metadata correction strategy based on two types of difference packets, including: Generate two types of difference packages and secondary association values ​​for each metadata subset; Establish a two-level correlation value sequence D, D=(d1,d2…d i …d m1 ), where d i is the first-level association value between a type of difference package and the i-th metadata subset; m1 is the number of metadata subsets; Preset the first-level correlation threshold D1; If d iD1, generating a single metadata correction instruction according to the inverse sub-model of the i-th code sub-component set and the secondary difference package; generating a metadata correction strategy according to all metadata correction instructions.

[0013] In some embodiments of the present application, the update instruction of the bidirectional conversion model is generated according to the monitoring data package judgment, comprising: establishing a forward sub-model sequence T, T=(t1, t2…t i …t n1 ), wherein t i is the forward sub-model of the i-th metadata sub-component set; n1 is the number of metadata sub-component sets; setting ki as the target forward model according to the forward sub-model sequence T; i generating a first risk value f of the target forward model according to the monitoring data package; f=[ β i *j i ]; wherein θ1 is the number of forward bias indicators; β i is the influence factor of the i-th forward bias indicator; j i is the reference value of the i-th forward bias indicator generated based on the monitoring data package; presetting a first risk value threshold F1; if f>F1, generating a first update instruction of the target forward model; judging whether to generate a first update instruction of each forward sub-model in turn.

[0014] In some embodiments of the present application, the update instruction of the bidirectional conversion model is generated according to the monitoring data package judgment, further comprising: establishing an inverse sub-model sequence K, K=(k1, k2…k i …k m1 ), wherein k i is the inverse sub-model of the i-th metadata sub-component set; n1 is the number of code sub-components; setting ki as the target inverse model according to the inverse sub-model sequence K; generating a secondary risk value q of the target inverse model according to the monitoring data package; q=[ η i *v i ]; wherein θ2 is the number of inverse bias indicators; η i is the influence factor of the i-th inverse bias indicator; v i is the reference value of the i-th inverse bias indicator generated based on the monitoring data package; ​A preset secondary risk value threshold K1 is set. If k>K1, a secondary update instruction for generating the target reverse model is generated. In sequence, whether a secondary update instruction for generating each reverse sub-model is generated is judged.

[0015] In some embodiments of the present application, the judging of the update instruction for generating the bidirectional conversion model according to the monitoring data packet further comprises: A first reference value H1 is generated according to the primary risk values of all the forward sub-models; A second reference value H2 is generated according to the secondary risk values of all the reverse sub-models; An update evaluation value s is generated according to the first reference value H1 and the second reference value H2; s=e1*H1+e2*H2; Wherein, e1 is a preset first weight coefficient; e2 is a preset second weight coefficient; A preset update evaluation value threshold S1 is set. If s>S1, a tertiary update instruction is generated.

[0016] In some embodiments of the present application, a metadata and code bidirectional conversion system is provided, comprising: A central control unit for constructing a bidirectional conversion model; The bidirectional conversion model comprises a forward conversion model, a reverse conversion model and an intermediate mapping layer; A first conversion unit for acquiring a first type of difference packet; The first conversion unit is further used for generating a code correction strategy; A second conversion unit for acquiring a second type of difference packet; The second conversion unit is further used for generating a metadata correction strategy; The central control unit comprises: An update module for acquiring monitoring data packets according to a preset update time node, and judging an update instruction for generating the bidirectional conversion model according to the monitoring data packets.

[0017] A processing module for establishing and constructing the bidirectional conversion model.

[0018] Compared with the prior art, the metadata and code bidirectional conversion method and system of the present application has the beneficial effects that: By respectively performing aggregation processing on metadata parameters and code parameters, a plurality of metadata sets and code sets are constructed, corresponding analysis and recognition models are constructed according to feature categories in different sets, and an intermediate mapping layer is constructed, so as to realize accurate mapping between code and metadata, and improve the bidirectional conversion efficiency and conversion precision of metadata and code.

[0019] The conversion accuracy of the bidirectional conversion model is analyzed by periodically acquiring the monitoring data packet, and the internal structure is optimized and updated in time to ensure the bidirectional conversion efficiency and conversion accuracy of the metadata and the code. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a flowchart of a metadata and code bidirectional conversion method in the preferred embodiment of the present application. DETAILED DESCRIPTION

[0021] The specific embodiments of the present application will be further described in detail below in conjunction with the drawings and examples. The following examples are used to illustrate the present application, but are not used to limit the scope of the present application.

[0022] In the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0023] The terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0024] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication between the two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0025] As shown in Figure 1 The metadata and code bidirectional conversion method of the preferred embodiment of the present application comprises: S101: constructing a bidirectional conversion model, the bidirectional conversion model comprising a forward conversion model, a reverse conversion model and an intermediate mapping layer; S102: the forward conversion model generates a code correction strategy according to a type of difference packet, and the reverse conversion model generates a metadata correction strategy according to a type of difference packet; S103: Obtain monitoring data packets according to preset update time nodes, and generate update instructions for the bidirectional conversion model based on the monitoring data packets.

[0026] Specifically, the forward conversion model is an algorithmic model that outputs code through metadata, while the reverse conversion model is an algorithmic model that corrects metadata through code.

[0027] Specifically, the first-level difference package records the changed parameters of the metadata, while the second-level difference package records the changed parameters of the code.

[0028] In a preferred embodiment of this application, a bidirectional conversion model is constructed, including: Iterate through the metadata parameters to generate multiple metadata sub-components; Create a metadata sub-array A, A=(a1, a2…a…) i …a n ), where a i This represents the i-th metadata sub-component; n is the number of metadata sub-components. Aggregate all metadata sub-components and generate multiple metadata sub-component sets based on the aggregation results; Construct a metadata subset set sequence W, W=(w1, w2…w i …w n1 ), where w i Let n be the i-th metadata subset; n1 is the number of metadata subsets; and n > n1; Based on the metadata subset sequence W, set w sequentially. i For the target metadata dataset; Define the parsing sub-model and code output model for the target component set; Generate a forward sub-model of the target component set based on the parsing sub-model and the code data model; Generate forward sub-models for each metadata subset in sequence, and generate a forward transformation model based on all forward sub-models.

[0029] Specifically, by analyzing and filtering all metadata parameters, multiple metadata blocks are generated. A metadata sub-item sequence is established based on all metadata blocks, where a single metadata sub-item represents a complete metadata block.

[0030] Specifically, metadata blocks are independent data units that describe different specific functions, entities, or configurations, and may be various data units such as databases, business rules, and API interfaces.

[0031] Specifically, all metadata sub-components are analyzed, and metadata sub-components with the same function are aggregated to generate multiple metadata sub-component sets. In each metadata sub-component set, the metadata sub-components belong to the same metadata block and have the same function.

[0032] Specifically, the parsing sub-model can read the structured metadata (such as JSON, YAML, XML, etc.) of the metadata blocks corresponding to the target subset, parse its content, and construct an intermediate abstract representation model (i.e., the first-level sub-structure). This model is organized in a hierarchical tree structure, capturing all logical entities, attributes, and relationships in the metadata while preserving the original semantic information. Then, through a set code output mode, the constructed intermediate abstract representation model is transformed into source code files in the target programming language (such as Java, Python, TypeScript, etc.). The transformation process maintains logical consistency with the metadata, and the generated code includes necessary classes, methods, fields, and comments.

[0033] Specifically, the conversion of metadata to code is achieved by constructing various positive transformation models.

[0034] Specifically, constructing a bidirectional conversion model also includes: Iterate through the code parameters to generate multiple code components; Create a sequence of code sub-components B, B=(b1,b2…b…). i …b m ), where b i Let m be the i-th code sub-component; m is the number of code sub-components. Aggregate all code components and generate multiple sets of code components based on the aggregation results; Establish a sequence of code component sets P, P=(p1,p2…p i …p m ), where p i Let m be the i-th code subset; m1 be the number of code subsets; and m > m1; Based on the sequence P of code component sets, p is set sequentially. i For the target code set; Define the identification sub-model and data correction model for the target code set; The inverse sub-model of the target code set is set based on the identification sub-model and the data correction model; The reverse sub-models of each code component set are set sequentially, and the reverse conversion model is generated based on all the reverse sub-models.

[0035] Specifically, a code subset is constructed by aggregating code sub-components that have the same code instructions, wherein the code instructions mapped by each code sub-component in a single code subset are the same.

[0036] Specifically, by filtering and analyzing all code parameters, multiple sets of code instructions are generated, and multiple code sub-components are generated based on all code instructions. Each code sub-component is a complete code instruction.

[0037] Specifically, the code instruction is a complete code that can implement different functions, configuration modification, etc.

[0038] Specifically, by identifying the sub-model, the code sub-piece in the target code can be parsed, the structural elements (such as class definition, attribute, method, etc.) in the code are identified, and the semantic information thereof is extracted, an intermediate abstract representation model (i.e., a secondary sub-structure) equivalent to the original metadata is reconstructed, and the intermediate abstract representation model obtained is reconstructed into a new metadata file consistent with the original metadata format, structure and semantics according to the pre-defined metadata mode specification through the data correction model.

[0039] Specifically, constructing the bidirectional conversion model further includes: According to the metadata sub-piece sequence A, a is set in sequence i for the target metadata sub-piece; generating a primary sub-structure of the target metadata sub-piece through the forward conversion model; generating the primary intermediate structure of each metadata sub-piece in sequence; According to the code sub-piece set sequence B, b is set in sequence i for the target code sub-piece; generating a secondary sub-structure of the target code sub-piece through the reverse conversion model; generating an intermediate mapping layer according to all primary sub-structures and all secondary sub-structures.

[0040] Specifically, by calling and connecting each primary sub-structure and secondary sub-structure that exist in association (i.e., can be converted to each other), a corresponding conversion calling structure is generated, and the intermediate mapping layer is generated according to the conversion calling structure.

[0041] It can be understood that in the above embodiments, by respectively performing aggregation processing on the metadata parameters and the code parameters, a plurality of metadata sets and code sets are constructed, corresponding parsing and identifying models are constructed according to the feature categories in different sets, and the intermediate mapping layer is constructed, so as to realize accurate mapping between the code and the metadata, and improve the bidirectional conversion efficiency and conversion precision of the metadata and the code.

[0042] In the preferred embodiments of the present application, the forward conversion model generates a code correction strategy according to a type of difference package, including: generating a type of difference package and a primary association value of each metadata sub-piece set; establishing a primary association value sequence C, C=(c1,c2…cn1), wherein i …cn1 n1 , wherein c i is a primary association value of a type of difference package and the i-th metadata sub-piece set; n1 is the number of metadata sub-piece sets; a preset primary association value threshold C1; If c i C1, generating a single code output instruction according to the forward sub-model of the i-th metadata sub-piece set and the first-level difference package; Generating a code correction strategy according to all code output instructions.

[0043] Specifically, according to whether there is a change parameter of each metadata sub-piece in the current metadata sub-piece set in the first-level difference package, if there is, the first-level correlation value of the two is preferably 1, and if there is not, the first-level correlation value of the two is preferably 0. Specifically, the first-level correlation value threshold can be set according to historical parameters, and the value range of the first-level correlation value threshold is preferably (0, 1), and the application is preferably 0.5.

[0044] Specifically, the code correction strategy includes the corresponding code converted from the first-level difference package.

[0045] Specifically, the reverse conversion model generates a metadata correction strategy according to the second-level difference package, including: Generating a second-level correlation value of each metadata sub-piece set and the second-level difference package; Establishing a second-level correlation value sequence D, D=(d1, d2…d i …d m1 ), wherein d i is the first-level correlation value of the first-level difference package and the i-th metadata sub-piece set; m1 is the number of metadata sub-piece sets; A first-level correlation value threshold D1 is preset; If d i >D1, generating a single metadata correction instruction according to the reverse sub-model of the i-th code sub-piece set and the second-level difference package; Generating a metadata correction strategy according to all metadata correction instructions.

[0046] Specifically, according to whether there is a change parameter of each code sub-piece in the current code sub-piece set in the second-level difference package, if there is, the first-level correlation value of the two is preferably 1, and if there is not, the first-level correlation value of the two is preferably 0. Specifically, the second-level correlation value threshold can be set according to historical parameters, and the value range of the first-level correlation value threshold is preferably (0, 1), and the application is preferably 0.5.

[0047] Specifically, the metadata correction strategy includes the corresponding metadata structure converted from the second-level difference package.

[0048] It can be understood that in the above embodiments, the conversion accuracy of the bidirectional conversion model is analyzed by periodically acquiring the monitoring data package, and the internal structure is optimized and updated in time, so as to ensure the bidirectional conversion efficiency and conversion accuracy of the metadata and the code.

[0049] In the preferred embodiment of the present application, the update instruction for generating the bidirectional conversion model according to the monitoring data packet comprises: establishing a forward sub-model sequence T, T = (t1, t2…tn1), wherein ti is a forward sub-model of the ith metadata sub-component set; and n1 is the number of metadata sub-component sets. i …t n1 ), wherein ti is a forward sub-model of the ith metadata sub-component set; and n1 is the number of metadata sub-component sets. i According to the forward sub-model sequence T, t i is sequentially set as a target forward model. According to the monitoring data packet, a first risk value f of the target forward model is generated. f=[ β i *j i ]; wherein θ1 is the number of forward deviation indexes; βi is an influence factor of the ith forward deviation index; and j is a reference value of the ith forward deviation index generated based on the monitoring data packet. i i A first risk value threshold F1 is preset. If f > F1, a first update instruction of the target forward model is generated. Whether a first update instruction of each forward sub-model is generated is sequentially judged.

[0050] Specifically, the first risk value threshold can be set according to historical parameters. When the real-time first risk value is greater than the preset first risk value threshold, it indicates that the current forward conversion model has an operation abnormality, and the inadapted forward sub-model needs to be updated and corrected in time according to the first update instruction, so as to improve the accuracy and efficiency of the bidirectional conversion of metadata and code.

[0051] Specifically, the greater the first risk value, the greater the possibility that the current forward conversion model has an operation abnormality.

[0052] Specifically, the forward deviation indexes include, but are not limited to, the error rate of output code, the total number of errors and other parameters reflecting the metadata conversion efficiency. By quantitatively processing each forward deviation index, the reference values of each forward deviation index are in the same value range, and the greater the reference value of each forward deviation index, the lower the metadata conversion efficiency.

[0053] Specifically, the influence factor of each forward deviation index can be set according to the degree of association with the metadata conversion efficiency. The greater the degree of association, the greater the reference value of the corresponding influence factor. The mapping relationship between the two can be set according to historical parameters.

[0054] ​​​Specifically, according to the first-level update instruction, the non-fitting forward sub-model is updated and corrected in time, and the accuracy and efficiency of the bidirectional conversion of the metadata and the code are improved.

[0055] Specifically, the update instruction for generating the bidirectional conversion model according to the monitoring data packet further comprises: A reverse sub-model sequence K is established, K=(k1, k2…kn1) i …k m1 ), wherein k i is the reverse sub-model of the ith metadata sub-piece set; n1 is the number of the code sub-piece set; ki is sequentially set as the target reverse model according to the reverse sub-model sequence K; A second-level risk value q of the target reverse model is generated according to the monitoring data packet; q=[ η i *v i ]; Wherein θ2 is the number of reverse deviation indexes; η i is the influence factor of the ith reverse deviation index; v i is the reference value of the ith reverse deviation index generated based on the monitoring data packet; A second-level risk value threshold K1 is preset; If k>K1, a second-level update instruction for generating the target reverse model is generated; Whether the second-level update instruction for generating each reverse sub-model is generated is sequentially judged.

[0056] Specifically, the second-level risk value threshold can be set according to historical parameters. When the real-time second-level risk value is greater than the preset second-level risk value threshold, it indicates that the current reverse conversion model has operation abnormality, and the non-fitting reverse sub-model needs to be updated and corrected in time according to the second-level update instruction, so as to improve the accuracy and efficiency of the bidirectional conversion of the metadata and the code.

[0057] Specifically, the greater the second-level risk value, the greater the possibility of operation abnormality of the current reverse conversion model.

[0058] Specifically, the reverse deviation indexes include but are not limited to the error rate of the converted metadata, the mapping code conversion efficiency parameters such as the fitting degree of the converted metadata, and the reference values of the reverse deviation indexes are quantitatively processed so as to be in the same value range, and the greater the reference value of each reverse deviation index, the lower the metadata conversion efficiency.

[0059] Specifically, the influence factor of each reverse deviation index can be set according to the correlation degree with the code conversion efficiency, and the greater the correlation degree, the greater the reference value of the corresponding influence factor. The mapping relationship between the two can be set according to historical parameters.

[0060] Specifically, the generating the update instruction of the bidirectional conversion model according to the monitoring data packet further comprises: generating a first reference value H1 according to the first-level risk values of all the forward sub-models; generating a second reference value H2 according to the second-level risk values of all the reverse sub-models; generating an update evaluation value s according to the first reference value H1 and the second reference value H2; s = e1*H1 + e2*H2; wherein e1 is a preset first weight coefficient; and e2 is a preset second weight coefficient; presetting an update evaluation value threshold S1; if s > S1, generating a third-level update instruction.

[0061] Specifically, the first reference value and the second parameter value are in the same value interval.

[0062] Specifically, the first reference value is set according to the total value of all the first-level risk values, and the greater the total value, the greater the corresponding first reference value. The mapping relationship between them can be set according to historical parameters.

[0063] Specifically, the second reference value is set according to the sum of all the second-level risk values, and the greater the sum, the greater the corresponding second reference value. The mapping relationship between them can be set according to historical parameters.

[0064] Specifically, the first weight coefficient and the second weight coefficient can be set according to historical parameters, and the sum of the first weight coefficient and the second weight coefficient is 1. Specifically, the update evaluation value threshold can be set according to historical parameters. When the real-time update evaluation value is greater than the preset update evaluation value threshold, it indicates that the bidirectional conversion model as a whole has an abnormal running state, and the third-level update instruction needs to be used for timely overall optimization.

[0065] Based on any one of the above preferred embodiments, another preferred embodiment of the metadata and code bidirectional conversion method is provided. In this preferred embodiment, a metadata and code bidirectional conversion system is provided, comprising: a central control unit configured to construct a bidirectional conversion model; the bidirectional conversion model comprises a forward conversion model, a reverse conversion model and an intermediate mapping layer; a first conversion unit configured to obtain a first type of difference packet; the first conversion unit is further configured to generate a code correction strategy; a second conversion unit configured to obtain a second type of difference packet; the second conversion unit is further configured to generate a metadata correction strategy; the central control unit comprises: An updating module is configured to acquire the monitoring data packet according to a preset updating time node, and to generate an updating instruction of the bidirectional conversion model according to the monitoring data packet.

[0066] A processing module is configured to establish the bidirectional conversion model.

[0067] According to the first concept of the present application, by respectively performing aggregation processing on the metadata parameters and the code parameters, a plurality of metadata sets and code sets are constructed, and corresponding analysis and recognition models are constructed according to different characteristic categories in the sets, so as to construct an intermediate mapping layer, to realize accurate mapping between the code and the metadata, and to improve the bidirectional conversion efficiency and conversion precision of the metadata and the code.

[0068] According to the second concept of the present application, by periodically acquiring the monitoring data packet, the conversion precision of the bidirectional conversion model is analyzed, and the internal structure is timely optimized and updated, so as to guarantee the bidirectional conversion efficiency and conversion precision of the metadata and the code.

[0069] The above only describes the preferred embodiments of the present application, and it should be noted that, for those skilled in the art, without departing from the technical principles of the present application, a number of improvements and replacements can be made, and these improvements and replacements should also be considered as the protection scope of the present application.

Claims

1. A method for bi-directional conversion of metadata and code, characterized in that, The application relates to a method for constructing a bidirectional conversion model. The method comprises the following steps: A forward conversion model is constructed according to a first type of difference package, and a reverse conversion model is constructed according to a second type of difference package. An update instruction for generating the bidirectional conversion model is determined according to a monitoring data package.

2. The metadata and code bidirectional conversion method of claim 1, wherein, The method for constructing the bidirectional conversion model comprises the following steps: A plurality of metadata subparts are generated by traversing metadata parameters. Create a metadata sub-array A, A=(a1, a2…a…) i …a n ), where a i This represents the i-th metadata sub-component; n is the number of metadata sub-components. A plurality of metadata subpart sets are generated by aggregating all the metadata subparts. Construct a metadata subset set sequence W, W=(w1, w2…w i …w n1 ), where w i Let n be the i-th metadata subset; n1 is the number of metadata subsets; and n > n1; According to the metadata sub-set number sequence W, w is set in turn i Target metadata set; A target subpart set is set to have an analysis submodel and a code output model. A forward submodel of the target subpart set is generated according to the analysis submodel and the code data model. Forward submodels of all the metadata subpart sets are generated in sequence, and a forward conversion model is generated according to all the forward submodels.

3. The metadata and code bidirectional conversion method of claim 2, wherein, The method for constructing the bidirectional conversion model further comprises the following steps: A plurality of code subparts are generated by traversing code parameters. A code subelement sequence B, B=(b1, b2…b i …b m ), is established, wherein b i is the i th code subelement; m is the code subelement quantity; A plurality of code subpart sets are generated by aggregating all the code subparts. Establish a sequence of code component sets P, P=(p1,p2…p i …p m ), where p i Let m be the i-th code subset; m1 be the number of code subsets; and m > m1; According to the code sub-element set sequence P, p is set in turn i Target code set; A target code set is set to have an identification submodel and a data correction model. A reverse submodel of the target code set is set according to the identification submodel and the data correction model. Reverse submodels of all the code subpart sets are set in sequence, and a reverse conversion model is generated according to all the reverse submodels.

4. The metadata and code bidirectional conversion method of claim 3, wherein, The method for constructing the bidirectional conversion model further comprises the following steps: According to the metadata sub-element sequence A, a is set in turn i Target metadata sub-element; A first-level substructure of a target metadata subpart is generated by the forward conversion model. First-level intermediate structures of all the metadata subparts are generated in sequence. According to the code subcomponent set sequence B, b is set in turn i Target code subcomponent; A second-level substructure of a target code subpart is generated by the reverse conversion model. An intermediate mapping layer is generated according to all the first-level substructures and all the second-level substructures.

5. The metadata and code bidirectional conversion method of claim 4, wherein, The forward conversion model generates a code correction strategy according to the first type of difference package, and the method comprises the following steps: First-level correlation values of the first type of difference package and all the metadata subpart sets are generated. Establish a first-level related value sequence C, C=(c1,c2…c i …c n1 ), where c i n1 represents the first-level association value between a type of difference package and the i-th metadata subset; n1 is the number of metadata subsets. A first-level correlation value threshold C1 is preset. If c i >Cl, generating a single code output instruction according to the forward sub-model of the ith metadata sub-piece set and the first-level difference package; A code correction strategy is generated according to all the code output instructions.

6. The metadata and code bidirectional conversion method of claim 5, wherein, The reverse conversion model generates a metadata correction strategy according to the second type of difference package, and the method comprises the following steps: Second-level correlation values of the second type of difference package and all the metadata subpart sets are generated. A second correlation value sequence D is established, D=(d1, d2…d i …d m1 ), wherein d i is a first correlation value of a difference package and an i-th metadata sub-element set; m1 is a metadata sub-element set quantity; A first-level correlation value threshold D1 is preset. If d i D1, generating a single metadata correction instruction from the inverse sub-model of the ith code sub-component set and the secondary difference package. A metadata correction strategy is generated according to all the metadata correction instructions.

7. The metadata and code bidirectional conversion method of claim 6, wherein, The method for determining the update instruction for generating the bidirectional conversion model according to the monitoring data package comprises the following steps: Establish a forward sub-model sequence T, T=(t1,t2…t) i …t n1 ), where t i Let n1 be the forward sub-model of the i-th metadata subset; n1 is the number of metadata subsets. According to the forward sub-model sequence T, set t in turn i Target forward model; A first-level risk value f of a target forward model is generated according to the monitoring data package. f=[ β i *j i ]; wherein θ1 is the number of positive deviation indicators; β i is the influence factor of the i-th positive deviation indicator; j i is the reference value of the i-th positive deviation indicator generated based on the monitoring data packet; A first-level risk value threshold F1 is preset. If f>F1, a first-level update instruction of the target forward model is generated. Whether a first-level update instruction of each forward submodel is generated is determined in sequence.

8. The metadata and code bidirectional conversion method of claim 7, wherein, The method for determining the update instruction for generating the bidirectional conversion model according to the monitoring data package further comprises the following steps: Establish the reverse sub-model sequence K, K=(k1,k2…k i …k m1 ), where k i This is the inverse submodel of the i-th metadata subset; n1 is the number of code subsets; ki of a target reverse model is set according to a reverse submodel sequence K. A second-level risk value q of the target reverse model is generated according to the monitoring data package. q=[ η i *v i ]; wherein θ2is the number of reverse deviation indicators; η i is the impact factor of the i-th reverse deviation indicator; v i is the reference value of the i-th reverse deviation indicator generated based on the monitoring data packet; A second-level risk value threshold K1 is preset. If k>K1, a second-level update instruction of the target reverse model is generated. Whether a second-level update instruction of each reverse submodel is generated is determined in sequence.

9. The metadata and code bidirectional conversion method of claim 8, wherein, The method for determining the update instruction for generating the bidirectional conversion model according to the monitoring data package further comprises the following steps: A first reference value H1 is generated according to first-level risk values of all the forward submodels. A second reference value H2 is generated according to second-level risk values of all the reverse submodels. generating an update evaluation value s according to the first reference value H1 and the second reference value H2; s = e1*H1 + e2*H2; wherein e1 is a preset first weight coefficient; e2 is a preset second weight coefficient; a preset update evaluation value threshold S1; if s > S1, generating a third-level update instruction.

10. A metadata and code bidirectional conversion system employing the metadata and code bidirectional conversion method according to any one of claims 1 to 9, characterized by, comprising: a central control unit configured to construct a bidirectional conversion model; the bidirectional conversion model comprises a forward conversion model, a reverse conversion model and an intermediate mapping layer; a first conversion unit configured to obtain a first type of difference package; the first conversion unit is further configured to generate a code correction strategy; a second conversion unit configured to obtain a second type of difference package; the second conversion unit is further configured to generate a metadata correction strategy; the central control unit comprises: an update module configured to obtain a monitoring data package according to a preset update time node, and generate an update instruction of the bidirectional conversion model according to the monitoring data package; a processing module configured to establish and construct the bidirectional conversion model.