Interface function acquisition method and device, equipment, storage medium and program product

By determining and processing the private code of the target interface function, the problem of low code reuse efficiency in traditional technologies has been solved, and more efficient universal code reuse and business program development efficiency are achieved.

CN119356651APending Publication Date: 2025-01-24BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411503095.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In traditional technology, interface functions in code with general functions that fail to meet the needs of business programs need to be re-written, resulting in low efficiency in code reuse.

Method used

By determining the target interface function corresponding to the business program to be developed from the preset general code library, and processing the private code in the variable code of the target interface function according to the business program requirement information, the interface function that meets the business program requirements is obtained.

Benefits of technology

It improved the possibility and efficiency of determining the target interface function from the general code library, simplified the processing process of the private code, and improved the efficiency of the variable codes after processed, thereby improving the efficiency of the replication of the universal code and the need to develop business to develop business. Program development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356651A_ABST
    Figure CN119356651A_ABST
Patent Text Reader

Abstract

The invention relates to an interface function obtaining method and device, equipment, a storage medium and a program product, and relates to the field of finance. The method comprises the steps of determining a target interface function corresponding to a to-be-developed business program from a preset universal code library; according to the demand information of the to-be-developed business program, processing private codes in variable codes of the target interface function to obtain processed variable codes; the private code is a code corresponding to a non-callable function in the processed variable code; and according to the processed variable code and an immutable code in the target interface function, obtaining the target interface function meeting the to-be-developed business program. By adopting the method, the code reuse efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the financial field, and in particular to a method, device, equipment, storage medium and program product for obtaining an interface function. Background Art

[0002] In the business program development of a bank, there are some code libraries that can implement common functions. For example, the common functions may be query functions, etc. The codes that implement the common functions may be managed for code reuse to improve the development efficiency of the business programs.

[0003] In the conventional technology, when there is no interface function in the code of the general function that meets the requirements of the current business program, the interface function of the code of the general function needs to be rewritten.

[0004] Therefore, there is a problem of low efficiency of code reuse in traditional technologies. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device, equipment, storage medium and program product for determining reused code that can improve the efficiency of code reuse in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for obtaining an interface function. The method comprises:

[0007] Determine the target interface function corresponding to the business program to be developed from the preset general code library;

[0008] According to the demand information of the business program to be developed, the private code in the variable code of the target interface function is processed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code;

[0009] According to the processed variable code and the immutable code in the target interface function, a target interface function that satisfies the business program to be developed is obtained.

[0010] In one embodiment, the step of processing the private code in the variable code of the target interface function according to the requirement information of the business program to be developed to obtain the processed variable code includes:

[0011] Performing generalization processing on the variable code to obtain a generalized variable code;

[0012] The private code in the generalized variable code is processed according to the requirement information to obtain the processed variable code.

[0013] In one embodiment, the processing of the private code in the generalized variable code according to the requirement information to obtain the processed variable code includes:

[0014] According to the requirement information, determine to write the target code corresponding to the requirement information;

[0015] The private code is modified according to the target code to obtain the processed variable code.

[0016] In one embodiment, the modifying the private code according to the target code to obtain the processed variable code includes:

[0017] Determining a target subcode in the private code according to the target code and the private code; the target subcode is a subcode in the private code that is inconsistent with the target code;

[0018] According to the target code, the target subcode is modified to obtain the processed variable code.

[0019] In one embodiment, obtaining a target interface function that satisfies the business program to be developed according to the processed variable code and the immutable code in the target interface function includes:

[0020] The processed variable code and the immutable code are encapsulated to obtain the target interface function that satisfies the business program to be developed.

[0021] In one embodiment, determining the target interface function corresponding to the business program to be developed from a preset general code library includes:

[0022] The interface functions in the general code library whose functions are similar to the functions corresponding to the requirement information are greater than a preset similarity threshold and are determined as the target interface functions corresponding to the business program to be developed.

[0023] In a second aspect, the present application also provides a device for obtaining an interface function. The device comprises:

[0024] A determination module, used to determine the target interface function corresponding to the business program to be developed from a preset general code library;

[0025] A first acquisition module is used to process the private code in the variable code of the target interface function according to the demand information of the business program to be developed, so as to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code;

