Method and device for determining calling relation and electronic equipment

By receiving target requests on the user side, determining the target interface, and identifying the call object in the source code root directory to generate a call relationship link diagram, the problem of low accuracy and efficiency of determining call relationships between interfaces in the prior art is solved, and more efficient and accurate call relationship acquisition is achieved.

CN119883548APending Publication Date: 2025-04-25INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411941717.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing technology determines the accuracy and efficiency of calling relationships between interfaces through ledgers or self-built systems, resulting in errors in calling relationships between interfaces, affecting the efficiency of subsequent code processing.

Method used

It provides a method of determining the call relationship, by receiving the target request from the user, determining the target interface, and obtaining file information associated with the target interface in the source code root directory, identifying the object called by the target interface, generating a call relationship link diagram of the target interface, and feeding it back to the user.

Benefits of technology

The acquisition efficiency and accuracy of call relationships between interfaces are improved, and the problem of low accuracy and efficiency of calling relationships is solved in the prior art through ledgers or self-built systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883548A_ABST
    Figure CN119883548A_ABST
Patent Text Reader

Abstract

The invention discloses a call relation determination method and device and electronic equipment. Relates to the distributed field, and the method comprises the steps: receiving a target request sent by a user side, and determining a target interface from the target request, the target request being used for obtaining a calling relation link diagram of the target interface; a source code root directory containing the target interface is obtained, file information associated with the target interface is obtained from a source file under the source code root directory, M pieces of initial file information are obtained, and M is a positive integer; sequentially identifying objects called by the target interface in each piece of initial file information to obtain a plurality of calling objects, and generating a calling relation link diagram of the target interface according to a calling relation between each calling object and the target interface; and feeding back the calling relation link diagram to the user side. Through the method and the device, the problem that the accuracy and the efficiency of determining the calling relation through a standing book or a self-built system in the related technology are relatively low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed systems, and in particular, to a method, device and electronic device for determining a call relationship. Background Art

[0002] In the current context of Internet + Finance, especially with the widespread application of distributed technology and microservices, the realization of business scenarios in banking systems often requires the collaboration of multiple interfaces. Therefore, it is particularly important to be able to comprehensively and fully display and maintain the calling relationship between interfaces in the transaction chain for corresponding business scenarios. This affects the workload and resource investment cost required for the R&D team to carry out maintenance or function expansion in subsequent business scenarios, as well as the integrity and clarity of related tests.

[0003] Currently, when determining the calling relationship between interfaces, the calling relationship is usually registered through a ledger or a self-built system to determine the calling status of the interface. However, the accuracy of determining the calling relationship of the interface through the above method is low, and after maintaining and expanding the function of the code in the business scenario, the calling relationship needs to be updated. The efficiency and accuracy of updating the calling relationship through the ledger or self-built system for calling relationship registration are also low, which leads to errors in the calling relationship between interfaces and affects the efficiency of subsequent code processing.

[0004] Currently, no effective solution has been proposed to address the problem of low accuracy and efficiency in determining call relationships through ledgers or self-built systems in related technologies. Summary of the invention

[0005] The main purpose of this application is to provide a method, device and electronic device for determining call relationships, so as to solve the problem of low accuracy and efficiency in determining call relationships through ledgers or self-built systems in related technologies.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for determining a call relationship is provided. The method comprises: receiving a target request sent by a user end, and determining a target interface from the target request, wherein the target request is used to obtain a call relationship chain diagram of the target interface; obtaining a source code root directory containing the target interface, and obtaining file information associated with the target interface in the source file under the source code root directory, and obtaining M initial file information, wherein M is a positive integer; sequentially identifying the objects called by the target interface in each initial file information, and obtaining multiple call objects, and generating a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface; and feeding back the call relationship chain diagram to the user end.

[0007] Optionally, obtaining file information associated with a target interface in a source file under a source code root directory to obtain M initial file information includes: reading the first content under the source code root directory, and determining whether the first content is a directory; when the first content is a directory, determining the directory as the source code root directory, and re-executing the step of reading the first content under the source code root directory until the first content is file information in the source file; when the first content is file information, identifying whether there is a target interface in the file information; when there is a target interface in the file information, determining the file information as file information associated with the target interface; when traversing all the contents under the source code root directory, determining the obtained file information associated with the target interface as M initial file information.

[0008] Optionally, identifying the objects called by the target interface in each initial file information to obtain multiple calling objects includes: for each initial file information, obtaining a first code associated with the target interface in the initial file information; parsing the first code to obtain the calling object associated with the target interface in the first code.

[0009] Optionally, the calling object includes a calling method and a calling interface, and generating a calling relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface includes: judging whether there is a calling method in multiple calling objects; if there is no calling method in multiple calling objects, generating a calling relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface; if there is a calling method in multiple calling objects, obtaining a second code where the calling method is located, and determining the calling interface called by the calling method from the second code; generating a calling relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface, and the calling relationship between each calling method and the corresponding calling interface.

[0010] Optionally, before obtaining file information associated with the target interface in the source file under the source code root directory and obtaining M initial file information, the method also includes: obtaining the file type of the source file under the source code root directory; determining a conversion device for converting the source file according to the file type, wherein the conversion device is used to unify the file information in the source file according to a preset specification according to the file type; processing the source file according to the conversion device to obtain an updated source file, and obtaining M initial file information from the updated source file.

