CN114217848A - Dependency relationship processing method and device, electronic equipment and computer storage medium - Google Patents
Dependency relationship processing method and device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN114217848A CN114217848A CN202111638839.4A CN202111638839A CN114217848A CN 114217848 A CN114217848 A CN 114217848A CN 202111638839 A CN202111638839 A CN 202111638839A CN 114217848 A CN114217848 A CN 114217848A
- Authority
- CN
- China
- Prior art keywords
- module
- sub
- dependency relationship
- target
- dependency
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000012795 verification Methods 0.000 claims abstract description 44
- 230000006870 function Effects 0.000 claims description 73
- 238000000034 method Methods 0.000 claims description 32
- 238000012545 processing Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 10
- 238000012423 maintenance Methods 0.000 description 9
- 238000004458 analytical method Methods 0.000 description 8
- 230000001419 dependent effect Effects 0.000 description 7
- 238000013508 migration Methods 0.000 description 7
- 230000005012 migration Effects 0.000 description 7
- 238000010276 construction Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
- 230000000007 visual effect Effects 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/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure provides a dependency relationship processing method and device, electronic equipment and a computer storage medium, and relates to the technical field of computers, in particular to the technical fields of software engineering, engineering efficiency and the like. Determining dependency relationship information among a plurality of sub-modules of a target module according to a configuration file of the target module; checking the dependency relationship information to obtain a checking result; and updating the dependency relationship information according to the verification result. The embodiment of the disclosure can improve the utilization rate of the module and reduce unnecessary redundant information.
Description
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to the field of software engineering and engineering efficiency.
Background
In recent years, the number of mobile devices has increased dramatically with the spread of the internet, and the number of users who have mobile devices and the number of mobile devices that users all have also increased rapidly. Based on software or APP (Application) installed and operated on the smart device or the mobile device, different services can be provided for users to use. Similarly, with the development of the internet industry, many software or application products provide long-term service for users, and with the technical development of many years, the scale of the software or application products is also increasing, in this case, the process cost of software or application product iteration becomes higher, and the influence surface is larger, so that the potential research, development, update and maintenance costs of the software or application products are increased.
Disclosure of Invention
The disclosure provides a dependency relationship processing method and device, electronic equipment and a computer storage medium.
According to an aspect of the present disclosure, there is provided a dependency relationship processing method, including:
determining dependency relationship information among a plurality of sub-modules of the target module according to the configuration file of the target module;
checking the dependency relationship information to obtain a checking result;
and updating the dependency relationship information according to the verification result.
According to another aspect of the present disclosure, there is provided a dependency processing apparatus including:
the dependency relationship information determining module is used for determining dependency relationship information among a plurality of sub-modules of the target module according to the configuration file of the target module;
the checking module is used for checking the dependency relationship information to obtain a checking result;
and the updating module is used for updating the dependency relationship information according to the verification result.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method in any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method in any of the embodiments of the present disclosure.
According to the technology disclosed by the invention, the dependency relationship information is obtained according to the configuration file of the target module, the dependency relationship information is verified, and the dependency relationship information is updated according to the verification result, so that the effectiveness of each dependency relationship of the target module is ensured, the maintenance and the migration of the target module are facilitated, and the good performance is kept.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a dependency processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a dependency processing method according to another embodiment of the present disclosure;
FIG. 3 is a schematic diagram of dependencies of sub-modules according to an example of the present disclosure;
FIG. 4 is a schematic diagram of dependency processing results for sub-modules in accordance with an example of the present disclosure;
FIG. 5 is a schematic diagram of a dependency processing apparatus according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a dependency processing apparatus according to another embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a dependency processing apparatus according to yet another embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a dependency processing apparatus according to yet another embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a dependency processing apparatus according to yet another embodiment of the present disclosure;
fig. 10 is a block diagram of an electronic device for implementing a dependency processing method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
According to an embodiment of the present disclosure, a dependency relationship processing method is provided, and fig. 1 is a flowchart of the dependency relationship processing method according to the embodiment of the present disclosure, which may be applied to an electronic device that may execute instructions by using a front end or a segment. Among them, the terminal may be a User Equipment (UE), a mobile device, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and so on. In some possible implementations, the method may also be implemented by a processor calling computer readable instructions stored in a memory. As shown in fig. 1, the dependency relationship processing method includes:
step S11: determining dependency relationship information among a plurality of sub-modules of the target module according to the configuration file of the target module;
step S12: checking the dependency relationship information to obtain a checking result;
step S13: and updating the dependency relationship information according to the verification result.
In this embodiment, the target module may be a software module, an application program, or the like running on the terminal. The terminal here may be a user terminal, a server side, or a cloud side, or include both the user terminal and the server side.
For example, the target module may be a mapping application running on the mobile terminal. For another example, the target module may also be a map application running on the user terminal, and a map server deployed by the server side to maintain or respond to the map application.
In one possible implementation, the target module may be a software module or an application module having functions that operate independently to provide the user. Such as a document editing module. In another possible implementation, the target module may include a software module or an application module that can run independently, and other modules that are called to implement at least one function, such as a shopping application and a payment application that it calls.
The configuration file of the target module may be a file set for facilitating operations or facilitating subsequent operations on how to use or maintain the target file when the target module is constructed, where the target module may be recorded in a construction stage, and in order for each operator to perform construction work in a labor-sharing manner, the target module may be divided into a plurality of sub-functions, each sub-function is performed by at least one operation node of a target module construction task, and the operation node may correspond to a team construction task operator. Therefore, the division of the most original sub-modules of the target module and the interdependence conditions among the sub-modules can be obtained through the configuration file of the target module.
The dependency relationship information between the sub-modules may include a relationship of dependency between at least two sub-modules. If one submodule a calls another submodule B at any stage of the target module running process, then a dependency relationship between the two submodules A, B may be considered. The dependency relationship information among the multiple submodules of the target module comprises at least one dependency relationship about one submodule calling another submodule.
In this embodiment, the checking of the dependency relationship information may be checking of each dependency relationship in the dependency relationship information, whether the dependency relationship is valid, exists, or changes in the latest version of the target module.
In another possible implementation manner, the dependency relationship information may be checked, and each dependency relationship in the dependency relationship information may be determined according to given target module version information, whether the dependency relationship is valid, whether the dependency relationship exists or whether a change occurs in a given version, or the like.
In another possible implementation, the dependency information may be obtained by parsing the configuration file in a custom format.
In one implementation, the updated dependency information is the dependency information that has been used as a reference value by the target module during the update or iteration process, and may not include the dependency information that has been discarded.
And verifying the dependency relationship information to obtain a verification result, wherein the verification result including the conclusion of whether the dependency relationship is valid, whether the dependency relationship exists or whether the dependency relationship changes or the like is generated according to at least one dependency relationship in the dependency relationship information.
And updating the dependency relationship information according to the verification result, wherein the original dependency relationship information is still valid or at least one dependency relationship in the dependency relationship information is changed according to the verification result.
In this embodiment, the dependency relationship information is obtained according to the configuration file of the target module, the dependency relationship information is verified, and the dependency relationship information is updated according to the verification result, so that the validity of each dependency relationship of the target module is ensured, the maintenance and the migration of the target module are facilitated, and good performance is maintained.
In one embodiment, verifying the dependency relationship information and obtaining the verification result, as shown in fig. 2, includes:
step S21: determining a sub-module having a dependency relationship with a target sub-module as a sub-module to be verified; the target sub-module is one of a plurality of sub-modules;
step S22: determining a function contained in a submodule to be checked;
step S23: and obtaining a verification result according to the calling relation between the target sub-module and the function.
In one possible implementation, the verification operations of steps S21-S23 may be performed with each sub-module of the target module as the target sub-module in turn.
The sub-module having a dependency relationship with the target sub-module may be a sub-module having a calling relationship with the target module, which is included in the dependency relationship information. For example, according to the dependency information, submodule C calls submodule D, E, and submodule D calls submodule E, F. The sub-module to be verified is D, E with sub-module C as the target sub-module. When the sub-module D is taken as the target sub-module, the sub-module to be verified is E, F.
The function included in the sub-module to be verified is determined, and all functions in the sub-module to be verified can be determined according to the configuration file or the information of the code, the interface and the like of the sub-module to be verified. For example, the sub-module D to be checked includes functions D1, D2, and D3.
The verification result is obtained according to the calling relationship between the target sub-module and the function, and the verification result may be generated according to whether the calling relationship between the target sub-module and the function of the module to be verified exists or is valid when the dependency relationship information includes the dependency of the target sub-module on the sub-module to be verified.
In a specific implementation manner, the check result may be whether the dependency relationship between the target sub-module and the sub-module to be checked is valid, may also be a specific function of the sub-module to be checked called by the target sub-module, and may also be the number of functions in the sub-module to be checked called by the target sub-module.
For example, the verification result may be that the dependency relationship between the target sub-module D and the sub-module G to be verified exists or is valid. It may also be that the target submodule D calls the functions G1, G2 in the submodule G to be checked. The number of the functions of the target submodule D calling the submodule to be checked is 2.
For another example, the verification result may be that the dependency relationship between the target sub-module D and the sub-module to be verified E does not exist or is invalid. The function in the target submodule D calling the submodule E to be checked may be an empty or empty set. The number of the functions in the target submodule D calling the submodule to be checked is 0.
In this embodiment, whether the sub-module to be verified is depended on by the target sub-module can be determined according to the function included in the sub-module to be verified, so that an accurate verification result of the dependency relationship information can be generated.
In one embodiment, obtaining the verification result according to the calling relationship information of the target sub-module and the function includes:
and under the condition that the calling relation between the target sub-module and the function exists, determining that the verification result is that the dependency relation between the target sub-module and the sub-module to be verified is effective.
In this embodiment, the existence of the call relationship between the target sub-module and the function may indicate that the target sub-module calls the function, and if there are a plurality of functions, the target sub-module calls at least one function.
In this embodiment, when the calling relationship between the target sub-module and the function exists, it is determined that the check result is valid, so that the valid dependency relationship originally recorded in the configuration file of the target module can be retained.
In one embodiment, obtaining the verification result according to the calling relationship between the target sub-module and the function includes:
and under the condition that the target sub-module and the function calling relation does not exist, determining that the checking result is that the dependency relation between the target sub-module and the sub-module to be checked is invalid.
In this embodiment, the target sub-module does not have a function calling relationship, the target sub-module may not call a function, and the number of functions called by the target sub-module is 0 when there are a plurality of functions.
In this embodiment, under the condition that the target sub-module does not call the function, it is determined that the check result is invalid, so that the invalid dependency in the configuration file can be found out, and the dependency information can be updated in time.
In one embodiment, updating the dependency relationship information according to the verification result includes:
and deleting the dependency relationship between the target sub-module and the sub-module to be verified in the dependency relationship information under the condition that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is invalid.
In this embodiment, the invalid dependency relationship is deleted, so that the invalid dependency relationship in the target module is reduced, the volume of the target module is reduced, and operations such as maintenance and lateral migration for the target module are facilitated.
In one embodiment, updating the dependency relationship information according to the verification result includes:
under the condition that the checking result is that the dependency relationship between the target sub-module and the sub-module to be checked is effective, determining the strength of the dependency relationship between the target sub-module and the sub-module to be checked according to the number of functions of the target sub-module calling the sub-module to be checked;
and updating the sequence of the dependency relationship between the target submodule and the submodule to be checked in the dependency relationship information according to the strength.
In a possible implementation manner, the more the number of functions in the sub-module to be verified that is called by the target sub-module is, the stronger the dependency strength of the target sub-module on the sub-module to be verified is.
In another possible implementation manner, the more functions in the sub-module to be verified are called by the target sub-module, and according to the historical usage record, the greater the ratio of the number of times that the target sub-module calls the sub-module to be verified in the number of times that the target sub-module uses the target module can be determined, the stronger the dependence strength of the target sub-module on the sub-module to be verified is.
In another possible implementation manner, the more functions in the to-be-verified sub-module that the target sub-module calls, and the higher the satisfaction degree of other preset intensity conditions is, the stronger the dependency intensity of the target sub-module on the to-be-verified sub-module is.
In a possible implementation manner, the strength of the dependency relationship between the target sub-module and the sub-module to be verified may include the strength of the dependency relationship between the target sub-module and the sub-module to be verified.
In a possible implementation manner, the strength of the dependency relationship between the target sub-module and the sub-module to be verified may include the strength of the dependency relationship between the target sub-module and the sub-module to be verified by the target sub-module and the strength of the dependency relationship between the sub-module to be verified by the target sub-module.
According to the intensity, in the dependency relationship information, the order of the dependency relationship between the target sub-module and the sub-module to be verified is updated, and may be that, under the condition of high intensity, the order of the dependency relationship between the target sub-module and the sub-module to be verified is adjusted to a position further ahead.
In the embodiment, the dependency relationship information of the target module can be updated according to the dependency strength, so that the dependency relationship information has more value to the use and maintenance of the target module.
In recent years, due to rapid development of terminal technologies such as mobile terminals, the number of terminals has increased dramatically, the number of applications and software programs has increased, and the update speed has increased. However, for some applications and software programs which are launched for a long time, the increase of the number of updates also brings new problems.
For example, in terms of the scale of a software program or an application program, generally, the number of lines of a lightweight product code is tens of thousands of lines, while the number of lines of a super APP code is millions of lines, or more, and the number of times of updating the software program or the application program increases, which often causes significant changes in dependency information between sub-modules of the original software program or the original application program, and the existence of a large number of failed dependencies may cause unnecessary increase in dependency information, thereby increasing the unnecessary volume of the software program or the application program.
In the development of software programs or applications: generally, a light-weight software program or application product requires a small number of developers, but the developers of super APP require hundreds or thousands of people, and the cooperation and communication between the developers require cost. If a large number of invalid dependencies exist in the dependency information, many unnecessary or invalid synergies and communications may result.
In terms of the quality of software programs or application programs, for super APPs (APPs with a large number of modules), due to the diversity of functions, the scale of required research and development personnel, and high coordination cost, communication is difficult to be consistent when changes occur, and further, change information of the changed modules is difficult to even cannot be timely sensed by other modules.
In the aspect of detection of software programs or application programs, for super APP, the cost for completely understanding before detection is higher, but as the research and development process of a certain module, the work of evaluation of an influence surface, well-known, verification and the like lacks clear completion standards, and the detection effect is also known a posteriori. If a large number of useless dependencies exist, the comprehension and operation of detection are disturbed.
In the aspect of the influence surface of a software program or an application program, for the super APP, the change shadow surface of a basic module is larger, the risk generated by the change is also larger, and the cost of the later-stage repair is higher. A large number of useless dependencies can cause invalid operations and high risks which have larger influences when changing, and the cost of later repair is increased.
In terms of the dependency relationship of software programs or application programs, componentization is a necessary way for super APP, and the dependency relationship between components influences migration multiplexing of the components. Old useless or invalid dependencies have a large amount of lasting profound effects on migration reuse of components.
In the process of computer development, the quality and cost of a software development process are influenced by many factors, and the larger the scale is, the higher the collaborative cost is, and the higher the generated risk discovery cost is. Especially, the modification influence area of a module on a basic level is large, the problem feedback is not obvious, and the automatic detection work is constructed by means of systematic behaviors according to the reasons of risk and cost generation, so that the method is the key for improving the efficiency of software research and development engineering. The dependency relationship processing method provided by the embodiment of the disclosure can automatically analyze the relationship between the components and clear the dependency that has no explicit use relationship between the components. The method provided by the embodiment of the disclosure is a specific rule-based automation method, can accurately find unnecessary dependency relationships at lower cost, optimize the architecture, optimize some redundant dependency relationships in the updating process of target modules including software programs and application programs, and reduce the complexity of the dependency relationships among the modules.
In an example of the present disclosure, a public interface of a dependent sub-module (i.e., the sub-module to be checked in the foregoing embodiment) is analyzed through a dependency relationship between sub-modules of a target module, information such as a class, a constant, a variable, a function, and a macro definition of the dependent sub-module is obtained through the public interface, and a function of the dependent sub-module is determined. The system searches whether the function of the depended sub-module is called in the source code of the dependent sub-module (i.e. the target sub-module in the foregoing embodiment), and if not, it indicates that the dependence of the dependent sub-module on the depended sub-module is meaningless, and the dependence of the dependent sub-module on the depended sub-module can be released, thereby reducing the complexity of the dependence between different sub-modules in the whole product.
In one particular example, the sub-modules of the target module include m1, m2, m3, m 4; the dependency relationship and calling relationship are shown in fig. 3, and the submodule m1 depends on the submodules m2, m3 and m 4.
Then m1 is analyzed, and sub-module m1 is used as the target sub-module, and the template sub-modules are determined to include functions F11, F12 and F13 through the analysis of the code of the target sub-module. Through the public interface of sub-module m2, the validation sub-module m2 includes the function F21. The interface is disclosed by sub-module m3, confirming that sub-module m3 includes function F31. By performing a back-check on codes or expressions related to the functions F11, F12, and F13, it can be determined that the functions F11 and F12 call the function F31, and the function F13 calls the function F41. Further, it is determined that the calling relationships of the submodules m1 and m2 are 0, two calling relationships exist between the submodules m1 and m3 (i.e., two functions of the submodule m3 are called), and 1 calling relationship exists between the submodules m1 and m4 (i.e., one function of the submodule m4 is called).
The output results of the example shown in fig. 3 are shown in fig. 4. When updating the dependency information, the dependency with less calling relationship may be updated preferentially, for example, because m2 has no calling relationship with m1, the dependency of m1 on m2 may be deleted from the dependency information. Since m3 has 1 calling relationship with m1, the dependency relationship of m1 on m3 is preserved in the dependency relationship information. Since m4 has two calling relationships with m1, the dependency relationship of m1 on m4 is preserved in the dependency relationship information.
In another possible implementation manner, direct updating processing of the dependency relationship information can be performed according to the check result, and the dependency of m1 on m2 is deleted.
In other implementation manners, the dependency sub-module relationships of m2, m3 and m4 can be further analyzed and verified continuously, so that a dependency tree is constructed according to the target module, and is analyzed and updated.
An embodiment of the present disclosure further provides a dependency relationship processing apparatus, as shown in fig. 5, including:
a dependency relationship information determining module 51, configured to determine dependency relationship information between multiple sub-modules of the target module according to the configuration file of the target module;
the checking module 52 is configured to check the dependency relationship information to obtain a checking result;
and the updating module 53 is configured to update the dependency relationship information according to the verification result.
In one embodiment, as shown in fig. 6, the verification module includes:
a to-be-verified determining unit 61, configured to determine a sub-module having a dependency relationship with the target sub-module, as a to-be-verified sub-module; the target sub-module is one of a plurality of sub-modules;
a function determining unit 62, configured to determine a function included in the sub-module to be verified;
and the call relation processing unit 63 is configured to obtain a verification result according to the call relation between the target sub-module and the function.
In one embodiment, the call relation processing unit is further configured to:
and under the condition that the calling relation between the target sub-module and the function exists, determining that the verification result is that the dependency relation between the target sub-module and the sub-module to be verified is effective.
In one embodiment, the call relation processing unit is further configured to:
and under the condition that the target sub-module and the function calling relation does not exist, determining that the checking result is that the dependency relation between the target sub-module and the sub-module to be checked is invalid.
In one embodiment, as shown in FIG. 7, the update module includes:
and the deleting unit 71 is configured to delete the dependency relationship between the target sub-module and the sub-module to be verified in the dependency relationship information when the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is invalid.
In one embodiment, as shown in FIG. 8, the update module includes:
the strength unit 81 is configured to determine the strength of the dependency relationship between the target sub-module and the sub-module to be verified according to the number of functions of the target sub-module calling the sub-module to be verified when the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is valid;
and the intensity processing unit 82 is configured to update the order of the dependency relationship between the target sub-module and the sub-module to be verified in the dependency relationship information according to the intensity.
In an example of the present disclosure, the main components of the dependency relationship processing apparatus are as shown in fig. 9, and include:
the analysis setting module 91: support setting analysis on a certain module; for example, the module a is used as a target module and analyzed. The analysis setting module 151 in this example may multiplex the respective modules of the dependency relationship processing apparatus provided in the foregoing embodiments.
The dependency analysis module 92: the public interface (class, constant, variable, function and macro definition, etc.) information of the dependent sub-module can be analyzed through the dependency relationship between the modules (such as the target sub-module A depends on the sub-module B) based on a certain module needing to be analyzed. For example, B has an open function FB, and the system searches for the invocation of FB in the source code of the target sub-module a to determine whether the dependency between the modules is valid, thereby avoiding the cost of each maintenance and horizontal output, and the downward dependency tree during migration is large, which affects the multiplexing process, and the size is large and the speed is slow.
In the disclosed example, the target module may be a software program or application having functions or modules of network, thread running, searching, Feed, applet, and the like. The target comprises sub-modules with different capabilities and different levels, and a tree diagram can be generated according to the reference and referenced relations among the sub-modules. If the dependency relationship information of the target module has a large number of redundant and invalid dependency relationships, the dependency relationship information tree diagram of the target module may have an invalid structure, resulting in low reusability of the sub-modules.
The dependency analysis module 92 in this example can reuse each module in the dependency analysis apparatus provided in the other embodiments described above as necessary.
The dependency result prompt 93: no dependency relationship can be prompted, sorting can be performed according to the magnitude of dependency, and results and decisions are displayed for users. The dependency result prompt 93 in this example can reuse each module in the dependency relationship analysis apparatus provided in the foregoing other embodiments as necessary.
Generally, the dependency relationship of the target module plays a role in the construction, use and maintenance stages of the target module. If the dependency relationship information has a missing dependency relationship, the compiler may report an error; when unnecessary invalid dependency exists in the dependency information, the compiler will not report an error, but the dependency of the target module becomes complicated, which affects the migration of the target module, the multiplexing of sub-modules, and the maintenance of the target module. Since the dependencies between target modules are changing, the dependencies of the target modules also handle changing states as the target modules continue to optimize. After long-time version iteration of the target module, the dependency relationship among partial submodules of the target module is not actually used but still kept in the dependency relationship information; such as: submodule a of the target module depends on submodule B, but in actual use, submodule a does not call submodule B. This situation may cause a huge volume of the dependency information, and affect the utilization of the dependency information in the operation and maintenance process of the target module. The dependency relationship processing method and device provided by the disclosed example optimize the dependency relationship information of the target module based on the basic technology, and effectively reduce the cost of manual investigation.
When the number of target modules is too large, for example, the number of sub-modules on which the target sub-modules depend is 200, the workload of checking the invalid dependency relationship is huge and the difficulty is high. By the method and the device provided by the embodiment of the disclosure, the dependency relationship information of the target module can be updated and simplified only by an automatic means in a minute level.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 10 illustrates a schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the apparatus 1000 includes a computing unit 1011 that can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)1012 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1013. In the RAM 1013, various programs and data necessary for the operation of the device 1000 can also be stored. The calculation unit 1011, the ROM 1012, and the RAM 1013 are connected to each other by a bus 1014. An input/output (I/O) interface 1015 is also connected to bus 1014.
A number of components in device 1000 are connected to I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1017 such as various types of displays, speakers, and the like; a storage unit 1018 such as a magnetic disk, an optical disk, or the like; and a communication unit 1019 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 1019 allows the device 1000 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 1011 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1011 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 1011 performs the respective methods and processes described above, such as the dependency processing method. For example, in some embodiments, the dependency processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1018. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 1000 via the ROM 1012 and/or the communication unit 1019. When the computer program is loaded into the RAM 1013 and executed by the computing unit 1011, one or more steps of the dependency processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1011 may be configured to perform the dependency processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (15)
1. A dependency processing method, comprising:
determining dependency relationship information among a plurality of sub-modules of a target module according to a configuration file of the target module;
checking the dependency relationship information to obtain a checking result;
and updating the dependency relationship information according to the verification result.
2. The method of claim 1, wherein the verifying the dependency information and obtaining a verification result comprises:
determining a sub-module having a dependency relationship with a target sub-module as a sub-module to be verified; the target sub-module is one of the plurality of sub-modules;
determining functions contained in the sub-module to be verified;
and obtaining the verification result according to the calling relationship between the target sub-module and the function.
3. The method of claim 2, wherein the obtaining the verification result according to the call relation information of the target sub-module and the function comprises:
and under the condition that the calling relationship between the target sub-module and the function exists, determining that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is valid.
4. The method according to claim 2 or 3, wherein the obtaining the check result according to the calling relationship between the target sub-module and the function comprises:
and under the condition that the target sub-module and the function calling relation does not exist, determining that the checking result is that the dependency relation between the target sub-module and the sub-module to be checked is invalid.
5. The method according to claim 3 or 4, wherein the updating the dependency information according to the check result comprises:
and deleting the dependency relationship between the target sub-module and the sub-module to be verified in the dependency relationship information under the condition that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is invalid.
6. The method according to claim 3 or 4, wherein the updating the dependency information according to the check result comprises:
determining the strength of the dependency relationship between the target sub-module and the sub-module to be verified according to the number of functions of the target sub-module calling the sub-module to be verified under the condition that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is effective;
and updating the order of the dependency relationship between the target submodule and the submodule to be checked in the dependency relationship information according to the strength.
7. A dependency processing apparatus comprising:
the dependency relationship information determining module is used for determining dependency relationship information among a plurality of sub-modules of the target module according to the configuration file of the target module;
the checking module is used for checking the dependency relationship information to obtain a checking result;
and the updating module is used for updating the dependency relationship information according to the verification result.
8. The apparatus of claim 7, wherein the verification module comprises:
the to-be-verified determining unit is used for determining the sub-modules which have the dependency relationship with the target sub-modules and are used as the to-be-verified sub-modules; the target sub-module is one of the plurality of sub-modules;
the function determining unit is used for determining the functions contained in the sub-modules to be verified;
and the call relation processing unit is used for obtaining the verification result according to the call relation between the target sub-module and the function.
9. The apparatus of claim 8, wherein the call relation processing unit is further to:
and under the condition that the calling relationship between the target sub-module and the function exists, determining that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is valid.
10. The apparatus of claim 8 or 9, wherein the call relation processing unit is further configured to:
and under the condition that the target sub-module and the function calling relation does not exist, determining that the checking result is that the dependency relation between the target sub-module and the sub-module to be checked is invalid.
11. The apparatus of claim 9 or 10, wherein the update module comprises:
and the deleting unit is used for deleting the dependency relationship between the target sub-module and the sub-module to be verified in the dependency relationship information under the condition that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is invalid.
12. The apparatus of claim 9 or 10, wherein the update module comprises:
the intensity unit is used for determining the intensity of the dependency relationship between the target sub-module and the sub-module to be verified according to the number of functions of the target sub-module calling the sub-module to be verified under the condition that the verification result is that the dependency relationship between the target sub-module and the sub-module to be verified is effective;
and the intensity processing unit is used for updating the sequence of the dependency relationship between the target sub-module and the sub-module to be verified in the dependency relationship information according to the intensity.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111638839.4A CN114217848A (en) | 2021-12-29 | 2021-12-29 | Dependency relationship processing method and device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111638839.4A CN114217848A (en) | 2021-12-29 | 2021-12-29 | Dependency relationship processing method and device, electronic equipment and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114217848A true CN114217848A (en) | 2022-03-22 |
Family
ID=80706839
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111638839.4A Pending CN114217848A (en) | 2021-12-29 | 2021-12-29 | Dependency relationship processing method and device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114217848A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114816393A (en) * | 2022-05-18 | 2022-07-29 | 北京百度网讯科技有限公司 | Information generation method, device, equipment and storage medium |
CN115358175A (en) * | 2022-10-18 | 2022-11-18 | 北京智芯微电子科技有限公司 | Circuit formal model simplification method and system |
-
2021
- 2021-12-29 CN CN202111638839.4A patent/CN114217848A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114816393A (en) * | 2022-05-18 | 2022-07-29 | 北京百度网讯科技有限公司 | Information generation method, device, equipment and storage medium |
WO2023221416A1 (en) * | 2022-05-18 | 2023-11-23 | 北京百度网讯科技有限公司 | Information generation method and apparatus, and device and storage medium |
CN114816393B (en) * | 2022-05-18 | 2023-12-19 | 北京百度网讯科技有限公司 | Information generation method, device, equipment and storage medium |
CN115358175A (en) * | 2022-10-18 | 2022-11-18 | 北京智芯微电子科技有限公司 | Circuit formal model simplification method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107643984B (en) | Method and apparatus for outputting information | |
CN112015402B (en) | Method and device for quickly establishing service scene and electronic equipment | |
CN114217848A (en) | Dependency relationship processing method and device, electronic equipment and computer storage medium | |
CN114691148A (en) | Model reasoning acceleration method and device, electronic equipment and storage medium | |
CN112783508B (en) | File compiling method, device, equipment and storage medium | |
CN114816393B (en) | Information generation method, device, equipment and storage medium | |
CN113703808B (en) | Modularized gray level distribution method, device, equipment and storage medium | |
CN112905225A (en) | Method and device for creating continuous integration tool construction task | |
CN117251164A (en) | Model code conversion method, device, equipment and storage medium | |
CN114693116A (en) | Method and device for detecting code review validity and electronic equipment | |
CN116933189A (en) | Data detection method and device | |
CN114579120A (en) | Application code processing method and device, electronic equipment and storage medium | |
CN114327577A (en) | Code change determining method and device, electronic equipment and storage medium | |
CN114218313A (en) | Data management method, device, electronic equipment, storage medium and product | |
CN112506796A (en) | Data processing method, device, equipment and storage medium | |
CN111694686A (en) | Abnormal service processing method and device, electronic equipment and storage medium | |
CN113360368B (en) | Method and device for testing software performance | |
CN115525521A (en) | Log data verification method and device, electronic equipment, storage medium and product | |
CN114328234A (en) | Application program detection method and device, equipment and storage medium | |
CN115454800A (en) | Log data verification method and device, electronic equipment, storage medium and product | |
CN114417219A (en) | Information configuration method and device and electronic equipment | |
CN113535187A (en) | Service online method, service updating method and service providing method | |
CN113722344A (en) | Data production method, data production device, electronic device, storage medium, and program product | |
CN116820486A (en) | Bug positioning method, device and equipment of application program and storage medium | |
CN113626051A (en) | Byte code updating method and device and electronic equipment |
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 |