[0026] The second acquisition module is used to acquire the target interface function that meets the business program to be developed according to the processed variable code and the immutable code in the target interface function.

[0027] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0029] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0030] The above-mentioned interface function acquisition method, device, equipment, storage medium and program product determine the target interface function corresponding to the business program to be developed from a preset general code library. Since the target interface function determined in the interface function acquisition method provided in the present application only needs to correspond to the business to be developed, the possibility of determining the target interface function from the general code library can be improved. Furthermore, according to the demand information of the business program to be developed, the private code corresponding to the non-callable function in the variable code of the target interface function is processed. Compared with the traditional technology, only the private code in the variable code of the target interface function needs to be processed. Since the process of processing the private code is relatively simple and the amount of processed code is small, the efficiency of the processed variable code can be improved, so that the target interface function that meets the business program to be developed can be obtained according to the processed variable code and the immutable code in the target interface function, thereby improving the efficiency of obtaining the target interface function that meets the business program to be developed, and then the efficiency of reusing the general code can be improved; in addition, since the efficiency of reusing the general code is improved, the development efficiency of the business program to be developed is also improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] FIG1 is an application environment diagram of a method for obtaining an interface function in one embodiment;

[0032] FIG2 is a schematic diagram of a flow chart of a method for obtaining an interface function in one embodiment;

[0033] FIG3 is a schematic flow chart of a method for obtaining an interface function in another embodiment;

[0034] FIG4 is a schematic flow chart of a method for obtaining an interface function in another embodiment;

[0035] FIG5 is a schematic flow chart of a method for obtaining an interface function in another embodiment;

[0036] FIG6 is a structural block diagram of an interface function acquisition device in one embodiment;

[0037] FIG. 7 is a structural block diagram of a device for acquiring an interface function in another embodiment. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] It should be noted that the interface function acquisition method, device, equipment, storage medium and program product of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The present invention does not limit the application field of the interface function acquisition method, device, equipment, storage medium and program product.

[0040] In the process of bank business program development, the efficiency of program development can be improved by calling common code. In the traditional technology, when reusing code, the interface function that is the same as the business requirement is found in the common code. If the same interface function exists, the interface function is directly called. If the same interface function does not exist, the interface function is not called, and the corresponding code is rewritten according to the business requirement. Therefore, the efficiency of reusing common code in the traditional technology is relatively low. Based on this, the present application proposes a method for obtaining an interface function that can improve the efficiency of reusing common code. From a preset common code library, a target interface function corresponding to the business program to be developed is determined. According to the demand information of the business program to be developed, the private code corresponding to the non-callable function in the variable code of the target interface function is processed. According to the processed variable code and the immutable code in the target interface function, the target interface function that meets the business program to be developed is obtained. Compared with the traditional technology, only the private code in the variable code of the target interface function needs to be processed. Since the process of processing the private code is relatively simple and the amount of processed code is small, the efficiency of the processed variable code can be improved, and then the efficiency of reusing common code can be improved.

[0041] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0042] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a kind of", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The "multiple" involved in this application means greater than or equal to two. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices.

[0043] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, and may also be other implicit or related problems. For details, please refer to the description of the following embodiments. The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0044] The method for obtaining an interface function provided in an embodiment of the present application can be applied to an application environment as shown in FIG1. ​​FIG1 provides a computer device, which can be a server, and its internal structure diagram can be shown in FIG1. ​​The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of the target interface function of the business program to be developed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for obtaining an interface function is implemented. Those skilled in the art will understand that the structure shown in FIG. 1 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0045] In one embodiment, as shown in FIG. 2 , a method for obtaining an interface function is provided, which is described by taking the method applied to the computer device in FIG. 1 as an example, and includes the following steps:

[0046] S201, determining a target interface function corresponding to a business program to be developed from a preset general code library.

[0047] Among them, the preset general code library is established based on the code for implementing general functions in the code of the developed business program. The general code library may include a large number of general codes, wherein each general code contains one or more interface functions, and different interface functions are used to implement different functions. In this embodiment, the interface function corresponding to the business program to be developed can be determined as the target interface function, wherein the business program to be developed can be a business program related to a bank application (Application, APP), for example, a program for transfer business in a bank APP, or a program for querying historical bill business.