[0011] Optionally, feeding back the call relationship chain diagram to the user end includes: obtaining all the call interfaces in the call relationship chain diagram to obtain N call interfaces; determining the file information of the external files to which each call interface belongs to obtain N file information; adding each file information to the corresponding call interface in the call relationship chain diagram to obtain an updated call relationship chain diagram; and feeding back the updated call relationship chain diagram to the user end.

[0012] Optionally, feeding back the call relationship chain diagram to the user end includes: obtaining all the call interfaces in the call relationship chain diagram to obtain N call interfaces; determining the initial file information to which each call interface belongs to obtain N initial file information; adding the directory of each initial file information to the corresponding call interface in the call relationship chain diagram to obtain an updated call relationship chain diagram; and feeding back the updated call relationship chain diagram to the user end.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for determining a call relationship is provided. The device includes: a receiving unit, which is used to receive a target request sent by a user end, and determine a target interface from the target request, wherein the target request is used to obtain a call relationship chain diagram of the target interface; a first obtaining unit, which is used to obtain a source code root directory containing the target interface, and obtain file information associated with the target interface in the source file under the source code root directory, and obtain M initial file information, wherein M is a positive integer; a generating unit, which is used to sequentially identify objects called by the target interface in each initial file information, obtain multiple calling objects, and generate a call relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface; a feedback unit, which is used to feed back the call relationship chain diagram to the user end.

[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided, the electronic device comprising a memory storing an executable program; and a processor for running the program, wherein the above-mentioned method for determining the calling relationship is executed when the program is running.

[0015] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is provided, including computer instructions, which implement the steps of the above-mentioned method for determining the calling relationship when the computer instructions are executed by a processor.

[0016] In an embodiment of the present application, a target request sent by a user end is received, and a target interface is determined from the target request, wherein the target request is used to obtain a call relationship chain diagram of the target interface; a source code root directory containing the target interface is obtained, and file information associated with the target interface is obtained from the source file under the source code root directory to obtain M initial file information, wherein M is a positive integer; objects called by the target interface in each initial file information are identified in turn to obtain multiple call objects, and a call relationship chain diagram of the target interface is generated according to the call relationship between each call object and the target interface; the call relationship chain diagram is fed back to the user end, by obtaining file information corresponding to the target interface from the source file, and obtaining a call object having a call relationship with the target interface from the file information, and then generating a relationship chain diagram between the target interface and the call object according to the call relationship, thereby achieving the purpose of quickly and conveniently determining the call relationship between interfaces through the relationship chain diagram, thereby achieving the technical effect of improving the efficiency and accuracy of obtaining the call relationship between interfaces, thereby solving the technical problem of low accuracy and efficiency in determining the call relationship through a ledger or a self-built system in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for determining a call relationship is shown;

[0019] Figure 2 is a flowchart of a method for determining a call relationship provided in Example 1 of the present application;

[0020] Figure 3 It is a schematic diagram of an optional call relationship link diagram provided according to Example 1 of the present application;

[0021] Figure 4 is a schematic diagram of an optional calling relationship determination system provided according to Embodiment 1 of the present application;

[0022] Figure 5 is a schematic diagram of a device for determining a call relationship provided in Example 2 of the present application;

[0023] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] It should be noted that the method, device and electronic device for determining the call relationship determined in the present disclosure can be used in the distributed field, and can also be used in any field other than the distributed field. The application field of the method, device and electronic device for determining the call relationship determined in the present disclosure is not limited.

[0028] It should be noted that the collected information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation entrances are provided for users to choose to authorize use or refuse use. If the user chooses to refuse, the expert decision-making process is entered. For example, an interface is set between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.

[0029] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0030] Example 1

[0031] According to an embodiment of the present application, an embodiment of a method for determining a call relationship is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for determining a call relationship. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0033] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for determining the call relationship in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the method for determining the call relationship described above is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0037] Under the above operating environment, this application provides Figure 2 The method for determining the calling relationship shown. Figure 2 is a flowchart of a method for determining a calling relationship according to Embodiment 1 of the present application, such as Figure 2 As shown, the method includes:

[0038] Step S201, receiving a target request sent by a user terminal, and determining a target interface from the target request, wherein the target request is used to obtain a call relationship link diagram of the target interface.

[0039] It should be noted that the executor of this embodiment is a system for generating an interface call relationship chain diagram. After receiving a target request sent by a user terminal, the system can generate a call relationship chain diagram of the target interface according to the target interface indicated in the target request, thereby obtaining the interface called by the target interface and interface information in the project file under the source code root directory, wherein the user terminal is the device terminal used by the user who submits the request, and the call relationship chain diagram is a graphical representation of the call relationship between interfaces, which can display the call relationship between the target interface and other interfaces called by it.

[0040] Specifically, the system first receives a target request from the user, which contains specific information about the target interface that the user wants to obtain the call relationship for. The system will parse the request to determine the target interface. The processing of the target request ensures that the system can accurately understand the user's needs, that is, which interface's call relationship link diagram needs to be generated, and determines the processing object and purpose of the subsequent processing flow.

