CN113687825A - Software module construction method, device, equipment and storage medium - Google Patents
Software module construction method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113687825A CN113687825A CN202110981696.0A CN202110981696A CN113687825A CN 113687825 A CN113687825 A CN 113687825A CN 202110981696 A CN202110981696 A CN 202110981696A CN 113687825 A CN113687825 A CN 113687825A
- Authority
- CN
- China
- Prior art keywords
- software module
- metadata
- target
- data
- target software
- 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
- 238000010276 construction Methods 0.000 title claims abstract description 81
- 238000000034 method Methods 0.000 claims abstract description 32
- 230000008859 change Effects 0.000 claims description 15
- 238000009877 rendering Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 9
- 238000012508 change request Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000012423 maintenance Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000012800 visualization Methods 0.000 description 3
- 230000008520 organization Effects 0.000 description 2
- 238000001556 precipitation Methods 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 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/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/10—Requirements analysis; Specification techniques
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a storage medium for constructing a software module, wherein the method comprises the following steps: acquiring demand data of a target software module, and acquiring a target metadata model matched with the target software module according to the demand data; acquiring a target software module construction component corresponding to a target software module; and constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model. According to the technical scheme of the embodiment of the invention, the metadata model corresponding to the requirement data of the software module is obtained, the component is constructed through the software module, and the corresponding software module is constructed according to the metadata model, so that the construction efficiency of the software module is improved; meanwhile, the updating of the software module can be realized only by adjusting the metadata model, the multiplexing of the software module construction assembly is realized, the code quantity required to be modified for software updating is reduced, and the time cost is reduced.
Description
Technical Field
The embodiment of the invention relates to the technical field of software development, in particular to a method, a device, equipment and a storage medium for constructing a software module.
Background
With the rapid development of the software industry, the demands of users in various industries on software systems are increasingly vigorous. Meanwhile, the functions of the software system become more complex, and the development difficulty is increased.
In the existing software development mode, a large amount of development time is occupied by front-end interface customized development and back-end data organization service, the software development efficiency is difficult to improve so as to meet the requirement of continuous iteration, and a large amount of research and development manpower is required to be invested in the adaptation among different devices; in addition, the software front-end interface construction and the back-end data organization service are realized in a hard coding mode, once the business requirement is modified, corresponding front-end and back-end code modification is needed, and the workload is large; meanwhile, the high-similarity software modules with the same service type and different data sources have the problem of repeated coding, and the time consumption is huge.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for constructing a software module, provides a new way for constructing the software module based on a metadata model, can realize efficient research and development of the software module, reduces the number of software implementation codes needing to be modified due to software requirement modification, and reduces time cost.
In a first aspect, an embodiment of the present invention provides a method for constructing a software module, including:
acquiring demand data of a target software module, and acquiring a target metadata model matched with the target software module according to the demand data;
acquiring a target software module construction component corresponding to the target software module;
and constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model.
In a second aspect, an embodiment of the present invention further provides a device for constructing a software module, including:
the target metadata model acquisition module is used for acquiring the demand data of the target software module and acquiring a target metadata model matched with the target software module according to the demand data;
the target software module construction component acquisition module is used for acquiring a target software module construction component corresponding to the target software module;
and the target software module construction module is used for constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method for constructing a software module according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program implements the method for constructing the software module provided in any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the target metadata model matched with the target software module is obtained by obtaining the demand data of the target software module and according to the demand data; the target software module construction component corresponding to the target software module is obtained, and then the target software module corresponding to the demand data is constructed through the target software module construction component according to the target metadata model, so that the construction efficiency of the software module is improved; meanwhile, the updating of the software module can be realized only by adjusting the metadata model, the multiplexing of the software module construction assembly is realized, and the later maintenance cost and the maintenance workload of the software module realization code are greatly reduced.
Drawings
FIG. 1 is a flow chart of a method for constructing a software module according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of building a software module in another embodiment of the invention;
FIG. 3 is a schematic structural diagram of a software module constructing apparatus according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in another embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a method for constructing a software module according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a case where a software module is constructed based on a metadata model corresponding to requirement data of the software module, and the method may be executed by a software module constructing apparatus, which may be composed of hardware and/or software and may be generally integrated in an electronic device, and typically, may be integrated in a computer device installed with a software development application. As shown in fig. 1, the method specifically includes the following steps:
s110, acquiring demand data of the target software module, and acquiring a target metadata model matched with the target software module according to the demand data.
The software module refers to a functional module or a component of a software application; such as page displays or data services. A target metadata model comprising at least one set of metadata, each set of metadata comprising at least one metadata item; in this embodiment, the variable uncertain parts (for example, a query page and a result display page of software) in the software module are described by the metadata, and the description of the constantly changing software module can be realized by modifying the metadata definition, so that the expandability and adaptability of the software module can be improved, and the software quality can be improved.
It can be understood that, when each software module is developed and constructed, there is a certain need for elaboration of each software module, for example, functions and effects that can be achieved by each software module, and connection relationships between different software modules. By acquiring the demand data of the software module and determining the corresponding metadata model according to the demand data, the acquired metadata model can be ensured to reflect the development requirement of the software module, and further the constructed software module can be ensured to meet the development requirement.
In an optional implementation manner of this embodiment, obtaining the target metadata model matched with the target software module according to the requirement data may include: determining the definition of each metadata set and the definition of each metadata item in each metadata set according to the demand data; and forming a target metadata model matched with the target software module according to the defined metadata sets and the metadata items in the metadata sets.
Wherein the definition of the set of metadata includes at least one of a classification of the set of data, a contained data item, a key data item, a queryable data item, a exposable data item, an associated data set, and a similar data set. The definition of the metadata item includes at least one of a data property, a presentation property, an associated dictionary, an associated data item, and a similar data item. In the present embodiment, the definition of the metadata set and the definition of the metadata item are not particularly limited.
It will be appreciated that the definition of a set of metadata or the definition of a metadata item may be expressed in the form of numbers and characters, for example, classification a of a data set indicates that the current metadata set corresponds to a query service.
It should be noted that the metadata set may be classified from multiple dimensions, for example, by business, by collection, by generation, by source, and so on. The key data items define the subject objects described by the current metadata set, and can be social or natural subject objects such as identification people, places, things, objects and the like. Queryable data items defining metadata items that the current set of metadata can provide for querying; correspondingly, the data items can be displayed, and metadata items which can be displayed corresponding to the query result are defined. The associated data set refers to a metadata set directly associated with the current metadata set, and can be a source metadata set or a target metadata set. Similar datasets define synonymous metadata sets for the current metadata set, and they have similar data structures, possibly differing in partial metadata items, but all containing the same key data items.
Data attributes refer to basic attributes of the current metadata item, such as data type (e.g., value, date, time, and string, etc.), whether it is queryable, whether it is fixed length and byte length, etc. The presentation property refers to a visualization format for displaying the current metadata item on various terminal devices, such as a radio box, a multi-box, an input box, a date and time control, and the like. The associated dictionary is a metadata item for an enumeration type (one variable corresponds to multiple possible values), for example, nationality, country and region, and a dictionary code with standards. The associated data item refers to a metadata item directly associated with the current metadata item, and comprises metadata items which are replaceable in visual presentation and have important extensional significance. Similar data items, including synonyms of the current metadata items, or metadata items corresponding to uniform business meanings and different names.
In this embodiment, after acquiring the demand data of the target software module, first determining the structure of the target metadata model according to the demand data, for example, determining the number of metadata sets according to the number of pages to be displayed, determining the connection relationship between the metadata sets according to the display order of the display pages, and determining the number of metadata items in each metadata set according to the amount of data to be displayed in each display page; and further determining each metadata set and definition of the metadata items, and acquiring the constructed target metadata model.
And S120, acquiring a target software module construction component corresponding to the target software module.
The software module building component refers to a certain part in implementation code of a software functional module, and typically may include a page rendering component and a data service component.
It is understood that when similar software modules are constructed, most of the implementation codes of the software modules are determined to be unchanged, for example, display frame implementation codes, interface rendering codes and the like; in this embodiment, the determined part of the software module implementation code is stripped, the corresponding software module construction component is generated in advance, and when similar software modules are subsequently reconstructed or the same function is implemented, the corresponding software module construction component can be directly obtained without repeating the same coding operation, so that the development workload of the software modules can be greatly reduced.
In this embodiment, after the definition of the target metadata model is completed according to the requirement data of the target software module, the corresponding software module building component is automatically matched according to the definition of the target metadata model, and the construction of the target software module is realized through the corresponding software module building component, so that the operation of a user can be reduced, and the workload of the user can be reduced.
S130, according to the target metadata model, constructing a component through the target software module, and constructing a target software module corresponding to the demand data.
Specifically, after the target metadata model and the corresponding target software module building component are obtained, the target software module building component is operated, and the target metadata model is read through the target software module building component, so that the target software module is automatically built. Because the target metadata model is defined according to the demand data of the target software module, the target software module constructed according to the target metadata model can meet the corresponding demand data.
In this embodiment, after the construction of each software module is completed, the development of the target software can be realized through the combination of each software module; due to the adoption of the form of the software module, the function expansion of the target software is facilitated, and the expandability of the target software can be improved.
In an optional implementation manner of this embodiment, constructing, according to the target metadata model, a target software module corresponding to the requirement data through the target software module construction component may include:
constructing a software search interface according to the queryable data items in the metadata set and the definitions of the queryable data items through a page rendering component; and constructing a software display interface corresponding to the key data item according to the displayable data item in the metadata set and the definition of the displayable data item through a page rendering component.
The page rendering component can include a list, a card, a character type control, a time and date control and the like. In this embodiment, when an interface of target software is constructed, a target metadata model is read through a page rendering component to obtain a corresponding metadata set in the metadata model; furthermore, a search interface is constructed through the page rendering component according to the queryable data items and the definitions thereof in the current metadata set, and a search result display interface is constructed according to the displayable data items and the definitions thereof, so that the dynamic rendering of the target software interface is realized; it is worth noting that the search result display interface is constructed around the key data items, that is, the display information in the search result display interface is the corresponding search result obtained by using the key data items as the search information.
It should be noted that the difference between different software interfaces lies in the difference between metadata item definitions, and the adjustment of the software interfaces does not involve the change of page rendering components, and only needs to adjust the definition of corresponding metadata items or metadata sets; typically, if the presentation mode of a metadata item needs to be adjusted, only the presentation attribute of the metadata item needs to be adjusted, all metadata sets containing the metadata item and the referenced data service or software interface are automatically adjusted, and the workload of adjusting and updating the software module can be greatly reduced.
In addition, optionally, the data service component constructs input conditions of the data service according to the queryable data items in the metadata set and definitions of the queryable data items; and constructing an output result of the data service corresponding to the key data item according to the exposable data item in the metadata set and the definition of the exposable data item through the data service component.
The data service components may include a table control, a database control, and the like. When the back-end data service of the software module is constructed, the data service component respectively constructs the input conditions and the output results of the back-end data service according to each metadata item in the metadata set so as to realize the construction of the back-end data service of the software. In addition, the difference of the data service is also due to the difference of the definition of the corresponding metadata item, the adjustment of the data service does not relate to the change of the data service component, and only the definition of the corresponding metadata item needs to be adjusted; for example, adding an input condition to a data service simply needs to adjust the queryable data items corresponding to the metadata set.
In an optional implementation manner of this embodiment, the metadata model may be defined by a visual definition tool; specifically, the user may perform the defining operation of the metadata collection and the metadata item by dragging the preset defining item in the visualization tool.
Further, the visualization definition tool is associated with a metadata model operating system in advance; the metadata model operation system comprises a series of software module construction components which are packaged completely, can analyze and define the completed metadata model, and automatically search and operate the matched software module construction components so as to automatically realize the construction of the software module. The visual definition tool and the metadata model operating system are used for respectively executing the definition of the metadata model and the construction of the software module, so that repeated definition and construction work can be reduced to the greatest extent, and the workload of software development is reduced.
According to the technical scheme provided by the embodiment of the invention, the target metadata model matched with the target software module is obtained by obtaining the demand data of the target software module and according to the demand data; the target software module construction component corresponding to the target software module is obtained, and then the target software module corresponding to the demand data is constructed through the target software module construction component according to the target metadata model, so that the construction efficiency of the software module is improved; meanwhile, the updating of the software module can be realized only by adjusting the metadata model, the multiplexing of the software module construction assembly is realized, and the later maintenance cost and the maintenance workload of the software module realization code are greatly reduced.
Based on the foregoing embodiment, this embodiment specifically introduces that, when a software module addition request of a user is obtained, a software module to be added is constructed based on a constructed target software module.
Fig. 2 is a flowchart of a method for constructing a software module according to another embodiment of the present invention, and this embodiment provides a method for constructing a software module based on the foregoing technical solution, where the method includes:
s210, acquiring demand data of a target software module, and acquiring a target metadata model matched with the target software module according to the demand data.
And S220, acquiring a target software module construction component corresponding to the target software module.
And S230, constructing a target software module corresponding to the requirement data through the target software module construction component according to the target metadata model.
S240, responding to the software module adding request, and acquiring the data of the software module to be added.
The software module addition request is new addition command information of the software module, and may include requirement data for the software module to be added and a connection relationship between the software module to be added and other software modules.
It can be understood that the target software includes a plurality of software modules, when the current software module is constructed, the user may send a software module addition request to the terminal device, and the terminal device obtains the required data of the next software module to be constructed according to the received software module addition request. Or after the current target software is integrally constructed, if the target software needs to be updated iteratively, the user may also send a software module addition request to construct a new software module in the target software.
And S250, acquiring a metadata model to be added according to the required data to be added.
Specifically, according to the required data to be added, the number of the metadata sets in the metadata model to be added and the number of the metadata items in each metadata set are determined, the definitions of each metadata set and each metadata item are further determined, and finally the metadata model to be added corresponding to the required data to be added is obtained.
S260, calculating the similarity between each metadata set to be added in the metadata model to be added and each stored metadata set in the target metadata model, and determining a difference metadata item in the metadata set to be added when the similarity is determined to be greater than or equal to a preset similarity threshold value.
The preset similarity threshold may be set by user according to task requirements, which is not specifically limited in this embodiment. And the difference metadata items are metadata items in the metadata set to be added, which are not included in the stored metadata set.
It can be understood that, when the similarity between each metadata set to be added and the stored metadata set is particularly high (for example, the similarity is greater than or equal to 99%), at this time, the metadata model to be added and the current target metadata model may be regarded as a similar metadata model; in order to improve the construction efficiency of the software module to be added, at this time, the difference part may be correspondingly adjusted on the basis of the software module corresponding to the current target metadata model, and the adjusted software module is used as the software module to be added.
Secondly, if the similarity between each metadata set to be added and the stored metadata set is extremely low (for example, the similarity is less than or equal to 5%), indicating that no similarity exists between the metadata model to be added and the current target metadata model; at the moment, a software module construction component matched with the definition of the metadata model to be added is obtained, and the software module to be added is constructed according to the metadata model to be added through the current software module construction component.
In this embodiment, the calculating the similarity between different metadata sets may include: determining the similarity between the metadata set to be added and the stored metadata set according to the similarity between the definition of the metadata set to be added and the definition of the stored metadata set; specifically, the similarity between two metadata sets may be determined as a ratio of the same number of defined items in the two metadata sets to the total number of defined items.
In an optional implementation manner of this embodiment, calculating a similarity between each metadata set to be added in the metadata model to be added and each stored metadata set in the target metadata model may include: and calculating the intersection ratio of the key data items in the metadata set to be added and the key data items in the stored metadata set, and taking the calculation result as the similarity of the metadata set to be added and the stored metadata set.
The number of the key data items can be one or more, and the union ratio refers to the ratio of the union and the union. Taking the stored metadata set a ═ { I1, I2, I3, ·, In } { Ii, I ∈ N } as an example, I is an index of a metadata item, N is the number of metadata items, and a key data item thereof can be represented as Ak ═ { Ik }, Ik, which represents the kth metadata item of the stored metadata set; the metadata set to be added is B ═ { T1, T2, T3,. Tn }, { Tj, j ∈ M }, j is an index of a metadata item, M is the number of metadata items, and a key data item of the metadata item can be represented as Bk ═ { Tk }, Tk, which represents the kth metadata item of the metadata set to be added; the similarity between metadatum set a and metadatum set B may be expressed as r ═ Ak ≈ Bk |/| Ak | × 100%, where a ∞ B denotes the intersection of a and B, and a ∞ B denotes the union of a and B; | · | represents taking the modulus value.
S270, updating the target software module of the target metadata model according to the difference metadata item, and acquiring the updated target software module as the software module to be added corresponding to the software module adding request.
Specifically, after a difference metadata item is acquired from a metadata set to be added, a software module construction component corresponding to the difference metadata item is determined, and the difference metadata item is read through the corresponding software module construction component so as to correspondingly modify a target software module; it should be noted that, in this embodiment, only the portion, corresponding to the difference metadata item, of the target software module is modified, and the modified and updated target software module is used as a software module to be added, for example, the target software module corresponds to a search interface to be displayed, and when the difference metadata item is a queriable data item, only the searchable information of the search interface needs to be adjusted, and the search interface corresponding to the software module to be added can be obtained without performing overall adjustment on the search interface.
In the embodiment, when the similarity between the metadata model to be added and the stored metadata model is determined to be high, the difference metadata item is determined in the metadata set to be added, the target software module is adjusted and updated according to the difference metadata item, the software module is multiplexed, meanwhile, through the accumulation of the definition of the metadata model, knowledge precipitation is provided for the construction of the software module, through the utilization of the corresponding knowledge precipitation, the construction efficiency of the software module can be improved, and the workload required by the later maintenance of the software module is reduced.
In an optional implementation manner of this embodiment, after the constructing, by the target software module construction component, a target software module corresponding to the requirement data according to the target metadata model, the method may further include:
responding to a target software module requirement change request of a user, and acquiring change requirement data; according to the change demand data, correspondingly adjusting the target metadata model to obtain an adjusted target metadata model; and according to the adjusted target metadata model, constructing a target software module corresponding to the target software module requirement change request through the target software module construction component.
The software module requirement change request is command information which is adjusted according to the requirement corresponding to the current software module and comprises change requirement data.
It will be appreciated that as the software versions are updated iteratively, the requirements of the various software modules change. After receiving a target software module requirement change request sent by a user, the terminal equipment acquires change requirement data aiming at a target software module, and correspondingly modifies a target metadata model according to the current change requirement data to acquire a modified target metadata model; and operating the target software module construction assembly, reading the modified target metadata model, and completing the update of the target software module.
Wherein, according to the change demand data, correspondingly adjusting the target metadata model may include: and according to the change demand data, adjusting the number of the metadata sets in the target metadata model and the number of the metadata items in each metadata set, adjusting the definitions of each metadata set and each metadata item, and completing the corresponding adjustment of the target metadata model.
In this embodiment, when the software module needs to be modified or adjusted, the iterative update of the software module can be realized only by correspondingly modifying the matched metadata model and constructing the component through the fixed software module, so that the software development cost and the software development period are greatly reduced; meanwhile, the corresponding metadata model can be customized according to the preference of the user, so that the customization of the corresponding software module is realized, and the ever-increasing personalized requirements can be met.
According to the technical scheme provided by the embodiment of the invention, after a target metadata model corresponding to the required data of a target software module is obtained, a component is built through the target software module, the corresponding target software module is built according to the target metadata model, the corresponding required data to be added is obtained according to the received software module addition request, and the corresponding metadata model to be added is obtained according to the current required data to be added; when the similarity between the metadata model to be added and the target metadata model is determined to be larger than or equal to a preset similarity threshold, the difference metadata item is determined, the target software module is updated according to the current difference metadata item, and the updated target software module is used as the software module to be added, so that the efficient construction of the software module to be added is realized; by utilizing the constructed software module, the construction efficiency of the software module to be added can be improved, repeated coding is avoided, and the maintenance workload of the software can be greatly reduced.
Fig. 3 is a schematic structural diagram of a software module constructing apparatus according to another embodiment of the present invention. As shown in fig. 3, the apparatus includes: a target metadata model acquisition module 310, a target software module building component acquisition module 320, and a target software module building module 330. Wherein,
a target metadata model obtaining module 310, configured to obtain requirement data of a target software module, and obtain a target metadata model matched with the target software module according to the requirement data;
a target software module construction component obtaining module 320, configured to obtain a target software module construction component corresponding to the target software module;
and the target software module construction module 330 is configured to construct a target software module corresponding to the requirement data through the target software module construction component according to the target metadata model.
According to the technical scheme provided by the embodiment of the invention, the target metadata model matched with the target software module is obtained by obtaining the demand data of the target software module and according to the demand data; the target software module construction component corresponding to the target software module is obtained, and then the target software module corresponding to the demand data is constructed through the target software module construction component according to the target metadata model, so that the construction efficiency of the software module is improved; meanwhile, the updating of the software module can be realized only by adjusting the metadata model, the multiplexing of the software module construction assembly is realized, and the later maintenance cost and the maintenance workload of the software module realization code are greatly reduced.
Optionally, on the basis of the above technical solution, the target metadata model includes at least one metadata set; each of the sets of metadata includes at least one metadata item;
a target metadata model acquisition module 310 comprising:
the definition determining unit is used for determining the definition of each metadata set and the definition of each metadata item in each metadata set according to the demand data;
and the target metadata model forming unit is used for forming a target metadata model matched with the target software module according to each metadata set after definition and each metadata item in each metadata set.
Optionally, on the basis of the above technical solution, the definition of the metadata set includes at least one of a classification of a data set, a contained data item, a key data item, a queryable data item, a exposable data item, an associated data set, and a similar data set;
the definition of the metadata item includes at least one of a data property, a presentation property, an associated dictionary, an associated data item, and a similar data item.
Optionally, on the basis of the above technical solution, the target software module building module 330 includes:
the software search interface construction unit is used for constructing a software search interface according to the queryable data items in the metadata set and the definitions of the queryable data items through the page rendering component;
the software display interface construction unit is used for constructing a software display interface corresponding to the key data item according to the displayable data item and the definition of the displayable data item in the metadata set through the page rendering component; and
the input condition construction unit is used for constructing the input condition of the data service according to the queryable data item in the metadata set and the definition of the queryable data item through the data service component;
and the output result construction unit is used for constructing the output result of the data service corresponding to the key data item according to the exposable data item in the metadata set and the definition of the exposable data item through the data service component.
Optionally, on the basis of the above technical solution, the software module construction apparatus further includes:
the change demand data acquisition module is used for responding to a target software module demand change request of a user and acquiring change demand data;
and the target metadata model adjusting module is used for correspondingly adjusting the target metadata model according to the change demand data to obtain the adjusted target metadata model.
Optionally, on the basis of the above technical solution, the target software module construction module 330 is further configured to construct, according to the adjusted target metadata model, a target software module corresponding to the target software module requirement change request through the target software module construction component.
Optionally, on the basis of the above technical solution, the software module construction apparatus further includes:
the software module adding device comprises a to-be-added requirement data acquisition module, a to-be-added requirement data acquisition module and a to-be-added requirement data acquisition module, wherein the to-be-added requirement data acquisition module is used for responding to a software module adding request and acquiring to-be-added requirement data of a to-be-added software module;
the to-be-added metadata model acquisition module is used for acquiring a to-be-added metadata model according to the to-be-added demand data;
the difference metadata item determining module is used for calculating the similarity between each metadata set to be added in the metadata model to be added and each stored metadata set in the target metadata model, and determining a difference metadata item in the metadata set to be added when the similarity is determined to be greater than or equal to a preset similarity threshold;
and the target software module updating module is used for updating the target software module of the target metadata model according to the difference metadata item and acquiring the updated target software module as the software module to be added corresponding to the software module adding request.
Optionally, on the basis of the foregoing technical solution, the difference metadata item determining module is specifically configured to calculate an intersection ratio between a key data item in the metadata set to be added and a key data item in the stored metadata set, and use a calculation result as a similarity between the metadata set to be added and the stored metadata set.
The device can execute the construction method of the software module provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects for executing the method. For technical details which are not described in detail in the embodiments of the present invention, reference may be made to the methods for constructing software modules provided in all the aforementioned embodiments of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device according to another embodiment of the present invention, as shown in fig. 4, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of the processors 410 in the electronic device may be one or more, and one processor 410 is taken as an example in fig. 4; the processor 410, the memory 420, the input device 430 and the output device 440 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 4. The memory 420 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a software module construction method in any embodiment of the present invention (for example, the target metadata model acquisition module 310, the target software module construction component acquisition module 320, and the target software module construction module 330 in a software module construction apparatus). The processor 410 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 420, that is, implements one of the software module construction methods described above. That is, the program when executed by the processor implements:
acquiring demand data of a target software module, and acquiring a target metadata model matched with the target software module according to the demand data;
acquiring a target software module construction component corresponding to the target software module;
and constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to an electronic device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus, and may include a keyboard, a mouse, and the like. The output device 440 may include a display device such as a display screen.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to any of the embodiments of the present invention. Of course, the embodiment of the present invention provides a computer-readable storage medium, which can perform relevant operations in a method for constructing a software module according to any embodiment of the present invention. That is, the program when executed by the processor implements:
acquiring demand data of a target software module, and acquiring a target metadata model matched with the target software module according to the demand data;
acquiring a target software module construction component corresponding to the target software module;
and constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the above embodiment of the software module construction apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A method of constructing a software module, comprising:
acquiring demand data of a target software module, and acquiring a target metadata model matched with the target software module according to the demand data;
acquiring a target software module construction component corresponding to the target software module;
and constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model.
2. The method of claim 1, wherein the target metadata model comprises at least one set of metadata; each of the sets of metadata includes at least one metadata item;
according to the demand data, acquiring a target metadata model matched with the target software module, wherein the target metadata model comprises the following steps:
determining the definition of each metadata set and the definition of each metadata item in each metadata set according to the demand data;
and forming a target metadata model matched with the target software module according to the defined metadata sets and the metadata items in the metadata sets.
3. The method of claim 2, wherein the definition of the set of metadata includes at least one of a classification of the set of data, a containment data item, a key data item, a queryable data item, a exposable data item, an associated data item, and a similar data item;
the definition of the metadata item includes at least one of a data property, a presentation property, an associated dictionary, an associated data item, and a similar data item.
4. The method of claim 3, wherein building, by the target software module building component, a target software module corresponding to the requirements data according to the target metadata model comprises:
constructing a software search interface according to the queryable data items in the metadata set and the definitions of the queryable data items through a page rendering component;
constructing a software display interface corresponding to the key data item according to the displayable data item in the metadata set and the definition of the displayable data item through a page rendering component; and
constructing input conditions of the data service according to the queryable data items in the metadata set and definitions of the queryable data items through a data service component;
and constructing an output result of the data service corresponding to the key data item according to the exposable data item in the metadata set and the definition of the exposable data item through the data service component.
5. The method of claim 1, further comprising, after building, by the target software module building component, a target software module corresponding to the requirements data according to the target metadata model:
responding to a target software module requirement change request of a user, and acquiring change requirement data;
according to the change demand data, correspondingly adjusting the target metadata model to obtain an adjusted target metadata model;
and according to the adjusted target metadata model, constructing a target software module corresponding to the target software module requirement change request through the target software module construction component.
6. The method of claim 1, further comprising, after building, by the target software module building component, a target software module corresponding to the requirements data according to the target metadata model:
responding to a software module adding request, and acquiring the data of the software module to be added;
acquiring a metadata model to be added according to the required data to be added;
calculating the similarity between each metadata set to be added in the metadata model to be added and each stored metadata set in the target metadata model, and determining a difference metadata item in the metadata set to be added when the similarity is determined to be greater than or equal to a preset similarity threshold;
and updating the target software module of the target metadata model according to the difference metadata item, and acquiring the updated target software module as the software module to be added corresponding to the software module adding request.
7. The method of claim 6, wherein calculating the similarity between each to-be-added metadata set in the to-be-added metadata model and each stored metadata set in the target metadata model comprises:
and calculating the intersection ratio of the key data items in the metadata set to be added and the key data items in the stored metadata set, and taking the calculation result as the similarity of the metadata set to be added and the stored metadata set.
8. An apparatus for constructing a software module, comprising:
the target metadata model acquisition module is used for acquiring the demand data of the target software module and acquiring a target metadata model matched with the target software module according to the demand data;
the target software module construction component acquisition module is used for acquiring a target software module construction component corresponding to the target software module;
and the target software module construction module is used for constructing a target software module corresponding to the demand data through the target software module construction component according to the target metadata model.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more computer programs;
the method of constructing a software module according to any one of claims 1-7, when the one or more computer programs are executed by the one or more processors such that the one or more processors execute the computer programs.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of constructing a software module as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110981696.0A CN113687825B (en) | 2021-08-25 | 2021-08-25 | Method, device, equipment and storage medium for constructing software module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110981696.0A CN113687825B (en) | 2021-08-25 | 2021-08-25 | Method, device, equipment and storage medium for constructing software module |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113687825A true CN113687825A (en) | 2021-11-23 |
CN113687825B CN113687825B (en) | 2023-12-12 |
Family
ID=78582443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110981696.0A Active CN113687825B (en) | 2021-08-25 | 2021-08-25 | Method, device, equipment and storage medium for constructing software module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113687825B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114356472A (en) * | 2021-12-03 | 2022-04-15 | 浙江臻善科技股份有限公司 | System interface differential dynamic rendering method |
CN115794214A (en) * | 2023-02-09 | 2023-03-14 | 中邮消费金融有限公司 | Application module metadata management method, device, storage medium and device |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101231614A (en) * | 2008-02-02 | 2008-07-30 | 南京大学 | A Software Defect Location Method Based on Execution Trajectory Block Similarity |
US20160154629A1 (en) * | 2014-11-28 | 2016-06-02 | Ludo Franciscus Maria NOENS | Application builder based on metadata |
CN106649771A (en) * | 2016-12-27 | 2017-05-10 | 广州杰赛科技股份有限公司 | Data model updating method and system for database |
CN106843835A (en) * | 2016-12-21 | 2017-06-13 | 中国电子科技网络信息安全有限公司 | A kind of application systems software constructing system of meta data customizing, system constituting method |
CN107203529A (en) * | 2016-03-16 | 2017-09-26 | 中国移动通信集团河北有限公司 | Multi-service correlation analysis method and device based on metadata graph structural similarity |
CN109445792A (en) * | 2018-11-05 | 2019-03-08 | 用友网络科技股份有限公司 | Interface construction method, device and computer readable storage medium |
CN111142855A (en) * | 2020-04-03 | 2020-05-12 | 中邮消费金融有限公司 | Software development method and software development system |
CN111311082A (en) * | 2020-02-05 | 2020-06-19 | 绍兴大明电力设计院有限公司 | Power distribution design model generation method, device, equipment and storage medium |
CN111680085A (en) * | 2020-05-07 | 2020-09-18 | 北京三快在线科技有限公司 | Data processing task analysis method and device, electronic equipment and readable storage medium |
-
2021
- 2021-08-25 CN CN202110981696.0A patent/CN113687825B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101231614A (en) * | 2008-02-02 | 2008-07-30 | 南京大学 | A Software Defect Location Method Based on Execution Trajectory Block Similarity |
US20160154629A1 (en) * | 2014-11-28 | 2016-06-02 | Ludo Franciscus Maria NOENS | Application builder based on metadata |
CN107203529A (en) * | 2016-03-16 | 2017-09-26 | 中国移动通信集团河北有限公司 | Multi-service correlation analysis method and device based on metadata graph structural similarity |
CN106843835A (en) * | 2016-12-21 | 2017-06-13 | 中国电子科技网络信息安全有限公司 | A kind of application systems software constructing system of meta data customizing, system constituting method |
CN106649771A (en) * | 2016-12-27 | 2017-05-10 | 广州杰赛科技股份有限公司 | Data model updating method and system for database |
CN109445792A (en) * | 2018-11-05 | 2019-03-08 | 用友网络科技股份有限公司 | Interface construction method, device and computer readable storage medium |
CN111311082A (en) * | 2020-02-05 | 2020-06-19 | 绍兴大明电力设计院有限公司 | Power distribution design model generation method, device, equipment and storage medium |
CN111142855A (en) * | 2020-04-03 | 2020-05-12 | 中邮消费金融有限公司 | Software development method and software development system |
CN111680085A (en) * | 2020-05-07 | 2020-09-18 | 北京三快在线科技有限公司 | Data processing task analysis method and device, electronic equipment and readable storage medium |
Non-Patent Citations (3)
Title |
---|
JAVIER NOGUERAS-ISO 等: ""A model driven approach for the development of metadata editors, applicability to the annotation of geographic information resources"", 《DATA & KNOWLEDGE ENGINEERING》, pages 118 - 139 * |
吴优玲 等: ""元数据模型设计原理及具体应用"", 《工业控制计算机》, pages 85 - 87 * |
吴军 等: ""基于元数据的流程模型相似性度量方法"", 《计算机技术与发展》, pages 49 - 54 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114356472A (en) * | 2021-12-03 | 2022-04-15 | 浙江臻善科技股份有限公司 | System interface differential dynamic rendering method |
CN115794214A (en) * | 2023-02-09 | 2023-03-14 | 中邮消费金融有限公司 | Application module metadata management method, device, storage medium and device |
Also Published As
Publication number | Publication date |
---|---|
CN113687825B (en) | 2023-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106796578B (en) | Autoknowledge system and method and memory | |
EP3916584A1 (en) | Information processing method and apparatus, electronic device and storage medium | |
CN111512315A (en) | Block-wise extraction of document metadata | |
CN112052138A (en) | Service data quality detection method and device, computer equipment and storage medium | |
CN111125254A (en) | Database synchronization method and device, electronic equipment and computer readable medium | |
CN112114787B (en) | Report generation method, device and storage medium | |
CN113687825B (en) | Method, device, equipment and storage medium for constructing software module | |
CN111427577A (en) | Code processing method and device and server | |
CN113297287A (en) | User policy automatic deployment method and device and electronic equipment | |
CN114707474A (en) | Report generation method and device, electronic equipment and computer readable storage medium | |
CN112182359A (en) | Feature management method and system of recommendation model | |
CN115080039A (en) | Front-end code generation method, apparatus, computer equipment, storage medium and product | |
CN112506486A (en) | Search system establishing method and device, electronic equipment and readable storage medium | |
CN114064925A (en) | Knowledge graph construction method, data query method, device, equipment and medium | |
CN113434585A (en) | Resource saving method and equipment | |
CN112559914A (en) | Index data display method and device | |
CN116450723A (en) | Data extraction method, device, computer equipment and storage medium | |
CN103809915A (en) | Read-write method and device of magnetic disk files | |
CN116955856A (en) | Information display method, device, electronic equipment and storage medium | |
CN117035639A (en) | Business form and process automatic association processing method for process engine | |
CN115292370A (en) | Business document data processing method, device and medium | |
CN111767703B (en) | Form data acquisition method, device and system | |
CN115186188A (en) | Product recommendation method, device and equipment based on behavior analysis and storage medium | |
CN114637822A (en) | Legal information query method, device, equipment and storage medium | |
CN111680516A (en) | PDM system product design requirement information semantic analysis and extraction method and system |
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 |