[0048] It can be understood that the target interface function corresponding to the business program to be developed refers to an interface function similar to the interface function for implementing the business program to be developed. For example, if the business to be developed is to query activity list A, the target interface function corresponding to the business program to be developed can be an interface function for implementing the database query function, or the target interface function corresponding to the business program to be developed can also be an interface function for implementing the acquisition of activity list A.

[0049] It should be noted that in order to improve the efficiency of code reuse of common codes, in this embodiment, common codes similar to those that implement the business program to be developed can be found from the common code library, and the similar common codes can be determined as target interface functions. As an optional implementation method, if the target interface functions include multiple ones, the final target interface function can be further determined based on the amount of code data included in the target interface function, and the target interface function with the least amount of code data can be used as the common code called when implementing the business program to be developed.

[0050] Optionally, in this embodiment, according to the business type corresponding to the business program to be developed, an interface function that implements the same business type can be determined from the general code library, and the interface function can be determined as the target interface function; or, according to the implementation algorithm corresponding to the business program to be developed, an interface function using the same implementation algorithm can be determined from the general code library, and the interface function can be determined as the target interface function. Exemplarily, if the business to be developed is to query historical bills, an interface function for implementing the query function can be determined in the general code library, and the function can be determined as the target interface function.

[0051] S202, according to the demand information of the business program to be developed, the private code in the variable code of the target interface function is processed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code.

[0052] Among them, the demand information of the business program to be developed refers to the information such as the algorithms and data structures used to implement the functions of the business to be developed. According to the demand information, the immutable code and the variable code can be determined from the target interface function, and the code in the variable code that cannot be called by the called function is determined as the private code of the target interface function. Among them, the variable code refers to the code that can modify the corresponding variable value in the code according to the demand information.

[0053] Optionally, in this embodiment, based on the implementation code corresponding to the algorithm in the requirement information of the business program to be developed, it can be determined whether there is private code similar to the implementation code corresponding to the algorithm in the variable code of the target interface function, thereby modifying the similar private code according to the implementation code corresponding to the algorithm in the requirement information to obtain the processed variable code; or, based on the implementation code corresponding to the data structure in the requirement information of the business program to be developed, it can be determined whether there is private code similar to the implementation code corresponding to the data structure in the variable code of the target interface function, thereby modifying the similar private code according to the implementation code corresponding to the data structure in the requirement information to obtain the processed variable code.

[0054] S203, obtaining a target interface function that satisfies the business program to be developed according to the processed variable code and the immutable code in the target interface function.

[0055] Among them, the immutable code in the target interface function refers to the code whose member variable values ​​cannot be changed after an instance of a class is created in the program. For example, the code corresponding to the long integer class and the string class belongs to immutable code. It can be understood that after processing the variable code according to the demand information, the target interface function that can realize the business program to be developed can be obtained, that is, the target interface function that satisfies the business program to be developed.

[0056] It can be understood that the target interface function that satisfies the business program to be developed refers to an interface function that can directly implement the business to be developed by calling the target interface function. For example, if the business to be developed is query activity list A, the target interface function that satisfies the business program to be developed can be to implement query activity list B.

[0057] In this embodiment, the processed variable code and the immutable code in the target interface function can be combined according to the code writing rules, and the combined code can be determined as the target interface function that satisfies the business program to be developed.

[0058] In the above-mentioned interface function acquisition method, the target interface function corresponding to the business program to be developed is determined from a preset general code library. Since the target interface function determined in the interface function acquisition method provided in the present application only needs to correspond to the business to be developed, the possibility of determining the target interface function from the general code library can be improved. Furthermore, according to the demand information of the business program to be developed, the private code corresponding to the non-callable function in the variable code of the target interface function is processed. Compared with the traditional technology, only the private code in the variable code of the target interface function needs to be processed. Since the process of processing the private code is relatively simple and the amount of processed code is small, the efficiency of the processed variable code can be improved, so that the target interface function that meets the business program to be developed can be obtained according to the processed variable code and the immutable code in the target interface function, thereby improving the efficiency of obtaining the target interface function that meets the business program to be developed, and then the efficiency of reusing the general code can be improved. In addition, since the efficiency of reusing the general code is improved, the development efficiency of the business program to be developed is also improved.

[0059] In the above scenario where the private code in the variable code of the target interface function is processed according to the demand information of the business program to be developed to obtain the processed variable code, the variable code can be genericized, so as to process the private code in the variable code after the genericization to obtain the processed variable code. In one embodiment, as shown in FIG3 , the above S202 includes:

[0060] S301, performing generic processing on the variable code to obtain the genericized variable code.

[0061] Among them, generic processing refers to converting the reference type in the code into a parameter input code. During the process of compiling the code, the reference type is automatically checked and converted, and the corresponding type is called.

[0062] It should be noted that when creating the class corresponding to the interface function, the input parameter type and output parameter type corresponding to the class are created. In this embodiment, in order to improve the reusability of the variable code, wildcards can be used to replace the code corresponding to the input parameter type and the code corresponding to the output parameter type in the target interface function, and the variable code is generalized. Therefore, when running the target interface function, the reference type can be input as a parameter in the generalized variable code according to the demand information of the business to be developed.

[0063] S302, processing the private code in the generalized variable code according to the demand information to obtain the processed variable code.

[0064] Among them, private code may include code corresponding to private methods and code corresponding to private attributes. Private methods and private attributes refer to the attributes and methods of objects in class A that cannot be called and accessed by class B.

[0065] In this embodiment, the code corresponding to the private method and the code corresponding to the private attribute included in the variable code in the business program to be developed can be determined according to the demand information, and the private code in the generalized variable code can be modified to the code corresponding to the private method and the code corresponding to the private attribute included in the variable code in the business program to be developed to obtain the processed variable code.

[0066] In this embodiment, the variable code is genericized to obtain the generalized variable code. Since the reference type in the variable code is converted into parameters through the generalization process, the parameters in the generalized variable code can be determined according to the demand information, and the private code in the generalized variable code is processed. Since only the private code needs to be processed to obtain the processed variable code, the efficiency of obtaining the processed variable code is improved.

[0067] In the above scenario where the private code in the generalized variable code is processed according to the demand information to obtain the processed variable code, the target code can be determined according to the demand information, and the private code can be modified according to the target code to obtain the processed variable code. In one embodiment, as shown in FIG4 , the above S302 includes:

[0068] S401, determining, based on the demand information, the target code corresponding to the writing demand information.

[0069] The target code refers to the code used to implement the business to be developed. In this embodiment, the algorithm, data structure, classes included in the business to be developed, properties and methods defined in the class, objects to be created in the class, and the relationship between classes in the target code can be determined according to the demand information of the business program to be developed, so as to determine the target code corresponding to the demand information based on the above content.

[0070] S402, modify the private code according to the target code to obtain a processed variable code.

[0071] In this embodiment, it can be determined based on the target code whether there is code similar to the content included in the target code in the objects included in the private code, the codes of the private attributes corresponding to the objects, and the codes of the private methods. If so, the code similar to the private code is modified accordingly based on the target code to obtain the processed variable code.

[0072] In this embodiment, the target code corresponding to the writing requirement information is determined based on the requirement information. Since the corresponding target code can be accurately determined based on the requirement information, the private code can be accurately modified based on the target code, thereby improving the accuracy of the processed variable code.

[0073] In the above scenario where the private code is modified according to the target code to obtain the processed variable code, the target subcode in the private code can be determined according to the target code, and the processed variable code can be obtained by modifying the subcode. In one embodiment, as shown in FIG5 , the above S402 includes:

[0074] S501, determining a target subcode in the private code according to the target code and the private code; the target subcode is a subcode in the private code that is inconsistent with the target code.

[0075] It is understandable that the private code may include multiple subcodes, wherein the subcode may be consistent with the target code or inconsistent with the target code, and the subcode inconsistent with the target code may be determined as the target subcode. In this embodiment, the target code may be compared with each subcode in the private code to determine whether there is a subcode in the private code that is inconsistent with the target code, and if so, the inconsistent subcode is determined as the target subcode.

[0076] S502, modifying the target sub-code according to the target code to obtain a processed variable code.

[0077] In this embodiment, the target subcode may be modified accordingly according to the target code to obtain a processed variable code. For example, the data type in the target subcode may be modified to be the same data type as that in the target code.