[0041] Step S202, obtaining a source code root directory containing a target interface, and obtaining file information associated with the target interface in source files under the source code root directory, to obtain M initial file information, where M is a positive integer.

[0042] It should be noted that the source code root directory is the top-level directory for storing all program source code files of the project. The source file is a specific program source code file, which contains the definition of classes, interfaces, and methods. The file information can be the specific code content in the source file, the file information can be all the code in a source file, or part of the code in the source file. It only needs to ensure that the code content in the file information is associated with the target interface. The writing language used by the source code file is not limited.

[0043] Specifically, when it is determined that the user needs to obtain a target interface for a calling relationship, the source code root directory containing the target interface can be obtained from multiple project files. Usually, there is only one source code root directory related to the target interface.

[0044] After determining the source code root directory, since the source code root directory is the directory where all related source code programs are stored, it contains the definitions and implementations of all classes and interfaces in the development process. Therefore, the system starts from this root directory and recursively traverses all source files under the directory, reads the file information, and finally determines the file information in the source files related to the target interface, thereby obtaining multiple initial file information, and then constructs a call relationship chain diagram of the target interface based on the code content in the multiple initial file information, where each initial file information contains code information related to the target interface.

[0045] For example, the traversal process can be: specify the source code root directory of the program, and enter the target interface to be viewed. The system recursively accesses each file object by reading the content under the path of the source code root directory. If the file object is a directory, it continues to read the content under the directory; if the file object is a file, it reads the file information and determines whether there is content related to the target interface in the file information. If so, the file information is determined as the initial file information, and then the initial file information related to the target interface is obtained recursively.

[0046] It should be noted that after obtaining the initial file information related to the target interface, the initial file information can be cached in KV mode to ensure the uniqueness of the file. Even if there are files with the same file name in different paths, confusion can be avoided, thereby ensuring that the location information of the calling object that has a calling relationship with the target interface in the source file can be accurately determined, thereby ensuring the accuracy of the calling relationship chain diagram.

[0047] Step S203, sequentially identifying the objects called by the target interface in each initial file information, obtaining multiple calling objects, and generating a calling relationship link diagram of the target interface according to the calling relationship between each calling object and the target interface.

[0048] It should be noted that after obtaining multiple initial file information, since each initial file information contains a calling object associated with the target interface, it is necessary to process each initial file information separately to ensure that all calling objects are obtained, where the calling object can be a class or method directly or indirectly called by the target interface in the source code, and the calling relationship is a calling dependency relationship between interfaces, classes or methods.

[0049] Specifically, when processing the initial file information, it is necessary to identify the calling object called by the target interface in the initial file information through a preset identification method, and determine the type and calling relationship of the calling object. For example, the calling relationship can be a direct call or an indirect call.

[0050] When the calling relationship between the target interface and the calling object is determined, a calling relationship link diagram can be generated according to the calling relationship. Figure 3 is a schematic diagram of an optional call relationship link diagram provided according to Example 1 of the present application, such as Figure 3 As shown, the call relationship link graph can be composed of multiple nodes and multiple edges, where the nodes are target interfaces and call objects, and the edges are call relationships, thereby completing the construction operation of the call relationship link graph.

[0051] For example, the system uses recognition expanders and source code parsers to identify and parse objects in files, determine which objects are called directly or indirectly by the target interface, and by checking import statements, class attribute definitions, and method call statements in the source code, the system can build an object call network to locate all call objects related to the target interface. Finally, the system generates a call relationship link diagram based on the call relationship between these call objects and the target interface.

[0052] It should be noted that after determining the type of the calling object, the information of the calling object can be obtained according to the type of the calling object. For example, when the calling object is an interface, the interface information can be obtained. When the calling object is a method, the calling interface called in the local method corresponding to the called method can be obtained. The calling relationship chain graph can be further processed according to the calling relationship between the calling method and the calling interface, thereby obtaining a more accurate calling relationship chain graph.

[0053] Step S204: Feedback the call relationship link diagram to the user end.

[0054] Specifically, after obtaining the call relationship chain diagram, the call relationship chain diagram can be fed back to the user end through the result output device. The user end can receive and display the call relationship chain diagram through any interface that can receive and display information, such as a command line interface, a web interface, or a specific development tool plug-in, so that the user can intuitively see the call relationship of the target interface through the user end, thereby more effectively performing code maintenance, function expansion, and testing work. Through graphical display, users can also more clearly identify the call hierarchy and dependency relationship between interfaces, thereby improving the efficiency of code maintenance, function expansion, and testing work.

[0055] The method for determining the call relationship provided in the embodiment of the present application adopts the method of receiving a target request sent by a user end and determining the target interface from the target request, wherein the target request is used to obtain a call relationship chain diagram of the target interface; obtaining a source code root directory containing the target interface, and obtaining file information associated with the target interface in the source file under the source code root directory to obtain M initial file information, wherein M is a positive integer; sequentially identifying objects called by the target interface in each initial file information to obtain multiple call objects, and generating a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface; feeding back the call relationship chain diagram to the user end, obtaining file information corresponding to the target interface from the source file, and obtaining a call object having a call relationship with the target interface from the file information, and then generating a relationship chain diagram between the target interface and the call object according to the call relationship, thereby achieving the purpose of quickly and conveniently determining the call relationship between interfaces through the relationship chain diagram, thereby achieving the technical effect of improving the efficiency and accuracy of obtaining the call relationship between interfaces, and thereby solving the technical problem of low accuracy and efficiency in determining the call relationship through a ledger or a self-built system in the related technology.

