A system function integration method, device, equipment and storage medium
By setting the target routing information in the routing file of the first system, determining the target calling address and calling the second system function, the problem of high development and maintenance costs when integrating different system functions is solved, and efficient functional integration is achieved.
Patent Information
- Application Number
- CN202111002978.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-08-30
AI Technical Summary
When the prior art integrates functions between different systems, the development cost is high, the efficiency is low, and the subsequent maintenance cost is also high.
By presetting the target routing information in the routing file of the first system, determining the target call address information in response to user operation instructions, and calling the corresponding functions of the second system, the functions of the second system are integrated on the first system.
An efficient method of integrating the functions of the second system on the first system is realized, reducing development and maintenance costs and improving the efficiency of functional integration.
Smart Images

Figure CN113760258B_ABST
Abstract
Description
Technical Field
[0001] This article belongs to the field of automatic programming, and specifically relates to a system function integration method, device, equipment and storage medium. Background Art
[0002] In the process of rapid development of Internet technology, operating systems in different fields will continue to build and develop various application systems. In actual operations, for one system, if the function to be developed has been developed on another system, there are generally two development methods. One is to redevelop, which will inevitably bring great development costs and low efficiency. The second is to copy the function code of the existing system, but adapting the function code to the system to be developed will also greatly increase the workload of the front-end and back-end, and the subsequent maintenance cost is also very high. Therefore, how to improve the efficiency of integrating the functions of different systems has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] In view of the above problems in the prior art, the purpose of this article is to provide a system function integration method, device, equipment and storage medium, which can improve the efficiency of integration of different system functions.
[0004] In order to solve the above technical problems, the specific technical solutions of this article are as follows:
[0005] In one aspect, the present invention provides a method for integrating system functions, the method comprising:
[0006] In response to an operation instruction of a user directed to the first system, determining target routing information, the target routing information being pre-set in a routing file of the first system;
[0007] Determine, according to the target routing information, target calling address information of a corresponding function in the second system corresponding to the function called by the first system;
[0008] According to the target calling address information, the corresponding function of the second system is called to integrate the corresponding function of the second system on the first system.
[0009] Furthermore, the first system and the second system use the same login method and have the same interface design.
[0010] Furthermore, the target routing information is set by the following steps:
[0011] determining a corresponding function of the second system;
[0012] Determining the calling address information of the second system according to the corresponding function;
[0013] The target routing information of the corresponding function is generated according to the calling address information.
[0014] Further, generating the target routing information of the corresponding function according to the calling address information includes:
[0015] Determine a calling address template, wherein the calling address template includes a template parameter for determining a display window of a corresponding function of the second system in the first system and an address parameter for calling the corresponding function of the second system;
[0016] Determining target calling address information of the corresponding function according to the calling address template and the calling address information;
[0017] The target routing information of the corresponding function is generated according to the target calling address information and the routing file of the first system.
[0018] Preferably, the calling address template is an Iframe template.
[0019] Further, calling the corresponding function of the second system according to the target calling address information so as to integrate the corresponding function of the second system on the first system includes:
[0020] Parsing the target call address information to obtain the display window parameters and the uniform resource locator URL address of the corresponding function;
[0021] Generating a display window of a corresponding function of the second system on the display interface of the first system according to the display window parameters;
[0022] According to the URL address, corresponding functions of the second system are displayed in the display window.
[0023] Further, after generating a display window on a display interface of the first system according to the display window parameters, the method further comprises:
[0024] Determining whether the display window is consistent with the preset window;
[0025] If they are consistent, generating a menu bar consistent with the menu bar of the corresponding function of the second system in the display interface of the first system according to the menu bar of the corresponding function of the second system in the display window;
[0026] According to the menu bar generated by the display interface of the first system, the menu bar of the corresponding function of the second system in the display window is hidden so that the display window only displays the operation area of the corresponding function of the second system, and at the same time, the menu bar generated by the display interface of the first system is used to control the corresponding function of the second system in the display window.
[0027] Further, generating a menu bar consistent with the menu bar of the corresponding function of the second system in the display interface of the first system according to the menu bar of the corresponding function of the second system in the display window includes:
[0028] Acquire menu bar information in the corresponding function of the second system, wherein the menu bar information includes a menu item name of the corresponding function and a configuration route of each menu item name;
[0029] According to the preset interface design configuration, each menu item name is loaded and generated in the first system menu bar, and the configuration route is linked to the corresponding menu item name, so that the operation of the menu bar generated for the first system display interface can realize the control of the corresponding function of the second system in the display window page.
[0030] Further, displaying the corresponding function of the second system in the display window according to the URL address includes:
[0031] Determine identification information of a corresponding function of the second system according to the URL address;
[0032] Acquire the login status of the second system relative to the first system according to the identification information of the corresponding function of the second system;
[0033] When the login status of the second system is successful, the corresponding function of the second system is loaded in the display window through the URL address.
[0034] Furthermore, displaying the corresponding function of the second system in the display window according to the URL address also includes:
[0035] According to the URL address, an operation instruction of a corresponding function is sent to the second system, so that the server of the second system executes the operation instruction and feeds back the operation result to the first system;
[0036] The operation result of the corresponding function of the second system is displayed in the display window.
[0037] Furthermore, after displaying the corresponding function of the second system in the display window according to the URL address, the method further includes:
[0038] Obtaining an operation instruction from a user for a corresponding function of the second system;
[0039] According to the operation instruction, the operation instruction is sent to the second system, so that the second system executes the operation instruction and feeds back the execution result to the first system;
[0040] The execution result of the operation instruction is displayed in the display window.
[0041] Further, the calling of the corresponding function of the second system according to the target calling address information includes:
[0042] Monitor and obtain status information fed back by the second system;
[0043] According to the status information, determining whether the login of the second system has expired;
[0044] If the login of the second system expires, the login window of the second system is logged out in the first system, so that the user can log in the second system again on the first system.
[0045] Further, judging whether the login of the second system has expired according to the status information includes:
[0046] Determining event parameters in the state information;
[0047] When the event parameter is a preset parameter, it is determined that the login of the second system has expired, and the first system logs out of the login window of the second system.
[0048] Further, judging whether the login of the second system has expired according to the status information further includes:
[0049] If the second system login has not expired, obtaining abnormal information of the second system according to the status information;
[0050] Determining a fault location of the second system according to the abnormal information;
[0051] According to the fault location, an alarm is issued to the operation and maintenance personnel.
[0052] On the other hand, the present invention also provides a system function integration device, the device comprising:
[0053] a target routing information determination module, configured to respond to a user's operation instruction for the first system and determine target routing information, wherein the target routing information is pre-set in a routing file of the first system;
[0054] A calling address information determining module, used to determine, according to the target routing information, target calling address information of a corresponding function in the second system corresponding to the function called by the first system;
[0055] A calling module is used to call the corresponding function of the second system according to the target calling address information, so as to integrate the corresponding function of the second system on the first system.
[0056] On the other hand, the present invention also provides a functional integration system, the system comprising a first system and a second system;
[0057] The first system and the second system use the same login method and have the same interface design;
[0058] The first system is used to respond to the user's operation instructions for the first system, determine target routing information, and the target routing information is pre-set in the routing file of the first system; determine the target calling address information of the corresponding function in the second system corresponding to the function called by the first system according to the target routing information; call the corresponding function of the second system according to the target calling address information, so that the corresponding function of the second system is integrated on the first system.
[0059] On the other hand, this document also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.
[0060] Finally, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0061] By adopting the above technical scheme, a system function integration method, device, equipment and storage medium described in this article, by setting the target routing information in advance in the routing file of the first system, triggering the execution of the target routing information after receiving the user's operation instruction, and then determining the target calling address information for calling the corresponding function of the second system, and then calling the corresponding function of the second system on the first system through the target calling address information. This article can integrate the corresponding functions of other systems at a very low cost, thereby improving the integration efficiency of system functions.
[0062] In order to make the above and other purposes, features and advantages of this article more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 A schematic diagram of the structure of the function integration system provided by the embodiment of this article is shown;
[0065] Figure 2 A schematic diagram showing the steps of the system function integration method provided in the embodiment of this article is shown;
[0066] Figure 3 A schematic diagram of the front-end page for system function integration in the embodiment of this article is shown;
[0067] Figure 4 A schematic diagram of the steps of generating target routing information in the embodiment of this article is shown;
[0068] Figure 5 A schematic diagram of the corresponding function calling steps of the second system in the embodiment of this article is shown;
[0069] Figure 6 A schematic diagram of the corresponding function calling steps of the second system in the embodiment of this article is shown;
[0070] Figure 7 A schematic diagram of the display window processing steps in the embodiment of this invention is shown;
[0071] Figure 8 A schematic diagram of a display window in an embodiment of this invention is shown;
[0072] Fig. 9 A schematic diagram of the front-end page for system function integration in the embodiment of this article is shown;
[0073] Fig.10 It shows a schematic diagram of the structure of the system function integration device provided in the embodiment of this article;
[0074] Fig.11 A schematic diagram of the computer device structure provided in the embodiments of this article is shown.
[0075] Description of the accompanying symbols:
[0076] 10. First system;
[0077] 20. Second system;
[0078] 100. Target routing information determination module;
[0079] 200. Calling an address information determination module;
[0080] 300. Call module;
[0081] 1102. Computer equipment;
[0082] 1104. Processor;
[0083] 1106. Memory;
[0084] 1108. Driving mechanism;
[0085] 1110, input / output module;
[0086] 1112. Input device;
[0087] 1114. Output device;
[0088] 1116. Presentation equipment;
[0089] 1118. Graphical user interface;
[0090] 1120. Network interface;
[0091] 1122. Communication link;
[0092] 1124. Communication bus. DETAILED DESCRIPTION
[0093] The following will be combined with the drawings in the embodiments of this article to clearly and completely describe the technical solutions in the embodiments of this article. Obviously, the described embodiments are only part of the embodiments of this article, not all of the embodiments. Based on the embodiments of this article, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this article.
[0094] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0095] Explanation of the technical language used in this article:
[0096] The window.post Message() method enables cross-origin communication securely. Normally, for scripts on two different pages, the two scripts can communicate with each other only when the pages that execute them are located on a server with the same protocol (such as https), port number (443 is the default value for https), and host (the modulus Document.domain of the two pages is set to the same value). The window.post Message() method provides a controlled mechanism to circumvent this limitation and is more secure. Broadly speaking, a window can obtain a reference to another window (such as target Window = window.opener), and then call the target Window.post Message() method on the window to distribute a Message Event message. The window that receives the message is free to handle this event as needed. The parameters passed to window.postMessage() (such as message) will be exposed to the window that receives the message through the message event object.
[0097] Axios is an open source and free Promise-based HTTP client that can work in browsers and in node.js. It supports creating XML requests from browsers, making http requests in node.js, intercepting requests and responses, converting request and response data, and automatically converting JSON data.
[0098] In the prior art, when a new function needs to be added to an existing system, developers can develop it directly, which will incur a large development cost and be relatively inefficient. Alternatively, other systems that already have the function can be identified and the function code of the corresponding function of the system can be copied. However, adapting the function code to the system to be developed will greatly increase the workload of the front-end and back-end, and the subsequent maintenance cost is also very high.
[0099] In order to solve the above problems, the present invention provides a method for integrating system functions. Figure 1As shown, an integrated system provided according to the method is provided, the system includes a first system 10 and a second system 20, the first system 10 and the second system 20 are working systems in any field, such as a bank back-end transaction system in the financial field, etc., and the first system 10 and the second system 20 can establish a communication connection through a wired or wireless method. A configuration file integrating a corresponding function of the second system 20 is pre-configured in the first system 10. When the corresponding function needs to be used, the user selects the corresponding operation instruction in the client or menu bar of the first system 10, and then determines the target routing information pre-set in the first system routing file. The target routing information can be used to determine the target calling address information of the corresponding function in the second system corresponding to the function called by the first system. Finally, according to the target calling address information, the corresponding function of the second system 20 can be called in the first system 10, thereby realizing the integration of the corresponding function of the second system 20 on the first system 10, and only a small amount of configuration cost is consumed to realize the functions of other systems on the first system 10, thereby improving the efficiency of function integration and reducing costs.
[0100] Specifically, the embodiments of this document provide a system function integration method that can improve the efficiency of integrating different system functions. Figure 2 It is a schematic diagram of the steps of a system function integration method provided in the embodiments of this article. This specification provides the method operation steps described in the embodiments or flowcharts, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or device product is executed, it can be executed in the order of the methods shown in the embodiments or drawings or in parallel. Specifically, Figure 2 As shown, the method may include:
[0101] S101: responding to a user's operation instruction for a first system, determining target routing information, the target routing information being pre-set in a routing file of the first system;
[0102] S102: Determine, according to the target routing information, target calling address information of a corresponding function in the second system corresponding to the function called by the first system;
[0103] S103: Calling corresponding functions of the second system according to the target calling address information, so as to integrate the corresponding functions of the second system into the first system.
[0104] It can be understood that by adding the call path of the corresponding function of the second system to the routing file of the first system, and the user can send an operation instruction to the first system to trigger the call path, the corresponding function of the second system can be called through the call path, and the corresponding function can be displayed and operated in the first system. The call path is the target routing information of the corresponding function of the second system, and the target routing information is set in advance in the routing file according to the corresponding function of the second system. The target call address information can be determined according to the path direction of the target routing information. The target call address information is the implementation path of the corresponding function of the second system. For example, the server of the second system can be queried and the corresponding function can be implemented through the target call address information, and the operation result of the corresponding function can be fed back to the first system, thereby realizing the call of the corresponding function of the second system by the first system.
[0105] like Figure 3 As shown, it is a schematic diagram of the effect after the system function integration in the embodiment of this specification, wherein system A needs to call function 1 of system B, by configuring the target routing information of the system B function 1 in system A, the user clicks the option of calling the system B function 1 in the operation interface of system A, thereby triggering the target routing information, and determining the target calling address information of the system B function 1 according to the target routing information, and then displaying the system B function 1 in the display interface of system A in the form of a window according to the target calling address information.
[0106] The routing file can implement different routing sets for the first system, and can include routing names and routing configurations corresponding to the routing names. By receiving different user operation instructions in the entry file, selecting the routing name corresponding to the operation instruction, and then determining the corresponding routing configuration, and finally determining the destination according to the path in the routing configuration, the function corresponding to the destination is implemented.
[0107] Exemplarily, the client of the first system is developed through the vue framework, which is a progressive framework for building user interfaces, which is easy to use and has low maintenance costs. By configuring the call option of the corresponding function of the second system in the display interface or menu bar of the first system, the call option is associated with the entry file main.js of the first system, and the route of the corresponding function of the second system to be integrated is added in the routing file routes.js pointed to by the interface file. The route name is consistent with the corresponding function of the second system, thereby reducing the amount of code and development costs. The route points to the call address of the corresponding function of the second system. Therefore, the user triggers the call option in the menu bar of the first system, and the entry file determines the route name according to the trigger instruction, and then determines the corresponding route. Finally, the route points to the corresponding call address, so that only a small amount of development work needs to be added to the first system to realize the call of other system functions. Further, when the second system is upgraded, it can be realized that the code of the first system is updated with zero code (theoretically, only the call address of the relevant function of the second system needs to be updated), and it will not affect the independent operation of the second system, which greatly improves the efficiency of integration.
[0108] Since the development frameworks of different systems are different, there will also be differences in the development teams, and the functions of systems in different fields vary greatly. Therefore, in order to improve the adaptability of the embodiments of this specification and the security of the system, as an option, the first system and the second system use the same login method and have the same interface design. Through the same login method, it can be ensured that when the first system runs the corresponding function of the second system, the second system is in normal working condition, or when the second system is in a logged-out state, the second system can be logged in to the first system through the same login method, so that the first system can call the corresponding function of the second system in time, and the security of the second system can be further improved to avoid the leakage of its data. The same interface design can be consistent in the design style of the User Interface (UI), such as the menu on the left and the user information on the top, which can ensure that when the corresponding function of the second system is running on the display interface of the first system, it is convenient for the user to operate, so that the corresponding function of the second system can be quickly adapted to and used.
[0109] In actual work, the same type of backend management systems developed by the same department or team generally use the same UI framework and similar layout. Therefore, during the development process, there will be a need to integrate the functions of other systems. This can be achieved through the method provided in the above embodiment, which can greatly reduce the development workload, ensure the smooth operation of the integrated functions, and improve the efficiency of integration.
[0110] In the embodiments of this specification, multiple functions of the second system can be integrated on the first system, so different target routing information needs to be set, and different calling options can also be configured during front-end development. Optionally, the target routing information can be determined by the following steps:
[0111] determining a corresponding function of the second system;
[0112] Determining the calling address information of the second system according to the corresponding function;
[0113] The target routing information of the corresponding function is generated according to the calling address information.
[0114] It can be understood that the calling address information is the running instruction of the corresponding function of the second system. By executing the calling address information, the instruction to run the corresponding function can be sent to the second system. Therefore, the target routing information is generated in the first system routing file through the calling address information. The destination of the target routing information is the calling address information, that is, by triggering the target routing information, the calling address information can be pointed to.
[0115] In a further embodiment, Figure 4 As shown, generating the target routing information of the corresponding function according to the calling address information includes:
[0116] S201: Determine a calling address template, where the calling address template includes template parameters for determining a display window of a corresponding function of the second system in the first system and address parameters for calling the corresponding function of the second system;
[0117] S202: Determine the target calling address information of the corresponding function according to the calling address template and the calling address information;
[0118] S203: Generate target routing information of the corresponding function according to the target call address information and the routing file of the first system.
[0119] It can be understood that the display window that displays the corresponding function of the second system in the first system can be determined through the calling address template, so that the corresponding function can be controlled through the display window, and the calling address of the corresponding function can also be injected into the calling address template, so that the correspondence between the corresponding function of the second system and its display window in the first system can be realized, that is, different functions of the second system can be displayed through different display windows when integrated in the first system, thereby improving the targeted processing of different integrated functions of the second system, and then improving the efficiency of controlling the corresponding function in the first system.
[0120] The template parameters of the display window can be the display window position, window size, border color, etc., so that different integrated functions can be set according to user needs. As an option, the call address template can be an Iframe template. Iframe is an HTML tag that acts as a document in a document, or a floating frame (Frame). The Iframe element will create an inline frame (i.e., an inline frame) that contains another document. Through the Iframe tag, page nesting can be directly implemented on the front end. The template parameters can be Iframe attributes, such as frameborder: whether to display the border, 1 (yes), 0 (no); height: the height of the frame, which can be set using CSS; width: the width of the frame, which can be set using CSS; name: the name of the frame, window.frames[name]; scrolling: whether the frame scrolls, yes, no, auto; src: the address of the inner frame, which can be a page address or a picture address. Different display windows with different functions can be determined by setting the above parameters. Through the Iframe tag, the corresponding functions of the second system can be directly embedded into the first system, reducing the development cost of the first system.
[0121] For example, in the front end of the first system developed using the vue framework, the call of the corresponding function of the second system is implemented through the Iframe tag. In the actual call development process, the route of the corresponding function of the second system that needs to be integrated can be added to the first system routing file routes.js. The route name is consistent with the corresponding function of the second system. The route can point to the call address of the corresponding function of the second system. The call address is limited by a template, such as the template <template>, which contains a line of iframe code.<iframe:src="report Url"ref="iframe"> , wherein the URL in the code is the calling address of the corresponding function of the second system. By setting the template, the calling addresses of different functions of the second system can be loaded into the configuration file of the first system through the template, thereby realizing the calling of different functions.
[0122] In the embodiments of this specification, Figure 5 As shown, calling the corresponding function of the second system according to the target calling address information so as to integrate the corresponding function of the second system on the first system includes:
[0123] S301: parsing the target call address information to obtain the display window parameters and the uniform resource locator URL address of the corresponding function;
[0124] S302: generating a display window of a corresponding function of the second system on the display interface of the first system according to the display window parameters;
[0125] S303: Displaying corresponding functions of the second system in the display window according to the URL address.
[0126] It can be understood that the generation method of the target calling address information can be determined through the above steps. In the actual calling process, it is necessary to disassemble it to determine the display window parameters in the first system and the URL address for calling the corresponding function of the second system. Finally, the URL address is used to request the second system to run the corresponding function, and the running result is displayed through the display window of the first system.
[0127] In a further embodiment, in order to improve the security of the second system data, as an option, Figure 6 As shown, displaying the corresponding function of the second system in the display window according to the URL address includes:
[0128] S401: Determine identification information of a corresponding function of the second system according to the URL address;
[0129] S402: Acquire a login status of the second system relative to the first system according to identification information of a corresponding function of the second system;
[0130] S403: When the login status of the second system is successful, the corresponding function of the second system is loaded in the display window through the URL address.
[0131] Among them, the identification information can be an identification code of the corresponding function, such as an identification code added to the URL address, the identification code is a unique identification code of the corresponding function, or some fields in the URL address are used as the identification code of the corresponding function. The status information of the second system can be obtained through the identification information, such as sending a request instruction to the second system whether the login is successful. When the feedback information is received, the login status of the second system can be determined according to the feedback information. In specific implementation, if no feedback information from the second system is received within a specified time period, it indicates that the second system is in a non-logged-in state. When a successful login information feedback from the second system is received within the specified time period, it indicates that the second system is in a successful login state. When the second system is in a successful login state, its corresponding function is called (that is, the second system performs login authentication on the first system), which can ensure the security of data in the second system and avoid data leakage in the non-logged-in state.
[0132] In the embodiment of this specification, in order to improve the convenience of display window operation in the first system, as an option, Figure 7 As shown, after generating a display window on the display interface of the first system according to the display window parameters, the method includes:
[0133] S501: Determine whether the display window is consistent with the preset window;
[0134] S502: If they are consistent, generating a menu bar consistent with the menu bar of the corresponding function of the second system in the display interface of the first system according to the menu bar of the corresponding function of the second system in the display window;
[0135] S503: According to the menu bar generated by the display interface of the first system, the menu bar of the corresponding function of the second system in the display window is hidden, so that the display window only displays the operation area of the corresponding function of the second system, and at the same time, the menu bar generated by the display interface of the first system is used to control the corresponding function of the second system in the display window.
[0136] It can be understood that the preset window is a design window for the first system to call the corresponding function of the second system. When judging, it can be determined whether the attributes of the display window are consistent with the preset window attributes. When they are consistent, it indicates that the display window is generated by calling the corresponding function of the second system. In this way, only the operation area of the current corresponding system can be displayed, and the menu bar part is not displayed. The corresponding function menu bar can be replaced by the first system menu bar. It is only necessary to generate a menu bar consistent with the menu bar of the corresponding function of the second system at the position of the first system menu bar. The above steps can improve the utilization efficiency of the display window of the first system, which is fully used for the display of the corresponding function of the second system. The operation part is realized by the newly generated menu bar of the first system, thereby realizing that the corresponding function of the second system can be used alone in the second system and can also be embedded in other systems, thereby improving the integration adaptability of the corresponding function.
[0137] For example, by adding parameter judgment, the second system backend server can determine whether the call of the corresponding function is initiated by the second system itself or other systems. For example, a judgment statement of iframe=true is initiated for the URL address of accessing the second system. True means that it is running in Iframe. Therefore, when it is true, the menu bar of the corresponding function of the second system in the display window of the first system can be hidden through the above steps, and only the operation area of the corresponding function of the second system can be displayed. Preferably, the layout width and height of the display window can be kept consistent with the operation area of the first system display interface itself, so as to achieve a higher user operation experience.
[0138] like Figure 8 and Fig. 9 As shown, Figure 8 This is the display interface information when the B system works independently. When running function 1, it will also be displayed as Figure 8 In the form of display, that is, the display window of system A is also displayed in Figure 8 In order to improve the utilization of the display window and the user experience, the menu bar of function 1 of system B is converted to the menu bar of system A, for example Fig. 9 Operation 1, Operation 2 and Operation 3 in the A system are used as the entire display window of the B system function 1, thereby expanding the scope of the B system function 1 operation area and improving the user experience.
[0139] It should be noted that the newly generated menu bar of the first system is generated along with the call of the corresponding function of the second system. When the corresponding function exits, the newly generated menu bar will also be automatically removed. Specifically, the configuration information of the newly generated menu bar can be saved in the local database of the first system. When the corresponding function is called again, it is only necessary to query and load the configuration information of the corresponding menu bar from the local database of the first system. This can improve the configuration efficiency of the newly generated menu bar, and then the efficiency of calling the corresponding function of the second system. Of course, the update of the corresponding function of the second system will cause its menu bar to change. Therefore, in order to avoid the invalidation of the menu bar configuration information stored locally in the first system, an option for manual update can also be set at a specified position of the first system. The processing logic of manual update can regenerate a menu bar for the first system that is consistent with the menu bar of the corresponding function of the second system. In this way, when the locally stored menu bar configuration information is invalid, the timeliness of the operation of the corresponding function is improved by manual update.
[0140] In a further embodiment, generating a menu bar consistent with the menu bar of the corresponding function of the second system in the display interface of the first system according to the menu bar of the corresponding function of the second system in the display window includes:
[0141] Acquire menu bar information in the corresponding function of the second system, wherein the menu bar information includes a menu item name of the corresponding function and a configuration route of each menu item name;
[0142] According to the preset interface design configuration, each menu item name is loaded and generated in the first system menu bar, and the configuration route is linked to the corresponding menu item name, so that the operation of the menu bar generated for the first system display interface can realize the control of the corresponding function of the second system in the display window page.
[0143] Among them, the preset interface design is configured as the UI style of the first system. By copying the menu bar information in the corresponding function of the second system to the menu bar of the first system, the menu bar of the first system can control the corresponding function of the second system in the display window. For example, a new menu area can be added on the basis of the original menu bar of the first system. The menu area is used to generate a menu bar for controlling the corresponding function of the second system. In this way, it can be ensured that the first system can continue to be controlled on the basis of realizing the control of the corresponding function of the second system. The setting method and style of the newly generated menu bar are determined by the preset interface design configuration, and this specification embodiment does not limit it.
[0144] In the embodiment of the present specification, displaying the corresponding function of the second system in the display window according to the URL address also includes:
[0145] According to the URL address, an operation instruction of a corresponding function is sent to the second system, so that the server of the second system executes the operation instruction and feeds back the operation result to the first system;
[0146] The operation result of the corresponding function of the second system is displayed in the display window.
[0147] It can be understood that the second system backend server can be accessed through the URL address, thereby realizing the operation of the corresponding function, so that the operation result of the second system can be displayed in the display window of the first system. Then, by operating the menu bar of the corresponding function, the corresponding function in the display window can be operated, so that the interaction between the user and the corresponding function of the second system can be realized on the first system.
[0148] Therefore, on the basis that the display window displays the operation result of the corresponding function of the second system, as an option, after the display window displays the corresponding function of the second system according to the URL address, the method further includes:
[0149] Obtaining an operation instruction from a user for a corresponding function of the second system;
[0150] According to the operation instruction, the operation instruction is sent to the second system, so that the second system executes the operation instruction and feeds back the execution result to the first system;
[0151] The execution result of the operation instruction is displayed in the display window.
[0152] The operation instruction may be an operation of the user on the corresponding function menu bar, such as an operation on a menu bar newly generated by the first system, thereby achieving continuous operation of the corresponding function.
[0153] In the embodiment of this specification, calling the corresponding function of the second system according to the target calling address information includes:
[0154] Monitor and obtain status information fed back by the second system;
[0155] According to the status information, determining whether the login of the second system has expired;
[0156] If the login of the second system expires, the login window of the second system is logged out in the first system, so that the user can log in the second system again on the first system.
[0157] It can be understood that this step monitors the real-time status of the second system and operates only when the second system is successfully logged in. When its login expires, in order to ensure the security of the second system data, the login window of the second system is logged in in the display window of the first system, thereby ensuring that the user logs in to the second system again, ensuring the smooth operation of the corresponding functions of the second system. By way of example, the communication between the first system and the second system can be achieved through the iframe tag form, and the login status of the second system can be fed back in time, solving the problem of inconsistent login status of the two systems.
[0158] Further, judging whether the login of the second system has expired according to the status information includes:
[0159] Determining event parameters in the state information;
[0160] When the event parameter is a preset parameter, it is determined that the login of the second system has expired, and the first system logs out of the login window of the second system.
[0161] The status information is feedback information during the operation of the corresponding function of the second system. In the actual process, it should be fed back in the operation interface of the second system, but at this time it is called by the first system. Therefore, a judgment statement for the status information should also be set. When it is determined that the corresponding function is called by other systems, its status information should be sent to the first system. Exemplarily, the feedback status information of the second system can be obtained by setting an Axios interceptor, and a judgment statement is added to the interceptor to determine whether Iframe is true. If so, the communication method of sending Iframe is triggered. The specific code is: top.post Message('auth_302'); if not, the corresponding status information is displayed on the display interface of the second system.
[0162] The event parameter may be an identifier of the second system login expiration, such as auth_302. When the identifier exists in the status information, the second system may be deemed to be in a login expiration state. Since the first system and the second system use the same login method, when the user logs out of the login window of the second system through the first system, the user may log in again to ensure that the corresponding functions of the second system continue to operate.
[0163] Exemplarily, an event listener can be set, such as using the window.post Message() method to listen to the feedback information of the second system. The code for listening to the message is window.add Event Listener('message', this.message Handler). Once the message is listened to, the method in the message Handler is triggered. This method is mainly used to monitor whether the login of the second system in the Iframe has expired. Once the login has expired, it is necessary to trigger the logout method in the first system. The specific code of the method is as follows: message Handler(evt){if(evt.data==='auth_302'){logout()}}. evt is the callback parameter in the feedback information obtained by message. By defining evt, other ways of triggering the message listener can be avoided, thereby ensuring the security of communication. Furthermore, when the corresponding function exits, the added event listener needs to be removed, otherwise it will cause memory leakage. The specific code is window.remove Event Listener('message', this.message Handler).
[0164] In a further embodiment, the status information may also be feedback information during the operation of the corresponding function of the second system, which may include normal feedback information, such as feedback on successful data processing, and abnormal feedback information, such as information on data retrieval failure, etc. Therefore, in order to facilitate the user to understand the status information in a timely manner, as an option, judging whether the login of the second system has expired according to the status information further includes:
[0165] If the second system login has not expired, obtaining abnormal information of the second system according to the status information;
[0166] Determining a fault location of the second system according to the abnormal information;
[0167] According to the fault location, an alarm is issued to the operation and maintenance personnel.
[0168] The abnormal information can be determined by a preset abnormal identification, and different abnormal information corresponds to different identifications. Therefore, the corresponding abnormal identification can be set in advance through the historical abnormal information of the corresponding function of the second system. Therefore, when obtaining the status information, the abnormal information is determined by determining whether the status information contains the corresponding abnormal identification. When the abnormal information is identified, the fault location can be determined through the log file corresponding to the abnormal information, and then an alarm prompt is issued to the operation and maintenance personnel. For example, the alarm can be sent through email, text message, etc. The specific alarm method is not limited in the embodiments of this specification.
[0169] The system function integration method provided in the embodiments of this specification sets the target routing information in advance in the routing file of the first system, triggers the execution of the target routing information after receiving the user's operation instruction, and then determines the target calling address information for calling the corresponding function of the second system, and then calls the corresponding function of the second system on the first system through the target calling address information. This article can integrate the corresponding functions of other systems at a very low cost, thereby improving the integration efficiency of system functions.
[0170] Based on the same inventive concept, the embodiment of this specification also provides a system function integration device, such as Fig.10 As shown, the device comprises:
[0171] The target routing information determination module 100 is used to respond to the user's operation instruction for the first system and determine the target routing information, wherein the target routing information is pre-set in the routing file of the first system;
[0172] A calling address information determining module 200, for determining target calling address information of a corresponding function in the second system corresponding to the function called by the first system according to the target routing information;
[0173] The calling module 300 is used to call the corresponding function of the second system according to the target calling address information, so as to integrate the corresponding function of the second system on the first system.
[0174] The beneficial effects obtained by the above-mentioned device are consistent with the beneficial effects obtained by the above-mentioned method, and will not be described in detail in the embodiments of this specification.
[0175] like Fig.11 As shown, a computer device provided in an embodiment of this invention is provided. The system function integration device in an embodiment of this specification can be a computer device in this embodiment. The method provided above is executed. The computer device 1102 may include one or more processors 1104, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 1102 may also include any memory 1106, which is used to store any kind of information such as code, settings, data, etc. Non-limitingly, for example, the memory 1106 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 1102. In one case, when the processor 1104 executes an associated instruction stored in any memory or a combination of memories, the computer device 1102 may perform any operation of the associated instruction. The computer device 1102 also includes one or more drive mechanisms 1108 for interacting with any storage, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0176] The computer device 1102 may also include an input / output module 1110 (I / O) for receiving various inputs (via input devices 1112) and for providing various outputs (via output devices 1114). A specific output mechanism may include a presentation device 1116 and an associated graphical user interface (GUI) 1118. In other embodiments, the input / output module 1110 (I / O), the input device 1112, and the output device 1114 may not be included, and the computer device 1102 may be used as a computer device in a network. The computer device 1102 may also include one or more network interfaces 1120 for exchanging data with other devices via one or more communication links 1122. One or more communication buses 1124 couple the components described above together.
[0177] The communication link 1122 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1122 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0178] Corresponds to Figure 2 , Figure 4-Figure 7 The method in this article also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0179] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figure 2 , Figure 4-Figure 7 The method shown.
[0180] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0181] It should also be understood that in the embodiments of this document, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects before and after are in an "or" relationship.
[0182] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.
[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0184] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0185] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.
[0186] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0188] Specific embodiments are used in this article to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.< / template>
Claims
1. A system function integration method, characterized in that: The method comprises: In response to an operation instruction of a user directed to the first system, determining target routing information, the target routing information being pre-set in a routing file of the first system; Determine, according to the target routing information, target calling address information of a corresponding function in the second system corresponding to the function called by the first system; Calling a corresponding function of the second system according to the target calling address information, so as to integrate the corresponding function of the second system on the first system; The calling the corresponding function of the second system according to the target calling address information so as to integrate the corresponding function of the second system on the first system includes: Parsing the target call address information to obtain the display window parameters and the uniform resource locator URL address of the corresponding function; Generating a display window of a corresponding function of the second system on the display interface of the first system according to the display window parameters; According to the URL address, displaying the corresponding function of the second system in the display window; The displaying, in the display window, the corresponding function of the second system according to the URL address includes: Determine identification information of a corresponding function of the second system according to the URL address; Acquire the login status of the second system relative to the first system according to the identification information of the corresponding function of the second system; When the login status of the second system is successful, the corresponding function of the second system is loaded in the display window through the URL address; After generating a display window on a display interface of the first system according to the display window parameters, the method further comprises: Determining whether the display window is consistent with the preset window; If they are consistent, generating a menu bar consistent with the menu bar of the corresponding function of the second system in the display interface of the first system according to the menu bar of the corresponding function of the second system in the display window; According to the menu bar generated by the display interface of the first system, the menu bar of the corresponding function of the second system in the display window is hidden, so that the display window only displays the operation area of the corresponding function of the second system, and at the same time, the menu bar generated by the display interface of the first system controls the corresponding function of the second system in the display window; The step of generating a menu bar consistent with the menu bar of the second system corresponding function in the first system display interface according to the menu bar of the second system corresponding function in the display window comprises: Acquire menu bar information in the corresponding function of the second system, wherein the menu bar information includes a menu item name of the corresponding function and a configuration route of each menu item name; According to the preset interface design configuration, each menu item name is loaded and generated in the first system menu bar, and the configuration route is linked to the corresponding menu item name, so that the operation of the menu bar generated for the first system display interface can realize the control of the corresponding function of the second system in the display window page.
2. The method according to claim 1, characterized in that: The first system and the second system use the same login method and have the same interface design.
3. The method according to claim 1, characterized in that: The target routing information is set by the following steps: determining a corresponding function of the second system; Determining the calling address information of the second system according to the corresponding function; The target routing information of the corresponding function is generated according to the calling address information.
4. The method according to claim 3, characterized in that The generating the target routing information of the corresponding function according to the calling address information includes: Determine a calling address template, wherein the calling address template includes a template parameter for determining a display window of a corresponding function of the second system in the first system and an address parameter for calling the corresponding function of the second system; Determining target calling address information of the corresponding function according to the calling address template and the calling address information; The target routing information of the corresponding function is generated according to the target calling address information and the routing file of the first system.
5. The method according to claim 4, characterized in that The calling address template is an Iframe template.
6. The method according to claim 1, characterized in that The displaying, in the display window, the corresponding function of the second system according to the URL address further comprises: According to the URL address, an operation instruction of a corresponding function is sent to the second system, so that the server of the second system executes the operation instruction and feeds back the operation result to the first system; The operation result of the corresponding function of the second system is displayed in the display window.
7. The method according to claim 6, characterized in that After displaying the corresponding function of the second system in the display window according to the URL address, the method further includes: Obtaining an operation instruction from a user for a corresponding function of the second system; According to the operation instruction, the operation instruction is sent to the second system, so that the second system executes the operation instruction and feeds back the execution result to the first system; The execution result of the operation instruction is displayed in the display window.
8. The method according to claim 1, characterized in that The calling of the corresponding function of the second system according to the target calling address information comprises: Monitor and obtain status information fed back by the second system; Determining, based on the status information, whether the login of the second system has expired; If the login of the second system expires, the login window of the second system is logged out in the first system, so that the user can log in the second system again on the first system.
9. The method according to claim 8, characterized in that The determining, according to the status information, whether the login of the second system has expired includes: Determining event parameters in the state information; When the event parameter is a preset parameter, it is determined that the login of the second system has expired, and the first system logs out of the login window of the second system.
10. The method according to claim 8, characterized in that The determining, according to the status information, whether the login of the second system has expired further includes: If the second system login has not expired, obtaining abnormal information of the second system according to the status information; Determining a fault location of the second system according to the abnormal information; According to the fault location, an alarm is issued to the operation and maintenance personnel.
11. A system function integration device, characterized in that: The device comprises: a target routing information determination module, configured to respond to a user's operation instruction for the first system and determine target routing information, wherein the target routing information is pre-set in a routing file of the first system; A calling address information determining module, used to determine, according to the target routing information, target calling address information of a corresponding function in the second system corresponding to the function called by the first system; a calling module, configured to call a corresponding function of the second system according to the target calling address information, so as to integrate the corresponding function of the second system on the first system; The calling module is further used to parse the target calling address information, obtain the display window parameters and uniform resource locator URL address of the corresponding function; generate a display window of the corresponding function of the second system on the display interface of the first system according to the display window parameters; display the corresponding function of the second system in the display window according to the URL address; the displaying of the corresponding function of the second system in the display window according to the URL address includes: determining the identification information of the corresponding function of the second system according to the URL address; obtaining the login status of the second system relative to the first system according to the identification information of the corresponding function of the second system; when the login status of the second system is successful, loading the corresponding function of the second system in the display window through the URL address; after generating the display window on the display interface of the first system according to the display window parameters, it includes: judging whether the display window is consistent with the preset window; if consistent, according to the menu bar of the corresponding function of the second system in the display window, A menu bar consistent with the menu bar of the corresponding function of the second system is generated in the display interface of the first system; according to the menu bar generated by the display interface of the first system, the menu bar of the corresponding function of the second system in the display window is hidden, so that the display window only displays the operation area of the corresponding function of the second system, and at the same time, the menu bar generated by the display interface of the first system controls the corresponding function of the second system in the display window; according to the menu bar of the corresponding function of the second system in the display window, a menu bar consistent with the menu bar of the corresponding function of the second system is generated in the display interface of the first system, including: obtaining menu bar information in the corresponding function of the second system, the menu bar information including the menu item name of the corresponding function and the configuration route of each menu item name; according to the preset interface design configuration, each menu item name is loaded and generated in the menu bar of the first system, and the configuration route is linked to the corresponding menu item name, so that the operation of the menu bar generated by the display interface of the first system can realize the control of the corresponding function of the second system in the display window page.
12. A functional integration system, characterized in that: The system comprises a first system and a second system; The first system and the second system use the same login method and have the same interface design; The first system is used to respond to the user's operation instruction for the first system and determine the target routing information, wherein the target routing information is pre-set in the routing file of the first system; Determine, according to the target routing information, target calling address information of a corresponding function in the second system corresponding to the function called by the first system; call the corresponding function of the second system according to the target calling address information, so that the corresponding function of the second system is integrated on the first system; Among them, according to the target call address information, calling the corresponding function of the second system so as to integrate the corresponding function of the second system on the first system, including: parsing the target call address information to obtain the display window parameters and uniform resource locator URL address of the corresponding function; generating a display window of the corresponding function of the second system on the display interface of the first system according to the display window parameters; displaying the corresponding function of the second system in the display window according to the URL address; displaying the corresponding function of the second system in the display window according to the URL address, including: determining the identification information of the corresponding function of the second system according to the URL address; obtaining the login status of the second system relative to the first system according to the identification information of the corresponding function of the second system; when the login status of the second system is successful, loading the corresponding function of the second system in the display window through the URL address; generating a display window on the display interface of the first system according to the display window parameters includes: judging whether the display window is consistent with the preset window; if consistent, then loading the corresponding function of the second system in the display window according to the display window parameters. The method comprises: obtaining menu bar information of the corresponding function of the second system in the display window, wherein the menu bar information includes a menu item name of the corresponding function and a configuration route of each menu item name; and loading and generating each menu item name in the menu bar of the first system according to the preset interface design configuration, and linking the configuration route to the corresponding menu item name, so that the operation of the menu bar generated by the first system display interface can realize the operation of the corresponding function of the second system in the display window page.
13. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
A portal integration method and compute device
CN109542292A
Routing method and device, computer equipment and storage medium
CN111866158A