Access method, apparatus, device, storage medium and computer program product
By integrating multiple APIs through the access device and utilizing Java reflection and proxy programs to simulate execution, the problem of high complexity in integrating enterprise information software with professional software has been solved, improving performance and fault tolerance while reducing the number of interactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the integration of enterprise information software with professional software is highly complex, requiring the calling of multiple APIs, resulting in poor performance and fault tolerance, especially in microservice frameworks where there is a problem of redundant construction.
By integrating multiple functionally single APIs through the access device, using Java reflection to obtain the actual execution code of the RestAPI, and simulating program execution through a proxy program, a composite interface is provided, reducing the complexity of enterprise information software accessing professional software and reducing the number of interactions.
It reduces the complexity of integrating enterprise information software with professional software, improves performance and fault tolerance, reduces the risk of system errors, and avoids redundant construction.
Smart Images

Figure CN114138380B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software access technology, and in particular to an access method, apparatus, device, storage medium, and computer program product. Background Technology
[0002] Enterprise information software typically uses Java as its enterprise-level development technology. Some specialized software (i.e., software systems designed for specific fields, such as Confluence (a professional enterprise knowledge management and collaboration software) and JIRA) usually provide REST APIs for information access.
[0003] However, this part of the API usually focuses on a single function, and software access is usually achieved by encapsulating the API and providing a client SDK to facilitate access. However, the SDK has a certain learning cost, and different SDKs need to be called in complex scenarios.
[0004] Therefore, the existing software-based access methods increase the complexity of the access process. Summary of the Invention
[0005] This application provides an access method, apparatus, device, storage medium, and computer program product to overcome the problem that existing software access methods increase the complexity of access.
[0006] In a first aspect, embodiments of this application provide an access method applied to an access device, wherein the access device is used to integrate multiple single-function application programming interfaces (APIs), and the access device establishes communication connections with enterprise information software used to access target software and the target software, respectively; the method includes:
[0007] Obtain access requirement information of enterprise information software used to access the target software, the access requirement information including the API address to be accessed and the API parameters to be accessed;
[0008] Based on the API address to be accessed, locate the API handler to be accessed in the target software, and determine whether the API handler to be accessed contains data resources corresponding to the API parameters to be accessed.
[0009] If the data resource does not exist in the API processing program to be accessed, then it is determined whether there is a target directory associated with the API parameter to be accessed in the target software. If there is no target directory associated with the API parameter to be accessed in the target software, then a directory corresponding to the API parameter to be accessed is created in the target software according to the API parameter to be accessed, and the data resource corresponding to the API parameter to be accessed is created and encapsulated in the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software.
[0010] In one possible design, the method further includes:
[0011] If the data resource exists in the API processing program to be connected, then copy the data resource to the corresponding directory in the target software to connect the target software to the enterprise information software.
[0012] In one possible design, copying the data resources to the corresponding directory in the target software includes:
[0013] Determine whether the directory corresponding to the data resource exists in the target software;
[0014] If the directory corresponding to the data resource does not exist in the target software, then the directory corresponding to the data resource is created under the target software according to the information of the data resource; and the data resource is copied to the directory corresponding to the data resource.
[0015] In one possible design, the method further includes:
[0016] If the target software contains a target directory associated with the API parameters to be accessed, then search the target directory to see if the data resource exists.
[0017] If the data resource exists in the target directory, then the data of the data resource is encapsulated.
[0018] In one possible design, if the data resource does not exist in the target directory, then it is determined whether the target software contains a directory corresponding to the data resource.
[0019] If the target software does not have a directory corresponding to the data resource, then create a directory corresponding to the API parameter to be accessed under the target software according to the API parameter to be accessed;
[0020] Create and encapsulate the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed.
[0021] In one possible design, the method further includes:
[0022] If the target software contains a directory corresponding to the data resource, then create the data resource corresponding to the API parameter to be accessed in the directory corresponding to the data resource and encapsulate the data of the data resource.
[0023] Secondly, embodiments of this application provide an access device, which integrates multiple functionally single application programming interfaces (APIs) and establishes communication connections with enterprise information software for accessing target software and the target software, respectively; the device includes:
[0024] The acquisition module is used to acquire access requirement information of enterprise information software for accessing the target software. The access requirement information includes the API address to be accessed and the API parameters to be accessed.
[0025] The calling module is used to locate the API handler to be accessed in the target software based on the API address to be accessed, and to determine whether the API handler to be accessed contains data resources corresponding to the API parameters to be accessed.
[0026] The access module is used to determine whether a target directory associated with the API parameter to be accessed exists in the target software when the data resource does not exist in the API processing program to be accessed. If the target directory associated with the API parameter to be accessed does not exist in the target software, the module creates a directory corresponding to the API parameter to be accessed in the target software according to the API parameter to be accessed, and creates and encapsulates the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software.
[0027] Thirdly, embodiments of this application provide an access device, including: at least one processor and a memory;
[0028] The memory stores computer-executed instructions;
[0029] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the access method as described in the first aspect and various possible designs of the first aspect.
[0030] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the access method described in the first aspect and various possible designs of the first aspect.
[0031] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the access method described in the first aspect and various possible designs of the first aspect.
[0032] The access method, apparatus, device, storage medium, and computer program product provided in this embodiment first obtain access requirement information of enterprise information software for accessing target software. The access requirement information includes the API address to be accessed and the API parameters to be accessed. Then, based on the API address to be accessed, the API processing program to be accessed is searched in the target software, and it is determined whether the data resource corresponding to the API parameter to be accessed exists in the API processing program to be accessed. If the data resource does not exist in the API processing program to be accessed, it is determined whether the target software has a target directory associated with the API parameter to be accessed. If the target software does not have the target directory, a directory corresponding to the API parameter to be accessed is created in the target software according to the API parameter to be accessed, and the data resource corresponding to the API parameter to be accessed is created and encapsulated in the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software. By using mechanisms such as reflection and dynamic proxies, multiple functionally single APIs can be integrated to improve the complexity of external interfaces, thereby reducing the complexity of enterprise information software accessing target software (professional software), reducing the number of interactions between enterprise information software and professional software, and thus improving the performance and fault tolerance of enterprise software. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 A schematic diagram illustrating a scenario of the access method provided in an embodiment of this application;
[0035] Figure 2 A flowchart illustrating the access method provided in an embodiment of this application;
[0036] Figure 3 A flowchart illustrating an access method provided in another embodiment of this application;
[0037] Figure 4 A flowchart illustrating an access method provided in yet another embodiment of this application;
[0038] Figure 5 This is a schematic diagram of the access device provided in the embodiments of this application;
[0039] Figure 6 This is a schematic diagram of the access device provided in an embodiment of this application. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0042] Currently, enterprise information software typically uses Java as its enterprise-level development technology. Some specialized software (referring to domain-specific software systems such as Confluence and JIRA) usually provides REST APIs for information access. However, these APIs often focus on single functionalities (for example, in Confluence, interfaces for creating and querying spaces), and do not directly provide composite interfaces (for example, in Confluence, interfaces for checking if a space exists and creating it if it doesn't). This introduces complexity into software integration, increases the performance requirements of software integration (requiring multiple API calls to complete a single normal business requirement), and reduces the software's fault tolerance (multiple calls increase the risk of system errors).
[0043] Typically, software integration is achieved by encapsulating APIs and providing client SDKs for easy integration. However, this doesn't alleviate the aforementioned problems, and SDKs also have a learning curve. In complex scenarios, different SDKs may still be needed. Furthermore, in a microservices framework, after enterprise information software is divided into different microservices, different modules are usually developed by different teams. If all modules need to integrate with the same specialized software, excessive duplication of effort and similarity will occur.
[0044] Therefore, the existing software-based access methods increase the complexity of the access process.
[0045] To address the problems existing in the prior art, the technical concept of this application is to implement combined calls of interfaces through a rules engine, obtain the actual execution code program corresponding to the original RestApi through Java reflection mechanism, and simulate program execution through a proxy program. This can integrate multiple single-function APIs, improve the external composite interface, thereby reducing the complexity of enterprise information software accessing Java-type professional software, reducing the number of interactions between enterprise information software and professional software, thereby improving the performance of enterprise software and increasing the fault tolerance of the software.
[0046] In practical applications, see Figure 1 As shown, Figure 1 This is a schematic diagram illustrating a scenario of the access method provided in an embodiment of this application. The executing entity of this application can be an access device, which can be embedded into the target software (hereinafter referred to as professional software) through a plug-in or code program. The client SDK program of the access device packages data according to the API data format requirements of the access device, providing a more convenient API for enterprise information software and facilitating its invocation.
[0047] Taking the professional software Confluence as an example, the directory in this application refers to the space in Confluence, and the data resources refer to the page in Confluence.
[0048] Specifically, the access device can be implemented in three parts: the API part, the rule engine execution part, and the execution engine.
[0049] The API section exposes an external access API program. This API is a general access API, and the data received consists of two parts, as follows:
[0050] The first part defines the logical relationships between the single interfaces of each other, as shown below:
[0051] If the search directory does not exist, create it; if the target directory exists, return it.
[0052] The logical meaning of this data is a composite directory lookup interface and a directory creation interface.
[0053] The second part defines the data content required in the interface of the first part, as shown below:
[0054] Search Directory: Based on the API address, locate the API handler, determine if the data resource corresponding to the API parameter exists in the API handler, and if it exists, return the data resource information.
[0055] Create directories: Create directories corresponding to the API parameters under the target software, and create and encapsulate the data resources corresponding to the API parameters in the directories corresponding to the API parameters.
[0056] The rule engine execution part is responsible for parsing the first part of the logical relationship data of the API access, executing it according to the logic of the archived data, and calling the second part of the API data, packaging it into an executable program as required.
[0057] Execution Engine: Utilizing the API in the data, the corresponding code program is retrieved by looking up the URL mapping of the Java program. Through Java's reflection mechanism, the program instance corresponding to the API is instantiated, and then a proxy program is created to simulate the execution of the corresponding RestApi.
[0058] For example, the access device obtains access requirement information from the enterprise information software, which includes the API address to be accessed and the API parameters to be accessed. Based on the API address to be accessed, the access device searches for the API processing program to be accessed in the professional software and determines whether the data resource corresponding to the API parameters to be accessed exists in the API processing program. If it exists, the data resource is copied to the corresponding directory in the professional software. If the data resource does not exist and the target directory does not exist, the directory corresponding to the API parameters to be accessed is created in the professional software, and the data resource corresponding to the API parameters to be accessed is created and encapsulated in the created directory, so that the enterprise information software can access the target software.
[0059] This application, by embedding an access device into professional software and combining it with an SDK program wrapped in the professional software's RestApi program, can effectively reduce the complexity of accessing professional software and improve the performance of the access program.
[0060] The technical solutions of this application will be 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 described again in some embodiments.
[0061] Figure 2This is a flowchart illustrating the access method provided in an embodiment of this application. The method may include:
[0062] S201. Obtain access requirement information of the enterprise information software used to access the target software.
[0063] The access requirement information includes the API address and API parameters to be accessed. The execution entity of this access method can be an access device, which integrates multiple functionally single application programming interface (API) programs. The access device establishes communication connections with both the enterprise information software (used to access the target software) and the target software. Specifically, the access device can be embedded into the target software (hereinafter referred to as professional software) via plugins or code. The client SDK program of the access device packages data according to the API data format requirements of the access device, providing the enterprise information software with a more convenient API for easy invocation.
[0064] In this embodiment, the entity executing the access method can be an access device, such as a Java professional software access device. Combined with... Figure 3 As shown, the access device can be divided into two modules. The first module is embedded into professional software via plugins or code. The access device is implemented in three parts (including the API part, the rule engine execution part, and the execution engine). For details on the implementation process, please refer to [link to documentation]. Figure 1 The detailed process of the aforementioned embodiment will not be repeated here. The second module, the client SDK program of the access device, packages data according to the API data format requirements of the access device, providing a more convenient API for enterprise information software and facilitating its invocation.
[0065] S202. Based on the API address to be accessed, locate the API processing program to be accessed in the target software, and determine whether the API processing program to be accessed contains data resources corresponding to the API parameters to be accessed.
[0066] In this embodiment, the access device searches for the API processing program to be accessed in the professional software according to the API address to be accessed, and searches for whether the API parameter to be accessed or the data resource corresponding to the API parameter to be accessed exists in the API processing program to be accessed.
[0067] S203. If the data resource does not exist in the API processing program to be accessed, then determine whether there is a target directory associated with the API parameter to be accessed in the target software. If the target directory does not exist in the target software, then create a directory corresponding to the API parameter to be accessed in the target software according to the API parameter to be accessed, and create and encapsulate the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software.
[0068] In this embodiment, combined with Figure 4 As shown, if the data resource does not exist in the API handler to be accessed, it is determined whether a target directory associated with the API parameter to be accessed exists in the target software. Since developers may have stored the data in a specific directory, to avoid duplicate data resource creation, when the data resource corresponding to the API parameter to be accessed cannot be found in the API handler by its title, it is checked whether an associated target directory exists. If the target directory does not exist, it means that the target software does not provide the directory, and a new directory needs to be created.
[0069] The access method provided in this application obtains access requirement information of enterprise information software for accessing target software. This access requirement information includes the API address and API parameters to be accessed. Then, based on the API address, the method searches for the API handler to be accessed in the target software and determines whether the API handler contains data resources corresponding to the API parameters. If the API handler does not contain the data resources, the method determines whether a target directory associated with the API parameters exists in the target software. If the target directory does not exist, the method creates a directory corresponding to the API parameters in the target software, creates and encapsulates the data resources corresponding to the API parameters in that directory, enabling the enterprise information software to access the target software. Through mechanisms such as reflection and dynamic proxies, multiple functionally single APIs can be integrated to provide a composite interface, thereby reducing the complexity of enterprise information software accessing target software (professional software), reducing the number of interactions between enterprise information software and professional software, and thus improving the performance and fault tolerance of the enterprise software.
[0070] In one possible design, this embodiment provides a detailed description of the access method based on the above embodiments. The access method can also be implemented through the following steps:
[0071] If the data resource exists in the API processing program to be connected, then copy the data resource to the corresponding directory in the target software to connect the target software to the enterprise information software.
[0072] In this embodiment, if the access device finds the data resource in the API processing program to be accessed in the professional software, in order to provide a more convenient API for the enterprise information software and facilitate its calling, the data resource can be copied to the directory corresponding to the target software, and then the data can be encapsulated so that the enterprise information software can access the target software and easily call the API.
[0073] In one possible design, copying the data resources to the corresponding directory in the target software can be achieved through the following steps:
[0074] Step a1: Determine whether the target software contains a directory corresponding to the data resource.
[0075] Step a2: If the target software does not contain the Mulan Road corresponding to the data resource, then create the directory corresponding to the data resource in the target software according to the information of the data resource; copy the data resource to the directory corresponding to the data resource.
[0076] In this embodiment, if the access device finds the data resource in the API processing program to be accessed in the professional software, it first determines whether a directory corresponding to the data resource exists in the professional software. If it exists, to provide a more convenient API for the enterprise information software and facilitate easy access, the data resource can be copied to the directory corresponding to the target software. If it does not exist, the directory corresponding to the data resource needs to be created in the professional software. For example, the directory creation interface can be called to create the directory corresponding to the data resource, and then the data resource can be copied to the directory corresponding to the data resource and the data can be encapsulated for easy management and access by the enterprise information software.
[0077] In one possible design, this embodiment provides a detailed description of the access method based on the above embodiments. The access method can also be implemented through the following steps:
[0078] Step b1: If the target software contains a target directory associated with the API parameters to be accessed, then search the target directory to see if the data resource exists.
[0079] Step b2: If the data resource exists in the target directory, then encapsulate the data resource.
[0080] In this embodiment, if the data resource does not exist in the API processing program to be accessed, it is determined whether there is a target directory associated with the API parameter to be accessed in the target software. If there is a target directory, it is checked whether the data resource exists in the target directory. If the data resource exists in the target directory, the data is packaged according to the API data format requirements of the access device to provide a more convenient API for enterprise information software and facilitate its calling.
[0081] In one possible design, based on the above embodiments, the access method is described in detail and can be implemented through the following steps:
[0082] Step c1: If the data resource does not exist in the target directory, then determine whether the directory corresponding to the data resource exists in the target software.
[0083] Step c2: If the target software does not contain a directory corresponding to the data resource, then create a directory corresponding to the API parameter to be accessed under the target software according to the API parameter to be accessed.
[0084] Step c3: Create and encapsulate the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed.
[0085] In this embodiment, if a target directory exists in the target software, the system searches the target directory for the data resource corresponding to the API parameter to be accessed. If the data resource does not exist in the target directory, it needs to be created. The creation process is as follows: First, it determines whether a directory corresponding to the data resource exists in the target software (although a target directory associated with the API parameter to be accessed exists in the professional software, this target directory is not necessarily the directory corresponding to the data resource; there may be one or more target directories. To further confirm, it is necessary to determine whether a directory corresponding to the data resource exists in the target directory. Alternatively, if it is determined that the data resource does not exist in the target directory, the directory corresponding to the data resource needs to be recreated in the professional software, and then the data resource is created and encapsulated within that directory). If a directory corresponding to the data resource does not exist, the system creates the directory corresponding to the API parameter to be accessed in the target software according to the API parameter to be accessed, and creates and encapsulates the data resource corresponding to the API parameter to be accessed within that directory.
[0086] In one possible design, this embodiment provides a detailed description of the access method based on the above embodiments. This access method can be implemented through the following steps:
[0087] If the target software contains a directory corresponding to the data resource, then create the data resource corresponding to the API parameter to be accessed in the directory corresponding to the data resource and encapsulate the data of the data resource.
[0088] In this embodiment, the directory corresponding to the data resource is the same as the directory corresponding to the API parameter to be accessed. If the target software has a directory corresponding to the data resource but the data resource itself does not exist, then the data resource corresponding to the API parameter to be accessed is created in the directory corresponding to the data resource, and the data of the data resource is encapsulated.
[0089] This application, by embedding an access device into professional software and combining it with an SDK program wrapped in the professional software's RestApi program, can effectively reduce the complexity of accessing professional software and improve the performance of the access program. The key feature of the access device provided in this application is that it implements combined API calls through a rule engine, obtains the actual execution code program corresponding to the original RestApi through Java reflection, and simulates program execution through a proxy program.
[0090] To implement the access method, this embodiment provides an access device that integrates multiple single-function application programming interfaces (APIs). The access device establishes communication connections with both enterprise information software used to access the target software and the target software itself. See also... Figure 5 , Figure 5 This is a schematic diagram of the structure of the access device provided in the embodiments of this application; the access device 50 includes:
[0091] The acquisition module 501 is used to acquire access requirement information of enterprise information software for accessing the target software. The access requirement information includes the API address to be accessed and the API parameters to be accessed.
[0092] The calling module 502 is used to search for the API processing program to be accessed in the target software based on the API address to be accessed, and to determine whether there are data resources corresponding to the API parameters to be accessed in the API processing program to be accessed.
[0093] The access module 503 is used to determine whether there is a target directory associated with the API parameter to be accessed in the target software when the data resource does not exist in the API processing program to be accessed. If there is no target directory associated with the API parameter to be accessed in the target software, the module creates a directory corresponding to the API parameter to be accessed in the target software according to the API parameter to be accessed, and creates and encapsulates the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software.
[0094] In this embodiment, an acquisition module 501, a calling module 502, and an access module 503 are configured to acquire access requirement information of enterprise information software for accessing the target software. The access requirement information includes the API address to be accessed and the API parameters to be accessed. Then, based on the API address to be accessed, the API handler to be accessed is searched in the target software, and it is determined whether the data resource corresponding to the API parameter to be accessed exists in the API handler to be accessed. If the data resource does not exist in the API handler to be accessed, it is determined whether the target software has a target directory associated with the API parameter to be accessed. If the target software does not have the target directory, a directory corresponding to the API parameter to be accessed is created in the target software based on the API parameter to be accessed, and the data resource corresponding to the API parameter to be accessed is created and encapsulated in the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software. By using mechanisms such as reflection and dynamic proxies, multiple functionally single APIs can be integrated to improve the complexity of external interfaces, thereby reducing the complexity of enterprise information software accessing target software (professional software), reducing the number of interactions between enterprise information software and professional software, and thus improving the performance and fault tolerance of enterprise software.
[0095] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0096] In one possible design, the device further includes: a determining module; the determining module is configured to, when the data resource exists in the API processing program to be accessed, copy the data resource to the corresponding directory in the target software, so as to connect the target software to the enterprise information software.
[0097] In one possible design, the module is defined specifically for:
[0098] Determine whether the directory corresponding to the data resource exists in the target software;
[0099] If the directory corresponding to the data resource does not exist in the target software, then the directory corresponding to the data resource is created under the target software according to the information of the data resource; and the data resource is copied to the directory corresponding to the data resource.
[0100] In one possible design, the determining module is further configured to: when the target directory associated with the API parameter to be accessed exists in the target software, search the target directory to see if the data resource exists;
[0101] If the data resource exists in the target directory, then the data of the data resource is encapsulated.
[0102] In one possible design, the module is further defined for:
[0103] If the data resource does not exist in the target directory, determine whether the directory corresponding to the data resource exists in the target software;
[0104] If the target software does not have a directory corresponding to the data resource, then create a directory corresponding to the API parameter to be accessed under the target software according to the API parameter to be accessed;
[0105] Create and encapsulate the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed.
[0106] In one possible design, the determining module is further configured to, when the directory corresponding to the data resource exists in the target software, create the data resource corresponding to the API parameter to be accessed in the directory corresponding to the data resource and encapsulate the data of the data resource.
[0107] To implement the access method, this embodiment provides an access device. Figure 6 This is a schematic diagram of the access device provided in an embodiment of this application. Figure 6 As shown, the access device 60 in this embodiment includes a processor 601 and a memory 602; wherein, the memory 602 is used to store computer execution instructions; and the processor 601 is used to execute the computer execution instructions stored in the memory to implement the various steps performed in the above embodiment. For details, please refer to the relevant descriptions in the foregoing method embodiments.
[0108] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the access method described above.
[0109] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the access method described above.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms. Additionally, the functional modules in the various embodiments of this application may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned modular units can be implemented in hardware or in the form of hardware plus software functional units.
[0111] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. It should be understood that the processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0112] The memory may include high-speed RAM, and may also include non-volatile memory (NVM), such as at least one disk drive, and may also be a USB flash drive, external hard drive, read-only memory, disk, or optical disc. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses in the accompanying drawings are not limited to a single bus or a single type of bus. The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk, or optical disc. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.
[0113] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.
[0114] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An access method, characterized in that, The method is applied to an access device that integrates multiple single-function application programming interfaces (APIs), and establishes communication connections with enterprise information software used to access target software and the target software, respectively; the method includes: Obtain access requirement information of enterprise information software used to access the target software, the access requirement information including the API address to be accessed and the API parameters to be accessed; Based on the API address to be accessed, locate the API handler to be accessed in the target software, and determine whether the API handler to be accessed contains data resources corresponding to the API parameters to be accessed. If the data resource does not exist in the API processing program to be accessed, then it is determined whether there is a target directory associated with the API parameter to be accessed in the target software. If there is no target directory associated with the API parameter to be accessed in the target software, then according to the API parameter to be accessed, a directory corresponding to the API parameter to be accessed is created under the target software, and the data resource corresponding to the API parameter to be accessed is created and encapsulated under the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software. If the data resource exists in the API processing program to be connected, then copy the data resource to the corresponding directory in the target software to connect the target software to the enterprise information software.
2. The method according to claim 1, characterized in that, The step of copying the data resources to the corresponding directory in the target software includes: Determine whether the directory corresponding to the data resource exists in the target software; If the directory corresponding to the data resource does not exist in the target software, then the directory corresponding to the data resource is created under the target software according to the information of the data resource; and the data resource is copied to the directory corresponding to the data resource.
3. The method according to claim 1 or 2, characterized in that, The method further includes: If the target software contains a target directory associated with the API parameters to be accessed, then search the target directory to see if the data resource exists. If the data resource exists in the target directory, then the data of the data resource is encapsulated.
4. The method according to claim 3, characterized in that, The method further includes: If the data resource does not exist in the target directory, then it is determined whether the directory corresponding to the data resource exists in the target software; If the target software does not have a directory corresponding to the data resource, then create a directory corresponding to the API parameter to be accessed under the target software according to the API parameter to be accessed; Create and encapsulate the data resource corresponding to the API parameter to be accessed in the directory corresponding to the API parameter to be accessed.
5. The method according to claim 4, characterized in that, The method further includes: If the target software contains a directory corresponding to the data resource, then create the data resource corresponding to the API parameter to be accessed in the directory corresponding to the data resource and encapsulate the data of the data resource.
6. An access device, characterized in that, The access device is used to integrate multiple single-function application programming interfaces (APIs), and establishes communication connections with enterprise information software used to access the target software and the target software, respectively; the device includes: The acquisition module is used to acquire access requirement information of enterprise information software for accessing the target software. The access requirement information includes the API address to be accessed and the API parameters to be accessed. The calling module is used to locate the API handler to be accessed in the target software based on the API address to be accessed, and to determine whether the API handler to be accessed contains data resources corresponding to the API parameters to be accessed. The access module is configured to, when the data resource does not exist in the API processing program to be accessed, determine whether a target directory associated with the API parameter to be accessed exists in the target software; if the target directory associated with the API parameter to be accessed does not exist in the target software, then, based on the API parameter to be accessed, create a directory corresponding to the API parameter to be accessed under the target software, and create and encapsulate the data resource corresponding to the API parameter to be accessed under the directory corresponding to the API parameter to be accessed, so that the enterprise information software can access the target software; if the data resource exists in the API processing program to be accessed, copy the data resource to the corresponding directory in the target software to access the enterprise information software.
7. An access device, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the access method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by the processor, implement the access method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the access method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for accessing software shopping mall
CN101989345A