[0056] Optionally, in the method for determining the calling relationship provided in an embodiment of the present application, file information associated with the target interface is obtained in the source file under the source code root directory, and M initial file information is obtained, including: reading the first content under the source code root directory, and determining whether the first content is a directory; when the first content is a directory, determining the directory as the source code root directory, and re-executing the step of reading the first content under the source code root directory until the first content is the file information in the source file; when the first content is file information, identifying whether there is a target interface in the file information; when there is a target interface in the file information, determining the file information as file information associated with the target interface; when traversing all the contents under the source code root directory, determining the acquired file information associated with the target interface as M initial file information.

[0057] Specifically, when obtaining the initial file information, it is necessary to first read the first content under the source code root directory, where the first content refers to the first entity encountered by the system when processing the source code root directory, which can be a subdirectory or a source file. The system starts reading from the top level of the source code root directory, that is, traverses its content from the upper level of the root directory and determines whether the first content read is a directory.

[0058] In the case where the first content is determined to be a directory, it is necessary to further go into the directory and continue to read the content under it, that is, the system determines the directory as a new processing object and performs the reading operation again until it is confirmed to be file information. In the case where the first content is file information, it is necessary to check the read file information to determine whether it is related to the target interface specified by the user.

[0059] In the case where the target interface exists in the file information, it can be determined that the file information is related to the target interface. At this time, the file information can be marked to identify the file information as the initial file information, and continue to traverse other entity contents under the source code root directory, so as to mark all the file information related to the target interface under the source code root directory, thereby obtaining M initial file information. Thus, by recursively traversing the source code root directory, it is ensured that no source file that may contain the target interface call is missed. And by identifying whether the file information contains the target interface, redundant processing of irrelevant files is avoided, efficiency is improved, and the initial file information related to the target interface is accurately obtained.

[0060] This embodiment avoids manual management and errors by recursively accessing and intelligently identifying the contents under the source code root directory, while ensuring the accuracy and efficiency of subsequent acquisition of calling objects related to the target interface, thereby improving the accuracy of calling relationship analysis.

[0061] Optionally, in the method for determining the calling relationship provided in an embodiment of the present application, the objects called by the target interface in each initial file information are identified to obtain multiple calling objects, including: for each initial file information, obtaining a first code associated with the target interface in the initial file information; parsing the first code to obtain the calling object associated with the target interface in the first code.

[0062] Specifically, after obtaining the initial file information, the first code associated with the target interface can be obtained from the initial file information, wherein the first code refers to a specific source code segment containing the target interface call relationship, which can be a class definition, method implementation, or call statement. That is, after determining the initial file information, the system will read and locate the code fragments associated with the target interface, which may contain the call information of the target interface, thereby determining the call object associated with the target interface based on the code fragments. Then, the code fragments directly related to the target interface are screened out from a large amount of source file information, reducing the complexity and workload of subsequent parsing and improving efficiency.

[0063] Optionally, after determining the first code in the initial file information, a code parsing module can be used to parse the first code to identify which object or objects in the code are called by the target interface, thereby determining the calling object associated with the target interface in the first code, ensuring the accuracy of identifying the calling object, and then ensuring the accuracy of the subsequent generation of the calling relationship link diagram, wherein the calling object may include a class, an interface or a method.

[0064] This embodiment ensures that the system can accurately and efficiently identify the calling object of the target interface from the source code by identifying the first code and parsing the first code to obtain the calling object.

[0065] Optionally, in the method for determining the call relationship provided in the embodiment of the present application, the call object includes a call method and a call interface, and generating a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface includes: determining whether there is a call method in multiple call objects; if there is no call method in multiple call objects, generating a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface; if there is a call method in multiple call objects, obtaining a second code where the call method is located, and determining the call interface called by the call method from the second code; generating a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface, and the call relationship between each call method and the corresponding call interface.

[0066] Specifically, since the calling object includes the calling method and the calling interface, and the calling method may also include the calling interface, when generating the calling method and the calling interface, it is necessary to determine whether the calling method exists in the calling object.

[0067] When the calling object only contains the calling interface, the calling relationship chain diagram of the target interface can be directly generated according to the calling relationship between each calling object and the target interface. That is, if no calling method is found in the calling object, the system will focus on the analysis of the calling interface, and the system will construct a calling relationship chain diagram based on the calling relationship between these calling interfaces and the target interface.

[0068] When there are calling methods in multiple calling objects, the second code where the calling method is located can be obtained, and the calling interface called by the calling method can be determined from the second code, and then the calling interface under the calling method can be obtained, and the calling interface can be added to the calling relationship chain diagram, thereby ensuring the integrity and accuracy of the calling relationship chain diagram, wherein the second code can be a source code segment containing a specific implementation of the calling method, located in the source file of the calling object.

[0069] After determining the calling object, you can build a calling relationship link diagram based on the calling relationship between each calling interface and the target interface, the calling relationship between each calling method and the target interface, and the calling interface in each calling method, thereby obtaining a comprehensive calling relationship link diagram. This link diagram not only shows the relationship between the target interface and the directly called object, but also describes in detail the calling interface indirectly called by the calling method, forming a multi-level, multi-dimensional calling relationship display link diagram, which ensures that users can obtain information on all calling interfaces associated with the target interface based on the calling relationship link diagram.

