CN114610725B - Computer equipment, application method thereof and storage medium - Google Patents

Computer equipment, application method thereof and storage medium Download PDF

Info

Publication number
CN114610725B
CN114610725B CN202210506110.XA CN202210506110A CN114610725B CN 114610725 B CN114610725 B CN 114610725B CN 202210506110 A CN202210506110 A CN 202210506110A CN 114610725 B CN114610725 B CN 114610725B
Authority
CN
China
Prior art keywords
data
entity
interface
storage
metadata
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210506110.XA
Other languages
Chinese (zh)
Other versions
CN114610725A (en
Inventor
古训
李丽娟
霍曦
段军
邹昆
原小卫
郭春江
杨海琴
薛飞阳
张懿
李亮
李晨华洋
汪俊贵
刘越
周龙
冯奎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Jiuzhou Electronic Technology Co Ltd
Original Assignee
Chengdu Jiuzhou Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Jiuzhou Electronic Technology Co Ltd filed Critical Chengdu Jiuzhou Electronic Technology Co Ltd
Priority to CN202210506110.XA priority Critical patent/CN114610725B/en
Publication of CN114610725A publication Critical patent/CN114610725A/en
Application granted granted Critical
Publication of CN114610725B publication Critical patent/CN114610725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a computer device and an application method and a storage medium thereof.A data center component of the invention is frequently added, deleted and modified in a data structure; the types, description and length of the constituent elements of the data structure are uncertain; data entities are newly built or modified, data analysis methods are newly built or modified, data entities are assigned, database tables are newly built or modified, and data sql statements are newly built or modified, so that simplification and templating processing are performed, and the purposes of reducing coding amount, improving coding efficiency and enhancing code expandability and maintainability are achieved. The data center is atomized into data receiving, data processing, data distributing and data storing in a code mode; the coupling of the data center is reduced, and the expandability of data receiving, processing, distributing and storing is improved; and the data processing, data distribution and flexible scheduling of data storage are completed through the context object of the data center.

Description

Computer equipment, application method thereof and storage medium
Technical Field
The invention belongs to the technical field of software development, and particularly relates to computer equipment, an application method and a storage medium thereof.
Background
At present, frequent new addition, deletion and modification of a data structure commonly exist in a data joint test and joint debugging stage of software field deployment; the data structure has uncertain component element types, element descriptions and lengths; the currently commonly adopted countermeasures are that developers are sent to the field to perform real-time coding, testing, recompilation and release according to the requirements of users and the service change conditions.
The real-time coding process comprises a method for creating a data entity and a method for creating or modifying an analytic data structure, a database table is created or a database table field is modified, an sql statement is created or modified, the data entity is assigned with a value, and the data entity is stored in the newly created or modified database.
The problem with this approach is that, first, the adaptation needs to be re-encoded, which affects the stability of the application, increases the possibility of bug occurrence, and reduces the efficiency of joint debugging. Secondly, the software has poor expandability and design, and the application program needs to be recompiled and deployed to meet the requirement of changing the data structure. And thirdly, operation and maintenance personnel generally do not have the capability of developing codes, and by adopting the mode to deal with the problem, development and coding personnel are often required to be matched with the site, so that the utilization rate of the development personnel is reduced. Finally, as the complexity and the frequency of changes of the data structure increase, each time a data entity, a method for adding or modifying a formatted data structure, and a database table field need to be added or modified, the maintainability of the application program will be worse and worse.
Disclosure of Invention
Aiming at the defects in the prior art, the computer equipment, the application method and the storage medium thereof provided by the invention solve the problems of poor stability of an application program, high bug occurrence probability, low joint debugging efficiency, poor expansibility design, low utilization rate of developers and poor maintainability in a joint debugging stage of software field deployment data joint debugging in the prior art.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that: a computer device is provided with a data center component deployed in an application program of the computer device, wherein the data center component is used for receiving, analyzing and distributing dynamic data and storing the dynamic data in the real-time coding process of application software; the data center assembly includes:
the metadata information description rule file is used for simplifying and templating a dynamic data analysis process and a dynamic data storage process in application software code construction;
the data center behavior interface is used for realizing the decoupling of the data center component;
the data center context object is used for combining and scheduling data processors, data distributors and data storages in the data center component;
the dynamic data analysis module is used for describing the received metadata of the data structure according to the metadata information description rule file and performing formatting processing by adopting a uniform dynamic data analysis method to obtain a data entity;
the dynamic data storage module is used for storing the data entities into a database by adopting a uniform dynamic data storage method;
and the database is used for storing a storage table corresponding to the data entity.
Further, the metadata information description rule file comprises a data index of a data structure, a Chinese name, an English name, a coding mode, a detailed set of data structure components, data structure component names, data types of the data structure components, data length of the data structure components and description of the data structure components, which are determined based on the contract programming;
the data center behavior interface is realized through a strategy design mode and is annotated through an Ali code protocol, and comprises a data receiver interface, a data processor interface, a data distributor interface and a data storage interface;
the data receiver interface provides a uniform data receiving interface for data sent by an external system through a transmission protocol; the data processor interface provides a uniform data processing interface for the data analysis function realized by different data processing and formatting modes; the data distributor interface provides a uniform data distribution interface for realizing a distribution function by using different data distribution protocols; the data storage interface is a data storage interface provided by a storage function which uses different data sources as storage modes.
The invention has the beneficial effects that:
(1) the data center component in the computer equipment provided by the invention is frequently added, deleted and modified in a data structure; the types, description and length of the constituent elements of the data structure are uncertain; data entities are newly built or modified, data analysis methods are newly built or modified, database tables are newly built or modified, and data sql statement procedures are simplified and templated in a mode of configuring metadata information description rule files, so that the purposes of reducing coding amount, improving coding efficiency and enhancing code expandability and maintainability are achieved.
(2) The data center component in the computer equipment provided by the invention atomizes the data center into data receiving, data processing, data distribution and data storage in a code mode; the coupling of the data center is reduced, and the expandability of data receiving, processing, distributing and storing is improved; and data processing, data distribution and flexible scheduling of data storage are completed through the context object of the data center.
An application method of a data center component comprises the following steps:
s1, preparation: constructing a metadata information description rule file, a data center behavior interface and a data center context object;
s2, receiving: receiving metadata through a data receiver interface;
s3, analysis: describing the received metadata of the data structure according to the metadata information description rule file, and formatting the metadata by adopting a uniform dynamic data analysis method to obtain a data entity;
s4, distribution: distributing the data entity to a corresponding demand party for inspection;
s5, storing: storing the data entity passing the inspection into a database;
s6, encoding: and repeating the steps S2-S5, and storing the data entities corresponding to all codes into the database to finish the dynamic real-time coding of the application software.
The invention has the beneficial effects that:
(1) in the original mode, every time a new data structure type is added, a data entity, a data analysis method, a database table and an sql statement are required to be newly built. The invention can be used for only one time of coding and recycling under the condition of meeting the requirement. Later, if the data structure type is newly added, only the metadata information description rule file needs to be configured. Namely, a data entity is newly built, a data analysis method is newly built, a database table is newly built, and the process of inserting the newly built data into an sql statement is simplified and subjected to templating treatment. The robustness and the expandability of the code and the efficiency of the joint debugging of the data joint test are enhanced.
(2) When the composition elements of each data structure in the original mode are changed, the data entity, the data analysis method, the database table and the sql statement are required to be modified. After the first encoding is finished, only the metadata information description rule file needs to be modified. The possibility of bug occurrence is reduced, and the stability and maintainability of the code are enhanced.
(3) Because the field data joint examination joint debugging and the change adjustment of the data structure do not have great technical difficulty usually. If the development and coding personnel are required to participate in the link, the utilization rate of the development and coding personnel can be reduced, and the cost of joint debugging of data joint test can be increased. The more reasonable work arrangement should be the operation and maintenance personnel to take care of completing the part of the work. When the data center designed and developed by the invention is used for data joint test joint debugging, development and coding personnel are not required to participate. The operation and maintenance personnel can complete the joint debugging with other systems only by solving the configuration mode of the metadata information description rule file. The decoupling of development coding personnel and data joint test joint debugging activities is realized, the utilization rate of the development coding personnel is improved, and the cost of the data joint test joint debugging is reduced.
Further, the step S2 is specifically:
and constructing an instance object of the data receiver interface, receiving the metadata through a UDP communication protocol, and transmitting the metadata to the data center context object.
The beneficial effects of the above further scheme are: based on the further scheme, the communication protocol type of data receiving can be configured in the application program attribute file, such as UDP, TCP, RPC and the like, so that the configurability of the data receiving protocol is realized; the expandability of data receiving is increased; data receiver instance objects that are compatible with different communication protocol implementations.
Further, the step S3 includes the following steps:
s31, creating a corresponding instance object of the data processor according to the received metadata through the context object of the data center;
s32, in the instance object of the data processor, generating a corresponding dynamic data analysis method for the metadata description of the currently received data structure according to the metadata information description rule file, and calling the dynamic data analysis method for the context object of the data center;
and S33, analyzing the received metadata through a dynamic data analysis method to obtain a formatted data entity.
The beneficial effects of the above further scheme are: in the original mode, every time a new data structure type is added, a new data entity, a new data analysis method and a new data entity assignment code are required to be created. Through the steps, the requirements of newly adding and modifying the data structure can be met only by once coding, and the dynamic expansion and analysis of the data structure are realized; and realizing dynamic generation and assignment of data entities.
Further, the step S4 is specifically:
constructing an instance object of the data distributor, and connecting the object through a WebSocket communication protocol to distribute the data entity to a front end Vue interface for inspection;
when the verification is passed, it is determined that the data entity is successfully distributed and the formatted data entity is correct, and the step S5 is entered;
and when the test fails, checking the smoothness of a WebSocket distribution communication channel and the accuracy of the currently generated dynamic data analysis method.
The beneficial effects of the above further scheme are: the data distribution mode can be configured in the application program attribute file, such as WebSocket, RPC and the like, so that the configurability of the data distribution mode is realized; it may be checked whether the distribution function of the data center component is available and whether the object formatted with the data parsing object is correct.
Further, the step S5 includes the following steps:
s51, judging whether a mapping table corresponding to the current data entity exists in the database;
if yes, go to step S52;
if not, go to step S53;
s52, dynamically generating an sql statement for inserting data, and directly inserting the current data entity into a corresponding mapping table to finish data entity storage;
and S53, creating and calling an instance object of a data storer to dynamically create a table according to the current data entity through the data center context object, dynamically generating an sql statement, and inserting the current data entity into the newly created mapping table to finish data entity storage.
The beneficial effects of the above further scheme are: in the original mode, when a new data entity is added, a database table needs to be manually added, modified or deleted; manually adding, modifying or deleting data table fields; manually creating, modifying or deleting the sql sentences; through the steps, manual operation is needed for multiple times, and automation and templating of the coding part are needed, so that manual misoperation is reduced, the efficiency and expandability of data storage coding are improved, and dynamic storage of data entities is realized.
Further, in step S52, when the field data type, the field name, the field description, and the field length of the mapping table corresponding to the current data entity are all consistent with the current data entity, directly inserting the current data entity into the corresponding mapping table, and completing the storage of the data entity; when at least one of the field data type, the field name and the field description of the table corresponding to the current data entity is inconsistent with the current data entity, inserting the current data entity through newly building a mapping table or building a mapping table to be inserted into the current data entity and synchronizing the data in the original corresponding mapping table to the newly built mapping table to finish data storage.
The beneficial effects of the above further scheme are: and inserting the current data entity by building a mapping table and synchronizing the data in the original corresponding mapping table to the newly built mapping table, so as to keep the consistency and the integrity of the data. Data loss is avoided.
Further, the data center component needs to be started before the data entity is distributed to the front end Vue interface.
The beneficial effects of the above further scheme are: by starting the data center component, Vue is ensured to be in an accessible state when the interface is connected.
A computer-readable storage medium, in which a computer program is stored which, when executed, implements the steps of a method of application of a data centre component.
The invention has the beneficial effects that: the computer program for realizing the application method of the data center component provides a corresponding computer readable storage medium, and a user can conveniently and directly use the storage medium to realize the associated debugging of the field software deployment data.
Drawings
Fig. 1 is a flowchart of an application method of a data center component according to the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
Example 1:
the embodiment of the invention provides computer equipment, wherein a data center component based on metadata-driven programming is configured in the computer equipment, is deployed in an application software program and is used for receiving, analyzing and distributing dynamic data and storing the dynamic data in the real-time coding process of the application software; the data center assembly includes:
the metadata information description rule file is used for simplifying and templating a dynamic data analysis process and a dynamic data storage process in application software code construction;
the data center behavior interface is used for realizing the decoupling of the data center component;
the data center context object is used for combining and scheduling data processors, data distributors and data storages in the data center component;
the dynamic data analysis module is used for describing the received metadata of the data structure according to the metadata information description rule file and performing formatting processing by adopting a uniform dynamic data analysis method to obtain a data entity;
the dynamic data storage module is used for storing the data entity to a database by adopting a uniform dynamic data storage method;
and the database is used for storing a storage table corresponding to the data entity.
The metadata information description rule file in this embodiment includes a data index of a data structure, a chinese name, an english name, a coding method, a detailed set of data structure components, a data structure component name, a data type of the data structure components, a length of the data structure components, and a description of the data structure components, which are determined based on the agreement programming.
The metadata information description rule file provided in this embodiment takes a JSON format as an example, and is shown in table 1 and table 2:
table 1: metadata information description rule file format template specification table
Figure GDA0003713003090000091
Figure GDA0003713003090000101
Figure GDA0003713003090000111
Table 2: metadata information description rule file composition description table
Figure GDA0003713003090000112
Figure GDA0003713003090000121
In the embodiment, in order to increase the expandability of each link of the data center component, the data center component is divided and atomized into data receiving, data processing, data distribution and data storage in a mode of designing a data center behavior interface; the data interface object in this embodiment includes a data receiver interface, a data processor interface, a data distributor interface, and a data depositor interface; the data receiver interface provides a uniform data receiving interface for data sent by an external system through a transmission protocol; the data processor interface provides a uniform data processing interface for the data analysis function realized by different data processing and formatting modes; the data distributor interface provides a uniform data distribution interface for realizing a distribution function by using different data distribution protocols; the data storage interface is a data storage interface provided by a storage function which uses different data sources as storage modes.
The data center behavior interface in this embodiment can implement flexible switching of various receiving and distributing communication protocols (UDP, TCP, WebSocket, and the like) through a policy design mode and an annotation mode of SpringBoot, and meet the requirements of various heterogeneous storage data sources (Oracl, Mysql, a file system). In this embodiment, an example of an interface formed by using Java as a programming language and using an ari code protocol for style and annotation, and a calling method are shown in table 3:
table 3: data interface object examples
Figure GDA0003713003090000131
Figure GDA0003713003090000141
Figure GDA0003713003090000151
In this embodiment, a policy design mode is adopted to implement data center behavior interface design, which increases expandability for data center components, so that data reception of multiple communication protocols can be realized, data distribution of multiple communication protocols can be realized, and multiple versatility of data processing modes and multiple heterogeneous data sources (such as Oracle, MySql, file system, etc.) of data storage can be realized; the problem of poor readability caused by complex code structure is solved by effectively annotating the data center behavior interface.
The code corresponding to the data center context object for realizing flexible combination, scheduling and undertaking of data processing, data distribution and data storage in the embodiment is shown in table 4;
table 4: data center context object code examples
Figure GDA0003713003090000152
Figure GDA0003713003090000161
Figure GDA0003713003090000171
Figure GDA0003713003090000181
Figure GDA0003713003090000191
Metadata in this embodiment refers to a description of the data structure itself; metadata-driven programming refers to dynamically configuring data structure names, field types, field lengths, field descriptions, encoding formats and the like in the data transmission process by combining the characteristics of a data structure, so that code flexibility and an extensible programming mode are improved.
The data center component provided by the embodiment of the invention is frequently added, deleted and modified in a data structure; the types, description and length of the constituent elements of the data structure are uncertain; data entities are newly built or modified, data analysis methods are newly built or modified, database tables are newly built or modified, data entities are assigned, and data sql statements are newly built or modified, so that simplification and templating processing are performed, and the purposes of reducing coding amount, improving coding efficiency and enhancing code expandability and maintainability are achieved.
According to the data center component provided by the embodiment of the invention, a data center is atomized into data receiving, data processing, data distribution and data storage in a code mode; the coupling of the data center is reduced, and the expandability of data receiving, processing, distributing and storing is improved; and flexible combination and scheduling of data processing, data distribution and data storage are completed through the context object of the data center.
Example 2:
an embodiment of the present invention provides an application method of a data center component in embodiment 1, as shown in fig. 1, including the following steps:
s1, preparation: constructing a metadata information description rule file, a data center behavior interface and a data center context object;
s2, receiving: receiving metadata through a data receiver interface;
s3, analysis: describing the received metadata of the data structure according to the metadata information description rule file, and formatting the metadata by adopting a uniform dynamic data analysis method to obtain a data entity;
s4, distribution: distributing the data entity to a corresponding demand party for inspection;
s5, storing: storing the data entity passing the inspection into a database;
s6, encoding: and repeating the steps S2-S5, and storing the data entities corresponding to all codes into the database to finish the dynamic real-time coding of the application software.
Step S2 of this embodiment specifically includes:
and constructing an instance object of the data receiver interface, receiving the metadata through a UDP communication protocol, and transmitting the metadata to the data center context object.
In this embodiment, the code for receiving data via UDP communication protocol and transmitting the data to the data center for context object processing is shown in table 5:
table 5: data center context object processing received data code examples
Figure GDA0003713003090000201
Figure GDA0003713003090000211
Figure GDA0003713003090000221
Step S3 of the present embodiment includes the steps of:
s31, creating a corresponding instance object of the data processor according to the received metadata through the context object of the data center;
s32, in the instance object of the data processor, generating a corresponding dynamic data analysis method for the metadata description of the currently received data structure according to the metadata information description rule file, and calling the dynamic data analysis method for the context object of the data center;
and S33, analyzing the received metadata through a dynamic data analysis method to obtain a formatted data entity.
In step S31 of this embodiment, the code corresponding to the instance object of the data processor is newly created by the data center context object according to the received metadata is shown in table 6:
table 6: example object code instances for data center context object Create data processors
Figure GDA0003713003090000231
In steps S32-S33 of this embodiment, examples of codes corresponding to the generated dynamic data parsing method and the obtained formatted data entity are shown in table 7:
table 7: method for generating dynamic data analysis and obtaining formatted data entity code example
Figure GDA0003713003090000241
Figure GDA0003713003090000251
Figure GDA0003713003090000261
Figure GDA0003713003090000271
Figure GDA0003713003090000281
Figure GDA0003713003090000291
Figure GDA0003713003090000301
In this embodiment, the code for generating the dynamic data analysis method only needs to be written once, and only the metadata information description rule file needs to be configured when a new data structure file needs to be added or a data structure component needs to be modified later.
Step S4 of the present embodiment includes the steps of:
constructing an instance object of the data distributor, and connecting the object through a WebSocket communication protocol to distribute the data entity to a front end Vue interface for inspection;
when the verification is passed, it is determined that the data entity is successfully distributed and the formatted data entity is correct, and the step S5 is entered;
and when the test fails, checking the smoothness of a WebSocket distribution communication channel and the accuracy of the currently generated dynamic data analysis method.
It should be noted that in this embodiment, the data center component needs to be started before the data entity is distributed to the front end Vue interface, otherwise, the Vue interface is displayed to be closed.
In this embodiment, the data center context object distributes the data entity to the front end Vue interface to check the corresponding code representation, for example, as shown in table 8 and table 9;
table 8: distributed data entity code examples
Figure GDA0003713003090000302
Figure GDA0003713003090000311
Figure GDA0003713003090000321
Figure GDA0003713003090000331
Table 9: vue verification of decoding code examples
Figure GDA0003713003090000332
Figure GDA0003713003090000341
Figure GDA0003713003090000351
Step S5 of the present embodiment includes the steps of:
s51, judging whether a mapping table corresponding to the current data entity exists in the database;
if yes, go to step S52;
if not, go to step S53;
s52, dynamically generating an sql statement for inserting data, and directly inserting the current data entity into a corresponding mapping table to finish data entity storage;
s53, dynamically building a table according to the instance object of the current data entity by the data center context object, dynamically generating sql statement, inserting the current data entity into the newly built mapping table, and completing the data entity storage.
In step S52 of this embodiment, when the field data type, the field name, the field description, and the field length of the mapping table corresponding to the current data entity are all consistent with the current data entity, the current data entity is directly inserted into the corresponding mapping table, and the data entity storage is completed;
when at least one of the field data type, the field name and the field description of the table corresponding to the current data entity is inconsistent with the current data entity, inserting the current data entity through newly building a mapping table or building a mapping table to be inserted into the current data entity and synchronizing the data in the original corresponding mapping table to the newly built mapping table to finish data storage.
The corresponding code representation for storing the data entity in the database in this embodiment is shown in table 10 and table 11, for example;
table 10: storing data entities into database code instances
Figure GDA0003713003090000361
Figure GDA0003713003090000371
Figure GDA0003713003090000381
Figure GDA0003713003090000391
Figure GDA0003713003090000401
Figure GDA0003713003090000411
Figure GDA0003713003090000421
Figure GDA0003713003090000431
Figure GDA0003713003090000441
Figure GDA0003713003090000451
Figure GDA0003713003090000461
Figure GDA0003713003090000471
Figure GDA0003713003090000481
Figure GDA0003713003090000491
Figure GDA0003713003090000501
Figure GDA0003713003090000511
Figure GDA0003713003090000521
Figure GDA0003713003090000531
Table 11: determining data entity data structure attribute examples
Figure GDA0003713003090000532
Figure GDA0003713003090000541
Figure GDA0003713003090000551
Figure GDA0003713003090000561
Figure GDA0003713003090000571
Figure GDA0003713003090000581
Example 3:
the embodiment of the invention provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the steps of the application method of the data center component are realized when the computer program is executed. For example, the computer readable storage medium may be the above-mentioned memory including program instructions executable by a processor of an electronic device to perform the method of applying the data center component in embodiment 2 above.
In the embodiment of the present invention, the computer-readable storage medium includes, but is not limited to, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, without departing from the principle of the present application, the present application can also make several improvements and modifications, and those improvements and modifications also fall into the protection scope of the claims of the present application.

Claims (10)

1. The computer equipment is characterized in that a data center component is deployed in an application program of the computer equipment, and the data center component is used for receiving data, analyzing dynamic data, distributing the data and storing the dynamic data in the real-time coding process of application software; the data center assembly includes:
the metadata information description rule file is used for simplifying and templating a dynamic data analysis process and a dynamic data storage process in application software code construction;
the data center behavior interface is used for realizing the decoupling of the data center component;
the data center context object is used for combining and scheduling data processors, data distributors and data storages in the data center component;
the dynamic data analysis module is used for describing the received metadata of the data structure according to the metadata information description rule file, and performing formatting processing by adopting a uniform dynamic data analysis method to obtain a data entity;
the dynamic data storage module is used for storing the data entities into a database by adopting a uniform dynamic data storage method;
and the database is used for storing a storage table corresponding to the data entity.
2. The computer device of claim 1, wherein the metadata information description rules file comprises a data index of the data structure, a chinese name, an english name, a coding method, a specification set of data structure components, a data structure component name, a data structure component data type, a data structure component length, and a data structure component description determined based on the treaty programming;
the data center behavior interface is realized through a strategy design mode and is annotated through an Ali code protocol, and comprises a data receiver interface, a data processor interface, a data distributor interface and a data storage interface;
the data receiver interface provides a uniform data receiving interface for data sent by an external system through a transmission protocol; the data processor interface provides a uniform data processing interface for the data analysis function realized by different data processing and formatting modes; the data distributor interface provides a uniform data distribution interface for realizing a distribution function by using different data distribution protocols; the data storage interface is a data storage interface provided by a storage function which uses different data sources as storage modes.
3. An application method based on the computer device of any one of claims 1 to 2, wherein a data center component is deployed in an application program of the computer device, and the application method of the data center component comprises the following steps:
s1, preparation: constructing a metadata information description rule file, a data center behavior interface and a data center context object;
s2, receiving: receiving metadata through a data receiver interface;
s3, analysis: describing the received metadata of the data structure according to the metadata information description rule file, and formatting the metadata by adopting a uniform dynamic data analysis method to obtain a data entity;
s4, distribution: distributing the data entity to a corresponding demand party for inspection;
s5, storing: storing the data entity passing the inspection into a database;
s6, encoding: and repeating the steps S2-S5, and storing the data entities corresponding to all codes into the database to finish the dynamic real-time coding of the application software.
4. The method as claimed in claim 3, wherein the step S2 is specifically as follows:
and constructing an instance object of the data receiver interface, receiving the metadata through a UDP communication protocol, and transmitting the metadata to the data center context object.
5. The method as claimed in claim 3, wherein the step S3 includes the steps of:
s31, creating a corresponding instance object of the data processor according to the received metadata through the context object of the data center;
s32, in the instance object of the data processor, generating a corresponding dynamic data analysis method for the metadata description of the currently received data structure according to the metadata information description rule file for the calling of the context object of the data center;
and S33, analyzing the received metadata by a dynamic data analysis method to obtain a formatted data entity.
6. The method as claimed in claim 3, wherein the step S4 is specifically as follows:
constructing an instance object of a data distributor, and connecting the object through a WebSocket communication protocol to distribute a data entity to a front-end Vue interface for inspection;
when the verification is passed, it is determined that the data entity is successfully distributed and the formatted data entity is correct, and the step S5 is entered;
and when the test fails, checking the smoothness of a WebSocket distribution communication channel and the accuracy of the currently generated dynamic data analysis method.
7. The method as claimed in claim 3, wherein the step S5 includes the steps of:
s51, judging whether a mapping table corresponding to the current data entity exists in the database;
if yes, go to step S52;
if not, go to step S53;
s52, dynamically generating an sql statement for inserting data, and directly inserting the current data entity into a corresponding mapping table to finish data entity storage;
s53, dynamically building a table according to the instance object of the current data entity by the data center context object, dynamically generating sql statement, inserting the current data entity into the newly built mapping table, and completing the data entity storage.
8. The method of claim 7, wherein in step S52, when the field data type, the field name, the field description, and the field length of the mapping table corresponding to the current data entity are all consistent with the current data entity, the current data entity is directly inserted into the corresponding mapping table, and the data entity storage is completed;
when the field data type, the field name and the field description of the table corresponding to the current data entity are inconsistent with at least one item of the current data entity, inserting the current data entity through newly building a mapping table or newly building a mapping table to be inserted into the current data entity and synchronizing the data in the original corresponding mapping table to the newly built mapping table to finish data storage.
9. The method of claim 6, wherein the data center component is started before the data entity is distributed to a front end Vue interface.
10. A computer-readable storage medium, in which a computer program is stored, characterized in that the steps of the method of application of the computer device according to any of claims 3 to 9 are implemented when the computer program is executed.
CN202210506110.XA 2022-05-11 2022-05-11 Computer equipment, application method thereof and storage medium Active CN114610725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210506110.XA CN114610725B (en) 2022-05-11 2022-05-11 Computer equipment, application method thereof and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210506110.XA CN114610725B (en) 2022-05-11 2022-05-11 Computer equipment, application method thereof and storage medium

Publications (2)

Publication Number Publication Date
CN114610725A CN114610725A (en) 2022-06-10
CN114610725B true CN114610725B (en) 2022-08-16

Family

ID=81869030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210506110.XA Active CN114610725B (en) 2022-05-11 2022-05-11 Computer equipment, application method thereof and storage medium

Country Status (1)

Country Link
CN (1) CN114610725B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1662011A (en) * 2004-02-27 2005-08-31 捷讯研究有限公司 System and method for building component applications using metadata defined mapping between message and data domains
CN1834908A (en) * 2005-03-14 2006-09-20 捷讯研究有限公司 System and method for applying development patterns for component based applications
CN101465796A (en) * 2007-12-19 2009-06-24 中国移动通信集团公司 Method, device and system for collecting and distributing P2P system metadata
CN101512503A (en) * 2005-04-29 2009-08-19 微软公司 XML application framework
CN101567890A (en) * 2009-06-05 2009-10-28 成都市华为赛门铁克科技有限公司 Metadata transmission method, client device and server device
CN102833331A (en) * 2012-08-21 2012-12-19 北京邦诺存储科技有限公司 Cloud storage system and metadata writing-in method and metadata reading method thereof
CN105528418A (en) * 2015-12-04 2016-04-27 东软集团股份有限公司 Design document generation method and apparatus
CN109462640A (en) * 2018-10-29 2019-03-12 上海掌门科技有限公司 A kind of metadata synchronization method, data terminal, interactive system and medium
CN109739893A (en) * 2018-12-28 2019-05-10 上海连尚网络科技有限公司 A kind of metadata management method, equipment and computer-readable medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1662011A (en) * 2004-02-27 2005-08-31 捷讯研究有限公司 System and method for building component applications using metadata defined mapping between message and data domains
CN1834908A (en) * 2005-03-14 2006-09-20 捷讯研究有限公司 System and method for applying development patterns for component based applications
CN101512503A (en) * 2005-04-29 2009-08-19 微软公司 XML application framework
CN101465796A (en) * 2007-12-19 2009-06-24 中国移动通信集团公司 Method, device and system for collecting and distributing P2P system metadata
CN101567890A (en) * 2009-06-05 2009-10-28 成都市华为赛门铁克科技有限公司 Metadata transmission method, client device and server device
CN102833331A (en) * 2012-08-21 2012-12-19 北京邦诺存储科技有限公司 Cloud storage system and metadata writing-in method and metadata reading method thereof
CN105528418A (en) * 2015-12-04 2016-04-27 东软集团股份有限公司 Design document generation method and apparatus
CN109462640A (en) * 2018-10-29 2019-03-12 上海掌门科技有限公司 A kind of metadata synchronization method, data terminal, interactive system and medium
CN109739893A (en) * 2018-12-28 2019-05-10 上海连尚网络科技有限公司 A kind of metadata management method, equipment and computer-readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《某银行元数据解析处理系统》;李克学;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20170215(第2期);I138-2304 *

Also Published As

Publication number Publication date
CN114610725A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN109829011B (en) Data synchronization method and device for distributed heterogeneous database
CN108829884B (en) Data mapping method and device
CN107368503A (en) Method of data synchronization and system based on Kettle
CN109254907A (en) A kind of interface testing report-generating method and system based on Java
CN111737227B (en) Data modification method and system
CN110737594A (en) Database standard conformance testing method and device for automatically generating test cases
KR20160063990A (en) COMPUTER-EXECUTABLE MODEL reverse engineering mETHOD AND APPARATUS PERFORMING THE SAME
CN114168190A (en) Interface document generation method and device, computer equipment and storage medium
CN113886485A (en) Data processing method, device, electronic equipment, system and storage medium
CN114185791A (en) Method, device and equipment for testing data mapping file and storage medium
CN115599359A (en) Code generation method, device, equipment and medium
CN114610725B (en) Computer equipment, application method thereof and storage medium
CN109429260B (en) Method and device for checking northbound data
CN117172214A (en) API file conversion method, system and computer storage medium
US10540157B2 (en) Systems to remove object relational mappings from a software project
CN116466927A (en) Code generation method, system, electronic device and storage medium for batch processing task
CN113485942B (en) Automatic testing method and device based on independent modules
CN114168614A (en) Data management method, system, computer equipment and storage medium
CN114185928A (en) Universal interface docking system, method, device and storage medium
CN114358596A (en) Index calculation method and device
CN115617333A (en) Data updating method and device, electronic equipment and storage medium
CN112685426A (en) NiFi-based Kafka consumption NewSQL CDC stream data conversion method
CN108334621B (en) Database operation method, device, equipment and computer readable storage medium
CN116755684B (en) OAS Schema generation method, device, equipment and medium
CN117390055B (en) JOOQ continuous list sentence generation method, device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant