CN113835692A - Dictionary data processing method and device, electronic equipment and computer storage medium - Google Patents
Dictionary data processing method and device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN113835692A CN113835692A CN202111135328.0A CN202111135328A CN113835692A CN 113835692 A CN113835692 A CN 113835692A CN 202111135328 A CN202111135328 A CN 202111135328A CN 113835692 A CN113835692 A CN 113835692A
- Authority
- CN
- China
- Prior art keywords
- dictionary
- annotation
- parameter
- parameters
- data
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims description 52
- 238000012545 processing Methods 0.000 claims description 20
- 238000004458 analytical method Methods 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000004806 packaging method and process Methods 0.000 claims description 8
- 238000011161 development Methods 0.000 abstract description 11
- 230000006870 function Effects 0.000 description 29
- 238000005516 engineering process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/316—Aspect-oriented programming techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a data processing method and device of a dictionary, electronic equipment and a computer storage medium, which comprises the steps of adding annotation to parameters to be analyzed by the dictionary in service data when the service data is loaded on a page in an application system to obtain annotation parameters, wherein the annotation parameters comprise data source parameters, data table parameters, data id parameters, return field parameters and return reference name parameters; determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter; and analyzing the annotation parameters by using the target dictionary logic class to determine dictionary data information. In the scheme, the parameters to be analyzed by the dictionary are annotated, so that multiple data sources are supported in an annotation form, and a new association does not need to be established with the table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing dictionary data, an electronic device, and a computer storage medium.
Background
At present, after an object and a state of the object in an application system are defined by using a dictionary value in an application, a dictionary in the system and a dictionary item corresponding to the dictionary are stored in a database. Reading the dictionary and the dictionary items from the database when the application is started, and storing the dictionary and the dictionary items into a memory; the user can process the data of the dictionary according to the business requirement in the foreground page. Since many dictionary data are associated with table data during processing of dictionary data, new association needs to be established with table data association during processing of dictionary data, and code redundancy occurs.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data processing method and apparatus for a dictionary, an electronic device, and a computer storage medium, so as to solve the problem of code redundancy in the prior art.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiments of the present invention shows a data processing method for a dictionary, where the method includes:
adding annotation to parameters to be analyzed by a dictionary in service data when the service data is loaded on a page in an application system to obtain annotation parameters, wherein the annotation parameters comprise data source parameters, data table parameters, data id parameters, return field parameters and return parameter name parameters;
determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter;
and analyzing the annotation parameter by using the target dictionary logic class to determine dictionary data information.
Optionally, adding an annotation to a parameter to be analyzed by the dictionary in the service data to obtain an annotation parameter, where the annotation parameter includes:
acquiring an attribute function of the service data, and performing format conversion on the attribute function of the service data according to a preset format;
analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by a dictionary;
and adding annotation to the parameter to be analyzed by the dictionary according to a preset rule to obtain an annotation parameter.
Optionally, the determining, based on the annotation parameter, a target dictionary logic class corresponding to the annotation parameter includes:
and determining a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters.
Optionally, the method further includes:
and packaging the reference back parameter in the annotation parameter and the dictionary item corresponding to the dictionary parameter, and displaying the reference back parameter and the dictionary item in a page of an application system.
A second aspect of the embodiments of the present invention shows a data processing apparatus for a dictionary, the apparatus including:
the system comprises an annotation adding unit, a parameter analyzing unit and a parameter analyzing unit, wherein the annotation adding unit is used for adding annotation to the parameter to be analyzed by a dictionary in the business data when the business data is loaded on a page in an application system to obtain annotation parameters, and the annotation parameters comprise data source parameters, data table parameters, data id parameters, return field parameters and return reference name parameters;
the determining unit is used for determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter;
and the analysis unit is used for analyzing the annotation parameter by using the target dictionary logic class to determine dictionary data information.
Optionally, the annotation adding unit includes:
the acquiring subunit is used for acquiring the attribute function of the service data and performing format conversion on the attribute function of the service data according to a preset format;
the processing subunit is used for analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by the dictionary;
and the annotation adding subunit is used for adding annotation to the parameter to be analyzed by the dictionary according to a preset rule to obtain an annotation parameter.
Optionally, the determining unit is specifically configured to: and determining a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters.
Optionally, the method further includes:
and the packaging unit is used for packaging the reference-back parameter in the annotation parameter and the dictionary item corresponding to the dictionary parameter and displaying the reference-back parameter and the dictionary item in a page of an application system.
A third aspect of the embodiments of the present invention shows an electronic device, where the electronic device is configured to run a program, where the program executes the data processing method for a dictionary shown in the first aspect of the embodiments of the present invention when running.
A fourth aspect of the embodiments of the present invention shows a computer storage medium, where the storage medium includes a storage program, and when the program runs, a device on which the storage medium is located is controlled to execute the data processing method of the dictionary shown in the first aspect of the embodiments of the present invention.
Based on the data processing method, the device, the electronic device and the computer storage medium for the dictionary, provided by the embodiment of the invention, the method comprises the following steps: adding annotation to parameters to be analyzed by a dictionary in service data when the service data is loaded on a page in an application system to obtain annotation parameters, wherein the annotation parameters comprise data source parameters, data table parameters, data id parameters, return field parameters and return parameter name parameters; determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter; and analyzing the annotation parameter by using the target dictionary logic class to determine dictionary data information. In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart illustrating a data processing method for a dictionary according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an application architecture of data processing of a dictionary according to an embodiment of the present invention;
FIG. 3 is a flow chart of a data processing apparatus of a dictionary according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating another data processing apparatus for a dictionary according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Referring to fig. 1, a flowchart of a data processing method of a dictionary according to an embodiment of the present invention is shown, where the method includes:
step S101: when business data are loaded on a page in an application system, adding annotation to parameters to be analyzed by a dictionary in the business data to obtain annotation parameters.
In step S101, the annotation parameter includes a data source parameter, a data table parameter, and a data id parameter, i.e., a query field parameter, a return field parameter, and a return parameter.
In the process of implementing step S101 specifically, all interface methods are used as entry points, that is, target methods for enhancing application notifications, parameters that need to be subjected to dictionary parsing are determined in the object of the returned service data, and corresponding annotations are added. When the target function is executed, the object of the business data to be returned is obtained by a surrounding notification method, the parameter with the annotation is filtered, the annotation on the parameter is analyzed continuously, the data source, the data table, the data id, the return field and the return reference name which are needed by the dictionary item needing to be analyzed are obtained, and therefore the data source parameter, the data table parameter, the data id parameter, the return field parameter and the return reference name parameter are determined.
It is understood that the parameter requiring the dictionary parsing may be added with annotations, and all or part of the parameter may be annotated, and in a specific implementation, part of the parameter is annotated.
Step S102: and determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter.
In the process of implementing step S102 specifically, the data source parameters in the annotation parameters are analyzed, so as to obtain the target dictionary logic class DictService corresponding to the data source parameters by using the reflection principle.
It should be noted that, if the annotation is needed to support multiple data sources, the current application is needed to be configured to also support multiple data sources, each data source corresponds to a dictionary logic class DictService, and a corresponding method is implemented.
Step S103: and analyzing the annotation parameter by using the target dictionary logic class to determine dictionary data information.
In the process of implementing step S103 specifically, a corresponding MasterDictService target dictionary logic class, that is, a method of a main dictionary logic layer is called, so as to inject a data table, a query field, a return field, and a reference name into a mybatis self-defined sql statement, and further determine dictionary data information corresponding to the service data, that is, the method of the MasterDictService main dictionary logic layer is used to process related service logic, so as to obtain the dictionary data information of the service data.
It should be noted that the dictionary data information includes reference parameter, dictionary entry corresponding to the dictionary parameter, and corresponding field information.
The dictionary values are used to record the state of the data or the corresponding data id stored in the relationship table, i.e., the correspondence.
Optionally, the reference-back parameter in the annotation parameter and the dictionary item corresponding to the dictionary parameter are packaged and displayed in a page of an application system.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Based on the data processing method of the dictionary shown in the embodiment of the present invention, in the process of specifically implementing step S101 to add annotation to the parameter to be analyzed by the dictionary in the service data to obtain annotation parameters, the method includes the following steps:
step S11: and acquiring an attribute function of the service data, and performing format conversion on the attribute function of the service data according to a preset format.
In the process of implementing step S11 specifically, the target method of the application programming interface api is executed, and each interface is taken as a tangent point @ pointcut to intercept data returned by the interface, that is, to receive a parameter to be analyzed by a dictionary, that is, an object, in the service data to be loaded. And then acquiring all attribute functions and parent classes of the object, and converting the attribute functions and the parent classes according to a preset format.
It should be noted that the predetermined format may be a JavaScript object notification (json) format. In particular, the json format is easy to read and understand, and easy to machine parse and generate.
Step S12: and analyzing the attribute function of the service data in the preset format to obtain parameters to be analyzed by the dictionary.
In the process of implementing step S12 specifically, the attribute function of the service data in the preset format is analyzed, the dictionary corresponding to the attribute function is analyzed, and a parameter to be analyzed by the dictionary is determined from the database.
Step S13: and adding annotation to the parameter to be analyzed by the dictionary according to a preset rule to obtain an annotation parameter.
In the process of step S13, the preset rules refer to the annotated characteristics and the Aspect Organization Programming (AOP) technique under the spring framework.
In the process of implementing step S13 specifically, based on the characteristics of the annotation and the support of the Aspect facet programming (AOP) technology under the spring framework, a custom annotation is added to the field to be analyzed, so as to obtain a data source parameter, a data table parameter, a data id parameter, a return field parameter, and a return reference name parameter.
It should be noted that the data source parameter refers to ds (data source), the data table parameter refers to dittatable (data table), the query field parameter refers to dittcode (query field), the return field parameter refers to ditext (return field), and the return parameter rfetname (return parameter).
Wherein the parameter value of the query field is the data value of the currently annotated object obtained by reflection.
The digttext is a target field to be queried, namely a return field.
Optionally, if the attribute function of the service data is successfully analyzed, multiple data source parameters in the annotation are identified and data sources are switched, then the query sql is operated through a mybatis frame, the result is cached, and then the query result is put into json in a key (reference back) -value (dictionary value) mode for returning, so that the loading speed is increased, and the number of times of connection with the database is greatly reduced.
It should be noted that AOP is a technology for implementing unified maintenance of program functions through a precompilation mode and a dynamic agent during running.
In the embodiment of the invention, the attribute function of the service data is obtained, and format conversion is carried out on the attribute function of the service data according to a preset format; analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by the dictionary; adding annotation to the parameters to be analyzed by the dictionary according to preset rules to obtain annotation parameters, and supporting multiple data sources in an annotation form, namely, analyzing across the data sources, so that new association does not need to be established with table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Based on the data processing method of the dictionary shown in the above embodiment of the present invention, in the process of executing step S102, based on the annotation parameter, to determine the target dictionary logic class corresponding to the annotation parameter, the method includes the following steps:
step S21: and determining a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters.
In the specific implementation process of step S21, parsing annotation parameters to be returned by a cut-plane programming aop class dictionary cut-plane class DictAspect defining annotations, and finding a data source corresponding to the ds; and acquiring a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes by using a reflection principle according to the data source parameters.
It should be noted that, if the annotation is needed to support multiple data sources, the current application is needed to be configured to also support multiple data sources, each data source corresponds to a dictionary logic class DictService, and a corresponding method is implemented.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then determining a target dictionary logic class corresponding to the data source parameters from the plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters, and then analyzing the annotation parameters by using the target dictionary logic class so as to quickly determine dictionary data information, thereby reducing code redundancy and further improving the development efficiency of the application.
In order to better understand the content of the data processing method of the dictionary shown in the above embodiment of the present invention, the application architecture of the data processing of the dictionary shown in fig. 2 is used for illustration, and the specific content is described in the following process.
For example: in the education system A, all school information and all student information in B city can be inquired.
The database of the education system a stores a data table biz _ student storing student information and a data table biz _ school storing school information, and the data table biz _ student storing student information stores a corresponding school schoolId.
Assuming that the information of all students called "Lisan" is loaded on the page of the education system A, the corresponding school information of the students is displayed on the page of the education system A.
Note that the student information includes student ids, student names, genders, identification cards, and school ids of all students in city B.
The method for executing the target of the programming interface api of the education system A is characterized in that each interface is used as a tangent point @ pointcut, and student information returned by the interfaces is intercepted, namely, parameters to be analyzed by a dictionary in the student information needing to be loaded, namely, objects are received. And then acquiring all attribute functions and parent classes of the object, and converting the attribute functions and the parent classes into the student information in the json format.
Analyzing the attribute function of the student letter in the json format, and analyzing the dictionary corresponding to the attribute function to determine the school schoolId in the student entity object student VO needing to add the annotation.
Then, based on the characteristics of the annotation and the support of the AOP technology for the facet-oriented programming under the spring framework, a custom annotation is added to the field (school ID) to be analyzed, that is, the annotation content is ditable ═ ditt (ds ═ master "," biz _ school ", ditocode ═ ID", ditext ═ Name ", and rfield Name ═ school Name), so as to obtain ds (master main data source), ditable (school information data table biz _ school), ditect (school ID field in the school information table of ditable), ditext (return field to be queried in the school information table, i.e., school Name in the biz _ school table), and rfieldname (alias of school Name).
Then, defining annotation facing facet programming aop class dictionary facet class DictAssiect analyzes ds (master main data source), dictTable (school information data table biz _ school), dictCode (school ID field in the dictTable school information table), dictText (school name in the biz _ school table), rfiedName (alias of school name), finding out the data source corresponding to ds; and acquiring a target dictionary logic class MasterDictService corresponding to the data source parameters from the DictService1 and the DictService2 in the plurality of initial dictionary logic classes by using the reflection principle.
Wherein, the masterDictService is an initial dictionary logic class DictService 1.
Finally, calling a corresponding method of the masterdintservice main dictionary logic layer, analyzing ds (master main data source), ditvtable (school information data table biz _ school), dittcode (school ID field in the dittcable school information table), ditext (school name in the biz _ school table), and rfidname (alias of school name), so as to analyze the annotation parameter as select { dittcext } as $ { rfidname } frame { dictTable } where $ { dictCode } { key } limit 1, and obtaining the corresponding school name schoolName, namely dictionary data information, that is, service processes related business logic by the method of the masterdintservice main dictionary logic layer.
Optionally, the schoolName field may be
{
"student number id" 20210801001",
"name": Lisan ",
"sex": for male ",
"id card idcard": 4306821xxxxxxxxx ",
"school number schoollId": 211",
"school name schoolName": Beijing university subsidiary middle school "}, a great face
"student number id" 20210802002",
"name": Lisan ",
"sex": "female",
"id card idcard": 4306821xxxxxxxxx ",
"school number schoollId": 985",
"school name schoolName": "attached school of the university of Qinghua" }.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Based on the above data processing method for a dictionary shown in the embodiment of the present invention, correspondingly, the embodiment of the present invention also discloses a data processing apparatus for a dictionary correspondingly, as shown in fig. 3, which is a schematic structural diagram of data processing for a dictionary shown in the embodiment of the present invention, and the apparatus includes:
the annotation adding unit 301 is configured to add an annotation to a parameter to be analyzed by a dictionary in business data when the business data is loaded on a page in an application system, so as to obtain an annotation parameter, where the annotation parameter includes a data source parameter, a data table parameter, a data id parameter, a return field parameter, and a return parameter name parameter.
A determining unit 302, configured to determine, based on the annotation parameter, a target dictionary logic class corresponding to the annotation parameter.
And the parsing unit 303 is configured to parse the annotation parameter by using the target dictionary logic class, and determine dictionary data information.
It should be noted that, the specific principle and the implementation process of each unit in the data processing apparatus of the dictionary disclosed in the above embodiment of the present invention are the same as the data processing method of the dictionary disclosed in the above embodiment of the present invention, and reference may be made to corresponding parts in the data processing method of the dictionary disclosed in the above embodiment of the present invention, which are not described herein again.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Optionally, based on the data processing apparatus of the dictionary shown in the foregoing embodiment of the present invention, the annotation adding unit 301 includes:
and the obtaining subunit is used for obtaining the attribute function of the service data and performing format conversion on the attribute function of the service data according to a preset format.
And the processing subunit is used for analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by the dictionary.
And the annotation adding subunit is used for adding annotation to the parameter to be analyzed by the dictionary according to a preset rule to obtain an annotation parameter.
In the embodiment of the invention, the attribute function of the service data is obtained, and format conversion is carried out on the attribute function of the service data according to a preset format; analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by the dictionary; adding annotation to the parameters to be analyzed by the dictionary according to preset rules to obtain annotation parameters, and supporting multiple data sources in an annotation form, namely, analyzing across the data sources, so that new association does not need to be established with table data association. And then, analyzing the annotation parameters through the target dictionary logic classes corresponding to the annotation parameters, so that dictionary data information can be quickly determined, code redundancy is reduced, and the development efficiency of the application is improved.
Optionally, based on the data processing apparatus of the dictionary shown in the foregoing embodiment of the present invention, the determining unit 302 is specifically configured to: and determining a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then determining a target dictionary logic class corresponding to the data source parameters from the plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters, and then analyzing the annotation parameters by using the target dictionary logic class so as to quickly determine dictionary data information, thereby reducing code redundancy and further improving the development efficiency of the application.
Optionally, the data processing apparatus based on the dictionary shown in the foregoing embodiment of the present invention, with reference to fig. 3 and fig. 4, further includes:
and the packaging unit 304 is configured to package the reference-back parameter in the annotation parameter and the dictionary item corresponding to the dictionary parameter, and display the package in a page of the application system.
In the embodiment of the invention, the parameters to be analyzed by the dictionary are annotated, and the multi-data source is supported in the form of annotation, namely, the cross-data source analysis, so that a new association does not need to be established with the table data association. And then, analyzing the annotation parameter through a target dictionary logic class corresponding to the annotation parameter so as to quickly determine dictionary data information, and packaging the obtained dictionary data information to display to a user. Therefore, code redundancy is reduced, and the development efficiency of the application is improved.
The embodiment of the invention also discloses electronic equipment, which is used for operating the database storage process, wherein the data processing method of the dictionary disclosed in the figure 1 is executed when the database storage process is operated.
The embodiment of the invention also discloses a computer storage medium, which comprises a storage database storage process, wherein when the storage database storage process runs, the equipment where the storage medium is located is controlled to execute the data processing method of the dictionary disclosed in the figure 1.
In the context of this disclosure, a computer storage medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method of data processing of a dictionary, the method comprising:
adding annotation to parameters to be analyzed by a dictionary in service data when the service data is loaded on a page in an application system to obtain annotation parameters, wherein the annotation parameters comprise data source parameters, data table parameters, data id parameters, return field parameters and return parameter name parameters;
determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter;
and analyzing the annotation parameter by using the target dictionary logic class to determine dictionary data information.
2. The method of claim 1, wherein adding annotation to the parameter to be parsed by the dictionary in the business data to obtain an annotation parameter comprises:
acquiring an attribute function of the service data, and performing format conversion on the attribute function of the service data according to a preset format;
analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by a dictionary;
and adding annotation to the parameter to be analyzed by the dictionary according to a preset rule to obtain an annotation parameter.
3. The method of claim 1, wherein said determining, based on said annotation parameter, a target dictionary logical class corresponding to said annotation parameter comprises:
and determining a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters.
4. The method of claim 1, further comprising:
and packaging the reference back parameter in the annotation parameter and the dictionary item corresponding to the dictionary parameter, and displaying the reference back parameter and the dictionary item in a page of an application system.
5. A dictionary data processing apparatus, characterized in that the apparatus comprises:
the system comprises an annotation adding unit, a parameter analyzing unit and a parameter analyzing unit, wherein the annotation adding unit is used for adding annotation to the parameter to be analyzed by a dictionary in the business data when the business data is loaded on a page in an application system to obtain annotation parameters, and the annotation parameters comprise data source parameters, data table parameters, data id parameters, return field parameters and return reference name parameters;
the determining unit is used for determining a target dictionary logic class corresponding to the annotation parameter based on the annotation parameter;
and the analysis unit is used for analyzing the annotation parameter by using the target dictionary logic class to determine dictionary data information.
6. The apparatus of claim 5, wherein the annotation adding unit comprises:
the acquiring subunit is used for acquiring the attribute function of the service data and performing format conversion on the attribute function of the service data according to a preset format;
the processing subunit is used for analyzing the attribute function of the service data in the preset format to obtain a parameter to be analyzed by the dictionary;
and the annotation adding subunit is used for adding annotation to the parameter to be analyzed by the dictionary according to a preset rule to obtain an annotation parameter.
7. The apparatus according to claim 5, wherein the determining unit is specifically configured to: and determining a target dictionary logic class corresponding to the data source parameters from a plurality of initial dictionary logic classes based on the data source parameters in the annotation parameters.
8. The apparatus of claim 5, further comprising:
and the packaging unit is used for packaging the reference-back parameter in the annotation parameter and the dictionary item corresponding to the dictionary parameter and displaying the reference-back parameter and the dictionary item in a page of an application system.
9. An electronic device, characterized in that the electronic device is configured to run a program, wherein the program performs the data processing method of the dictionary of any one of claims 1 to 4 when running.
10. A computer storage medium, characterized in that the storage medium comprises a stored program, wherein the device on which the storage medium is located is controlled to execute the data processing method of the dictionary according to any one of claims 1 to 4 when the program runs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111135328.0A CN113835692B (en) | 2021-09-27 | 2021-09-27 | Dictionary data processing method and device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111135328.0A CN113835692B (en) | 2021-09-27 | 2021-09-27 | Dictionary data processing method and device, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113835692A true CN113835692A (en) | 2021-12-24 |
CN113835692B CN113835692B (en) | 2024-09-17 |
Family
ID=78970792
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111135328.0A Active CN113835692B (en) | 2021-09-27 | 2021-09-27 | Dictionary data processing method and device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113835692B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114237806A (en) * | 2021-12-29 | 2022-03-25 | 瀚云科技有限公司 | Page information display method and device, electronic equipment and storage medium |
CN114676686A (en) * | 2022-05-30 | 2022-06-28 | 恒生电子股份有限公司 | Data dictionary processing method, translation method and related device |
CN117195863A (en) * | 2023-09-12 | 2023-12-08 | 蔷薇聚信(北京)科技有限公司 | Dictionary/field analysis method and device, micro-service system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103440272A (en) * | 2013-08-05 | 2013-12-11 | 北京康邦科技有限公司 | Database maintenance method and device |
CN109542412A (en) * | 2018-10-16 | 2019-03-29 | 平安普惠企业管理有限公司 | Interface message generation method, device, computer equipment and storage medium |
CN110069248A (en) * | 2019-03-16 | 2019-07-30 | 平安城市建设科技(深圳)有限公司 | Call method, device, equipment and the computer readable storage medium of interface data |
CN111767057A (en) * | 2020-06-29 | 2020-10-13 | 京东城市(北京)数字科技有限公司 | Data processing method and device |
-
2021
- 2021-09-27 CN CN202111135328.0A patent/CN113835692B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103440272A (en) * | 2013-08-05 | 2013-12-11 | 北京康邦科技有限公司 | Database maintenance method and device |
CN109542412A (en) * | 2018-10-16 | 2019-03-29 | 平安普惠企业管理有限公司 | Interface message generation method, device, computer equipment and storage medium |
CN110069248A (en) * | 2019-03-16 | 2019-07-30 | 平安城市建设科技(深圳)有限公司 | Call method, device, equipment and the computer readable storage medium of interface data |
CN111767057A (en) * | 2020-06-29 | 2020-10-13 | 京东城市(北京)数字科技有限公司 | Data processing method and device |
Non-Patent Citations (1)
Title |
---|
张显政;张华秋;: "基于元数据的检察机关与政法部门信息共享方法研究", 甘肃科技纵横, no. 09, 25 September 2016 (2016-09-25), pages 20 - 21 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114237806A (en) * | 2021-12-29 | 2022-03-25 | 瀚云科技有限公司 | Page information display method and device, electronic equipment and storage medium |
CN114237806B (en) * | 2021-12-29 | 2024-03-12 | 瀚云科技有限公司 | Page information display method and device, electronic equipment and storage medium |
CN114676686A (en) * | 2022-05-30 | 2022-06-28 | 恒生电子股份有限公司 | Data dictionary processing method, translation method and related device |
CN117195863A (en) * | 2023-09-12 | 2023-12-08 | 蔷薇聚信(北京)科技有限公司 | Dictionary/field analysis method and device, micro-service system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113835692B (en) | 2024-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10540383B2 (en) | Automatic ontology generation | |
US20200118566A1 (en) | Human-computer interaction processing system, method, storage medium, and electronic device | |
US9690775B2 (en) | Real-time sentiment analysis for synchronous communication | |
CN113835692A (en) | Dictionary data processing method and device, electronic equipment and computer storage medium | |
US9977770B2 (en) | Conversion of a presentation to Darwin Information Typing Architecture (DITA) | |
CN109189841B (en) | Multi-data source access method and system | |
CN111177231A (en) | Report generation method and report generation device | |
WO2017046729A1 (en) | Natural language interface to databases | |
CN110046287A (en) | A kind of the data query method, apparatus and storage medium unrelated with type of database | |
CN110232156B (en) | Information recommendation method and device based on long text | |
US20160357811A1 (en) | Webpage content search | |
CN110765101A (en) | Label generation method and device, computer readable storage medium and server | |
CN112463154A (en) | Page generation method, device and system and electronic equipment | |
US20110264703A1 (en) | Importing Tree Structure | |
CN111046640A (en) | Dynamic generation method and device of certification document | |
CN108241620B (en) | Query script generation method and device | |
US20150046443A1 (en) | Document-based search with facet information | |
US20180285460A1 (en) | Pickup article cognitive fitment | |
CN113051333B (en) | Data processing method and device, electronic equipment and storage medium | |
CN114995877A (en) | Variable configuration method and device | |
CN114328678A (en) | Method and device for displaying option information in service, electronic equipment and storage medium | |
CN114692583A (en) | Electronic form approval serial number generation method, device, equipment and storage medium | |
CN113220187A (en) | Micro banking business interaction method and related equipment | |
US20200097585A1 (en) | Optimization of data processing job execution using hash trees | |
CN110362790A (en) | Processing method, device, electronic equipment and the readable storage medium storing program for executing of font file |
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 |