[0078] In this embodiment, based on the target code and the private code, the target subcode in the private code that is inconsistent with the target code can be determined, so that the target subcode can be modified according to the target code to obtain a processed variable code. Since the target subcode can be accurately determined based on the target code and the private code, the accuracy of the obtained variable code can be improved.

[0079] In the above scenario where the target interface function that satisfies the business program to be developed is obtained based on the processed variable code and the immutable code in the target interface function, the processed variable code and the immutable code can be encapsulated as the target interface function. In one embodiment, the above S203 includes: encapsulating the processed variable code and the immutable code to obtain the target interface function that satisfies the business program to be developed.

[0080] Among them, encapsulation is to combine the abstracted data and the operations on the data during the program development process to form a public interface to the outside. During the program running process, the corresponding functions can be implemented by calling the encapsulated interface functions.

[0081] In this embodiment, the processed variable code of the target function corresponding to the business program to be developed can be encapsulated with the immutable code in the target interface function to obtain an interface function, which is determined as the target interface function that satisfies the business program to be developed.

[0082] In this embodiment, variable code and immutable code can be encapsulated into a target interface function through encapsulation processing, so that the business program to be developed can quickly implement the corresponding function by simply calling the target interface function, thereby improving the efficiency of reusing common codes and thus improving the development efficiency of the business program to be developed.

[0083] In the above scenario of determining the target interface function corresponding to the business program to be developed from the preset general code library, the target interface function can be determined according to the similarity between the function of the interface function and the function corresponding to the requirement information and the preset similarity threshold. In one embodiment, the above S201 includes: determining the interface function in the general code library whose similarity with the function corresponding to the requirement information is greater than the preset similarity threshold as the target interface function corresponding to the business program to be developed.

[0084] The preset similarity threshold refers to the minimum value of the similarity between the function of the interface function and the function corresponding to the requirement information. Optionally, the preset similarity threshold can be 95%, or the preset similarity threshold can also be 90%. The preset similarity threshold can be determined based on the actual requirement information, and this embodiment does not limit this. It can be understood that a large number of interface functions are included in the general code library, and different functions can be realized by running different interface functions. By comparing the similarity between the functions of the interface functions in the general code library and the functions corresponding to the requirement information of the business program to be developed, the target interface function for realizing the business program to be developed can be determined from the numerous interface functions.

[0085] In this embodiment, the functions that need to be implemented by the business to be developed can be determined based on the demand information, and the functions that need to be implemented by the business to be developed can be compared with the functions of each interface function of the general code library to determine the similarity between the functions of each interface function and the functions that need to be implemented by the business to be developed. Further, each similarity is compared with a preset similarity threshold. If a certain similarity is greater than the preset similarity threshold, the interface function corresponding to the similarity can be determined as the target interface function corresponding to the business program to be developed.

[0086] As an optional implementation, if there are multiple interface functions with similarities greater than a similarity threshold in the general code library, the interface function corresponding to the maximum similarity may be determined as the target interface function corresponding to the business program to be developed.

[0087] In this embodiment, by determining the interface function in the general code library as the target interface function corresponding to the business program to be developed, the interface function whose function similarity with the function corresponding to the requirement information is greater than a preset similarity threshold, it is possible to accurately determine the similar target interface function from the general code library according to the function corresponding to the requirement information of the business program to be developed, thereby improving the accuracy of the determined target interface function corresponding to the business program to be developed.

[0088] To facilitate understanding by those skilled in the art, the following is a detailed introduction to the method for obtaining the interface function provided by the present application. The method may include:

[0089] S1, determining an interface function in a general code base whose function similarity with the function corresponding to the requirement information of a business program to be developed is greater than a preset similarity threshold as a target interface function.

[0090] S2, performing generalization processing on the variable code of the target interface function to obtain the generalized variable code.

[0091] S3, according to the demand information of the business program to be developed, determine the target code corresponding to the demand information.

[0092] S4, determining a target subcode in the private code according to the target code and the private code in the generalized variable code; the target subcode is a subcode in the private code that is inconsistent with the target code.

[0093] S5, modifying the target subcode according to the target code to obtain a processed variable code.

[0094] S6, encapsulating the processed variable code and the immutable code in the target interface function to obtain a target interface function that satisfies the business program to be developed.

