A method and system for processing an HTTP call address
By matching HTTP call addresses in a pre-defined data source instance pool, the problem of low efficiency in maintaining HTTP call addresses is solved, enabling dynamic acquisition and management, adapting to complex and ever-changing information system architectures, and improving processing efficiency.
Patent Information
- Application Number
- CN202310377864.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-07
AI Technical Summary
In existing technologies, the methods for maintaining HTTP call addresses are difficult to meet the dynamically changing operational needs of systems, resulting in low processing efficiency and an inability to adapt to complex and ever-changing information system architectures.
By acquiring the request message data to be processed, determining the call scenario information, and matching the execution instance data in the preset data source instance pool, the HTTP call address is dynamically obtained, supporting the dynamic expansion and management of multiple data source instances, including data source instance refresh and change monitoring.
It enables dynamic acquisition and management of HTTP call addresses, improves processing efficiency, meets the needs of increasingly diverse operating ecosystem scenarios, and supports real-time activation and dynamic expansion.
Smart Images

Figure CN116366624B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network communication, in particular to a HTTP call address processing method and system. BACKGROUND
[0002] At present, HTTP (Hyper Text Transfer Protocol, Hyper Text Transfer Protocol) is the most commonly used communication protocol in the industry online system. In communication calling, the acquisition of communication call address is an indispensable link.
[0003] In the prior art, the maintenance of HTTP call address in the industry generally adopts file configuration, and the scheme of loading configuration when the service starts. The acquisition mechanism of the call address is fixed. When the configuration needs to be changed or added, the configuration file needs to be manually modified and the service needs to be restarted to reload. If the logic of acquiring the call address changes, the business layer or communication layer code needs to be modified. With the transformation of the whole society from informatization to digitization, the information system architecture is becoming more and more complex and diversified. The interaction scenarios between systems are becoming more and more dynamic. The running ecological relationship between systems changes dynamically in running. The running mode cannot be completely determined in the design and deployment stage, which leads to the fact that the communication call address acquisition logic also needs to be dynamically and real-time changed with the running of the system. The traditional single file configuration call address restart service effective means has been more and more difficult to meet the actual needs of system running. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a HTTP call address processing method, system, electronic device and computer readable storage medium, which can realize the technical effect of improving the processing efficiency of HTTP call address.
[0005] In a first aspect, the embodiments of the present application provide a HTTP call address processing method, comprising:
[0006] acquiring to-be-processed request message data;
[0007] determining call scenario information according to the to-be-processed request message data;
[0008] matching in a preset data source instance pool according to the call scenario information to obtain execution instance data;
[0009] determining a HTTP call address according to the execution instance data, and performing HTTP communication calling based on a communication calling layer and the HTTP call address.
[0010] In the implementation process, the HTTP call address processing method determines call scenario information through to-be-processed request message data, and then matches corresponding execution instance data from a preset data source instance pool through the call scenario information, and completes HTTP call of the execution instance after determining the HTTP call address, wherein the preset data source instance pool includes multiple data source instances; therefore, the HTTP call address processing method can dynamically obtain the HTTP call address according to the call scenario, and can also dynamically expand the data source instances in the preset data source instance pool horizontally as the scenarios continue to increase, meet the increasingly rich running ecological scenario requirements, and achieve the technical effect of improving the processing efficiency of the HTTP call address.
[0011] Further, after the step of matching in the preset data source instance pool according to the call scenario information and obtaining the execution instance data, the method further includes:
[0012] According to the execution instance data, corresponding configuration data is read in the preset data source.
[0013] Further, the preset data source instance pool includes one or more of a database instance, a configuration file instance, a parameter injection instance, and a message injection instance.
[0014] Further, before the step of matching in the preset data source instance pool according to the call scenario information and obtaining the execution instance data, the method further includes:
[0015] A management operation is performed on the data source instances in the preset data source instance pool, and the management operation includes a data source instance refreshing operation and a data source instance change listening operation.
[0016] In the implementation process, the management operation is performed on the data source instances in the preset data source instance pool, so that for known scenarios, when the HTTP call address changes, the data source instance corresponding to the scenario can be found through the data source instance refreshing operation and the data source instance change listening operation, and the corresponding data source configuration is modified.
[0017] Further, the data source instance change listening operation is to listen to changes of the data source instances and their configuration contents, and obtain data source instance listening data.
[0018] The data source instance refreshing operation is to send the data source instance listening data to a data source instance refresher, and the data source instance refresher adds or reduces the data source instances in the preset data source instance pool according to the data source instance listening data, or dynamically refreshes the data source configuration of the data source instances in the preset data source instance pool.
[0019] Further, before the step of matching in the preset data source instance pool according to the calling scenario information to obtain the execution instance data, the method further comprises:
[0020] Obtaining a data source instance change event collected by a data source instance register, the data source instance change event comprising a change of a data source instance and a configuration change;
[0021] Sending the data source instance change event to a data source instance change listener, and dynamically changing an HTTP calling address of a data source instance in the preset data source instance pool through the data source instance change listener.
[0022] In the above implementation process, the data source instance register collects the data source instance change event, and the data source instance change listener dynamically changes the preset data source instance pool; thus, for a new scenario, when an existing data source instance does not meet the requirement, a new data source instance can be implemented according to the requirement, the new instance is registered through the data source instance register, after triggering the change event, the new instance is hot loaded to the preset data source instance pool through the data source instance change listener, the dynamic publishing of the instance is completed, and the business requirement is met.
[0023] In a second aspect, an HTTP calling address processing system is provided, comprising:
[0024] An obtaining module, configured to obtain to-be-processed request message data;
[0025] A calling scenario module, configured to determine calling scenario information according to the to-be-processed request message data;
[0026] An execution instance module, configured to match in a preset data source instance pool according to the calling scenario information to obtain execution instance data;
[0027] A calling module, configured to determine an HTTP calling address according to the execution instance data, and perform HTTP communication calling based on a communication calling layer and the HTTP calling address.
[0028] Further, the HTTP calling address processing system further comprises:
[0029] A configuration reading module, configured to read corresponding configuration data in a preset data source according to the execution instance data.
[0030] Further, the HTTP calling address processing system further comprises:
[0031] A management module, configured to perform a management operation on a data source instance in the preset data source instance pool, the management operation comprising a data source instance refreshing operation and a data source instance change listening operation.
[0032] Further, the processing system of the HTTP call address further comprises:
[0033] The registration change module is configured to: acquire a data source instance change event collected by the data source instance register, the data source instance change event comprising a change of the data source instance and a configuration change; and send the data source instance change event to a data source instance change listener, so as to dynamically change the HTTP call address of the data source instance in the preset data source instance pool through the data source instance change listener.
[0034] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the method according to any one of the first aspect when executing the computer program.
[0035] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores instructions, and the instructions, when running on a computer, cause the computer to execute the method according to any one of the first aspect.
[0036] In a fifth aspect, a computer program product is provided, and the computer program product, when running on a computer, causes the computer to execute the method according to any one of the first aspect.
[0037] Other features and advantages of the present application will be described in the following description and other parts, or some features and advantages can be known or determined without doubt from the description, or can be obtained by implementing the above-mentioned technologies disclosed in the present application.
[0038] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following will describe the preferred embodiments, and the detailed description will be given as follows with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0040] Figure 1 A flowchart of a HTTP call address processing method provided by the embodiments of the present application is shown in the figure;
[0041] Figure 2Another flowchart of the HTTP call address processing method provided by the embodiment of the present application is shown in the figure;
[0042] Figure 3 The framework diagram of the call address acquisition, call address setting, and communication calling provided by the embodiment of the present application is shown in the figure;
[0043] Figure 4 The structural block diagram of the HTTP call address processing system provided by the embodiment of the present application is shown in the figure;
[0044] Figure 5 The structural block diagram of the electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0046] It should be noted that similar reference numerals and letters indicate similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", and the like are only used for distinguishing description, and cannot be understood as indicating or implying relative importance.
[0047] The HTTP call address processing method, system, electronic device, and computer readable storage medium provided by the embodiments of the present application can be applied in the maintenance process of the HTTP call address. The HTTP call address processing method determines the call scenario information through the to-be-processed request message data, and then matches the corresponding execution instance data from the preset data source instance pool through the call scenario information, and completes the HTTP call of the execution instance after determining the HTTP call address, wherein the preset data source instance pool includes multiple data source instances. Therefore, the HTTP call address processing method can dynamically obtain the HTTP call address according to the call scenario, and can also dynamically expand the data source instances in the preset data source instance pool horizontally as the scenarios continue to increase, meet the increasingly rich running ecological scenario requirements, and achieve the technical effect of improving the processing efficiency of the HTTP call address.
[0048] Please refer to Figure 1 , Figure 1 The flowchart of the HTTP call address processing method provided by the embodiment of the present application is shown in the figure, and the HTTP call address processing method includes the following steps:
[0049] S100: Obtain to-be-processed request message data.
[0050] Exemplarily, the request message data sent by the external device can dynamically confirm the call scenario in real time.
[0051] S200: determining calling scene information according to the to-be-processed request message data;
[0052] S300: performing matching in the preset data source instance pool according to the calling scene information to obtain execution instance data.
[0053] Exemplarily, the preset data source instance pool includes multiple data source instances, and the execution instance of the calling address is matched and obtained from the preset data source instance pool according to the calling scene information, that is, according to a specific scene, so as to obtain the execution instance data.
[0054] S400: determining an HTTP calling address according to the execution instance data, and performing HTTP communication calling based on the communication calling layer and the HTTP calling address.
[0055] Exemplarily, the processing method of the HTTP calling address determines calling scene information through the to-be-processed request message data, and then matches corresponding execution instance data from the preset data source instance pool through the calling scene information, and completes HTTP calling of the execution instance after the HTTP calling address is determined, wherein the preset data source instance pool includes multiple data source instances; therefore, the processing method of the HTTP calling address can dynamically obtain the HTTP calling address according to the calling scene, and can also dynamically expand the data source instances in the preset data source instance pool horizontally as the scenes continue to increase, so as to meet the increasingly rich running ecological scene requirements and achieve the technical effect of improving the processing efficiency of the HTTP calling address.
[0056] Please refer to Figure 2 , Figure 2 Another flowchart example of the processing method of the HTTP calling address provided by the embodiment of the present application.
[0057] Exemplarily, after the step S300 of performing matching in the preset data source instance pool according to the calling scene information to obtain execution instance data, the method further includes:
[0058] S310: reading corresponding configuration data in the preset data source according to the execution instance data.
[0059] Exemplarily, according to the implementation rule of the execution instance data itself, the required configuration data can be read from the preset data source.
[0060] Exemplarily, the preset data source instance pool includes one or more of a database instance, a configuration file instance, a parameter injection instance, and a message injection instance.
[0061] Exemplarily, before the step S300 of performing matching in the preset data source instance pool according to the calling scene information to obtain execution instance data, the method further includes:
[0062] S210: Perform a management operation on the data source instance in the preset data source instance pool, and the management operation includes a data source instance refreshing operation and a data source instance change listening operation.
[0063] Exemplarily, by performing a management operation on the data source instance in the preset data source instance pool, for a known scenario, when the HTTP call address changes, the data source instance corresponding to the scenario can be found through the data source instance refreshing operation and the data source instance change listening operation, and the corresponding data source configuration is modified.
[0064] Exemplarily, the data source instance change listening operation is to listen to the change of the data source instance and the configuration content thereof, and obtain data source instance listening data.
[0065] The data source instance refreshing operation is to send the data source instance listening data to a data source instance refresher, and the data source instance refresher adds or reduces the data source instance in the preset data source instance pool according to the data source instance listening data, or dynamically refreshes the data source of the data source instance in the preset data source instance pool.
[0066] Exemplarily, before the step of S300: matching in the preset data source instance pool according to the call scenario information to obtain execution instance data, the method further includes:
[0067] S220: Obtain a data source instance change event collected by a data source instance register, and the data source instance change event includes a change of the data source instance and a configuration change;
[0068] S230: Send the data source instance change event to a data source instance change listener, and dynamically change the HTTP call address of the data source instance in the preset data source instance pool through the data source instance change listener.
[0069] Exemplarily, the data source instance change event is collected by the data source instance register, and the preset data source instance pool is dynamically changed by the data source instance change listener; thus, for a new scenario, when an existing data source instance does not meet the demand, a new data source instance can be implemented according to the demand, the new instance is registered into the preset data source instance pool through the data source instance register, after triggering the change event, the new instance is hot-loaded into the preset data source instance pool through the data source instance change listener, the dynamic publishing of the instance is completed, and the business demand is met.
[0070] See Figure 3 , Figure 3 The framework schematic diagram of the call address acquisition, the call address setting, and the communication calling provided by the embodiment of the application.
[0071] In some embodiments, the HTTP call address processing method provided by the embodiments of the present application divides the HTTP call scene into three stages of call address acquisition (call scene screening layer), call address setting, and communication call by fine-grained division, provides independent implementation modules according to the responsibilities of each stage, and provides a design scheme of real-time effectiveness of HTTP call address multi-data source; thereby, the HTTP call address processing method supports the design of dynamic real-time effectiveness of multi-scene data source, and specific step processes are as follows:
[0072] Step 1: The call scene screening layer dynamically confirms the call scene through the request message data input by the external device, and passes the scene to the data source adaptation layer;
[0073] Step 2: The data source adaptation layer matches the actual call address acquisition execution instance from the data source instance pool according to the specific scene, and the execution instance reads the required configuration data from the data source according to the implementation rules, the data source can be a database, a configuration file, an instance parameter injection, an apollo, and the like, and the application system can also implement other specific instances according to the data source adaptation layer interface according to the business scene;
[0074] Step 3: The data source instance management layer manages the data source instance, and the management responsibilities include data source instance refreshing and data source instance change listening. The responsibility of the data source instance change listening is to listen to the change of the data source instance and the configuration content, to pass the changed content to the data source instance refresher, and the data source instance refresher can add or reduce the data source instance according to the changed content, or dynamically refresh the data source instance configuration data source;
[0075] Step 4: The data source instance register is responsible for collecting data source instance change events, which include the change of the data source instance itself and the configuration change, the change action is triggered on the configuration page, forms a change event notification data source instance change listener, so as to complete the dynamic change and real-time effectiveness of the HTTP call address;
[0076] Step 5: After steps 1 to 4, the call address acquisition stage is completed, the call address is passed to the call address setting layer to complete the call address setting through the dynamic acquisition of the call address according to the scene, and finally the HTTP communication call is completed through the communication call layer.
[0077] Exemplarily, through the above HTTP call address processing method, after the application system is put into operation, the HTTP call address can be dynamically acquired according to the call scene, and the data source instance can be dynamically expanded horizontally as the scene increases, to meet the increasingly rich running ecological scene demand; the HTTP call address processing method at least includes the following beneficial effects;
[0078] 1. For known scenarios, when the HTTP call address changes, the corresponding data source instance can be found, its corresponding data source configuration can be modified, and the data source instance registrar can be triggered to achieve real-time dynamic effect.
[0079] 2. For new scenarios, when existing data source instances do not meet the requirements, a new data source instance can be implemented according to the interface provided by the data source adaptation layer. The new instance is registered through the data source instance registry. After the change event is triggered, the new instance is hot-loaded into the data source instance pool through the data source instance refresher, thus completing the dynamic release of the instance and meeting the business requirements.
[0080] Please see Figure 4 , Figure 4 The following is a structural block diagram of an HTTP call address processing system provided in an embodiment of this application. The HTTP call address processing system includes:
[0081] The acquisition module 100 is used to acquire the request message data to be processed;
[0082] The scenario module 200 is used to determine the scenario information based on the request message data to be processed.
[0083] The execution instance module 300 is used to match the execution instance data in the preset data source instance pool based on the call scenario information.
[0084] Module 400 is used to determine the HTTP call address based on the execution instance data, and to perform HTTP communication calls based on the communication call layer and the HTTP call address.
[0085] For example, the HTTP call address processing system also includes:
[0086] The configuration reading module is used to read the corresponding configuration data from the preset data source based on the execution instance data.
[0087] For example, the HTTP call address processing system also includes:
[0088] The management module is used to manage data source instances in the preset data source instance pool. Management operations include data source instance refresh operations and data source instance change monitoring operations.
[0089] For example, the HTTP call address processing system also includes:
[0090] The registration change module is configured to: acquire a data source instance change event collected by the data source instance register, the data source instance change event including a change of the data source instance and a configuration change; and send the data source instance change event to a data source instance change listener, so as to dynamically change an HTTP calling address of a data source instance in a preset data source instance pool through the data source instance change listener.
[0091] It should be noted that the processing system of the HTTP calling address provided in the embodiments of the present application is not limited to the above-mentioned method embodiments Figures 1 to 2 The method embodiments corresponding to the processing system of the HTTP calling address provided in the embodiments of the present application are shown in the above-mentioned method embodiments, and thus will not be described here again.
[0092] The present application also provides an electronic device, please refer to Figure 5 , Figure 5 The present application provides a structural block diagram of an electronic device. The electronic device can include a processor 510, a communication interface 520, a memory 530, and at least one communication bus 540. The communication bus 540 is used to realize the direct connection communication of the components. The communication interface 520 of the electronic device in the embodiments of the present application is used for signaling or data communication with other node devices. The processor 510 can be an integrated circuit chip with signal processing capability.
[0093] The processor 510 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a ready-to-program gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. It can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor 510 can also be any conventional processor.
[0094] The memory 530 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 530 stores computer readable instructions which, when executed by the processor 510, enable the electronic device to perform the above-mentioned Figures 1 to 3 The method embodiments relate to each step.
[0095] Optionally, the electronic device can further include a storage controller, an input / output unit.
[0096] The memory 530, the storage controller, the processor 510, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses 540. The processor 510 is configured to execute executable modules stored in the memory 530, such as software function modules or computer programs included in the electronic device.
[0097] The input / output unit is configured to provide a user with a creation task and create an optional time period or a preset execution time for the task to achieve user interaction with a server. The input / output unit can be, but is not limited to, a mouse, a keyboard, etc.
[0098] It can be understood that, Figure 5 The structure shown is only schematic, and the electronic device can include more or fewer components than those shown in the figures, or have a different configuration from that shown in the figures. Figure 5 The components shown in the figures can be implemented in hardware, software, or a combination thereof. Figure 5 The components shown in the figures can be implemented in hardware, software, or a combination thereof. Figure 5 The components shown in the figures can be implemented in hardware, software, or a combination thereof.
[0099] The embodiments of the present application also provide a storage medium, which stores instructions. When the instructions are run on a computer, the computer program is executed by a processor to implement the method of the method embodiments. To avoid repetition, this will not be repeated here.
[0100] The present application also provides a computer program product, which, when run on a computer, causes the computer to execute the method of the method embodiments.
[0101] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other means. The apparatus embodiments described above are only illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0102] In addition, the functional modules in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0103] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application 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 for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0104] The above merely provides an example of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and thus, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.
[0105] The above merely provides an example of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and thus, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.
[0106] It should be noted that the relational terms herein such as first and second and the like are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A method for processing HTTP call addresses, characterized in that, include: Obtain the data of the request message to be processed; Determine the invocation scenario information based on the pending request message data; Based on the invocation scenario information, the execution instance data is obtained by matching within a preset data source instance pool. The HTTP call address is determined based on the execution instance data, and an HTTP communication call is performed based on the communication call layer and the HTTP call address. Before the step of matching in a preset data source instance pool based on the invocation scenario information to obtain execution instance data, the method further includes: The management operations are performed on the data source instances in the preset data source instance pool. The management operations include data source instance refresh operations and data source instance change monitoring operations. The data source instance change monitoring operation involves monitoring changes to the data source instance and its configuration content to obtain data source instance monitoring data. The data source instance refresh operation involves sending the data source instance monitoring data to the data source instance refresher. The data source instance refresher then adds or removes data source instances in the preset data source instance pool based on the data source instance monitoring data, or dynamically refreshes the data source configuration of the data source instances in the preset data source instance pool.
2. The method for processing HTTP call addresses according to claim 1, characterized in that, After the step of matching the execution instance data in the preset data source instance pool based on the invocation scenario information, the method further includes: Based on the execution instance data, the corresponding configuration data is read from the preset data source.
3. The method for processing HTTP call addresses according to claim 1 or 2, characterized in that, The preset data source instance pool includes one or more of the following: database instance, configuration file instance, parameter injection instance, and message injection instance.
4. The method for processing HTTP call addresses according to claim 1, characterized in that, Before the step of matching in a preset data source instance pool based on the invocation scenario information to obtain execution instance data, the method further includes: Obtain data source instance change events collected by the data source instance registrar, including changes to the data source instance and configuration changes; The data source instance change event is sent to the data source instance change listener, and the HTTP call address of the data source instance in the preset data source instance pool is dynamically changed through the data source instance change listener.
5. A system for processing HTTP call addresses, characterized in that, include: The acquisition module is used to acquire request message data to be processed; The scenario invocation module is used to determine scenario invocation information based on the pending request message data; The execution instance module is used to match the execution instance data in a preset data source instance pool based on the invocation scenario information. The calling module is used to determine the HTTP call address based on the execution instance data, and to perform HTTP communication calls based on the communication call layer and the HTTP call address; The management module is used to manage data source instances in the preset data source instance pool. The management operations include data source instance refresh operations and data source instance change monitoring operations. The data source instance change monitoring operation involves monitoring changes to the data source instance and its configuration content to obtain data source instance monitoring data. The data source instance refresh operation involves sending the data source instance monitoring data to the data source instance refresher. The data source instance refresher then adds or removes data source instances in the preset data source instance pool based on the data source instance monitoring data, or dynamically refreshes the data source configuration of the data source instances in the preset data source instance pool.
6. The HTTP call address processing system according to claim 5, characterized in that, The processing system also includes: The configuration reading module is used to read the corresponding configuration data from the preset data source based on the execution instance data.
7. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method for processing an HTTP call address as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the HTTP call address processing method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data source dynamic configuration method and device, computer equipment and storage medium
CN110764814A