[0070] This embodiment obtains the corresponding calling interface according to the type of the calling object, thereby ensuring that the system can accurately identify and associate the calling method and calling interface in the calling object, and then construct an accurate and detailed calling relationship chain diagram.

[0071] Optionally, in the method for determining the calling relationship provided in an embodiment of the present application, before obtaining file information associated with the target interface in the source file under the source code root directory and obtaining M initial file information, the method also includes: obtaining the file type of the source file under the source code root directory; determining a conversion device for converting the source file according to the file type, wherein the conversion device is used to unify the file information in the source file according to a preset specification according to the file type; processing the source file according to the conversion device to obtain an updated source file, and obtaining M initial file information from the updated source file.

[0072] It should be noted that in order to ensure that the system can accurately read the source files in the source code root directory, the source files in the source code root directory need to be processed, so that the system can perform content reading operations on the processed source files to ensure the accuracy of the content of the source files.

[0073] Specifically, when processing source files in the source code root directory, it is first necessary to obtain the file type of the source files in the source code root directory, and then determine whether the source files need to be processed based on the file type, wherein the file type can be identified by checking the file suffix.

[0074] After obtaining the file type of the source file, the conversion device for converting the source file can be determined according to the file type, and the source file can be converted by the conversion device, thereby ensuring that the system can accurately obtain the code information in the source file, wherein the conversion device can be a tool or module that uniformly converts the file information in the source file according to the preset specification according to the file type. By using the conversion device, the system can ensure that all source file information is converted into a unified format, which is convenient for subsequent parsing and call relationship analysis, while improving the flexibility and scalability of the system.

[0075] After being processed by the conversion device, the information in the source file is converted into a format that meets the preset specifications, forming an updated source file. These updated source files not only retain the original code information, but also undergo certain formatting processing to make them easier to parse and identify. Subsequently, the system obtains the file information associated with the target interface from these updated source files, thereby obtaining M initial file information, thereby ensuring the accuracy of the operation of obtaining the initial file information.

[0076] This embodiment provides standardized and formatted source file information for the subsequent determination of the calling interface of the target interface by identifying the source file type and processing and updating the source file content. This process not only improves the system's ability to process source code, but also expands the processing of other types of source files, so that the entire technical solution can more comprehensively cover all relevant files in the project.

[0077] Optionally, in the method for determining the call relationship provided in an embodiment of the present application, feeding back the call relationship chain diagram to the user end includes: obtaining all the call interfaces in the call relationship chain diagram to obtain N call interfaces; determining the file information of the external files to which each call interface belongs to obtain N file information; adding each file information to the corresponding call interface in the call relationship chain diagram to obtain an updated call relationship chain diagram; and feeding back the updated call relationship chain diagram to the user end.

[0078] Specifically, when the call relationship chain graph is fed back to the user end, the call relationship chain graph needs to be further processed, so as to send the processed call relationship chain graph to the user end.

[0079] After completing the construction of the call relationship link graph, the system can extract all the call interfaces recorded in the graph, obtain N call interfaces, and find all external file information corresponding to the N call interfaces. By obtaining the file information of the external files, it can provide users with a more specific interface call context, including the file location and file type of the call interface, which helps users understand the definition of the interface and the overall picture of the call relationship.

[0080] After obtaining the external file information, the external file information can be added to the corresponding calling interface in the call relationship link diagram, that is, N file information is associated with the calling interface in the call relationship link diagram, and the file information is added to the link diagram as an additional attribute of the calling interface. In this way, the link diagram not only shows the calling relationship between the interfaces, but also includes the source file information of each interface, forming an updated call relationship link diagram with richer content.

[0081] This embodiment enriches the information volume and practicality of the link diagram by performing detailed file information association on the calling interface in the link diagram before feeding back the calling relationship link diagram, so that the user can not only obtain the calling relationship between the interfaces from the link diagram, but also directly obtain the source file information of the calling interface, including the file location and type, thereby improving the efficiency of subsequent code review, understanding of system architecture and maintenance work.

[0082] Optionally, in the method for determining the call relationship provided in an embodiment of the present application, feeding back the call relationship chain diagram to the user end includes: obtaining all the call interfaces in the call relationship chain diagram to obtain N call interfaces; determining the initial file information to which each call interface belongs to obtain N initial file information; adding the directory of each initial file information to the corresponding call interface in the call relationship chain diagram to obtain an updated call relationship chain diagram; and feeding back the updated call relationship chain diagram to the user end.

[0083] Specifically, when the call relationship chain graph is fed back to the user end, the call relationship chain graph needs to be further processed, so as to send the processed call relationship chain graph to the user end.

[0084] After completing the construction of the call relationship link graph, the system can extract all the call interfaces recorded in the graph, obtain N call interfaces, and find the initial file information corresponding to each call interface, that is, the specific location and file attributes of these interfaces in the source code, thereby obtaining N initial file information.

