Method for realizing data transmission structure conversion through rapid code injection

Through object-oriented design methods and dynamic injection and dynamic compilation technology, the data transmission model is defined and converted, and the problems of data transmission model conventions and frequent changes are solved, and the work efficiency of data integration and interaction is improved.

CN119883220AInactive Publication Date: 2025-04-25XIAN FLIGHT SELF CONTROL INST OF AVIC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411950061.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for the prior art to quickly reach the agreement on the data transmission model, and the data transmission model changes frequently due to business development or changes in interaction scenarios, which increases the cost of development and operation and maintenance.

Method used

The object-oriented design method is used to structure the two-level data transmission model, and the business conversion rules between the data models are defined through dynamic injection and dynamic compilation technology to achieve rapid conversion of the data transmission structure.

Benefits of technology

Quickly respond to frequent changes in data models, improve the work efficiency of data integration and interaction, and reduce development and operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883220A_ABST
    Figure CN119883220A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data transmission, and particularly relates to a method for realizing data transmission structure conversion through rapid code injection. The method comprises the steps that two-stage data transmission models are defined in a structured mode, a service conversion rule between the two-stage data transmission models is defined through the dynamic injection and dynamic compiling technology, and data transmission structure conversion between the two-stage data transmission models is conducted according to the service conversion rule.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data transmission, and in particular relates to a method for realizing data transmission structure conversion through rapid code injection. Background Art

[0002] Currently, data integration and interaction are the main ways to achieve data sharing and interconnection. The scope of data interaction has also gradually expanded from within the enterprise to a wider range of cross-enterprise, cross-industry and cross-domain data exchange. The design concept of data interaction is mainly carried out in a data-oriented or database / table-oriented manner. Due to the low readability of data or database / table, the two parties in the interaction have different understandings and perceptions of each other's business, which makes it difficult to quickly reach an agreement on the data transmission model. The agreed transmission model is also frequently changed due to changes in business development or interaction scenarios, resulting in frequent updates of the logic code for data structure conversion, which increases the work costs of development and operation and maintenance. Therefore, how to effectively help the two parties in the interaction eliminate the differences in data understanding, quickly reach an agreement on the transmission model, and quickly respond to changes in the data transmission model caused by business development or changes in interaction scenarios has become the core key to doing a good job in data integration and interaction. Summary of the invention

[0003] The purpose of the present invention is to propose an object-oriented design method, structuredly define a data transmission model, use dynamic injection and dynamic compilation technology to define business conversion rules between data models, quickly respond to frequent changes in data models during data integration and interaction, and improve the work efficiency of data integration and interaction.

[0004] The technical solution of the present invention:

[0005] A method for implementing data transmission structure conversion by fast code injection, the method comprising:

[0006] The two-level data transmission model is structured and defined. The business conversion rules between the two-level data transmission models are defined using dynamic injection and dynamic compilation techniques. The data transmission structure between the two-level data transmission models is converted according to the business conversion rules.

[0007] Furthermore,

[0008] The two-level data transmission model is: external data transmission model and internal data transmission model;

[0009] The structure of the external data transmission model is defined by the data provider and established based on the data provider's business model; the internal data transmission model is established or reused based on the business objects of the internal application system.

[0010] Furthermore,

[0011] The external data transmission model is used to realize data reception, parsing and temporary storage, and to feed back the response results to the external interface; the association between the internal data transmission model and the business object gives the transmitted data business meaning.

[0012] Furthermore,

[0013] Dynamic injection and dynamic compilation techniques are used to define the business conversion rules between the two-level data transmission models, which are implemented through a configurable data structure "conversion rule management" module; the "conversion rule management" module allows users to create business rules for data structure conversion in a dynamically defined manner.

[0014] Furthermore,

[0015] The "conversion rule management" module includes four parts: basic information management, rule management, version management, and related application objects. The rule management is used to manage dynamically injected codes.

[0016] Furthermore,

[0017] Use dynamic injection and dynamic compilation technology to define the business conversion rules between the two-level data transmission models, which are defined immediately and take effect immediately.