[0095] It should be noted that for the descriptions in the above S1-S6, reference may be made to the relevant descriptions in the above embodiments, and the effects are similar, which will not be repeated in this embodiment.

[0096] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0097] Based on the same inventive concept, the embodiment of the present application also provides an interface function acquisition device for implementing the interface function acquisition method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the acquisition device for one or more interface functions provided below can refer to the limitations of the interface function acquisition method above, and will not be repeated here.

[0098] In one embodiment, as shown in FIG6 , a device for obtaining an interface function is provided, comprising: a determination module 10, a first obtaining module 11 and a second obtaining module 12, wherein:

[0099] The determination module 10 is used to determine the target interface function corresponding to the business program to be developed from a preset general code library.

[0100] The first acquisition module 11 is used to process the private code in the variable code of the target interface function according to the demand information of the business program to be developed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code.

[0101] The second acquisition module 12 is used to acquire the target interface function that satisfies the business program to be developed according to the processed variable code and the immutable code in the target interface function.

[0102] The device for obtaining the interface function provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0103] In one embodiment, as shown in FIG7 , the first acquisition module 11 includes: a first acquisition unit 111 and a second acquisition unit 112, wherein:

[0104] The first acquisition unit 111 is used to perform generalization processing on the variable code to obtain the generalized variable code.

[0105] The second acquisition unit 112 is used to process the private code in the generalized variable code according to the demand information to obtain the processed variable code.

[0106] The device for obtaining the interface function provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0107] In one embodiment, please continue to refer to FIG. 7 , the second acquisition unit 112 is specifically used to: determine the target code corresponding to the writing demand information according to the demand information; and modify the private code according to the target code to obtain the processed variable code.

[0108] The device for obtaining the interface function provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0109] In one embodiment, please continue to refer to Figure 7. The above-mentioned second acquisition unit 112 is also specifically used to: determine the target subcode in the private code according to the target code and the private code; the target subcode is the subcode in the private code that is inconsistent with the target code; according to the target code, modify the target subcode to obtain a processed variable code.

[0110] The device for obtaining the interface function provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0111] In one embodiment, please continue to refer to FIG. 7 , the second acquisition module 12 includes: a third acquisition unit 121, wherein:

[0112] The third acquisition unit 121 is used to encapsulate the processed variable code and immutable code to obtain a target interface function that satisfies the business program to be developed.

[0113] The device for obtaining the interface function provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0114] In one embodiment, please continue to refer to FIG. 7 , the above-mentioned determination module 10 includes: a determination unit 101, wherein:

[0115] The determination unit 101 is used to determine the interface functions in the general code library whose functions are similar to the functions corresponding to the requirement information greater than a preset similarity threshold as target interface functions corresponding to the business program to be developed.

[0116] The device for obtaining the interface function provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0117] Each module in the acquisition device of the above interface function can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0118] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0119] Determine the target interface function corresponding to the business program to be developed from the preset general code library;

[0120] According to the demand information of the business program to be developed, the private code in the variable code of the target interface function is processed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code;

[0121] According to the processed variable code and the immutable code in the target interface function, a target interface function that satisfies the business program to be developed is obtained.

[0122] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0123] Genericizing the variable code to obtain the genericized variable code;

[0124] According to the demand information, the private code in the generalized variable code is processed to obtain the processed variable code. In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0125] According to the demand information, determine the target code corresponding to the demand information;

[0126] The private code is modified according to the target code to obtain the processed variable code.

[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0128] Determine, according to the target code and the private code, a target subcode in the private code; the target subcode is a subcode in the private code that is inconsistent with the target code;

[0129] According to the target code, the target subcode is modified to obtain the processed variable code.

[0130] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0131] The processed variable code and immutable code are encapsulated to obtain the target interface function that satisfies the business program to be developed.

[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0133] The interface functions in the general code library whose functions are similar to the functions corresponding to the requirement information are greater than a preset similarity threshold value are determined as target interface functions corresponding to the business program to be developed.

[0134] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0135] Determine the target interface function corresponding to the business program to be developed from the preset general code library;

[0136] According to the demand information of the business program to be developed, the private code in the variable code of the target interface function is processed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code;

[0137] According to the processed variable code and the immutable code in the target interface function, a target interface function that satisfies the business program to be developed is obtained.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0139] Genericizing the variable code to obtain the genericized variable code;