[0085] It should be noted that after obtaining N initial file information, it is necessary to obtain the directory information of the N initial file information and add the directory information to the description of each calling interface in the calling relationship link diagram, so that the calling interface not only includes the relationship between the interfaces, but also provides additional location information of the interface in the source code, so that the updated link diagram contains richer contextual information, which can help users quickly locate specific files in the source code.

[0086] This embodiment adds directory information to the link diagram, so that users can directly trace related files in the source code according to the link diagram, thereby improving the efficiency of subsequent code review, understanding of system architecture and maintenance work.

[0087] Figure 4 is a schematic diagram of an optional call relationship determination system provided in Example 1 of the present application, such as Figure 4 As shown, the system includes: a source code loader 41, a source code identifier 42, an identification expander 43, a source code parser 44, and a result outputter 45.

[0088] The source code loader 41 is used to load the source code files in the specified path, including a source code file loading module and a file type extension module.

[0089] Source code file loading module: recursively access each file object by reading the content under the specified path. If it is a directory, continue to read the content under the directory; if it is a file, read the file information and cache the file information in KV mode, where K must include the node information where the file is located to avoid the same file information under different paths.

[0090] File type extension module: supports users to customize the reading file type and realize on-demand loading function.

[0091] Source code identifier 42: is used to identify the source code type, for example, classify the source code according to the development language, including a data information conversion module and a source code type expansion module.

[0092] Data information conversion module: It identifies the type according to the suffix of the source code file, and converts the corresponding file type and file information into the data information defined by this system. The data includes the file type and the file information KV value.

[0093] Source code type extension module: provides an extension interface to support the access of custom identifiers.

[0094] Identifier extender 43: refers to a custom identifier that is connected to the system by implementing the extension interface provided by the source code identifier 42, including an identifier interface module and an identifier extension module.

[0095] Identifier interface module: standardizes the definition of the custom identifier, including the identifier's input and output parameters and operation functions, so that the custom identifier can meet the processing requirements of the source code identifier 42 of this system.

[0096] Identifier extension module: provides personalized recognition requirements for other types of source code.

[0097] Source code parser 44: refers to a processor that implements parsing of files in the loading cache, including a source code syntax parsing module, a syntax formatting module, a reference relationship parsing module, a method call parsing module, a parsing result storage module, and a parsing log output module.

[0098] Source code syntax parsing module: reads files from disk according to the file information in the loading cache, and parses them according to the syntax of the development language based on the file type.

[0099] Syntax formatting module: During the parsing process, various statement writing methods are formatted and converted into general writing methods that meet the source code type.

[0100] Reference relationship parsing module: For interface call relationships that may exist during parsing, such as class attribute definitions in the class, the call relationship is judged by checking whether there is an import operation. If so, the relationship between the reference class is established and the parser is recursively called to perform reference class parsing.

[0101] Method call parsing module: For possible method call relationships in the parsing, it is determined whether the current call statement is in the local method of the class. If so, a call relationship between the local method and the called method is established.

[0102] Parsing result storage module: converts the parsed file information into the source code object data type of this system and stores it in the parsing cache.

[0103] Parsing log output module: supports outputting text to disk after reformatting the source code during the parsing process. This function has switch control.

[0104] The result outputter 45 generates a call relationship chain diagram from the call relationship obtained by the source code parser 44, and sends the call relationship chain diagram to the user end, so that the user can receive and view the call relationship chain diagram.

[0105] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0106] Example 2

[0107] The embodiment of the present application also provides a device for determining a call relationship. It should be noted that the device for determining a call relationship in the embodiment of the present application can be used to execute the method for determining a call relationship provided in the above embodiment. The device for determining a call relationship provided in the embodiment of the present application is introduced below.

[0108] According to an embodiment of the present application, a device for implementing the above-mentioned method for determining the calling relationship is also provided. Figure 5 is a schematic diagram of a device for determining a call relationship according to Embodiment 2 of the present application, such as Figure 5 As shown, the device comprises:

[0109] The receiving unit 51 is used to receive a target request sent by a user terminal and determine a target interface from the target request, wherein the target request is used to obtain a call relationship link diagram of the target interface.

[0110] The first acquisition unit 52 is used to acquire a source code root directory containing a target interface, and acquire file information associated with the target interface from source files under the source code root directory to obtain M initial file information, where M is a positive integer.

[0111] The generating unit 53 is used to sequentially identify the objects called by the target interface in each initial file information, obtain multiple calling objects, and generate a calling relationship link diagram of the target interface according to the calling relationship between each calling object and the target interface.

[0112] The feedback unit 54 is used to feed back the call relationship link diagram to the user end.

[0113] The device for determining the call relationship provided by the embodiment of the present application receives the target request sent by the user end through the receiving unit 51, and determines the target interface from the target request, wherein the target request is used to obtain the call relationship chain diagram of the target interface; the first acquisition unit 52 obtains the source code root directory containing the target interface, and obtains the file information associated with the target interface in the source file under the source code root directory, and obtains M initial file information, wherein M is a positive integer; the generation unit 53 sequentially identifies the objects called by the target interface in each initial file information, obtains multiple call objects, and generates the call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface; the feedback unit 54 feeds back the call relationship chain diagram to the user end. By obtaining the file information corresponding to the target interface from the source file, and obtaining the call object having a call relationship with the target interface from the file information, and then generating the relationship chain diagram between the target interface and the call object according to the call relationship, the purpose of quickly and conveniently determining the call relationship between interfaces through the relationship chain diagram is achieved, thereby achieving the technical effect of improving the acquisition efficiency and accuracy of the call relationship between interfaces, and thus solving the technical problem of low accuracy and efficiency of determining the call relationship through the ledger or self-built system in the related technology.

