CN112486481B - Multi-module layered architecture implementation method and device, electronic equipment and medium - Google Patents

Multi-module layered architecture implementation method and device, electronic equipment and medium Download PDF

Info

Publication number
CN112486481B
CN112486481B CN202011410435.5A CN202011410435A CN112486481B CN 112486481 B CN112486481 B CN 112486481B CN 202011410435 A CN202011410435 A CN 202011410435A CN 112486481 B CN112486481 B CN 112486481B
Authority
CN
China
Prior art keywords
modules
module
hierarchy
setting
dependency relationship
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011410435.5A
Other languages
Chinese (zh)
Other versions
CN112486481A (en
Inventor
孙振义
王帅
段进伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhanxinzhanli Information Technology Co ltd
Original Assignee
Beijing Zhanxinzhanli Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhanxinzhanli Information Technology Co ltd filed Critical Beijing Zhanxinzhanli Information Technology Co ltd
Priority to CN202011410435.5A priority Critical patent/CN112486481B/en
Publication of CN112486481A publication Critical patent/CN112486481A/en
Application granted granted Critical
Publication of CN112486481B publication Critical patent/CN112486481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a multi-module layered architecture implementation method, a multi-module layered architecture implementation device, electronic equipment and a medium. The method comprises the following steps: acquiring a plurality of modules; determining a hierarchy of modules in the architecture; classifying the modules based on their hierarchy; and setting the dependency relationship between the modules based on the hierarchy of the modules, wherein the recycling rate of the module codes is improved by setting the dependency relationship between the modules. The confusion caused by module accumulation is avoided, and the development efficiency is greatly improved; the repeated utilization rate of the module codes is improved, and the development cost is reduced.

Description

Multi-module layered architecture implementation method and device, electronic equipment and medium
Technical Field
The invention relates to the field of software development, in particular to a multi-module layered architecture implementation method.
Background
With the development of the internet, software needs to bear various service scenes, and with the gradual expansion of the software scale, the number of modules is also increasing. Iterative development of mobile-side applications typically requires separate modules. The module responsible person generally only needs to pay attention to the codes of the modules of the responsible person, the interfaces among the modules are generally fixed, the module codes can be easily and independently separated, and the development efficiency is greatly improved by multiplexing the module codes in each project, so that the module responsible person has a modular meaning.
The modules are divided into two categories, a main module and a sub-module, the main module typically being only one, there being a plurality of sub-modules, each sub-module being in a separate directory. As the number of modules increases, sub-modules can even reach tens or hundreds. Hundreds of modules are directly stacked under an engineering root directory, so that searching for a target module becomes very difficult, and code maintenance becomes a disaster. The dependency relationship between them is very complex, even mutual dependency and ring dependency occur, and the interfaces are gradually complex, so that it is very difficult to separate a module with an independent function, and the modularization meaning is lost.
In summary, with the above technical problems caused by the increase of the number of modules, it is especially necessary to provide a multi-module layered architecture implementation method with higher development efficiency.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a multi-module layered architecture implementation method, which is used for solving the defect of low development efficiency caused by very complex dependency relationship among modules in the prior art, and realizing the effects of improving code reusability, improving development efficiency and reducing development cost.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for implementing a multi-module layered architecture, including:
acquiring a plurality of modules;
determining a hierarchy of modules in the architecture; and
and setting the dependency relationship among the modules based on the hierarchy of the modules, wherein the recycling rate of the module codes is improved by setting the dependency relationship among the modules.
Further, setting the dependencies between the modules based on the hierarchy of the modules includes:
setting the dependency relationship between the modules as follows based on the hierarchy of the modules:
the dependence of higher-level modules on lower-level modules; and
unidirectional direct dependencies between modules at the same hierarchy level.
Further, setting the dependencies between the modules based on the hierarchy of the modules further includes:
identifying abnormal dependencies between the modules;
the dependencies between the modules are adjusted based on the identified abnormal dependencies between the modules.
Further, setting the dependencies between the modules based on the hierarchy of the modules further includes:
identifying compatibility between modules based on the increase or decrease of interfaces between modules and the result of code checking;
the dependencies between the modules are adjusted based on the identified compatibility among the modules.
Further, the method further comprises:
the modules are classified based on their hierarchy.
Further, classifying the module based on the hierarchy of the module includes:
dividing the module into a base layer module, a functional layer module, a service layer module and an application layer module based on the level of the module, wherein the level of the module is as follows from high to low in sequence: an application layer module, a service layer module, a functional layer module and a base layer module.
Further, the method further comprises:
each of the business layer modules is compiled separately.
Further, the method further comprises:
the functional layer module and the base layer module utilize unit testing to realize self iteration.
Further, the method is applied to the development of mobile terminal applications.
In a second aspect, the present invention provides a multi-module layered architecture implementation apparatus, including:
an acquisition unit configured to acquire a plurality of modules;
a determining unit for determining a hierarchy of modules in the architecture; and
and the setting unit is used for setting the dependency relationship among the modules based on the hierarchy of the modules, wherein the recycling rate of the module codes is improved.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the multi-module layered architecture implementation method as described above when the program is executed.
In a fourth aspect, the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the multi-module hierarchical architecture implementation method as described above.
The multi-module layered architecture implementation method provided by the invention is suitable for a multi-person collaborative development architecture layered design scheme, is particularly used for large-scale iterative development of mobile terminal application, classifies the modules by judging the hierarchy of the modules in the architecture and based on the hierarchy of the modules, avoids confusion caused by module accumulation, and greatly improves development efficiency; and the dependency relationship among the modules is set based on the hierarchy of the modules, and the repeated utilization rate of the module codes is improved by setting the dependency relationship among the modules, so that the development cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for implementing a multi-module layered architecture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an abnormal dependency relationship between modules in the prior art;
FIG. 3 is a schematic diagram of the hierarchy and dependency of modules according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a multi-module layered architecture implementation device according to an embodiment of the present invention; and
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the existing modularized design scheme, hundreds of modules are directly stacked under an engineering root directory, so that searching for a target module becomes very difficult, and code maintenance becomes a disaster. The dependency relationship between them is very complex, even mutual dependency and ring dependency occur, and the interface is gradually complex, so that it is very difficult to separate a module with an independent function, and the modularization meaning is lost. Resulting in inefficiency of development.
Therefore, the improved modularized architecture layering design scheme brings the beneficial effects of improving the development efficiency, improving the code recycling rate and reducing the development cost for large-scale software development. Therefore, the present invention provides a method, an apparatus, an electronic device, and a medium for implementing a multi-module layered architecture, and details of the present invention are explained and illustrated in the following by specific embodiments.
Fig. 1 shows a flowchart of a multi-module layered architecture implementation method provided by an embodiment of the present invention. As shown in fig. 1, the method for implementing the multi-module layered architecture provided by the embodiment of the invention includes the following steps:
step 110: acquiring a plurality of modules;
step 120: determining a hierarchy of modules in the architecture; and
step 130: and setting the dependency relationship among the modules based on the hierarchy of the modules, wherein the recycling rate of the module codes is improved by setting the dependency relationship among the modules.
In step 110, the obtained modules include modules of different levels, which may implement different functions in one example. The number of modules of the same hierarchy may be one or more, the modules of the same hierarchy may have the same or different structures, and the modules of the same hierarchy may realize the same or different functions. In one example, a module includes a main module and at least one sub-module, and a process of creating the main module and the at least one sub-module is included before the main module and the at least one sub-module are acquired. In one example, the modules include four attributes, input and output, logic functions, running programs, internal data.
In step 120, in one example, the hierarchy of the module is determined by a high-level developer at the beginning of the module build. In one example, the main module and the at least one sub-module are divided into 4 levels, and of course, the main module and the at least one sub-module may be divided into 3 levels, and those skilled in the art will recognize that the number of levels of module division in the architecture may be set and adjusted according to actual needs, and the number of levels of module division in the architecture should not be taken as a limitation of the present invention.
In step 130, the dependency relationships between the modules are set based on the hierarchy of the modules, wherein the reuse rate of the module code is improved by setting the dependency relationships between the modules.
Specifically, the dependency relationship between the setting modules is:
the high-level modules depend on the low-level modules, i.e. the application layer modules depend on the service layer modules, the service layer modules depend on the function layer modules, and the function layer modules depend on the base layer modules.
The dependency may be cross-level, i.e., the application layer modules may depend on the functional layer modules and/or the base layer modules.
The co-hierarchical modules may depend directly but not on each other.
Low-level modules cannot rely on high-level modules.
In the embodiment, the module dependency relationship is normalized according to the hierarchy, so that the chaotic dependency relationship of the module is avoided, and the module codes can be multiplexed better and faster.
Based on any one of the foregoing embodiments, in the method for implementing a multi-module layered architecture according to another embodiment of the present invention, the method further includes:
the modules are classified based on their hierarchy.
Specifically, the modules are classified according to a module abstraction level, and all the modules are divided into four layers, namely a base layer, a function (func) layer, a business layer and an application (app) layer.
In the above embodiment, by classifying the modules by hierarchy, module storm is avoided.
Based on the foregoing embodiments, in the method for implementing a multi-module hierarchical architecture according to another embodiment of the present invention, classifying the modules based on the hierarchy of the modules includes:
dividing the module into a base layer module, a functional layer module, a service layer module and an application layer module based on the level of the module, wherein the level of the module is as follows from high to low in sequence: an application layer module, a service layer module, a function layer module, and a base layer module, as shown in fig. 3.
Wherein the modules of the base layer are the most basic classes of modules, in which are placed: access to the network, save configuration, information collection, process communication, performance monitoring, etc., which does not include any interfaces (UIs), the base layer module is not visible to the user.
Modules in the modules of the functionality layer contain some simple functional components, such as sharing, payment, downloading, etc., contain some simple interfaces (UIs), which are visible to the user, but these modules typically do not appear directly as separate functions.
The modules of the business layer are independent functions such as: the modules of the general service layer have independent interfaces and service logics, can call a base layer and a function (func) layer, and combine with the interfaces (UI) to form complete and available functions.
The application layer contains only the master module.
In the embodiment, each module and the layer thereof are effectively organized and defined, disorder caused by module accumulation is avoided, and development efficiency is greatly improved.
Based on any one of the foregoing embodiments, in the method for implementing a multi-module hierarchical architecture according to another embodiment of the present invention, setting the dependency relationship between the modules based on the hierarchy of the modules includes:
setting the dependency relationship between the modules as follows based on the hierarchy of the modules:
the dependence of the high-level modules on the low-level modules; and
unidirectional direct dependencies between modules at the same hierarchy level.
In one example, the application layer module relies on a business layer module, the business layer module relies on a function layer module, and the function layer module relies on a base layer module, as shown in particular in fig. 3.
In addition, the modules may be dependent hierarchically between each other, i.e., in one example, the application layer module may rely on a functional layer module or a base layer module; the traffic layer module may rely on the base layer module.
In addition, modules at the same hierarchy may be directly dependent, but not interdependent, i.e., modules that are logically adjacent may only be dependent unidirectionally between modules at the same hierarchy.
In addition, low-level modules cannot rely on high-level modules. That is, the base layer module cannot rely on other modules at a higher level than itself.
In the embodiment, the good dependency relationship among the modules is set according to the module level, so that the code reusability is improved, and the development cost is reduced.
Based on any one of the foregoing embodiments, in the method for implementing a multi-module hierarchical architecture according to another embodiment of the present invention, setting the dependency relationship between the modules based on the hierarchy of the modules further includes:
identifying abnormal dependencies between the modules;
the dependencies between the modules are adjusted based on the identified abnormal dependencies between the modules.
In one example, the "abnormal" dependency between modules generally refers to a dependency that does not conform to the dependency in the above embodiment, that is, for example, a dependency in which a low-level module depends on a high-level module, a dependency in which the modules depend on each other (as shown in fig. 2), a dependency in which the modules depend on each other in both directions in the same level, a dependency in which the modules depend on each other in the same level, and the like. Of course, interdependence, ring dependencies, etc. are also included.
In one example, abnormal dependencies are automatically identified using a dependency analysis visualization tool.
Specifically, the examination is performed at the time of compilation, because erroneous dependency results in compilation failure, which implies the possibility that an abnormal dependency exists.
Specifically, after the abnormal dependency relationship is identified, the decoupling operation is performed on the abnormal dependency relationship.
In the above embodiment, based on the identified abnormal dependency relationship between the modules, the dependency relationship between the modules is reorganized, so that code reusability is improved, and development cost is reduced.
Based on any one of the foregoing embodiments, in the method for implementing a multi-module hierarchical architecture according to another embodiment of the present invention, setting the dependency relationship between the modules based on the hierarchy of the modules further includes:
identifying compatibility between modules based on the increase or decrease of interfaces between modules and the result of code checking;
the dependencies between the modules are adjusted based on the identified compatibility among the modules.
Specifically, when the compatibility between the modules is not good, decoupling is performed on the dependency relationship between the corresponding modules.
In one example, when compatibility between modules is identified as being less than a threshold, a decoupling operation is performed on dependencies between the respective modules. And when the compatibility between the modules is identified to be greater than or equal to a certain threshold value, decoupling the dependency relationship between the corresponding modules.
The increase and decrease conditions of the interfaces between the modules are discovered in time by automatically deriving an interface list between the modules at regular intervals. On the basis of determining the increase and decrease of interfaces between modules through the interface list, strict code inspection is performed, so that the problem of module incompatibility is found. That is, the compatibility between modules is identified based on both the increase or decrease of the interfaces between modules and the result of the code check. Of course, in one example, compatibility between modules may also be identified based on one of an increase or decrease in interfaces between modules and a result of code checking.
In the embodiment, based on the identified compatibility between the modules, the dependency relationship between the modules is reorganized, so that the code reusability is improved, and the development cost is reduced.
Based on any one of the foregoing embodiments, in the method for implementing a multi-module layered architecture according to another embodiment of the present invention, the method further includes:
each of the business layer modules is compiled separately.
In the above embodiment, the modules in the business layer can be compiled and run independently by using the customized compiling technology, so that all codes do not need to be compiled independently, and development efficiency is greatly improved.
Based on any one of the foregoing embodiments, in the method for implementing a multi-module layered architecture according to another embodiment of the present invention, the method further includes:
the functional layer module and the base layer module utilize unit testing to realize self iteration.
The functional layer module and the base layer module comprise perfect unit test codes, and the iterative development of the functional layer module and the base layer module can be realized by running the unit test codes without depending on the call of an upper layer to the functional layer module and the base layer module.
The layers of the invention are directly distributed to a leader (leader), and the modules are directly distributed to development individuals, so that the multi-module layered architecture implementation method is particularly suitable for large team collaborative development. The invention discloses an architecture layering design scheme suitable for multi-person collaborative development, and the method or the scheme of the invention is suitable for iterative development of mobile terminal application.
The invention provides a multi-module layered architecture implementation method, which is suitable for a multi-person collaborative development architecture layered design scheme, is particularly used for large-scale iterative development of mobile terminal application, and classifies modules by judging the hierarchy of the modules in the architecture and based on the hierarchy of the modules, so that disorder caused by module accumulation is avoided, and development efficiency is greatly improved; and the dependency relationship among the modules is set based on the hierarchy of the modules, and the repeated utilization rate of the module codes is improved by setting the dependency relationship among the modules, so that the development cost is reduced.
The multi-module layered architecture implementation device provided by the invention is described below, and the multi-module layered architecture implementation device described below and the multi-module layered architecture implementation method described above can be referred to correspondingly.
Fig. 4 illustrates a physical schematic diagram of a multi-module layered architecture implementation apparatus, and as shown in fig. 4, the electronic device may include:
an acquisition unit 410 for acquiring a plurality of modules;
a determining unit 420, configured to determine a hierarchy of modules in the architecture; and
and a setting unit 430, configured to set a dependency relationship between the modules based on the hierarchy of the modules, where by setting the dependency relationship between the modules, a recycling rate of module codes is improved.
Further, the setting unit 430 sets the dependency relationship between the modules based on the hierarchy of the modules as:
the dependence of the high-level modules on the low-level modules; and
unidirectional direct dependencies between modules at the same hierarchy level.
Further, the setting unit 430 sets the dependency relationship between the modules based on the hierarchy of the modules further includes:
identifying abnormal dependencies between the modules;
the dependencies between the modules are adjusted based on the identified abnormal dependencies between the modules.
Further, the setting unit 430 sets the dependency relationship between the modules based on the hierarchy of the modules further includes:
identifying compatibility between modules based on the increase or decrease of interfaces between modules and the result of code checking;
the dependencies between the modules are adjusted based on the identified compatibility among the modules.
Further, the apparatus further comprises:
and the classification unit is used for classifying the modules based on the hierarchy of the modules.
Further, the classification unit divides the modules into a base layer module, a functional layer module, a service layer module and an application layer module based on the hierarchy of the modules, wherein the hierarchy of the modules is sequentially from high to low: an application layer module, a service layer module, a functional layer module and a base layer module.
Further, the apparatus further comprises:
and the compiling unit is used for compiling each module in the business layer module independently.
Further, the apparatus further comprises:
and the iteration unit is used for realizing self iteration by the functional layer module and the base layer module through unit testing without calling the functional layer module and the base layer module by a higher-level module.
Further, the device is applied to the development of mobile terminal applications.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a multi-module hierarchical architecture implementation method comprising:
acquiring a plurality of modules;
determining a hierarchy of modules in the architecture; and
and setting the dependency relationship among the modules based on the hierarchy of the modules, wherein the recycling rate of the module codes is improved by setting the dependency relationship among the modules.
It will be appreciated that the refinement and expansion functions that the computer program may perform are as described with reference to the above embodiments.
Based on the same inventive concept, a further embodiment of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements all the steps of the above-described multi-module hierarchical architecture implementation method.
It will be appreciated that the refinement and expansion functions that the computer program may perform are as described with reference to the above embodiments.
Based on the same inventive concept, a further embodiment of the present invention provides a computer program product comprising a computer program which, when executed by a processor, implements all the steps of the above-mentioned method for implementing a multi-module hierarchical architecture.
It will be appreciated that the refinement and expansion functions that the computer program may perform are as described with reference to the above embodiments.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment of the invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the above technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform the security defense method described in the respective embodiments or some parts of the embodiments.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, in the present disclosure, descriptions of the terms "one embodiment," "some embodiments," "examples," "particular examples," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for implementing a multi-module layered architecture, comprising:
acquiring a plurality of modules;
determining a hierarchy of modules in the architecture; and
setting the dependency relationship among the modules based on the hierarchy of the modules, wherein the repeated utilization rate of module codes is improved by setting the dependency relationship among the modules;
wherein setting the dependency relationship between the modules based on the hierarchy of the modules includes: identifying compatibility between modules based on the increase or decrease of the interfaces between the modules and the result of code checking; adjusting dependencies between the modules based on the identified compatibility between the modules;
adjusting the dependencies between the modules based on the identified compatibility among the modules includes: when the compatibility among the modules is identified to be smaller than a certain threshold, decoupling the dependency among the corresponding modules; when the compatibility between the modules is identified to be greater than or equal to a certain threshold, decoupling operation is not carried out on the dependency relationship between the corresponding modules;
the increase and decrease conditions of the interfaces between the modules are discovered in time by automatically deriving an interface list between the modules at regular intervals, and code checking is performed on the basis of determining the increase and decrease conditions of the interfaces between the modules through the interface list, so that the problem of incompatibility of the modules is discovered.
2. The method of claim 1, wherein,
setting the dependency between the modules based on the hierarchy of the modules includes:
setting the dependency relationship between the modules based on the hierarchy of the modules to include:
the dependence of higher-level modules on lower-level modules; and
unidirectional direct dependencies between modules at the same hierarchy level.
3. The method for implementing the multi-module layered architecture according to claim 1 or 2, wherein,
setting the dependency between the modules based on the hierarchy of the modules includes:
identifying abnormal dependencies between the modules;
the dependencies between the modules are adjusted based on the identified abnormal dependencies between the modules.
4. The multi-module layered architecture implementation method of claim 1, wherein the method further comprises:
the modules are classified based on their hierarchy.
5. The method of claim 4, wherein,
classifying the modules based on their hierarchy includes:
dividing the module into a base layer module, a functional layer module, a service layer module and an application layer module based on the level of the module, wherein the level of the module is as follows from high to low in sequence: an application layer module, a service layer module, a functional layer module and a base layer module.
6. The multi-module layered architecture implementation method of claim 5, further comprising:
each of the business layer modules is compiled separately.
7. The multi-module layered architecture implementation method of claim 5, further comprising:
the functional layer module and the base layer module utilize unit testing to realize self iteration.
8. The multi-module layered architecture implementation method according to claim 1, wherein the method is applied in the development of mobile-end applications.
9. A multi-module layered architecture implementation apparatus, comprising:
an acquisition unit configured to acquire a plurality of modules;
a determining unit for determining a hierarchy of modules in the architecture; and
the setting unit is used for setting the dependency relationship among the modules based on the hierarchy of the modules, wherein the repeated utilization rate of the module codes is improved by setting the dependency relationship among the modules;
wherein the setting unit is further configured to: identifying compatibility between modules based on the increase or decrease of the interfaces between the modules and the result of code checking; adjusting dependencies between the modules based on the identified compatibility between the modules;
adjusting the dependencies between the modules based on the identified compatibility among the modules includes: when the compatibility among the modules is identified to be smaller than a certain threshold, decoupling the dependency among the corresponding modules; when the compatibility between the modules is identified to be greater than or equal to a certain threshold, decoupling operation is not carried out on the dependency relationship between the corresponding modules;
the increase and decrease conditions of the interfaces between the modules are discovered in time by automatically deriving an interface list between the modules at regular intervals, and code checking is performed on the basis of determining the increase and decrease conditions of the interfaces between the modules through the interface list, so that the problem of incompatibility of the modules is discovered.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the multi-module layered architecture implementation method of any of claims 1-8 when the program is executed.
11. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the multi-module hierarchical architecture implementation method according to any of claims 1-8.
CN202011410435.5A 2020-12-03 2020-12-03 Multi-module layered architecture implementation method and device, electronic equipment and medium Active CN112486481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011410435.5A CN112486481B (en) 2020-12-03 2020-12-03 Multi-module layered architecture implementation method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011410435.5A CN112486481B (en) 2020-12-03 2020-12-03 Multi-module layered architecture implementation method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112486481A CN112486481A (en) 2021-03-12
CN112486481B true CN112486481B (en) 2024-03-19

Family

ID=74939456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011410435.5A Active CN112486481B (en) 2020-12-03 2020-12-03 Multi-module layered architecture implementation method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112486481B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113835751B (en) * 2021-09-30 2024-01-09 北京达佳互联信息技术有限公司 Code testing method, device, electronic equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010086871A1 (en) * 2009-01-28 2010-08-05 Harshal Ingale A modularized micro processor design
WO2010147010A1 (en) * 2009-06-17 2010-12-23 日本電気株式会社 Module classification analysis system, module classification analysis method, and module classification analysis program
CN102810065A (en) * 2011-05-31 2012-12-05 国际商业机器公司 Method and system for loading program modules
JP2014164701A (en) * 2013-02-27 2014-09-08 Azapa Co Ltd Model analysis support program, model analysis support device and storage medium
CN105760166A (en) * 2016-02-23 2016-07-13 浪潮通用软件有限公司 Source code automatic construction achieving method based on layering
CN107145353A (en) * 2017-05-05 2017-09-08 武汉斗鱼网络科技有限公司 Software frame and Design of Software Framework method
CN109871229A (en) * 2019-01-16 2019-06-11 平安普惠企业管理有限公司 Management method, device, storage medium and the terminal device of code text
CN110007920A (en) * 2018-01-04 2019-07-12 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment obtaining code dependence
CN110096280A (en) * 2019-03-18 2019-08-06 中国平安人寿保险股份有限公司 Creation method, device, computer installation and the storage medium of code engineering
CN110399119A (en) * 2019-06-18 2019-11-01 五八有限公司 A kind of modularization construction method, device, electronic equipment and storage medium
CN111367506A (en) * 2020-03-03 2020-07-03 腾讯科技(深圳)有限公司 Data generation method, data generation device, storage medium and electronic device
CN111459499A (en) * 2020-04-20 2020-07-28 网易(杭州)网络有限公司 Program compiling method and device, computer storage medium and electronic equipment
CN111666100A (en) * 2020-05-13 2020-09-15 深圳思为科技有限公司 Software framework generation method and device, electronic equipment and storage medium
CN112015404A (en) * 2020-08-27 2020-12-01 深圳开立生物医疗科技股份有限公司 Ultrasonic image diagnosis system, construction method thereof, ultrasonic device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8745584B2 (en) * 2007-05-03 2014-06-03 International Business Machines Corporation Dependency injection by static code generation
CN103546826B (en) * 2012-07-16 2017-07-21 上海贝尔股份有限公司 The transmission method and device of video traffic
US9141380B2 (en) * 2013-04-30 2015-09-22 Oracle International Corporation Method and system for visualization of large codebases
US9658836B2 (en) * 2015-07-02 2017-05-23 Microsoft Technology Licensing, Llc Automated generation of transformation chain compatible class

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010086871A1 (en) * 2009-01-28 2010-08-05 Harshal Ingale A modularized micro processor design
WO2010147010A1 (en) * 2009-06-17 2010-12-23 日本電気株式会社 Module classification analysis system, module classification analysis method, and module classification analysis program
CN102810065A (en) * 2011-05-31 2012-12-05 国际商业机器公司 Method and system for loading program modules
JP2014164701A (en) * 2013-02-27 2014-09-08 Azapa Co Ltd Model analysis support program, model analysis support device and storage medium
CN105760166A (en) * 2016-02-23 2016-07-13 浪潮通用软件有限公司 Source code automatic construction achieving method based on layering
CN107145353A (en) * 2017-05-05 2017-09-08 武汉斗鱼网络科技有限公司 Software frame and Design of Software Framework method
CN110007920A (en) * 2018-01-04 2019-07-12 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment obtaining code dependence
CN109871229A (en) * 2019-01-16 2019-06-11 平安普惠企业管理有限公司 Management method, device, storage medium and the terminal device of code text
CN110096280A (en) * 2019-03-18 2019-08-06 中国平安人寿保险股份有限公司 Creation method, device, computer installation and the storage medium of code engineering
CN110399119A (en) * 2019-06-18 2019-11-01 五八有限公司 A kind of modularization construction method, device, electronic equipment and storage medium
CN111367506A (en) * 2020-03-03 2020-07-03 腾讯科技(深圳)有限公司 Data generation method, data generation device, storage medium and electronic device
CN111459499A (en) * 2020-04-20 2020-07-28 网易(杭州)网络有限公司 Program compiling method and device, computer storage medium and electronic equipment
CN111666100A (en) * 2020-05-13 2020-09-15 深圳思为科技有限公司 Software framework generation method and device, electronic equipment and storage medium
CN112015404A (en) * 2020-08-27 2020-12-01 深圳开立生物医疗科技股份有限公司 Ultrasonic image diagnosis system, construction method thereof, ultrasonic device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Inspecting Coding Dependency in Layered Video Coding for Efficient Unequal Error Protection;Mohammad Reza Zakerinasab;《2015 IEEE 35th International Conference on Distributed Computing Systems》;20150723;1-7 *
一种软件模块管理通用机制的设计与实现;李平勇;《成都大学学报(自然科学版)》;20200724;197-180 *
模块化组织运行机理的整合性架构研究;任浩;《同济大学学报(社会科学版)》;20091231;98-103 *

Also Published As

Publication number Publication date
CN112486481A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
US11323273B2 (en) System and method for generating a blockchain application for different blockchain technologies
US20200401386A1 (en) Reconfiguring application software into microservice architecture
US20070214391A1 (en) Method and apparatus for testing software
CN104331366A (en) Test case design efficiency promotion method and system
CN106021093A (en) Test case reuse method and system
CN101379504B (en) Access control management method and system for composite application based on roles
CN111931172A (en) Financial system business process abnormity early warning method and device
CN112486481B (en) Multi-module layered architecture implementation method and device, electronic equipment and medium
CN109165102B (en) Constraint solver distributed scheduling method based on intelligent contracts
CN113052696B (en) Financial business task processing method, device, computer equipment and storage medium
CN107368330A (en) Client patch restorative procedure, device and system
CN115525534A (en) Test case generation method and platform based on swagger interface test
Uzunov et al. Assessing and improving the quality of security methodologies for distributed systems
EP4025994A1 (en) Enhanced virtual machine image management system
Madapudi et al. Change requests artifacts to assess impact on structural design of SDLC phases
KR20110067418A (en) System and method for monitoring and evaluating a self-healing system
CN115048158A (en) Process arranging and calling method, system and computer equipment thereof
CN105760293B (en) The method and system of muti-language support test
CN113127359A (en) Method and device for obtaining test data
CN113342647A (en) Test data generation method and device
CN112748947A (en) System configuration method and device, storage medium and electronic equipment
CN111538491A (en) Data event processing method, device, equipment and storage medium
CN111061640B (en) Software reliability test case screening method and system
CN112783791B (en) Interface test case generation method and device
Jang et al. Object-oriented component identification method using the affinity analysis technique

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