[0140] According to the requirement information, the private code in the genericized variable code is processed to obtain the processed variable code.

[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0142] According to the demand information, determine the target code corresponding to the demand information;

[0143] The private code is modified according to the target code to obtain the processed variable code.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] Determine, according to the target code and the private code, a target subcode in the private code; the target subcode is a subcode in the private code that is inconsistent with the target code;

[0146] According to the target code, the target subcode is modified to obtain the processed variable code.

[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0148] The processed variable code and immutable code are encapsulated to obtain the target interface function that satisfies the business program to be developed.

[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0150] The interface functions in the general code library whose functions are similar to the functions corresponding to the requirement information are greater than a preset similarity threshold value are determined as target interface functions corresponding to the business program to be developed.

[0151] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0152] Determine the target interface function corresponding to the business program to be developed from the preset general code library;

[0153] According to the demand information of the business program to be developed, the private code in the variable code of the target interface function is processed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code;

[0154] According to the processed variable code and the immutable code in the target interface function, a target interface function that satisfies the business program to be developed is obtained.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0156] Genericizing the variable code to obtain the genericized variable code;

[0157] According to the requirement information, the private code in the genericized variable code is processed to obtain the processed variable code.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] According to the demand information, determine the target code corresponding to the demand information;

[0160] The private code is modified according to the target code to obtain the processed variable code.

[0161] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0162] Determine, according to the target code and the private code, a target subcode in the private code; the target subcode is a subcode in the private code that is inconsistent with the target code;

[0163] According to the target code, the target subcode is modified to obtain the processed variable code.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] The processed variable code and immutable code are encapsulated to obtain the target interface function that satisfies the business program to be developed.

[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0167] The interface functions in the general code library whose functions are similar to the functions corresponding to the requirement information are greater than a preset similarity threshold value are determined as target interface functions corresponding to the business program to be developed.

[0168] It should be noted that the 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.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0170] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0171] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for obtaining an interface function, characterized in that: The method comprises: Determine the target interface function corresponding to the business program to be developed from the preset general code library; According to the demand information of the business program to be developed, the private code in the variable code of the target interface function is processed to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code; According to the processed variable code and the immutable code in the target interface function, a target interface function that satisfies the business program to be developed is obtained.

2. The method according to claim 1, characterized in that The step of processing the private code in the variable code of the target interface function according to the demand information of the business program to be developed to obtain the processed variable code includes: Performing generalization processing on the variable code to obtain a generalized variable code; The private code in the generalized variable code is processed according to the requirement information to obtain the processed variable code.

3. The method according to claim 2, characterized in that The step of processing the private code in the generalized variable code according to the requirement information to obtain the processed variable code includes: According to the requirement information, determine to write the target code corresponding to the requirement information; The private code is modified according to the target code to obtain the processed variable code.

4. The method according to claim 3, characterized in that The step of modifying the private code according to the target code to obtain the processed variable code includes: Determining a target subcode in the private code according to the target code and the private code; the target subcode is a subcode in the private code that is inconsistent with the target code; According to the target code, the target subcode is modified to obtain the processed variable code.

5. The method according to any one of claims 1 to 4, characterized in that: The step of obtaining a target interface function that satisfies the business program to be developed according to the processed variable code and the immutable code in the target interface function comprises: The processed variable code and the immutable code are encapsulated to obtain the target interface function that satisfies the business program to be developed.

6. The method according to any one of claims 1 to 4, characterized in that: The step of determining the target interface function corresponding to the business program to be developed from the preset general code library includes: The interface functions in the general code library whose functions are similar to the functions corresponding to the requirement information are greater than a preset similarity threshold and are determined as the target interface functions corresponding to the business program to be developed.

7. A device for obtaining an interface function, characterized in that: The device comprises: A determination module, used to determine a target interface function corresponding to the business program to be developed from a preset general code library; A first acquisition module is used to process the private code in the variable code of the target interface function according to the demand information of the business program to be developed, so as to obtain the processed variable code; the private code is the code corresponding to the non-callable function in the processed variable code; The second acquisition module is used to acquire the target interface function that meets the business program to be developed according to the processed variable code and the immutable code in the target interface function.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.