[0114] Optionally, in the device for determining the calling relationship provided in the embodiment of the present application, the first acquisition unit 52 includes: a first judgment module, used to read the first content under the source code root directory and determine whether the first content is a directory; a first determination module, used to determine the directory as the source code root directory when the first content is a directory, and re-execute the step of reading the first content under the source code root directory until the first content is file information in the source file; an identification module, used to identify whether there is a target interface in the file information when the first content is file information; a second determination module, used to determine the file information as file information associated with the target interface when the target interface exists in the file information; the first acquisition module, used to determine the acquired file information associated with the target interface as M initial file information when traversing all the contents under the source code root directory.

[0115] Optionally, in the device for determining the calling relationship provided in an embodiment of the present application, the generation unit 53 includes: a second acquisition module, used to obtain a first code associated with the target interface in the initial file information for each initial file information; and a parsing module, used to parse the first code to obtain a calling object associated with the target interface in the first code.

[0116] Optionally, in the device for determining the call relationship provided in the embodiment of the present application, the call object includes a call method and a call interface, and the generation unit 53 includes: a second judgment module, used to determine whether a call method exists in multiple call objects; a first generation module, used to generate a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface when there is no call method in multiple call objects; a third determination module, used to obtain the second code where the call method is located, and determine the call interface called by the call method from the second code when there is a call method in multiple call objects; a second generation module, used to generate a call relationship chain diagram of the target interface according to the call relationship between each call object and the target interface, and the call relationship between each call method and the corresponding call interface.

[0117] Optionally, in the device for determining the calling relationship provided in the embodiment of the present application, before obtaining the file information associated with the target interface in the source file under the source code root directory and obtaining M initial file information, the device also includes: a second acquisition unit, used to obtain the file type of the source file under the source code root directory; a determination unit, used to determine a conversion device for converting the source file according to the file type, wherein the conversion device is used to unify the file information in the source file according to a preset specification according to the file type; and a processing unit, used to process the source file according to the conversion device, obtain an updated source file, and obtain M initial file information from the updated source file.

[0118] Optionally, in the call relationship determination device provided in the embodiment of the present application, the feedback unit 54 includes: a third acquisition module, used to acquire all call interfaces in the call relationship link diagram to obtain N call interfaces; a fourth determination module, used to determine the file information of the external file to which each call interface belongs to, and obtain N file information; a first adding module, used to add each file information to the corresponding call interface in the call relationship link diagram, respectively, to obtain an updated call relationship link diagram; a first feedback module, used to feed back the updated call relationship link diagram to the user end.

[0119] Optionally, in the call relationship determination device provided in the embodiment of the present application, the feedback unit 54 includes: a fourth acquisition module, used to acquire all call interfaces in the call relationship link diagram to obtain N call interfaces; a fifth determination module, used to determine the initial file information to which each call interface belongs, to obtain N initial file information; a second adding module, used to add the directory of each initial file information to the corresponding call interface in the call relationship link diagram, to obtain an updated call relationship link diagram; a second feedback module, used to feed back the updated call relationship link diagram to the user end.

[0120] It should be noted that the receiving unit 51, the first acquisition unit 52, the generating unit 53, and the feedback unit 54 correspond to steps S201 to S204 in Embodiment 1, and the two modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the modules may also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0121] Example 3

[0122] An embodiment of the present application may provide an electronic device, Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (only one is shown) processor 1002, memory 1004, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0123] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0124] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive a target request sent by the user end, and determine the target interface from the target request, wherein the target request is used to obtain a call relationship chain diagram of the target interface; obtain a source code root directory containing the target interface, and obtain file information associated with the target interface in the source file under the source code root directory to obtain M initial file information, wherein M is a positive integer; identify the objects called by the target interface in each initial file information in turn to obtain multiple calling objects, and generate a call relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface; and feed back the call relationship chain diagram to the user end.

[0125] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: read the first content under the source code root directory and determine whether the first content is a directory; if the first content is a directory, determine the directory as the source code root directory, and re-execute the step of reading the first content under the source code root directory until the first content is file information in the source file; if the first content is file information, identify whether there is a target interface in the file information; if there is a target interface in the file information, determine the file information as file information associated with the target interface; when traversing all the contents under the source code root directory, determine the acquired file information associated with the target interface as M initial file information.

[0126] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: for each initial file information, obtain the first code associated with the target interface in the initial file information; parse the first code to obtain the calling object associated with the target interface in the first code.

[0127] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: determine whether there is a calling method in multiple calling objects; if there is no calling method in multiple calling objects, generate a calling relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface; if there is a calling method in multiple calling objects, obtain the second code where the calling method is located, and determine the calling interface called by the calling method from the second code; generate a calling relationship chain diagram of the target interface according to the calling relationship between each calling object and the target interface, and the calling relationship between each calling method and the corresponding calling interface.

