System integration method and system based on HttpClient technology
By using the HttpClient technology-based method in system integration, the problem that the existing technology cannot control the system integration direction according to the remote system operation state is solved, dynamic adjustment of the subsystem operation state and avoiding abnormal requests is achieved, and the stability and efficiency of system integration are improved.
Patent Information
- Application Number
- CN202410184994.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-19
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-02-19
AI Technical Summary
Existing system integration technology cannot control the system integration direction based on the remote system's operating status, and when the target system is unavailable, it will cause a large number of abnormal requests to block, affecting system integration.
The system integration method based on HttpClient technology is adopted. By setting up HttpClient technology for the entrance system and the subsystem to be integrated in advance, the subsystem logs into the entrance system and saves the login information. If the login fails, poll the next subsystem. The entrance system receives the subsystem's interface request and parses the information, and configures the subserver based on the parsed information.
It realizes the system integration trend based on the subsystem's operating status. Poll the next subsystem when the subsystem is unavailable, avoiding a large number of abnormal requests and improving the stability and efficiency of system integration.
Smart Images

Figure CN118013498B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of system integration technology, and in particular to a system integration method and system based on HttpClient technology. Background Art
[0002] With the continuous development of information construction, the number of enterprise business systems continues to increase, and the complexity is becoming more and more difficult to control. This requires the integration of various business systems into a unified basic work platform. Common system integration single sign-on implementation methods, such as using simulated login URLs to integrate the target system using IFRAME, and single sign-on based on the reverse proxy function of Apache HTTP Server, all have the following problems: the system integration direction cannot be controlled according to the operating status of the remote system, and a large number of abnormal requests are blocked when the target system is unavailable, affecting system integration. Summary of the invention
[0003] The embodiment of the present application provides a system integration method and system based on HttpClient technology to solve the problem that the existing system integration technology cannot control the system integration direction according to the remote system operation status, and a large number of abnormal requests block the system integration when the target system is unavailable.
[0004] In a first aspect, an embodiment of the present application provides a system integration method based on HttpClient technology, the method comprising the following steps:
[0005] Pre-set the corresponding HttpClient technology for the entry system and multiple subsystems to be integrated;
[0006] The subsystem logs into the entry system based on HttpClient technology, and saves and manages the information after successful login. If the login fails, it polls the next subsystem.
[0007] The entry system receives the interface request of the subsystem based on HttpClient technology and parses the subsystem information according to the interface request;
[0008] The entry system configures the subserver corresponding to logging into the subsystem according to the parsed subsystem information.
[0009] Furthermore, the entry system receives the interface request of the subsystem based on the HttpClient technology, and parses the information of the subsystem according to the interface request, including:
[0010] The entry system receives the interface request of the subsystem based on HttpClient technology, and obtains the IP address, user name and first password of the subsystem from the interface request.
[0011] Furthermore, the portal system configures the subserver corresponding to the subsystem according to the parsed subsystem information, including:
[0012] The main server of the entry system calculates the IP address of the subsystem according to a set algorithm to generate a second password;
[0013] Compare the generated second password with the first password to see if they are the same. If they are the same, the main server uses the user name and password to log in to the sub-server according to the IP address of the sub-system and configure the sub-server. If they are different, an error reminder is issued.
[0014] Furthermore, the main server of the portal system calculates the IP address of the subsystem according to a set algorithm to generate a second password, including:
[0015] The main server of the entry system calculates a first hash value corresponding to the IP address of the subsystem, queries whether there is a password corresponding to the first hash value in the password list stored in the main server, and generates a second password based on the query result;
[0016] The password list stores hash values corresponding to multiple IP addresses, label attributes corresponding to the IP addresses, and passwords corresponding to each hash value, where the hash value is obtained by encrypting the IP address according to a hash algorithm;
[0017] The IP address corresponding to the first hash value is verified based on the tag attribute.
[0018] Furthermore, the main server of the portal system calculates the first hash value corresponding to the IP address of the subsystem, including:
[0019] The main server of the entry system divides the IP address of the subsystem into 4 segments of decimal integers, adds 1 to the first and second segments of data, and stores the third and fourth segments of data in reverse order to obtain a first hash value.
[0020] Furthermore, the subsystem logs into the entry system based on HttpClient technology, and saves and manages the information after successful login, including:
[0021] The main server of the entry system generates an identity confirmation request of the subsystem and sends the identity confirmation request to the subserver of the subsystem;
[0022] The sub-server sends an access request with identity information to the main server based on HttpClient technology;
[0023] The main server verifies the legitimacy of the sub-server based on the identity information and feeds back the verification result to the sub-server;
[0024] If the verification is successful, the subsystem successfully logs into the entry system and stores and manages the successful login information.
[0025] Furthermore, after configuring the subserver corresponding to the subsystem for logging into the subsystem according to the parsed information of the subsystem, the portal system further includes:
[0026] The entry system calls the configured subsystem according to the call request;
[0027] The entry system calls the configured subsystem according to the call request, including:
[0028] The main server of the entry system sends the call request to the sub-server of the sub-system;
[0029] The main server maps the call request to the sub-server according to the pre-defined task delegation relationship;
[0030] The sub-server executes the method corresponding to the call request and returns the result of the call to the main server.
[0031] In a second aspect, the embodiment of the present application further provides a system integration system based on HttpClient technology, including:
[0032] The initial setting module is used to pre-set the corresponding HttpClient technology for the entry system and multiple subsystems to be integrated;
[0033] The system login module is used for the subsystem to log in to the entry system based on HttpClient technology, and save and manage the information after successful login. If the login fails, it will poll the next subsystem;
[0034] The system parsing module is used for the entry system to receive the interface request of the subsystem based on the HttpClient technology, and parse the information of the subsystem according to the interface request;
[0035] The system configuration module is used for the entry system to configure the sub-server corresponding to the sub-system according to the parsed sub-system information.
[0036] In a third aspect, an embodiment of the present application further provides a computer device, including: a memory and one or more processors;
[0037] The memory is used to store one or more programs;
[0038] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned system integration method based on HttpClient technology.
[0039] In a fourth aspect, an embodiment of the present application further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute a system integration method based on HttpClient technology as described above when executed by a computer processor.
[0040] The embodiment of the present application pre-sets corresponding HttpClient technologies for the entry system and multiple subsystems to be integrated; the subsystem logs in to the entry system based on the HttpClient technology, and saves and manages the information after successful login. If the login fails, it polls the next subsystem; the entry system receives the interface request of the subsystem based on the HttpClient technology, and parses the information of the subsystem according to the interface request; the entry system configures the subserver corresponding to the login of the subsystem according to the parsed subsystem information; the system integration direction is controlled according to the subsystem operation status, and the next subsystem is polled when the subsystem is unavailable, so as to avoid a large number of abnormal requests blocking the system integration. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of a system integration method based on HttpClient technology provided in an embodiment of the present application;
[0042] Figure 2 is a flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application;
[0043] Figure 3 is a flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application;
[0044] Figure 4 is a flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application;
[0045] Figure 5 is a flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application;
[0046] Figure 6 It is a structural diagram of a system integration system based on HttpClient technology provided in an embodiment of the present application;
[0047] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0049] The embodiment of the present application establishes a system integration method based on HttpClient technology, which solves the problem that the existing system integration technology cannot control the system integration direction according to the remote system operation status, and a large number of abnormal requests block the system integration when the target system is unavailable.
[0050] The system integration method based on HttpClient technology provided in the embodiment can be executed by a system integration system based on HttpClient technology, which can be implemented by software and / or hardware and integrated in a system integration device based on HttpClient technology. The system integration device based on HttpClient technology can be a computer or other device.
[0051] Figure 1 A flowchart of a system integration method based on HttpClient technology provided in an embodiment of the present application. Figure 1 , the method comprises the following steps:
[0052] Step 110: Pre-set the corresponding HttpClient technology for the entry system and multiple subsystems to be integrated.
[0053] Specifically, the entry system is provided with a main server, and the subsystem is provided with a sub-server. Corresponding HttpClients are pre-set for the main server and a plurality of sub-servers to be integrated, so that the main server and the sub-servers can be connected and communicated through HttpClient technology to realize system integration.
[0054] Step 120: The subsystem logs into the entry system based on HttpClient technology, and saves and manages the information after successful login. If the login fails, the next subsystem is polled.
[0055] Specifically, the sub-server of the subsystem logs in to the main server of the entry system based on HttpClient technology to request to establish a connection with the main server to achieve login. If the sub-server login is successful, the successful login information is saved and managed, and the sub-system corresponding to the sub-server is successfully integrated with the entry system. If the sub-server login fails, the sub-system is recorded, and the sub-server of the next sub-system begins to request to log in to the main server.
[0056] It can be understood that after the subsystems that failed to log in are recorded, wait until all subsystems complete the login operation, and re-establish the connection between the entry system and the subsystem that failed to log in. If the connection still fails, call up the configuration parameters of the subsystem to analyze the cause of the failure. For example, analyze whether the identity information of the subsystem is incorrect and whether it belongs to the list of systems that need to be integrated. If not, there is no need to perform the next integration operation on the subsystem. If it does, a subsystem fault error is reported so that the connection between the subsystem and the entry system can be established manually.
[0057] Exemplarily, the entry system needs to be integrated with subsystems numbered 1-10, where subsystems 1-5 all log in successfully, and subsystems 1-5 save and manage the successful login information. If the login to subsystem 6 fails, subsystem 6 is recorded and the login to subsystems 7-10 is performed directly. After subsystems 7-10 complete the login process, the login to subsystem 6 is performed again.
[0058] Step 130: The entry system receives the interface request of the subsystem based on the HttpClient technology, and parses the information of the subsystem according to the interface request.
[0059] Specifically, the main server of the entry system receives the interface request of the sub-server of the sub-system based on the HttpClient technology, and obtains the IP address, user name and first password of the sub-system from the interface request.
[0060] The message is sent to the local area network where the main server is located through the software installed on the sub-server, and the message carries the IP address, user name and password of the sub-server. The password is generated using a predetermined algorithm based on the IP address.
[0061] Step 140: The portal system configures the subserver corresponding to the subsystem according to the parsed information of the subsystem.
[0062] Specifically, the main server of the entry system parses the information of the subsystem, and determines whether the connection is correct based on the parsed subsystem information. If the connection fails, an error reminder is issued. If the connection is successful, the main server logs in to the subserver to configure parameters. Optionally, the parameter configuration includes configuration of the subsystem number, sequence, connection information and integration data.
[0063] Based on the above embodiments, Figure 2 A flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application is given. The system integration method based on HttpClient technology is a specific implementation of the system integration method based on HttpClient technology. Figure 2 , the system integration method based on HttpClient technology includes:
[0064] 1201. The main server of the portal system generates an identity confirmation request of the subsystem, and sends the identity confirmation request to the subserver of the subsystem.
[0065] It can be understood that integrating a subsystem into the entry system requires verifying the identity of the subsystem to see whether it belongs to the system or server that needs to be integrated, that is, whether the subsystem is legal. Specifically, the main server of the entry system generates an identity confirmation request for the subsystem and sends the identity confirmation request to the subsystem's subserver.
[0066] 1202. The sub-server sends an access request with identity information to the main server based on HttpClient technology.
[0067] Specifically, the subsystem receives an identity confirmation request from the main server, and the subserver sends an access request with identity information to the main server based on HttpClient technology. Optionally, the identity information can be an IP address, MAC address, etc., or a number pre-set for the subsystem.
[0068] 1203. The main server verifies the legitimacy of the sub-server according to the identity information, and feeds back the verification result to the sub-server.
[0069] Specifically, the main server receives the identity information sent by the sub-server, verifies the legitimacy of the sub-system based on the identity information, and feeds back the verification result to the sub-server. It can be understood that if the verification is legitimate, the sub-server logs in to the main server based on HttpClient technology.
[0070] 1204. If the verification is successful, the subsystem successfully logs into the entry system and stores and manages the successful login information.
[0071] Based on the above embodiments, Figure 3 and Figure 4 A flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application is given. The system integration method based on HttpClient technology is a specific implementation of the system integration method based on HttpClient technology. Figure 3 and Figure 4 , the system integration method based on HttpClient technology includes:
[0072] 1301. The main server of the entry system calculates the IP address of the subsystem according to a set algorithm to generate a second password.
[0073] Optionally, after the subsystem logs into the entry system, the server of the entry system needs to parse the information of the subsystem and configure the parameters of the subsystem accordingly to achieve system integration; specifically, the main server of the entry system calculates the IP address of the subsystem according to a set algorithm to generate a second password.
[0074] 1302. Compare the generated second password and the first password to see if they are the same. If they are the same, the main server uses the user name and password to log in to the sub-server according to the IP address of the sub-system and configure the sub-server. If they are different, an error reminder is issued.
[0075] It is understandable that although the subsystem successfully logs into the entry system, this is only the first step in system integration. The subsystem still needs to be configured through the entry system to achieve successful system integration. Optionally, the main server of the entry system calculates the IP address of the subsystem according to a set algorithm to generate a second password, and compares it with the first password obtained by receiving the interface request of the subsystem. If the second password is the same as the first password, the main server uses the username and password to log in to the subserver according to the IP address of the subsystem and configure the subserver. If the second password is different from the first password, an error reminder is issued, and the reason for the password difference needs to be further investigated. For example, the subsystem does not belong to the list of systems that need to be integrated.
[0076] 13011. The main server of the entry system calculates the first hash value corresponding to the IP address of the subsystem, queries the password list stored in the main server to see whether there is a password corresponding to the first hash value, and generates a second password based on the query result.
[0077] Specifically, the main server of the entry system divides the IP address of the subsystem into 4 segments of decimal integers, adds 1 to the first and second segments of data, and stores the third and fourth segments of data in reverse order to obtain a first hash value.
[0078] Optionally, if the sub-server first encrypts the IP address (plain text) and then transmits the encrypted ciphertext, the main server will decrypt it after receiving the ciphertext to obtain the real IP address (plain text) of the sub-server. Specifically, the IP address of the sub-system is expressed in "dot decimal" in the form of (abcd), where a, b, c, d are all decimal integers between 0 and 255, respectively referred to as the 1st, 2nd, 3rd, and 4th segments, such as the IP address "192.168.1.123". Exemplarily, that is: the 1st and 2nd segments of the IP address are both used as the ciphertext after adding 1, and the 3rd and 4th segments are both used as the ciphertext after reverse storage, such as the plaintext is "192.168.5.12", and the ciphertext is "193.169.500.210", where the "5" and "12" in the plaintext are respectively regarded as three-digit representations: "005" and "012". The specific programming is as follows:
[0079]
[0080]
[0081] 13012. The password list stores hash values corresponding to multiple IP addresses, label attributes corresponding to the IP addresses, and passwords corresponding to each hash value, and the hash value is obtained by encrypting the IP address according to a hash algorithm.
[0082] 13013. Verify the IP address corresponding to the first hash value based on the tag attribute.
[0083] Specifically, the password list stores hash values corresponding to multiple IP addresses, label attributes corresponding to the IP addresses, and passwords corresponding to each hash value. The second password is obtained by looking up the first hash value corresponding to the IP address of the subsystem calculated by the main server. Furthermore, the IP address is verified through the label attribute in the password list to determine the second password and avoid errors in generating the second password.
[0084] Based on the above embodiments, Figure 5 A flowchart of another system integration method based on HttpClient technology provided in an embodiment of the present application is given. The system integration method based on HttpClient technology is a specific implementation of the system integration method based on HttpClient technology. Figure 5 , the system integration method based on HttpClient technology includes:
[0085] 150. The entry system calls the configured subsystem according to the call request;
[0086] The entry system calls the configured subsystem according to the call request, including:
[0087] 1501. The main server of the portal system sends a call request to the sub-server of the sub-system.
[0088] It can be understood that after completing the successful login connection between the entry system and all subsystems, the main system can call the subsystem during the working process. Specifically, the main server of the entry system sends the call request to the subsystem's subserver. If the call is successfully completed, the system integration is completely successful.
[0089] 1502. The main server maps the call request to the sub-server according to a predefined task delegation relationship.
[0090] Specifically, a task delegation relationship is pre-set in the main server, that is, the main server stores data information of each subsystem and subserver and its corresponding functions and tasks to be completed, and calls the corresponding subsystem according to different tasks, that is, sends a call request mapped to the subserver.
[0091] 1503. The sub-server executes the method corresponding to the call request and returns the call result to the main server.
[0092] Specifically, the sub-server receives a call request from the main server. If the task included in the call request corresponds to the sub-server, the sub-server executes the method corresponding to the call request and returns the call result to the main server.
[0093] Exemplarily, subsystem 1 is integrated into the portal system, and corresponding HttpClient technologies are pre-set for the portal system and subsystem 1. Subsystem 1 logs into the portal system based on HttpClient technology. The main server of the portal system generates identity information of subsystem 1 and sends the identity information to subserver 1 of subsystem 1. Subserver 1 sends an access request with identity information to the main server based on HttpClient technology. The main server verifies the legitimacy of subserver 1 according to the identity information and feeds back the verification result to subserver 1. Subserver 1 verifies that it successfully logs into the portal system and stores and manages the successful login information. Next, the portal system receives subserver 1 based on HttpClient technology. The main server of the entry system receives an interface request from the subsystem 1, and obtains the IP address, user name and first password of the subsystem 1 from the interface request. The main server of the entry system calculates the IP address of the subsystem 1 according to the set algorithm to generate a second password. The second password is the same as the first password. The main server logs in to the subserver 1 using the user name and password according to the IP address of the subsystem 1 and configures the numbering, sequence, connection information and integrated data of the subserver 1. After the configuration is completed, the main server of the entry system sends the call request to the subserver 1. The main server maps the call request to the subserver 1 according to the pre-defined task delegation relationship. The subserver 1 executes the method corresponding to the call request and returns the result of the call to the main server, thereby completing the integration of the entry system and the subsystem 1.
[0094] Based on the above examples, please refer to Figure 6 The embodiment of the present application provides a system integration system based on HttpClient technology, and the system integration system based on HttpClient technology specifically includes: an initial setting module 601, a system login module 602, a system analysis module 603 and a system configuration module 604.
[0095] Among them, the initial setting module 601 is used to pre-set the corresponding HttpClient technology for the entry system and multiple subsystems to be integrated; the system login module 602 is used for the subsystem to log in to the entry system based on the HttpClient technology, and save and manage the information after successful login. If the login fails, poll the next subsystem; the system parsing module 603 is used for the entry system to receive the interface request of the subsystem based on the HttpClient technology, and parse the information of the subsystem according to the interface request; the system configuration module 604 is used for the entry system to configure the subserver corresponding to the login of the subsystem according to the parsed subsystem information.
[0096] In some embodiments, the system analysis module 603 is also used for the entry system to receive the interface request of the subsystem based on the HttpClient technology, and obtain the IP address, user name and first password of the subsystem from the interface request.
[0097] In some embodiments, the system configuration module 604 includes a password generation unit and a password judgment unit. The password generation unit is used for the main server of the entry system to calculate the IP address of the subsystem according to a set algorithm to generate a second password; the password judgment unit is used to compare whether the generated second password is the same as the first password. If they are the same, the main server uses the user name and password to log in to the subserver according to the IP address of the subsystem and configure the subserver. If they are different, an error reminder is issued.
[0098] In some embodiments, the system configuration module 604 also includes a password query unit, a password storage unit and an address verification unit. The password query unit is used to calculate the first hash value corresponding to the IP address of the subsystem of the main server of the entry system to query whether there is a password corresponding to the first hash value in the password list stored by the main server, and then generate a second password based on the query result; the password storage unit is used to store the hash values corresponding to multiple IP addresses, the label attributes corresponding to the IP addresses, and the passwords corresponding to each hash value in the password list, and the hash value is obtained by encrypting the IP address according to the hash algorithm; the address verification unit is used to verify the IP address corresponding to the first hash value based on the label attribute.
[0099] In some embodiments, the password query unit is also used for the entry system to call the configured subsystem according to the call request, add 1 to the first and second segments of data, and store the third and fourth segments of data in reverse order to obtain a first hash value.
[0100] In some embodiments, the system login module 602 includes an identity generation unit, an access request unit, a legal verification unit and a verification management unit. The identity generation unit is used for the main server of the portal system to generate an identity confirmation request for the subsystem, and send the identity confirmation request to the subserver of the subsystem; the access request unit is used for the subserver to send an access request with identity identification information to the main server based on HttpClient technology; the legal verification unit is used for the main server to verify the legality of the subserver according to the identity identification information, and to feedback the verification result to the subserver; the verification management unit is used for the subsystem to successfully log in to the portal system if the verification is successful, and to store and manage the successful login information.
[0101] In some embodiments, it also includes a system call module, which is used for the entry system to call the configured subsystem according to the call request; the system call module includes a call request unit, a call mapping unit and a call feedback unit, the call request unit is used for the main server of the entry system to send the call request to the sub-server of the subsystem; the call mapping unit is used for the main server to map the call request to the sub-server according to a pre-defined task delegation relationship; the call feedback unit is used for the sub-server to execute the method corresponding to the call request and return the call result to the main server.
[0102] Exemplarily, subsystem 1 is integrated into the portal system, and corresponding HttpClient technologies are pre-set for the portal system and subsystem 1. Subsystem 1 logs into the portal system based on HttpClient technology. The main server of the portal system generates identity information of subsystem 1 and sends the identity information to subserver 1 of subsystem 1. Subserver 1 sends an access request with identity information to the main server based on HttpClient technology. The main server verifies the legitimacy of subserver 1 according to the identity information and feeds back the verification result to subserver 1. Subserver 1 verifies that it successfully logs into the portal system and stores and manages the successful login information. Next, the portal system receives subserver 1 based on HttpClient technology. The main server of the entry system receives an interface request from the subsystem 1, and obtains the IP address, user name and first password of the subsystem 1 from the interface request. The main server of the entry system calculates the IP address of the subsystem 1 according to the set algorithm to generate a second password. The second password is the same as the first password. The main server logs in to the subserver 1 using the user name and password according to the IP address of the subsystem 1 and configures the numbering, sequence, connection information and integrated data of the subserver 1. After the configuration is completed, the main server of the entry system sends the call request to the subserver 1. The main server maps the call request to the subserver 1 according to the pre-defined task delegation relationship. The subserver 1 executes the method corresponding to the call request and returns the result of the call to the main server, thereby completing the integration of the entry system and the subsystem 1.
[0103] As described above, the embodiment of the present application pre-sets corresponding HttpClient technologies for the entry system and multiple subsystems to be integrated; the subsystem logs in to the entry system based on the HttpClient technology, and saves and manages the information after successful login. If the login fails, it polls the next subsystem; the entry system receives the interface request of the subsystem based on the HttpClient technology, and parses the information of the subsystem according to the interface request; the entry system configures the subserver corresponding to the login of the subsystem according to the parsed subsystem information; the system integration direction is controlled according to the subsystem operation status, and the next subsystem is polled when the subsystem is unavailable, so as to avoid a large number of abnormal requests blocking the system integration.
[0104] The system integration system based on HttpClient technology provided in the embodiment of the present application can be used to execute the system integration method based on HttpClient technology provided in the above embodiment, and has corresponding functions and beneficial effects.
[0105] The embodiment of the present application also provides a computer device, which can integrate the system integration system based on HttpClient technology provided in the embodiment of the present application. Figure 7 Schematic diagram of a computer device provided in an embodiment of the present application. Figure 7 The computer device includes: an input device 73, an output device 74, a memory 72 and one or more processors 71; the memory 72 is used to store one or more programs; when the one or more programs are executed by the one or more processors 71, the one or more processors 71 implement the system integration method based on HttpClient technology as provided in the above embodiment. The input device 73, the output device 74, the memory 72 and the processor 71 can be connected by a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0106] The processor 71 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 72, that is, realizes the above-mentioned system integration method based on HttpClient technology.
[0107] The computer device provided above can be used to execute the system integration method based on HttpClient technology provided in the above embodiment, and has corresponding functions and beneficial effects.
[0108] The embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute a system integration method based on HttpClient technology when executed by a computer processor. The system integration method based on HttpClient technology includes: pre-setting corresponding HttpClient technology for an entry system and multiple subsystems to be integrated; the subsystem logs in to the entry system based on HttpClient technology, and saves and manages the information after successful login, and if the login fails, polls the next subsystem; the entry system receives an interface request from the subsystem based on HttpClient technology, and parses the information of the subsystem according to the interface request; the entry system configures the subserver corresponding to the subsystem based on the parsed subsystem information.
[0109] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape devices; computer device memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer device in which the program is executed, or may be located in a different second computer device, which is connected to the first computer device via a network (such as the Internet). The second computer device can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (for example, in different computer devices connected via a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0110] Of course, the computer executable instructions of the storage medium containing computer executable instructions provided in the embodiment of the present application are not limited to the system integration method based on HttpClient technology as described above, and can also execute related operations in the system integration method based on HttpClient technology provided in any embodiment of the present application.
[0111] The system integration system based on HttpClient technology, storage medium and computer device provided in the above embodiments can execute the system integration method based on HttpClient technology provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the system integration method based on HttpClient technology provided in any embodiment of the present application.
[0112] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A system integration method based on HttpClient technology, characterized in that: The method comprises the following steps: Pre-set the corresponding HttpClient technology for the entry system and multiple subsystems to be integrated; The subsystem logs in to the entry system based on HttpClient technology, and saves and manages the information after successful login. If the login fails, it polls the next subsystem. Among them, after the subsystems with failed logins are recorded, after all subsystems complete the login operation, the entry system is reconnected to the subsystem with failed login. If the connection still fails, the configuration parameters of the subsystem are retrieved to analyze the cause of the failure. The entry system receives the interface request of the subsystem based on HttpClient technology and parses the subsystem information according to the interface request; The entry system configures the subserver corresponding to the subsystem according to the parsed subsystem information; wherein the configuration includes configuring the number, sequence, connection information and integration data of the subsystem; The entry system receives the interface request of the subsystem based on HttpClient technology, and parses the information of the subsystem according to the interface request, including: The entry system receives the interface request of the subsystem based on HttpClient technology, and obtains the IP address, user name and first password of the subsystem from the interface request; The entry system configures the subserver corresponding to the subsystem according to the parsed subsystem information, including: The main server of the entry system calculates the IP address of the subsystem according to a set algorithm to generate a second password; Compare the generated second password with the first password to see if they are the same. If they are the same, the main server uses the user name and password to log in to the sub-server according to the IP address of the sub-system and configure the sub-server. If they are different, an error reminder is issued; The main server of the portal system calculates the IP address of the subsystem according to a set algorithm to generate a second password, including: The main server of the entry system calculates a first hash value corresponding to the IP address of the subsystem, queries whether there is a password corresponding to the first hash value in the password list stored in the main server, and generates a second password based on the query result; The password list stores hash values corresponding to multiple IP addresses, label attributes corresponding to the IP addresses, and passwords corresponding to each hash value, where the hash value is obtained by encrypting the IP address according to a hash algorithm; Verify the IP address corresponding to the first hash value based on the tag attribute; The main server of the portal system calculates a first hash value corresponding to the IP address of the subsystem, including: The main server of the entry system divides the IP address of the subsystem into 4 segments of decimal integers, adds 1 to the first and second segments of data, and stores the third and fourth segments of data in reverse order to obtain a first hash value.
2. According to claim 1, the system integration method based on HttpClient technology is characterized in that: The subsystem logs into the entry system based on HttpClient technology, and saves and manages the information after successful login, including: The main server of the entry system generates an identity confirmation request of the subsystem and sends the identity confirmation request to the subserver of the subsystem; The sub-server sends an access request with identity information to the main server based on HttpClient technology; The main server verifies the legitimacy of the sub-server based on the identity information and feeds back the verification result to the sub-server; If the verification is successful, the subsystem successfully logs into the entry system and stores and manages the successful login information.
3. The system integration method based on HttpClient technology according to claim 1, characterized in that: After configuring the subserver corresponding to the subsystem for logging into the subsystem according to the parsed information of the subsystem, the portal system further includes: The entry system calls the configured subsystem according to the call request; The entry system calls the configured subsystem according to the call request, including: The main server of the entry system sends the call request to the sub-server of the sub-system; The main server maps the call request to the sub-server according to the pre-defined task delegation relationship; The sub-server executes the method corresponding to the call request and returns the result of the call to the main server.
4. A system integration system based on HttpClient technology, characterized in that: include: The initial setting module is used to pre-set the corresponding HttpClient technology for the entry system and multiple subsystems to be integrated; The system login module is used for the subsystem to log in to the entry system based on HttpClient technology, and save and manage the information after successful login. If the login fails, it will poll the next subsystem. Among them, after the subsystems that failed to log in are recorded, wait until all subsystems complete the login operation, and re-establish a connection between the entry system and the subsystem that failed to log in. If the connection still fails, the configuration parameters of the subsystem are called to analyze the cause of the failure. The system parsing module is used for the entry system to receive the interface request of the subsystem based on the HttpClient technology, and parse the information of the subsystem according to the interface request; The system configuration module is used for the entry system to configure the subserver corresponding to the subsystem according to the parsed subsystem information; wherein the configuration includes the numbering, sequence, connection information and integration data of the subsystem; The entry system receives the interface request of the subsystem based on HttpClient technology, and parses the information of the subsystem according to the interface request, including: The entry system receives the interface request of the subsystem based on HttpClient technology, and obtains the IP address, user name and first password of the subsystem from the interface request; The entry system configures the subserver corresponding to the subsystem according to the parsed subsystem information, including: The main server of the entry system calculates the IP address of the subsystem according to a set algorithm to generate a second password; Compare the generated second password with the first password to see if they are the same. If they are the same, the main server uses the user name and password to log in to the sub-server according to the IP address of the sub-system and configure the sub-server. If they are different, an error reminder is issued; The main server of the portal system calculates the IP address of the subsystem according to a set algorithm to generate a second password, including: The main server of the entry system calculates a first hash value corresponding to the IP address of the subsystem, queries whether there is a password corresponding to the first hash value in the password list stored in the main server, and generates a second password based on the query result; The password list stores hash values corresponding to multiple IP addresses, label attributes corresponding to the IP addresses, and passwords corresponding to each hash value, where the hash value is obtained by encrypting the IP address according to a hash algorithm; Verify the IP address corresponding to the first hash value based on the tag attribute; The main server of the portal system calculates a first hash value corresponding to the IP address of the subsystem, including: The main server of the entry system divides the IP address of the subsystem into 4 segments of decimal integers, adds 1 to the first and second segments of data, and stores the third and fourth segments of data in reverse order to obtain a first hash value.
5. A computer device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a system integration method based on HttpClient technology as described in any one of claims 1 to 3.
6. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute a system integration method based on HttpClient technology as described in any one of claims 1 to 3 when executed by a computer processor.
Citation Information
Patent Citations
System integration method based on HttpClient technique
CN102694850A
System login method and device and medium
CN116055149A