[0018] Furthermore,

[0019] The injected "dynamic conversion rule code" is managed and stored by the rule module in the "conversion rule management" function. The rule module provides an online Java programming rule viewer. Java language code blocks can be written online in the rule viewer to implement the coding operation of the conversion rule. Externally written Java code block files can also be imported.

[0020] Furthermore,

[0021] The method also includes: checking in, checking out and code version control capabilities of the conversion rule code.

[0022] The advantages of the present invention are: defining and describing the structural information of the transmitted data with an object-oriented design method, closely related to the business and high readability, fast and configurable online definition of data structure conversion rule code, the conversion rule code is implemented by dynamic code injection and dynamic compilation technology, and is saved and effective immediately, and can quickly respond to development and operation and maintenance work caused by changes in conversion structure or conversion rules. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a data structure conversion method configuration process diagram that can be quickly injected;

[0024] Figure 2 This is a diagram of the dynamic rule code management function page. DETAILED DESCRIPTION

[0025] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.

[0026] The technical solution of the present invention is: using an object-oriented design method to define a two-level (internal / external) data transmission model, based on JAVA dynamic code injection and dynamic compilation technology, defining business rules for model conversion in data transmission, so as to achieve the purpose of quickly realizing data structure conversion between different structural models of transmission data. The business conversion rules exist in the form of JAVA dynamic code, providing management functions such as check-in, check-out and version control of dynamic code, and realizing configuration management of dynamic injection code.

[0027] The embodiment of the present invention provides a technical method for implementing data transmission structure conversion through rapid code injection of structured data applied in the field of data integration and interaction, such as Figure 1 and Figure 2 As shown,

[0028] Use object-oriented design methods to structure the definition of data transmission models, use dynamic injection and dynamic compilation technology to define business conversion rules between data models, quickly respond to frequent changes in data models during data integration and interaction, and improve data integration and interaction work efficiency.

[0029] Based on the object-oriented design method, the data transmission models of both parties involved in data interaction are defined separately. The external data structure realizes the reception, analysis and temporary storage of data, and timely feedbacks the response results to the external interface; the internal data transmission model is associated with the business object to improve the readability and rule verification of the transmitted data

[0030] Configurable data structure "conversion rule management" module. In a dynamically defined way, users manually create business rules for data structure conversion. The "conversion rule management" module includes four parts: basic information management, rule management (dynamically injected code), version management, and related application objects.

[0031] The conversion rules between data structures are defined by dynamic code injection and dynamic compilation technology, which are defined immediately and take effect immediately.

[0032] The management of conversion rules has the ability to check in, check out, and control code versions.

[0033] A two-level data transmission model is defined based on an object-oriented design method. The structure of the external data transmission model is defined by the data provider and is established based on the data provider's business model; the internal transmission structure is established based on the business objects of the internal application system, and the data structure model of the business object can also be directly reused. The two parties in the interaction mainly focus on the integrity of their respective data structures and businesses. The external data structure realizes data reception, parsing and temporary storage, and timely feedback of response results to the external interface; the internal data transmission model is associated with the business object, giving the transmitted data business meaning, improving the readability of the transmitted data and rule verification.

[0034] Configurable data structure "conversion rule management" module. In a dynamically defined way, users manually create business rules for data structure conversion. The "conversion rule management" module includes four parts: basic information management, rule management (dynamically injected code), version management, and related application objects.

[0035] Dynamic conversion rules between data structures are defined by dynamic code injection and dynamic compilation technology. They are defined immediately and take effect immediately. The injected "dynamic conversion rule code" is managed and stored by the rule module in the "conversion rule management" function. This module provides a rule viewer that supports online Java programming. Rule definition personnel can write Java language code blocks online in the rule viewer to implement the coding operation of the conversion rules. They can also import externally written Java code block files. At runtime, according to the rule calling mechanism, the Java rule code blocks defined in the rules are dynamically compiled. When the conversion rule is triggered, it runs immediately in the memory to implement the conversion of the data structure according to the logic encoded by the rule.