[0128] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: obtain the file type of the source file in the source code root directory; determine the conversion device for converting the source file according to the file type, wherein the conversion device is used to unify the file information in the source file according to the preset specification according to the file type; process the source file according to the conversion device to obtain an updated source file, and obtain M initial file information from the updated source file.

[0129] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: obtain all the calling interfaces in the call relationship link diagram to obtain N calling interfaces; determine the file information of the external files to which each calling interface belongs to obtain N file information; add each file information to the corresponding calling interface in the call relationship link diagram to obtain an updated call relationship link diagram; and feed back the updated call relationship link diagram to the user end.

[0130] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain all the calling interfaces in the calling relationship link diagram to obtain N calling interfaces; determine the initial file information to which each calling interface belongs to obtain N initial file information; add the directory of each initial file information to the corresponding calling interface in the calling relationship link diagram to obtain an updated calling relationship link diagram; and feed back the updated calling relationship link diagram to the user end.

[0131] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations are shown.

[0132] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0133] Example 4

[0134] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for determining the calling relationship provided in the first embodiment.

[0135] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0136] An embodiment of the present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the method for determining a call relationship.

[0137] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned method for determining the calling relationship.

[0138] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0139] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0142] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0144] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining a call relationship, characterized in that: include: Receiving a target request sent by a user terminal, and determining a target interface from the target request, wherein the target request is used to obtain a call relationship link graph of the target interface; Obtain a source code root directory containing the target interface, and obtain file information associated with the target interface from source files under the source code root directory to obtain M initial file information, where M is a positive integer; Identify the objects called by the target interface in each initial file information in turn, obtain multiple calling objects, and generate a calling relationship link graph of the target interface according to the calling relationship between each calling object and the target interface; Feedback the call relationship link graph to the user end.

2. The method according to claim 1, characterized in that Obtain file information associated with the target interface from the source files in the source code root directory, and obtain M initial file information including: Reading the first content under the source code root directory, and determining whether the first content is a directory; In the case where the first content is a directory, determining the directory as the source code root directory, and re-performing the step of reading the first content under the source code root directory until the first content is file information in the source file; In the case where the first content is file information, identifying whether the target interface exists in the file information; In a case where the target interface exists in the file information, determining the file information as file information associated with the target interface; When all contents under the source code root directory are traversed, the acquired file information associated with the target interface is determined as M initial file information.

3. The method according to claim 1, characterized in that Identify the objects called by the target interface in each initial file information, and obtain multiple calling objects including: For each initial file information, obtaining a first code associated with the target interface in the initial file information; The first code is parsed to obtain a calling object associated with the target interface in the first code.

4. The method according to claim 1, characterized in that: The calling object includes a calling method and a calling interface, and generating a calling relationship link diagram of the target interface according to the calling relationship between each calling object and the target interface includes: Determine whether the calling method exists in the multiple calling objects; In the case that the calling method does not exist in the multiple calling objects, generating a calling relationship link graph of the target interface according to the calling relationship between each calling object and the target interface; In the case that the calling method exists in the multiple calling objects, obtaining a second code where the calling method is located, and determining a calling interface called by the calling method from the second code; A call relationship link graph of the target interface is generated according to the call relationship between each call object and the target interface, and the call relationship between each call method and the corresponding call interface.

5. The method according to claim 1, characterized in that Before acquiring file information associated with the target interface from the source files in the source code root directory and obtaining M initial file information, the method further includes: Obtain the file type of the source file in the source code root directory; Determine a conversion device for converting the source file according to the file type, wherein the conversion device is used to unify the file information in the source file according to a preset specification according to the file type; The source file is processed according to the conversion device to obtain an updated source file, and the M initial file information is obtained from the updated source file.

6. The method according to claim 1, characterized in that Feeding back the call relationship link graph to the user end includes: Obtain all calling interfaces in the calling relationship link diagram to obtain N calling interfaces; Determine the file information of the external files to which each calling interface belongs, and obtain N file information; Add each file information to the corresponding calling interface in the calling relationship chain diagram to obtain an updated calling relationship chain diagram; The updated call relationship link graph is fed back to the user end.

7. The method according to claim 1, characterized in that Feeding back the call relationship link graph to the user end includes: Obtain all calling interfaces in the calling relationship link diagram to obtain N calling interfaces; Determine the initial file information to which each calling interface belongs, and obtain N initial file information; Add the directories of each initial file information to the corresponding calling interface in the calling relationship chain diagram to obtain an updated calling relationship chain diagram; The updated call relationship link graph is fed back to the user end.

8. A device for determining a call relationship, characterized in that: include: A receiving unit, used to receive a target request sent by a user terminal, and determine a target interface from the target request, wherein the target request is used to obtain a call relationship link graph of the target interface; A first acquisition unit is used to acquire a source code root directory containing the target interface, and acquire file information associated with the target interface from source files under the source code root directory to obtain M initial file information, where M is a positive integer; A generating unit, used to sequentially identify objects called by the target interface in each initial file information, obtain multiple calling objects, and generate a calling relationship link graph of the target interface according to the calling relationship between each calling object and the target interface; A feedback unit is used to feed back the call relationship link diagram to the user end.

9. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method for determining a calling relationship described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor, used to run the program, wherein the program executes the method for determining the calling relationship described in any one of claims 1 to 7 when running.