Dependency processing method, device, electronic device and computer storage medium
By analyzing and updating the sub-module dependencies of software or applications, the high cost and low efficiency problems caused by invalid dependency information are solved, more efficient inter-module collaboration and dependency management are achieved, and the update and maintenance process of software or applications is optimized.
Patent Information
- Application Number
- CN202111638839.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-12-29
AI Technical Summary
With the increase in the number of mobile devices and software applications, the R&D, update and maintenance costs in the iteration process of software or application products have increased. The failure of dependency information has led to high communication costs between modules, difficult detection and high change risks, which has affected the performance and efficiency of software or applications.
By analyzing the configuration files of the target module, the dependencies between submodules are determined, the dependency information is verified, and the dependency information is updated according to the verification results. The validity of the dependency information is optimized, and redundant and invalid dependencies are automatically processed.
It reduces the R&D and maintenance costs of software or applications, improves the collaborative efficiency between modules, simplifies the management of dependencies, reduces the impact of invalid dependencies on migration and detection, and optimizes the performance of software or applications.
Smart Images

Figure CN114217848B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to technical fields such as software engineering and engineering efficiency. Background Art
[0002] In recent years, with the popularization of the Internet, the number of mobile devices has increased dramatically, and the number of users holding mobile devices and the average number of mobile devices held by each user has also increased rapidly. Software or APPs (Applications) installed and running on smart devices or mobile devices can provide different services for users. Similarly, with the development of the Internet industry, many software or application products have provided services to users for a long time. With years of technological development, the scale of software or application products has also continued to increase. In this case, the cost of the software or application product iteration process will become higher and the impact will be greater, thereby increasing the potential research and development, update, and maintenance costs of the software or application products. Summary of the Invention
[0003] The present disclosure provides a dependency relationship processing method, device, electronic device, and computer storage medium.
[0004] According to one aspect of the present disclosure, a dependency processing method is provided, comprising:
[0005] Determine the dependency information between multiple submodules of the target module according to the configuration file of the target module;
[0006] Verify dependency information and obtain verification results;
[0007] Update dependency information based on the verification results.
[0008] According to another aspect of the present disclosure, a dependency relationship processing apparatus is provided, comprising:
[0009] A dependency information determination module is used to determine dependency information between multiple submodules of a target module based on a configuration file of the target module;
[0010] Verification module, used to verify dependency information and obtain verification results;
[0011] The update module is used to update the dependency information according to the verification results.
[0012] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method in any embodiment of the present disclosure.
[0016] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method in any embodiment of the present disclosure.
[0017] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program / instruction, which implements the method in any embodiment of the present disclosure when the computer program / instruction is executed by a processor.
[0018] According to the technology disclosed in the present invention, dependency information is obtained based on the configuration file of the target module, the dependency information is verified, and the dependency information is updated based on the verification results, thereby ensuring the validity of each dependency of the target module, which is beneficial to the maintenance and migration of the target module and maintaining good performance.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0021] Figure 1 is a schematic diagram of a dependency relationship processing method according to an embodiment of the present disclosure;
[0022] Figure 2 is a schematic diagram of a dependency processing method according to another embodiment of the present disclosure;
[0023] Figure 3 is a schematic diagram of dependency relationships of submodules according to an example of the present disclosure;
[0024] Figure 4 1 is a schematic diagram of the dependency relationship processing result of the submodule according to an example of the present disclosure;
[0025] Figure 5 is a schematic diagram of a dependency relationship processing device according to an embodiment of the present disclosure;
[0026] Figure 6 is a schematic diagram of a dependency relationship processing device according to another embodiment of the present disclosure;
[0027] Figure 7 is a schematic diagram of a dependency relationship processing device according to another embodiment of the present disclosure;
[0028] Figure 8 is a schematic diagram of a dependency relationship processing device according to another embodiment of the present disclosure;
[0029] Figure 9 is a schematic diagram of a dependency relationship processing device according to another embodiment of the present disclosure;
[0030] Figure 10 It is a block diagram of an electronic device used to implement the dependency processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0032] According to an embodiment of the present disclosure, a dependency processing method is provided. Figure 1 This is a flowchart of a dependency processing method according to an embodiment of the present disclosure. The method can be applied to electronic devices that can utilize a front-end or have segmented execution instructions. For example, the device can be deployed on a terminal or server or other processing device to execute configuration files, determine dependency information, and other steps. The terminal can 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 the like. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in a memory. For example Figure 1 As shown, dependency handling methods include:
[0033] Step S11: Determine dependency information between multiple submodules of the target module based on the configuration file of the target module;
[0034] Step S12: Verify the dependency information and obtain the verification result;
[0035] Step S13: Update the dependency information according to the verification result.
[0036] In this embodiment, the target module may be a software module, application program, etc. running on a terminal. The terminal here may be a user terminal, a server, or a cloud, or may include both a user terminal and a server.
[0037] For example, the target module may be a map application running on a mobile terminal, or a map server deployed on a user terminal that maintains or responds to the map application.
[0038] In one possible implementation, the target module may be a software module or application module that runs independently to provide functionality to the user, such as a document editing module. In another possible implementation, the target module may include a software module or application module that runs independently and other modules that it calls to implement at least one functionality, such as a shopping application and a payment application that it calls.
[0039] The target module's configuration file can be a file set up when building the target module to facilitate operations or to facilitate the subsequent use or maintenance of the target file. It can record the target module's construction phase. In order to enable different operators to divide the work to complete the construction, the target module can be divided into multiple sub-functions. Each sub-function is completed by at least one operation node of the target module construction task. The operation node can correspond to a team's construction task operator. Therefore, through the target module's configuration file, the target module's most original sub-module division and the interdependence between the sub-modules can be obtained.
[0040] Dependency information between multiple submodules may include a dependency relationship between at least two submodules. If, at any stage during the target module's execution, submodule A calls submodule B, a dependency relationship exists between these two submodules. Dependency information between multiple submodules of the target module includes at least one dependency relationship between one submodule and another.
[0041] In this embodiment, verifying the dependency information may include verifying whether each dependency in the dependency information is valid, exists, or has changed under the latest version of the target module.
[0042] In another possible implementation, the dependency information may be verified by determining, based on given target module version information, whether each dependency in the dependency information is valid, exists, or has changed under a given version.
[0043] In another possible implementation, the dependency information may be obtained by parsing the configuration file in a custom format.
[0044] In one implementation, the updated dependency information is dependency information that serves as a reference during the update or iteration process of the target module, and may not include dependency information that has been abandoned.
[0045] Verifying the dependency information and obtaining the verification result may be generating a verification result including conclusions such as whether the dependency is valid, exists, or has changed for at least one dependency in the dependency information.
[0046] Updating the dependency information according to the verification result may include determining that the original dependency information is still valid, or changing at least one dependency in the dependency information.
[0047] In this embodiment, dependency information is obtained based on the configuration file of the target module, the dependency information is verified, and the dependency information is updated based on the verification result, thereby ensuring the validity of each dependency of the target module, which is beneficial to the maintenance and migration of the target module and maintaining good performance.
[0048] In one embodiment, the dependency information is verified to obtain a verification result, such as Figure 2 As shown, including:
[0049] Step S21: determining a submodule having a dependency relationship with a target submodule as a submodule to be verified; the target submodule is one of the multiple submodules;
[0050] Step S22: Determine the functions included in the submodule to be checked;
[0051] Step S23: Obtain a verification result based on the calling relationship between the target submodule and the function.
[0052] In a possible implementation, each submodule of the target module may be sequentially used as a target submodule to perform the verification operations of steps S21 to S23.
[0053] A submodule with a dependency relationship with the target submodule can be a submodule with a call relationship with the target module as included in the dependency information. For example, according to the dependency information, submodule C calls submodules D and E, and submodule D calls submodules E and F. If submodule C is used as the target submodule, the submodules to be verified are D and E. If submodule D is used as the target submodule, the submodules to be verified are E and F.
[0054] The functions included in the submodule to be checked may be determined by determining all functions in the submodule to be checked based on a configuration file or the code, interface, etc. of the submodule to be checked. For example, submodule D to be checked includes functions d1, d2, and d3.
[0055] The verification result is obtained based on the calling relationship between the target sub-module and the function. When the dependency information includes information about the target sub-module's dependency on the sub-module to be verified, the verification result is generated based on whether the calling relationship between the target sub-module and the function of the module to be verified exists or is valid.
[0056] In a specific implementation, the verification result can be whether the dependency relationship between the target sub-module and the sub-module to be verified is valid, or it can be the specific function of the sub-module to be verified called by the target sub-module, or it can be the number of functions in the sub-module to be verified called by the target sub-module.
[0057] For example, the verification result may be that the dependency relationship between the target submodule D and the submodule to be verified G exists or is valid. Alternatively, the verification result may be that the target submodule D calls functions g1 and g2 in the submodule to be verified G. Alternatively, the number of functions called by the target submodule D in the submodule to be verified is 2.
[0058] For another example, the verification result may be that the dependency between the target submodule D and the submodule to be verified E does not exist or is invalid. Alternatively, the result may be that the number of functions called by the target submodule D in the submodule to be verified E is empty or an empty set. Alternatively, the number of functions called by the target submodule D in the submodule to be verified is zero.
[0059] In this embodiment, it is possible to determine whether the sub-module to be checked is dependent on the target sub-module according to the functions included in the sub-module to be checked, thereby generating an accurate verification result of the dependency information.
[0060] In one embodiment, obtaining a verification result based on the calling relationship information between the target submodule and the function includes:
[0061] In the case that a calling relationship between the target submodule and the function exists, the verification result is determined to be that the dependency relationship between the target submodule and the submodule to be verified is valid.
[0062] In this embodiment, the existence of a calling relationship between the target submodule and the function may refer to the target submodule calling the function. If there are multiple functions, the target submodule calls at least one function.
[0063] In this embodiment, when a calling relationship between the target submodule and the function exists, the verification result is determined to be that the dependency relationship is valid, so that the valid dependency relationship originally recorded in the configuration file of the target module can be retained.
[0064] In one embodiment, obtaining a verification result based on the calling relationship between the target submodule and the function includes:
[0065] In the case that the target submodule and the function call relationship do not exist, the verification result is determined to be that the dependency relationship between the target submodule and the submodule to be verified is invalid.
[0066] In this embodiment, there is no calling relationship between the target submodule and the function, which may be that the target submodule does not call the function. In the case that there are multiple functions, the number of functions called by the target submodule is 0.
[0067] In this embodiment, when the target submodule does not call a function, the verification result is determined to be that the dependency is invalid, so that the invalid dependency in the configuration file can be found and the dependency information can be updated in time.
[0068] In one embodiment, updating dependency information according to the verification result includes:
[0069] When the verification result shows that the dependency relationship between the target submodule and the submodule to be verified is invalid, the dependency relationship between the target submodule and the submodule to be verified is deleted from the dependency information.
[0070] In this embodiment, invalid dependencies are deleted, thereby reducing invalid dependencies in the target module and streamlining the size of the target module, which is beneficial to operations such as maintenance and horizontal migration of the target module.
[0071] In one embodiment, updating dependency information according to the verification result includes:
[0072] If the verification result shows that the dependency relationship between the target submodule and the submodule to be verified is valid, determining the strength of the dependency relationship between the target submodule and the submodule to be verified based on the number of functions called by the target submodule in the submodule to be verified;
[0073] According to the strength, the order of the dependency relationship between the target submodule and the submodule to be verified is updated in the dependency information.
[0074] In a possible implementation, the more functions in the sub-module to be checked that are called by the target sub-module, the stronger the dependency of the target sub-module on the sub-module to be checked.
[0075] In another possible implementation, the more functions in the sub-module to be checked that are called by the target sub-module, and the greater the proportion of the number of times the target sub-module calls the sub-module to be checked in the number of times the target module is used, based on historical usage records, the stronger the target sub-module's dependence on the sub-module to be checked.
[0076] In another possible implementation, the more functions in the submodule to be checked that the target submodule calls, and the more other preset strength conditions are satisfied, the stronger the target submodule's dependence on the submodule to be checked.
[0077] In a possible implementation, the strength of the dependency relationship between the target sub-module and the sub-module to be checked may include the strength of the dependency of the target sub-module on the sub-module to be checked.
[0078] In a possible implementation, the strength of the dependency relationship between the target submodule and the submodule to be checked may include the strength of the dependency of the target submodule on the submodule to be checked and the strength of the dependency of the submodule to be checked on the target submodule.
[0079] According to the strength, in the dependency information, the order of the dependency between the target submodule and the submodule to be checked is updated. When the strength is high, the order of the dependency between the target submodule and the submodule to be checked is adjusted to a front position.
[0080] In this embodiment, the dependency information of the target module can be updated according to the dependency strength, thereby making the dependency information more valuable for the use and maintenance of the target module.
[0081] In recent years, the rapid development of mobile and other terminal technologies has led to a dramatic increase in the number of terminals, a surge in the number of applications and software programs, and an increasing rate of updates. However, for some older applications and software programs, the increased frequency of updates has also brought new problems.
[0082] For example, in terms of the scale of software programs or applications, generally speaking, the number of lines of code for lightweight products is tens of thousands, while the number of lines of code for super APPs is millions, or even more. The increase in the number of updates to software programs or applications often leads to major changes in the dependency information between the sub-modules of the original software programs or applications. The existence of a large number of invalid dependencies may lead to an unnecessary increase in dependency information, thereby increasing the unnecessary size of the software program or application.
[0083] In software or application development: Generally speaking, lightweight software or application products require fewer developers, but super apps require hundreds or even thousands of developers. Collaboration and communication between developers incur costs. If dependency information contains a large number of invalid dependencies, this can lead to unnecessary or ineffective collaboration and communication.
[0084] In terms of the quality of software programs or applications, for super apps (apps with a large number of modules), due to the diversity of functions, the scale of R&D personnel required, and the high cost of collaboration, it may be difficult to communicate consistently when changes occur, which may lead to the change information of the changed module being difficult or even impossible to be perceived by other modules in a timely manner.
[0085] When it comes to the testability of software programs or applications, the cost of fully understanding them before testing is indeed high for super apps. However, within the development process of a single module, impact assessment, public awareness, and verification lack clear completion standards, and test results are only known a posteriori. The presence of numerous unused dependencies complicates both understanding and execution of testing.
[0086] Regarding the impact of software programs or applications, for super apps, changes to foundational modules have a significant impact, resulting in greater risks and higher costs for subsequent remediation. Numerous unused dependencies can lead to ineffective operations and increased risks during changes, increasing the cost of subsequent remediation.
[0087] When it comes to software program or application dependencies, componentization is essential for super apps. Component dependencies influence component migration and reuse. Old, unused, or invalid dependencies can have a significant, long-lasting impact on component migration and reuse.
[0088] In the process of computer technology development, the quality and cost of the software development process are affected by many factors. The larger the scale, the higher the collaboration cost and the higher the risk discovery cost. In particular, the modification of modules at the basic level has a large impact and the problem feedback is not obvious. With the help of systematic behavior, building automated detection work according to the causes of risks and costs is the key to improving the efficiency of software development projects. The dependency processing method provided by the embodiment of the present disclosure can automatically analyze the relationship between components and clear the dependencies between components without clear usage relationships. The method provided by the embodiment of the present disclosure is an automation method based on specific rules, which can accurately discover unnecessary dependencies at a lower cost, optimize the architecture, optimize some redundant dependencies in the update process of target modules including software programs and applications, and reduce the complexity of dependencies between modules.
[0089] In one example disclosed herein, the public interface of the dependent submodule (i.e., the submodule to be verified in the aforementioned embodiment) is analyzed through the dependency relationship between the submodules of the target module, and the class, constant, variable, function, macro definition and other information of the dependent submodule are obtained through the public interface to determine the function of the dependent submodule. The system searches the source code of the dependent submodule (i.e., the target submodule in the aforementioned embodiment) to see whether the function of the dependent submodule is called. If not, it means that the dependency of the dependent submodule on the dependent submodule is meaningless, and the dependency relationship of the dependent submodule on the dependent submodule can be released, thereby reducing the complexity of the dependency relationship between different submodules in the entire product.
[0090] In a specific example, the submodules of the target module include m1, m2, m3, and m4; the dependency and call relationships are as follows: Figure 3 As shown, submodule m1 depends on submodules m2, m3, and m4.
[0091] Then, m1 is analyzed, and submodule m1 is taken as the target submodule. Then, by parsing the code of the target submodule, it is determined that the template submodule includes functions F11, F12, and F13. Through the public interface of submodule m2, it is confirmed that submodule m2 includes function F21. Through the public interface of submodule m3, it is confirmed that submodule m3 includes function F31. By reverse checking the code or expression related to functions F11, F12, and F13, it can be determined that functions F11 and F12 call function F31, and function F13 calls function F41. It is then determined that the calling relationship between submodules m1 and m2 is 0, submodules m1 and m3 have two calling relationships (i.e., calling two functions of submodule m3), and submodules m1 and m4 have one calling relationship (i.e., calling one function of submodule m4).
[0092] Figure 3 The output of the example shown is Figure 4 When updating dependency information, prioritize dependencies with fewer call relationships. For example, since m2 has no call relationship with m1, m1's dependency on m2 can be deleted from the dependency information. Since m3 has one call relationship with m1, m1's dependency on m3 is retained in the dependency information. Since m4 has two call relationships with m1, m1's dependency on m4 is retained in the dependency information.
[0093] In another possible implementation, the dependency information may be directly updated based on the verification result to delete the dependency of m1 on m2.
[0094] In other implementations, the dependency submodule relationships among m2, m3, and m4 may be further continuously analyzed and verified to construct a dependency tree based on the target module, and to analyze and update the dependency tree.
[0095] The embodiment of the present disclosure also provides a dependency relationship processing device, such as Figure 5 As shown, including:
[0096] A dependency information determination module 51 is configured to determine dependency information between multiple submodules of a target module based on a configuration file of the target module;
[0097] Verification module 52, used to verify dependency information and obtain verification results;
[0098] The updating module 53 is used to update the dependency information according to the verification result.
[0099] In one embodiment, Figure 6 As shown, the verification module includes:
[0100] The to-be-verified determination unit 61 is configured to determine a submodule having a dependency relationship with a target submodule as a submodule to be verified; the target submodule is one of the multiple submodules;
[0101] A function determination unit 62 is used to determine the functions included in the submodule to be checked;
[0102] The calling relationship processing unit 63 is used to obtain the verification result according to the calling relationship between the target sub-module and the function.
[0103] In one embodiment, the call relationship processing unit is further configured to:
[0104] In the case that a calling relationship between the target submodule and the function exists, the verification result is determined to be that the dependency relationship between the target submodule and the submodule to be verified is valid.
[0105] In one embodiment, the call relationship processing unit is further configured to:
[0106] In the case that the target submodule and the function call relationship do not exist, the verification result is determined to be that the dependency relationship between the target submodule and the submodule to be verified is invalid.
[0107] In one embodiment, Figure 7 As shown, the update module includes:
[0108] The deleting unit 71 is configured to delete the dependency relationship between the target submodule and the submodule to be verified from the dependency relationship information if the verification result shows that the dependency relationship between the target submodule and the submodule to be verified is invalid.
[0109] In one embodiment, Figure 8 As shown, the update module includes:
[0110] A strength unit 81 is configured to determine the strength of the dependency relationship between the target submodule and the submodule to be verified based on the number of functions called by the target submodule in the submodule to be verified, if the verification result shows that the dependency relationship between the target submodule and the submodule to be verified is valid;
[0111] The strength processing unit 82 is configured to update the order of the dependency relationship between the target submodule and the submodule to be verified in the dependency relationship information according to the strength.
[0112] In one example of the present disclosure, the main components of the dependency relationship processing device are as follows: Figure 9 As shown, including:
[0113] Analysis setting module 91: supports setting the analysis of a module, for example, taking module A as the target module and analyzing module A. The analysis setting module 151 in this example can reuse the modules of the dependency processing apparatus provided in the above embodiments.
[0114] Dependency Analysis Module 92: Based on the dependencies between modules (e.g., target submodule A depends on submodule B), it analyzes the public interfaces (classes, constants, variables, functions, macro definitions, etc.) of the dependent submodules. For example, if B has a public function FB, the system searches for calls to FB in the source code of target submodule A to determine whether the inter-module dependency is valid. This avoids the cost of maintenance and horizontal output each time, which would increase the downward dependency tree during migration, hindering the reuse process, increasing the size, and slowing down the process.
[0115] In the example disclosed herein, the target module may be a software program or application with functions or modules such as networking, thread execution, search, feed (delivery), and applets. The target may include sub-modules with different capabilities and different levels, and a tree diagram may be generated based on the reference and referenced relationships between the sub-modules. If the dependency information of the target module contains a large number of redundant or invalid dependencies, the dependency information tree diagram of the target module may have an invalid structure, resulting in low reusability of the sub-modules.
[0116] The dependency analysis module 92 in this example can reuse the modules in the dependency analysis devices provided in other aforementioned embodiments when necessary.
[0117] Dependency result prompt 93: It can prompt if there is no dependency relationship, and can also sort according to the level of dependency to show the results and decision-making to the user. The dependency result prompt 93 in this example can reuse the modules in the dependency relationship analysis device provided in other embodiments above when necessary.
[0118] Generally speaking, the dependencies of a target module play a crucial role in the construction, use, and maintenance of the target module. Missing dependencies in the dependency information may cause the compiler to report an error. If there are unnecessary, invalid dependencies in the dependency information, the compiler will not report an error, but the target module's dependencies will become complex, affecting the migration of the target module, the reuse of submodules, and the maintenance of the target module. Because the dependencies between target modules are changing and the target module is continuously optimized, the target module's dependencies will also handle changing states. After a long period of version iteration of the target module, some dependencies between submodules of the target module may exist but are not actually used, yet they are still retained in the dependency information. For example, submodule A of the target module depends on submodule B, but in actual use, submodule B is not called from submodule A. This situation results in a large volume of dependency information, affecting its use during the operation and maintenance of the target module. The dependency processing method and device provided in the examples of this disclosure, based on basic technologies, optimize the dependency information of the target module, effectively reducing the cost of manual troubleshooting.
[0119] If there are too many target modules, for example, if a target submodule depends on 200 submodules, troubleshooting invalid dependencies is a huge and difficult task. However, the method and apparatus provided by the embodiments of the present disclosure can update and simplify the dependency information of target modules in minutes using only automated means.
[0120] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0121] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0122] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0123] like Figure 10As shown, the device 1000 includes a computing unit 1011, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1012 or a computer program loaded from the storage unit 1008 into a random access memory (RAM) 1013. Various programs and data required for the operation of the device 1000 can also be stored in the RAM 1013. The computing unit 1011, the ROM 1012, and the RAM 1013 are connected to each other via a bus 1014. An input / output (I / O) interface 1015 is also connected to the bus 1014.
[0124] Various components in device 1000 are connected to I / O interface 1005, including an input unit 1006, such as a keyboard, mouse, etc.; an output unit 1017, such as various types of displays, speakers, etc.; a storage unit 1018, such as a magnetic disk, optical disk, etc.; and a communication unit 1019, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1019 allows device 1000 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0125] The computing unit 1011 can be a variety of general and / or special processing components with 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 dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1011 performs the various methods and processes described above, such as the dependency processing method. For example, in some embodiments, the dependency processing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 1018. In some embodiments, part or all of the computer program can be loaded and / or installed on 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 can be performed. Alternatively, in other embodiments, the computing unit 1011 may be configured to execute the dependency processing method in any other appropriate manner (eg, by means of firmware).
[0126] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0127] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0128] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0129] To provide interaction with a user, the systems and techniques described herein 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 the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 can be received in any form (including acoustic input, voice input, or tactile input).
[0130] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, 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 a local area network (LAN), a wide area network (WAN), and the Internet.
[0131] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0132] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0133] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A dependency processing method, comprising: Determine dependency information between multiple submodules of the target module according to a configuration file of the target module; Verifying the dependency information to obtain a verification result; updating the dependency information according to the verification result; The verifying the dependency information to obtain a verification result includes: Determine a submodule having a dependency relationship with a target submodule as a submodule to be verified; the target submodule is one of the multiple submodules; Determine the function included in the submodule to be verified; obtain the verification result according to the calling relationship between the target submodule and the function; Wherein, updating the dependency information according to the verification result includes: If the verification result indicates that the dependency relationship between the target submodule and the submodule to be verified is valid, determining the strength of the dependency relationship between the target submodule and the submodule to be verified based on the number of functions of the submodule to be verified called by the target submodule; According to the strength, the order of the dependency relationship between the target submodule and the submodule to be checked is updated in the dependency relationship information.
2. The method according to claim 1, wherein Obtaining the verification result according to the calling relationship information between the target submodule and the function includes: In a case where a calling relationship between the target submodule and the function exists, it is determined that the verification result indicates that the dependency relationship between the target submodule and the submodule to be verified is valid.
3. The method according to claim 1, wherein Obtaining the verification result according to the calling relationship between the target submodule and the function includes: In a case where the target submodule and the function call relationship do not exist, it is determined that the verification result is that the dependency relationship between the target submodule and the submodule to be verified is invalid.
4. The method according to claim 2 or 3, wherein: The updating of the dependency information according to the verification result includes: If the verification result shows that the dependency relationship between the target submodule and the submodule to be verified is invalid, the dependency relationship between the target submodule and the submodule to be verified is deleted from the dependency information.
5. A dependency relationship processing device, comprising: A dependency information determination module, configured to determine dependency information between multiple submodules of a target module based on a configuration file of the target module; A verification module, used to verify the dependency information and obtain a verification result; An updating module, configured to update the dependency information according to the verification result; Wherein, the verification module includes: a to-be-verified determination unit, configured to determine a submodule having a dependency relationship with a target submodule as a to-be-verified submodule; the target submodule being one of the plurality of submodules; A function determination unit, configured to determine the function included in the submodule to be checked; A call relationship processing unit, configured to obtain the verification result according to the call relationship between the target submodule and the function; The update module includes: a strength unit, configured to determine the strength of the dependency relationship between the target submodule and the submodule to be checked based on the number of functions of the submodule to be checked called by the target submodule, if the verification result indicates that the dependency relationship between the target submodule and the submodule to be checked is valid; A strength processing unit is configured to update, in the dependency information, an order of the dependency relationship between the target submodule and the submodule to be checked according to the strength.
6. The device according to claim 5, wherein The call relationship processing unit is further configured to: In a case where a calling relationship between the target submodule and the function exists, it is determined that the verification result indicates that the dependency relationship between the target submodule and the submodule to be verified is valid.
7. The device according to claim 5, wherein The call relationship processing unit is further configured to: In a case where the target submodule and the function call relationship do not exist, it is determined that the verification result is that the dependency relationship between the target submodule and the submodule to be verified is invalid.
8. The device according to claim 6 or 7, wherein: The update module includes: The deleting unit is configured to delete the dependency relationship between the target submodule and the submodule to be checked from the dependency relationship information if the verification result shows that the dependency relationship between the target submodule and the submodule to be checked is invalid.
9. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-4.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Useless dependency detection method and device
CN108628751A