[0036] The ability to check in, check out, and control the code version of conversion rule codes. In the normal process of data integration and interaction, changes in business development or interaction scenarios may cause changes in the conversion structure of both parties, and the conversion rules must also change accordingly. Through the editing permission control of the check-out control code, each check-in of the injected code will trigger the code version control mechanism, automatically upgrading the version number of the injected code, which is convenient for code tracing and historical version reuse.

[0037] Example

[0038] Step 1: Define and describe the input model of external raw data using an object-oriented design method. The model structure and data are managed and stored in JSON format. Figure 1 Template adding and template uploading in "External JSON structure management" in template management;

[0039] Step 2: Define the conversion component, that is, define the business rules for conversion. By associating the model template established in the first step, establish the association relationship between the conversion component and the model. Define the code rules for conversion in the conversion component. When the rules are running, perform the model conversion in the code by dynamic code injection, and temporarily store the conversion results in JSON format. Figure 1 The link of associating / creating models and converting component definitions in "external JSON structure management" in template management;

[0040] Step 3: When the external conversion results need to be pushed to the internal business application, the internal conversion component is associated with the internally created data structure model, and the data conversion rule code for the internal business application structure is defined in the internal conversion component. When the rules are run, the external rules are converted into a data structure that conforms to the internal business model, that is, Figure 1 The link of associating / creating models and converting component definitions in "Internal JSON structure management" in template management;

[0041] Step 4: The converted data content that meets the requirements of the internal business application data model is forwarded to the business application interface, processed by the business application and stored in the system database, completing the entire data transmission process.

Claims

1. A method for implementing data transmission structure conversion by fast code injection, characterized in that: The method comprises: The two-level data transmission model is structured and defined. The business conversion rules between the two-level data transmission models are defined using dynamic injection and dynamic compilation techniques. The data transmission structure between the two-level data transmission models is converted according to the business conversion rules.

2. The method for realizing data transmission structure conversion by fast code injection according to claim 1, characterized in that: The two-level data transmission model is: external data transmission model and internal data transmission model; The structure of the external data transmission model is defined by the data provider and established based on the data provider's business model; the internal data transmission model is established or reused based on the business objects of the internal application system.

3. The method for realizing data transmission structure conversion by fast code injection according to claim 2, characterized in that: The external data transmission model is used to realize data reception, parsing and temporary storage, and to feed back the response results to the external interface; the association between the internal data transmission model and the business object gives the transmitted data business meaning.

4. The method for realizing data transmission structure conversion by fast code injection according to claim 1, characterized in that: Dynamic injection and dynamic compilation techniques are used to define the business conversion rules between the two-level data transmission models, which are implemented through the configurable data structure "conversion rule management" module; the "conversion rule management" module allows users to create business rules for data structure conversion in a dynamically defined manner.

5. The method for realizing data transmission structure conversion by fast code injection according to claim 4, characterized in that: The "conversion rule management" module includes four parts: basic information management, rule management, version management, and related application objects. The rule management is used to manage dynamically injected code.

6. The method for realizing data transmission structure conversion by fast code injection according to claim 1, characterized in that: Use dynamic injection and dynamic compilation technology to define the business conversion rules between the two-level data transmission models, which are defined immediately and take effect immediately.

7. The method for realizing data transmission structure conversion by fast code injection according to claim 5, characterized in that: The injected "dynamic conversion rule code" is managed and stored by the rule module in the "conversion rule management" function. The rule module provides an online Java programming rule viewer, in which Java language code blocks can be written online to implement the coding operation of the conversion rule. Externally written Java code block files can also be imported.

8. The method for implementing data transmission structure conversion by fast code injection according to claim 5, characterized in that: The method also includes: checking in, checking out and code version control capabilities of the conversion rule code.

Citation Information

Patent Citations

  • Method and device for generating business rule code, electronic equipment and storage medium

    CN116909564A

  • Industrial software code automatic generation method based on data and behavior model

    CN117492723A

  • Dynamic configuration field conversion method, system and device, medium and product

    CN118939715A

  • Compiler and method for compiling business rules for a serverless runtime environment

    US10678522B1