Business proxy method and device, medium and program product
By using configuration information to interact with the target system in the proxy server, the problem of duplicate construction of the proxy system between the 2B system and the 2C system is solved, and flexible and efficient business agents are realized, reducing costs and improving the reliability and security of the system.
Patent Information
- Application Number
- CN202510515554.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the business agency method between the enterprise-level user system (2B system) and the consumer-level user system (2C system) has led to the repeated construction of multiple proxy systems, resulting in system redundancy and waste of development and deployment resources.
By obtaining the business information of the target service in the proxy server, using the configuration information including initiating call information and calling processing information, the interaction with the second target system is achieved, and the service output parameters are obtained and feedback, so as to avoid duplicate construction of the proxy system and optimize the business agent architecture.
Reduces system redundancy, reduces development and deployment costs, improves the flexibility and efficiency of business agents, and ensures the reliability and security of business agent processes.
Smart Images

Figure CN120378483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a service proxy method, device, medium, and program product. Background Art
[0002] Many systems for enterprise-level users (To-Business, hereinafter referred to as 2B) have a high security level and cannot be directly opened to systems for consumers (To-Customer, hereinafter referred to as 2C). In such a scenario, a proxy system is required to proxy the 2B system. The proxy system can not only well protect the security of the 2B system but also facilitate the development of various services in the 2C system.
[0003] In the related art, a proxy system is built for each individual service function, and multiple proxy systems need to be repeatedly built for multiple service functions. The proxy systems are opened for 2C systems of different downstream enterprises to call, and the 2C systems then implement various services for ordinary users.
[0004] However, in the above method, multiple proxy systems need to be built for multiple service functions. These proxy systems have similar functions and system redundancy, and bring repeated access costs to downstream enterprises accessing the proxy systems. It increases the construction costs of all participating parties and causes waste of development and deployment resources. Summary of the Invention
[0005] The present invention provides a service proxy method, device, medium, and program product to solve the technical problem of waste of development and deployment resources caused by the service proxy method in the related art.
[0006] According to one aspect of the present invention, there is provided a service proxy method applied to a proxy server. The method includes:
[0007] Obtaining service information of a target service sent by a first target system; wherein the service information includes service identification information and service input parameters;
[0008] Obtaining configuration information of the target service according to the service identification information; wherein the configuration information includes initiation call information and call processing information, the initiation call information is used to indicate the address information of a second target system corresponding to the service identification information, and the call processing information is used to characterize the feedback manner when the second target system feeds back service output parameters, and the service output parameters correspond to the service input parameters;
[0009] Sending the call processing information and the service input parameters to the second target system according to the initiation call information;
[0010] Receiving the service output parameters fed back by the second target system according to the call processing information;
[0011] Send the service output parameters to the first target system.
[0012] According to another aspect of the present invention, a service proxy device is provided, which is arranged in a proxy server. The device includes:
[0013] A first acquisition module, configured to acquire service information of a target service sent by a first target system; wherein, the service information includes: service identification information and service input parameters;
[0014] A second acquisition module, configured to acquire configuration information of the target service according to the service identification information; wherein, the configuration information includes initiation call information and call processing information, the initiation call information is used to indicate the address information of a second target system corresponding to the service identification information, and the call processing information is used to characterize the feedback manner when the second target system feeds back service output parameters, and the service output parameters correspond to the service input parameters;
[0015] A first sending module, configured to send the call processing information and the service input parameters to the second target system according to the initiation call information;
[0016] A receiving module, configured to receive the service output parameters fed back by the second target system according to the call processing information;
[0017] A second sending module, configured to send the service output parameters to the first target system.
[0018] According to another aspect of the present invention, an electronic device is provided. The electronic device includes:
[0019] At least one processor; and
[0020] A memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor can execute the service proxy method according to any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is used to be executed by a processor, it implements the service proxy method according to any embodiment of the present invention.
[0023] According to another aspect of the present invention, there is provided a computer program product, including a computer program which, when executed by a processor, implements the service agent method according to any embodiment of the present invention.
[0024] The technical solution of the embodiment of the present invention includes: obtaining service information of a target service sent by a first target system, where the service information includes service identification information and service input parameters; obtaining configuration information of the target service according to the service identification information, where the configuration information includes initiation call information and call processing information, the initiation call information is used to indicate the address information of a second target system corresponding to the service identification information, the call processing information is used to characterize the feedback manner when the second target system feeds back service output parameters, and the service output parameters correspond to the service input parameters; sending the call processing information and the service input parameters to the second target system according to the initiation call information; receiving the service output parameters fed back by the second target system according to the call processing information; and sending the service output parameters to the first target system. This service agent method has the following technical effects: on the one hand, through the configuration information of the target service, this service agent method realizes obtaining service output parameters from the second target system and feeding them back to the first target system, and flexibly agents different services in a configuration-based manner, without the need to repeatedly build different agent systems, optimizing the service agent architecture, reducing system redundancy. Downstream enterprises do not need to repeatedly access different agent systems, but only need to access the proxy server once to obtain service output parameters using this service agent method, reducing the construction costs of all participating parties, avoiding waste of development and deployment resources, and at the same time, improving the flexibility of the service agent process; on the other hand, by configuring the initiation call information and call processing information of the target service, this service agent method can efficiently and accurately obtain service output parameters from the second target system, improving the efficiency and reliability of the service agent.
[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0027] Figure 1 is a schematic diagram of an application scenario of an agent system in the related art;
[0028] Figure 2 It is a schematic diagram of the application scenario of the proxy system provided by the embodiment of the present invention;
[0029] Figure 3 It is a flowchart of a service proxy method provided by the embodiment of the present invention;
[0030] Figure 4 It is a schematic diagram of information interaction of the service proxy method provided by the embodiment of the present invention;
[0031] Figure 5 It is a flowchart of another service proxy method provided by the embodiment of the present invention;
[0032] Figure 6 It is a schematic structural diagram of a service proxy device provided by the embodiment of the present invention;
[0033] Figure 7 It is a schematic structural diagram of an electronic device for implementing the service proxy method of the embodiment of the present invention. Detailed implementation manners
[0034] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "comprising" and any deformation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the embodiments of the present invention all comply with the relevant regulations of national laws and regulations.
[0036] The proxy system involved in this embodiment will be described below. Considering factors such as security, the functions of the 2B system (referred to as System 1) cannot be directly exposed to the 2C system, but the services of System 1 are proxied through System 2. In this process, as a proxy system, System 2 does not undertake business and needs to be exposed to the 2C system for calling. System 2 is the proxy system of System 1.
[0037] Figure 1 It is a schematic diagram of the application scenario of the proxy system in the related art. As Figure 1 shown, in the related art, the 2B system B1 is used to implement the business function A, and the 2B system B2 is used to implement the business function B. For the business function A, the proxy system A1 is built. For the business function B, the proxy system A2 is built. The 2C systems C1, C2, and C3 are connected to the proxy system A1 to achieve interaction with the 2B system B1 through the proxy system A1 under the trigger of users such as ordinary user A, ordinary user B, or ordinary user C. The 2C systems C1, C2, and C3 are connected to the proxy system A2 to achieve interaction with the 2B system B2 through the proxy system A2 under the trigger of users such as ordinary user A, ordinary user B, or ordinary user C.
[0038] However, in this implementation method, on the one hand, the functions of the proxy system A1 and the proxy system B1 are similar, resulting in system redundancy. On the other hand, this method brings duplicate access costs to the downstream 2C systems, thus causing waste of development and deployment resources.
[0039] The proxy system in this embodiment uses a platform-based design solution to solve the problem of duplicate construction of proxy systems in the related art, optimize the system architecture, reduce system redundancy, improve system flexibility, reduce the construction costs of all parties involved, and enhance the user experience of the users of the proxy system. Figure 2 It is a schematic diagram of the application scenario of the proxy system provided by the embodiment of the present invention. The proxy system provided by this embodiment runs in the proxy server. As Figure 2 shown, the proxy system provided by this embodiment can be connected to the 2B systems B1, B2,..., Bn, etc., and can also be connected to the 2C systems C1, C2, C3,..., Cm, etc. Each 2C system realizes interaction with each 2B system through this proxy system under the trigger of users such as ordinary user A, ordinary user B, or ordinary user C. This proxy system is used to implement the business proxy method provided by this embodiment. In the business proxy method provided by this embodiment, according to the main requirements of the proxy system, the general logic is extracted and abstracted, and a standardized processing process is formulated. According to the standard process, the business lines are sorted out from the user perspective, and each business line is configured to meet the customized requirements of different business lines.
[0040] The business proxy method, device, medium, program product, and their technical effects provided by this embodiment will be introduced in detail below.
[0041] Figure 3 It is a flowchart of a business proxy method provided by an embodiment of the present invention. This embodiment is applicable to a scenario where a proxy system transfers business parameters between a first system and a second system. This method can be executed by a business proxy device, which can be implemented in the form of hardware and / or software. The business proxy device can be configured in an electronic device, for example, in a proxy server. The proxy server in this embodiment can be several proxy servers in a proxy server cluster. A proxy system runs in the proxy server, and the business proxy method provided by this embodiment is implemented through the proxy system. As Figure 3 shown, the method includes the following steps 301 to 305.
[0042] Step 301: Obtain the business information of the target business sent by the first target system.
[0043] Among them, the business information includes: business identification information and business input parameters.
[0044] The first target system in this embodiment refers to a system for implementing the target business. Optionally, the first target system can be a 2C system. In the process of implementing the target business, the first target system needs to interact with the second target system through a proxy server. Specifically, the first target system requests the business output parameters corresponding to the business input parameters from the second target system through the proxy server. The first target system sends the business information of the target business to the proxy server to request the business output parameters. The proxy server obtains the business information of the target business sent by the first target system.
[0045] The business identification information in this embodiment is used to uniquely represent the target business.
[0046] The business input parameters in this embodiment are parameters determined by the first target system according to actual business needs. Optionally, the business input parameters in this embodiment can be an account identifier, and the business output parameters can be the consumption details corresponding to the account identifier.
[0047] It can be understood that in step 301, the business information of the target business sent by the device running the first target system is obtained.
[0048] Step 302: Obtain the configuration information of the target business according to the business identification information.
[0049] Among them, the configuration information includes the call initiation information and the call processing information. The call initiation information is used to indicate the address information of the second target system corresponding to the service identification information. The call processing information is used to characterize the feedback method when the second target system feeds back the service output parameters. The service output parameters correspond to the service input parameters.
[0050] In this embodiment, different configuration information is pre-configured for different services. The configuration information in this embodiment includes two aspects: call initiation information and call processing information. Among them, the call initiation information is used to indicate the address information of the second target system corresponding to the service identification information. In other words, it is equivalent to indicating the destination for sending the service input parameters. The call processing information is used to characterize the feedback method when the second target system feeds back the service output parameters. In other words, it is equivalent to indicating how the second target system feeds back the service output parameters to the proxy server.
[0051] After obtaining the configuration information of the target service, the interaction between the proxy server and the second target system can be realized.
[0052] It should be noted that the second target system in this embodiment can be a 2B system. Of course, the first target system in this embodiment is not limited to a 2C system, and the second target system is not limited to a 2B system. As long as two systems that cannot directly interact can use the service proxy method provided in this embodiment to achieve interaction.
[0053] Step 303: Send the call processing information and the service input parameters to the second target system according to the call initiation information.
[0054] In the first implementation manner, the call processing information is used to characterize that the second target system feeds back the service output parameters in real time. In this implementation manner, according to the address information of the second target system indicated by the call initiation information, the call processing information and the service input parameters are sent to the second target system.
[0055] In this implementation manner, after receiving the call processing information and the service input parameters, the second target system feeds back the service output parameters corresponding to the service input parameters to the proxy server in real time. The real time in this embodiment means that after receiving the call processing information and the service input parameters, the second target system feeds back the service output parameters to the proxy server within a time interval less than or equal to the preset time threshold.
[0056] In the second implementation manner, the call processing information is used to represent that the second target system feeds back service output parameters through a callback function. In this implementation manner, the call processing information includes: the callback function and the address information of the proxy server. In this implementation manner, according to the address information of the second target system indicated by the call initiation information, the callback function, the address information of the proxy server, and the service input parameters are sent to the second target system.
[0057] In this implementation manner, after receiving the callback function, the address information of the proxy server, and the service input parameters, the second target system, after a time interval greater than the preset time threshold, feeds back the service output parameters corresponding to the service input parameters to the proxy server through the callback function based on the address information of the proxy server.
[0058] The above two implementation manners can flexibly implement the interaction with the second target system based on different call processing information, expanding the application scenarios of this service proxy method.
[0059] Optionally, in a scenario, the number of second target systems is multiple. In this scenario, the configuration information includes: the call initiation information and the call processing information corresponding to each second target system. The configuration information further includes: the service input sub-parameters corresponding to each second target system in the service input parameters.
[0060] Based on this scenario, the implementation manner of step 303 includes: for each second target system, according to the call initiation information corresponding to the second target system, the corresponding call processing information and the service input sub-parameters are sent to the second target system. In this implementation manner, the proxy server can implement service proxy between the first target system and multiple second target systems according to actual service requirements, meeting the actual service requirements and improving the flexibility of the service proxy method.
[0061] It can be understood that in this embodiment, the call processing information and the service input parameters are sent to the device running the second target system according to the call initiation information.
[0062] Step 304: Receive the service output parameters fed back by the second target system according to the call processing information.
[0063] In step 304, for the first implementation manner in step 303, receive the service output parameters fed back by the second target system in real time.
[0064] In step 304, for the second implementation manner in step 303, receive the service output parameters fed back by the second target system through the callback function based on the address information of the proxy server.
[0065] It should be noted that in step 304, the service output parameters fed back by the device running the second target system according to the call processing information are received.
[0066] Step 305: Send the service output parameters to the first target system.
[0067] After obtaining the service output parameters, the proxy server can send the service output parameters to the first target system. After obtaining the service output parameters, the first target system can use the service output parameters for subsequent service processing.
[0068] Corresponding to the scenario where there are multiple second target systems in step 303, in step 304, receive the service output sub-parameters corresponding to the service output sub-parameters fed back by each second target system according to the call processing information. In step 305, send each service output sub-parameter to the first target system.
[0069] Figure 4 It is a schematic diagram of information interaction of the service proxy method provided by the embodiments of the present invention. As Figure 4 shown, the service proxy method includes the following steps.
[0070] Step 401: The first target system sends the service information of the target service to the proxy server.
[0071] Step 402: The proxy server receives the service information of the target service sent by the first target system.
[0072] Step 403: The proxy server obtains the configuration information of the target service according to the service identification information.
[0073] Step 404: The proxy server sends the call processing information and service input parameters to the second target system according to the initiated call information.
[0074] Step 405: The second target system receives the call processing information and service input parameters.
[0075] Step 406: The second target system obtains the service output parameters corresponding to the service input parameters.
[0076] Step 407: The second target system feeds back the service output parameters to the proxy server according to the call processing information.
[0077] Step 408: The proxy server receives the service output parameters fed back by the second target system according to the call processing information.
[0078] Step 409: The proxy server sends the service output parameters to the first target system.
[0079] Step 410: The first target system receives the service output parameters sent by the proxy server.
[0080] Optionally, in steps 401 to 410, the target service may be corporate account opening. The first target system may be a system for implementing corporate account opening. The service input parameter may be a corporate identifier. The second target system may be a corporate information system. The service output parameter may be the information of the enterprise corresponding to the corporate identifier.
[0081] Optionally, in steps 401 to 410, the target service may be individual account opening. The first target system may be a system for implementing individual account opening. The service input parameter may be an individual identifier. The second target system may be an individual identity system. The service output parameter may be the identity information corresponding to the individual identifier.
[0082] It can be seen that based on this service proxy method, on the one hand, there is no need to repeat the construction of the proxy system, and multiple service lines can be serviced, reducing the development cost and operation and maintenance cost. On the other hand, for each first system, only one access to the proxy server is required to use multiple service functions, which is more convenient. On the other hand, through the configuration design, for newly added services in the future, only by modifying the configuration information of the service, the enabling of the new service line can be completed. Similarly, to close the service, only the configuration information of the service needs to be changed, without physical disconnection, which is highly flexible.
[0083] The service proxy method provided in this embodiment includes: obtaining service information of a target service sent by a first target system, where the service information includes service identification information and service input parameters; obtaining configuration information of the target service according to the service identification information, where the configuration information includes initiation call information and call processing information, the initiation call information is used to indicate the address information of a second target system corresponding to the service identification information, and the call processing information is used to characterize the feedback method when the second target system feeds back service output parameters, and the service output parameters correspond to the service input parameters; sending the call processing information and the service input parameters to the second target system according to the initiation call information; receiving the service output parameters fed back by the second target system according to the call processing information; and sending the service output parameters to the first target system. The service proxy method has the following technical effects: on the one hand, through the configuration information of the target service, the service proxy method realizes obtaining service output parameters from the second target system and feeding them back to the first target system, and flexibly proxies different services in a configured manner, without the need to repeatedly build different proxy systems, optimizing the service proxy architecture, reducing system redundancy. Downstream enterprises do not need to repeatedly access different proxy systems, but only need to access the proxy server once to obtain service output parameters using this service proxy method, reducing the construction costs of all participating parties, avoiding waste of development and deployment resources, and at the same time, improving the flexibility of the service proxy process; on the other hand, by configuring the initiation call information and call processing information of the target service, the service proxy method can efficiently and accurately obtain service output parameters from the second target system, improving the efficiency and reliability of service proxy.
[0084] Figure 5 It is a flowchart of another service proxy method provided by an embodiment of the present invention. The service proxy method provided in this embodiment further elaborates on the implementation manner in which the configuration information further includes other content based on the embodiments and various optional implementation manners shown in Figure 3 the embodiments and various optional implementation manners. As Figure 5 shown, the service proxy method provided in this embodiment includes the following steps 501 to 509.
[0085] Step 501: Obtain service information of a target service sent by a first target system.
[0086] Wherein, the service information includes service identification information and service input parameters.
[0087] The implementation process and technical principle of step 501 are similar to those of step 301, and will not be elaborated here.
[0088] Step 502: Obtain configuration information of the target service according to the service identification information.
[0089] Among them, the configuration information includes call initiation information and call processing information. The call initiation information is used to indicate the address information of the second target system corresponding to the service identification information. The call processing information is used to characterize the feedback method when the second target system feeds back service output parameters. The service output parameters correspond to the service input parameters.
[0090] In the process of service proxy, the standard process generally includes at least one of the following operations: traffic limiting, proxy server authentication, parameter verification, proxy server signature addition, etc. In this embodiment, at least one operation in the above standard process and the corresponding configuration information can be flexibly configured according to the actual requirements of the service. The following are several implementation manners.
[0091] In the first implementation manner, the configuration information further includes traffic limiting rule information. Before sending the call processing information and the service input parameters to the second target system according to the call initiation information, the service proxy method further includes the following steps: determining whether to limit the traffic of the target service according to the traffic limiting rule information; if it is determined not to limit the traffic of the target service, then determining to execute the step of "sending the call processing information and the service input parameters to the second target system according to the call initiation information".
[0092] This implementation manner can achieve traffic limiting, avoid a certain service from frequently sending service information, resulting in the proxy server being unable to respond to other services, avoid the proxy server from being overloaded, and ensure the service quality of each service.
[0093] In the second implementation manner, the configuration information further includes first authentication rule information, and the service information further includes first information to be authenticated. Before sending the call processing information and the service input parameters to the second target system according to the call initiation information, the service proxy method further includes the following steps: authenticating the first information to be authenticated according to the first authentication rule information; if the authentication of the first information to be authenticated passes, then determining to execute the step of "sending the call processing information and the service input parameters to the second target system according to the call initiation information".
[0094] This implementation manner can verify the identity of the first target system, ensure that the first target system has the right to access the proxy server and the second target server, and guarantee the security of the service proxy process. At the same time, this implementation manner can verify the integrity and correctness of the service information, ensure that the service information has not been tampered with, and improve the reliability of the service proxy process.
[0095] In the third implementation manner, the configuration information further includes parameter verification rule information, which is used to indicate verifying the attributes of the service input parameters. Before sending the call processing information and the service input parameters to the second target system according to the initiated call information, the service proxy method further includes the following steps: verifying the attributes of the service input parameters according to the parameter verification rule information; if the verification of the attributes of the service input parameters passes, determining to execute the step of "sending the call processing information and the service input parameters to the second target system according to the initiated call information".
[0096] This implementation manner avoids the problem that the second target system cannot correctly feedback the service output parameters due to incorrect attributes of the service input parameters, and improves the reliability of the service proxy process.
[0097] In the fourth implementation manner, the configuration information further includes second authentication rule information. Before sending the call processing information and the service input parameters to the second target system according to the initiated call information, the method further includes the following operations: generating second information to be authenticated according to the second authentication rule information. Correspondingly, sending the call processing information, the service input parameters and the second information to be authenticated to the second target system according to the initiated call information includes: sending the call processing information, the service input parameters and the second information to be authenticated to the second target system according to the initiated call information. Wherein, after authenticating the second information to be authenticated according to the second authentication rule information, the second target system sends the service output parameters.
[0098] This implementation manner can ensure the security and correctness of the interaction between the second target system and the proxy server, and improve the reliability of the service proxy process.
[0099] In this embodiment, on the basis that the configuration information includes the initiated call information and the call processing information, at least one of the above four implementation manners can be combined to implement flexible service proxy according to the actual business requirements. Through configuration design, for newly added services in the future, only the configuration information needs to be modified through the management end to complete the enabling of the new service line; similarly, to close a service, only the configuration information needs to be changed, without physical offline. The system flexibility is improved through dynamic configuration, and the development and operation and maintenance costs are reduced.
[0100] In the actual development process, the state machine management can be carried out for the steps of each of the above implementation manners to manage different state transitions.
[0101] For example, any one of the first implementation manner, the second implementation manner, the third implementation manner and the fourth implementation manner can be combined.
[0102] For another example, the first implementation manner and the second implementation manner can be combined. That is, the configuration information includes call initiation information, call processing information, traffic limiting rule information, and first authentication rule information. The service information further includes first information to be authenticated. In this example, it can be first determined whether traffic is limited. When it is determined that traffic is not limited, the first information to be authenticated is authenticated according to the first authentication rule information. When the authentication of the first information to be authenticated passes, the step of "sending the call processing information and service input parameters to the second target system according to the call initiation information" is determined to be executed.
[0103] For yet another example, the first implementation manner and the third implementation manner can be combined. That is, the configuration information includes call initiation information, call processing information, traffic limiting rule information, and parameter verification rule information. In this example, it can be first determined whether traffic is limited. When it is determined that traffic is not limited, the attributes of the service input parameters are verified according to the parameter verification rule information. If the verification of the attributes of the service input parameters passes, the step of "sending the call processing information and service input parameters to the second target system according to the call initiation information" is determined to be executed.
[0104] For still another example, the second implementation manner and the third implementation manner can be combined. That is, the configuration information includes call initiation information, call processing information, first authentication rule information, and parameter verification rule information. The service information further includes first information to be authenticated. In this example, the first information to be authenticated is authenticated according to the first authentication rule information. If the authentication of the first information to be authenticated passes, the attributes of the service input parameters are verified according to the parameter verification rule information. If the verification of the attributes of the service input parameters passes, the step of "sending the call processing information and service input parameters to the second target system according to the call initiation information" is determined to be executed.
[0105] For another example, the first implementation manner and the fourth implementation manner can be combined. That is, the configuration information includes call initiation information, call processing information, traffic limiting rule information, first authentication rule information, parameter verification rule information, and second authentication rule information. The service information further includes first information to be authenticated. In this implementation manner, the processes of performing traffic limiting judgment according to the traffic limiting rule information, authenticating the first information to be authenticated according to the first authentication rule information, and verifying the attributes of the service input parameters according to the parameter verification rule information can be executed in any order. Exemplarily, traffic limiting judgment can be performed first. When it is determined that there is no traffic limiting, authentication is performed. When the authentication passes, the attributes of the service input parameters are judged. It is also possible to perform authentication first. When the authentication passes, traffic limiting judgment is performed. When it is determined that there is no traffic limiting, the attributes of the service input parameters are judged. In the subsequent steps of this embodiment, the service proxy method provided in this embodiment will be described in detail by taking the order of first performing traffic limiting judgment, performing authentication when it is determined that there is no traffic limiting, and judging the attributes of the service input parameters when the authentication passes as an example.
[0106] In steps 503 to 509, the configuration information includes: call initiation information, call processing information, traffic limiting rule information, first authentication rule information, parameter verification rule information, and second authentication rule information. The service information includes: service identification information, service input parameters, and first information to be authenticated.
[0107] Optionally, the configuration information of the service in this embodiment can be stored in a database. Exemplarily, the database in this embodiment can be a relational database. After receiving the service information, the proxy server searches for the configuration information of the target service in the database.
[0108] Step 503: Determine whether to perform traffic limiting on the target service according to the traffic limiting rule information.
[0109] In this embodiment, traffic limiting is mainly implemented by counting. It is possible to determine whether to perform traffic limiting on the target service based on algorithms such as token bucket algorithm, leaky bucket algorithm, or sliding window, as well as the traffic limiting rule information.
[0110] Optionally, the traffic limiting rule information is used to indicate that within a preset duration, if the number of service information of the target service obtained is greater than the quantity threshold, traffic limiting is performed on the target service. The traffic limiting rule information includes the preset duration and the quantity threshold. Correspondingly, the implementation manner of step 503 can include: after obtaining the service information, updating the quantity of the service information to obtain the updated quantity of the service information; if the updated quantity is greater than the quantity threshold, determining to perform traffic limiting on the target service; if the updated quantity is less than or equal to the quantity threshold, determining not to perform traffic limiting on the target service.
[0111] Step 504: If it is determined not to throttle the target service, authenticate the first authentication information according to the first authentication rule information.
[0112] In this embodiment, when it is determined not to throttle the target service, authenticate the first authentication information according to the first authentication rule information.
[0113] The first authentication rule information in this embodiment is used to represent the authentication method. Optionally, the authentication method in this embodiment may include at least one of the following: account password authentication and verification signature, etc.
[0114] When the first authentication rule information indicates that the authentication method is account password authentication, the first authentication information may be the account and password sent by the first target system. The process of authenticating the first authentication information is to verify the account and password sent by the first target system to determine whether the account password is correct and matched. When it is determined that the account password is correct and matched, it is determined that the first authentication information passes the authentication. When it is determined that the account password is incorrect or unmatched, it is determined that the first authentication information fails the authentication.
[0115] When the first authentication rule information indicates that the authentication method is verification signature, the first authentication information may be the signature sent by the first target system. The process of authenticating the first authentication information is to verify the signature sent by the first target system to determine whether the signature is correct. When it is determined that the signature sent by the first target system is correct, it is determined that the first authentication information passes the authentication. When it is determined that the signature sent by the first target system is incorrect, it is determined that the first authentication information fails the authentication.
[0116] Optionally, if it is determined to throttle the target service, execute step 511.
[0117] Step 505: If the first authentication information passes the authentication, verify the attributes of the service input parameters according to the parameter verification rule information.
[0118] Among them, the parameter verification rule information is used to indicate verifying the attributes of the service input parameters.
[0119] In this embodiment, when the first authentication information passes the authentication, verify the attributes of the service input parameters according to the parameter verification rule information.
[0120] The attributes of the service input parameters in this embodiment may include at least one of the following: the number of characters of the service input parameters and the type of the service input parameters, etc.
[0121] If it is determined that the attribute of the service input parameter matches the attribute indicated in the parameter verification rule information, it is determined that the attribute verification of the service input parameter passes. If it is determined that the attribute of the service input parameter does not match the attribute indicated in the parameter verification rule information, it is determined that the attribute verification of the service input parameter fails.
[0122] For example, according to the actual business requirements, the service input parameter should be a numerical value, and the parameter verification rule information is used to indicate whether to verify that the type of the service input parameter is a number. If the type of the service input parameter is a number, it is determined that the attribute verification of the service input parameter passes. If the type of the service input parameter is not a number, it is determined that the attribute verification of the service input parameter fails.
[0123] Optionally, if the authentication of the first authentication information fails, step 511 is executed.
[0124] Step 506: If the attribute verification of the service input parameter passes, it is determined to execute the steps of step 507.
[0125] In this embodiment, after the attribute verification of the service input parameter passes, in order to ensure the security between proxy servers, step 507 is executed.
[0126] Optionally, if the attribute verification of the service input parameter fails, step 511 is executed.
[0127] Step 507: Generate second authentication information according to the second authentication rule information.
[0128] The second authentication rule information in this embodiment is used to indicate the authentication method of the second target system.
[0129] When the second authentication rule information indicates that the authentication method is account password authentication, the second authentication information includes an account and a password.
[0130] When the second authentication rule information indicates that the authentication method is signature verification, the second authentication information includes the signature generated by the proxy server.
[0131] When the second authentication rule information indicates that the authentication methods are account password authentication and signature verification, the second authentication information includes an account, a password, and the signature generated by the proxy server.
[0132] Step 508: Send call processing information, service input parameters, and second authentication information to the second target system according to the initiated call information.
[0133] Among them, after the second target system authenticates the second authentication information according to the second authentication rule information and passes the authentication, it sends service output parameters.
[0134] Step 508 is similar to step 303, except that in step 508, in addition to sending the call processing information and the service input parameters to the second target system, the second authentication information to be authenticated is also sent to the second target system.
[0135] After receiving the call processing information, the service input parameters, and the second authentication information to be authenticated, the second target system authenticates the second authentication information to be authenticated according to the second authentication rule information. After the authentication is passed, the service output parameters are fed back according to the call processing information.
[0136] Optionally, if the second target system fails to authenticate the second authentication information to be authenticated according to the second authentication rule information, it feeds back the parameter acquisition failure information to the proxy server.
[0137] Step 509: Receive the service output parameters fed back by the second target system according to the call processing information.
[0138] Step 510: Send the service output parameters to the first target system.
[0139] The implementation processes and technical principles of step 509 and step 304, and step 510 and step 305 are similar, and will not be elaborated here.
[0140] Step 511: Determine that the service proxy fails.
[0141] Optionally, in step 511, the proxy server may feed back the service proxy failure information to the first target system. The service proxy failure information may include a failure code for indicating the cause of the failure.
[0142] In the service proxy method provided in this embodiment, first, the flow limiting judgment is performed according to the flow limiting rule information. When it is determined that there is no flow limiting, the first authentication information to be authenticated is authenticated according to the first authentication rule information. When the authentication is passed, the attributes of the service input parameters are verified according to the parameter verification rule information. When the attributes of the service input parameters pass the verification, the second authentication information to be authenticated is generated according to the second authentication rule information. According to the call initiation information, the call processing information, the service input parameters, and the second authentication information to be authenticated are sent to the second target system. The flow limiting rule information, the first authentication rule information, the parameter verification rule information, and the second authentication rule information can be flexibly configured, which improves the flexibility of the service proxy process. At the same time, the security, accuracy, and reliability of the service proxy process are ensured.
[0143] Figure 6 It is a schematic structural diagram of a service proxy device provided in an embodiment of the present invention. This device is set in the proxy server. As Figure 6 shown, the service proxy device provided in this embodiment includes the following modules: a first acquisition module 61, a second acquisition module 62, a first sending module 63, a receiving module 64, and a second sending module 65.
[0144] The first acquisition module 61 is configured to acquire service information of a target service sent by a first target system.
[0145] Wherein, the service information includes: service identification information and service input parameters.
[0146] The second acquisition module 62 is configured to acquire configuration information of the target service according to the service identification information.
[0147] Wherein, the configuration information includes call initiation information and call processing information. The call initiation information is used to indicate the address information of a second target system corresponding to the service identification information. The call processing information is used to characterize the feedback manner when the second target system feeds back service output parameters. The service output parameters correspond to the service input parameters.
[0148] The first sending module 63 is configured to send the call processing information and the service input parameters to the second target system according to the call initiation information.
[0149] The receiving module 64 is configured to receive the service output parameters fed back by the second target system according to the call processing information.
[0150] The second sending module 65 is configured to send the service output parameters to the first target system.
[0151] In one embodiment, the configuration information further includes traffic limiting rule information. The apparatus further includes a first determination module and a second determination module.
[0152] The first determination module is configured to determine whether to perform traffic limiting on the target service according to the traffic limiting rule information.
[0153] The second determination module is configured to, if it is determined not to perform traffic limiting on the target service, determine to execute the steps performed by the first sending module 63.
[0154] In one embodiment, the traffic limiting rule information is used to indicate that, within a preset duration, if the number of pieces of service information of the target service acquired is greater than a quantity threshold, traffic limiting is performed on the target service. The first determination module is specifically configured to: after acquiring the service information, update the number of the service information to obtain an updated number of the service information; if the updated number is greater than the quantity threshold, determine to perform traffic limiting on the target service; if the updated number is less than or equal to the quantity threshold, determine not to perform traffic limiting on the target service.
[0155] In one embodiment, the configuration information further includes first authentication rule information, and the service information further includes first information to be authenticated. The apparatus further includes: a third determination module and a fourth determination module.
[0156] The third determination module is configured to authenticate the first information to be authenticated according to the first authentication rule information.
[0157] The fourth determination module is configured to, if the authentication of the first information to be authenticated passes, determine to execute the steps performed by the first sending module 63.
[0158] In one embodiment, the configuration information further includes parameter verification rule information, and the parameter verification rule information is used to indicate verifying the attributes of the service input parameters. The apparatus further includes: a fifth determination module and a sixth determination module.
[0159] The fifth determination module is configured to verify the attributes of the service input parameters according to the parameter verification rule information.
[0160] The sixth determination module is configured to, if the verification of the attributes of the service input parameters passes, determine to execute the steps performed by the first sending module 63.
[0161] In one embodiment, the call processing information is used to represent that the second target system feeds back the service output parameters in real time; or, the call processing information is used to represent that the second target system feeds back the service output parameters through a callback function, and the call processing information includes: the callback function and the address information of the proxy server.
[0162] In one embodiment, the configuration information further includes second authentication rule information. The apparatus further includes: a generation module, configured to generate second information to be authenticated according to the second authentication rule information. The first sending module 63 is specifically configured to: send the call processing information, the service input parameters, and the second information to be authenticated to the second target system according to the initiated call information. Wherein, after the second target system authenticates the second information to be authenticated according to the second authentication rule information and passes the authentication, it sends the service output parameters.
[0163] The service proxy apparatus provided by the embodiments of the present invention can execute the service proxy method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0164] Figure 7It is a schematic structural diagram of an electronic device for implementing the service proxy method of the embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0165] As Figure 7 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0166] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0167] The processor 11 can be various general-purpose and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the service proxy method.
[0168] In some embodiments, the business agent method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the business agent method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the business agent method by any other suitable means (e.g., by means of firmware).
[0169] The various implementations of the systems and techniques described above in this document may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0170] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other devices, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0171] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0172] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0173] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of the communication network include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0174] A computing system may include a client and a server. The client and the server are generally far apart from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs that run on respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0175] An embodiment of the present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the service proxy method provided in any embodiment of the present invention.
[0176] In the process of implementing the computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0177] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0178] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A business agency method, characterized in that, Applied to a proxy server, the method includes: Obtain the service information of the target service sent by the first target system; wherein, the service information includes: service identification information and service input parameters; Obtain the configuration information of the target service according to the service identification information; wherein, the configuration information includes an initiation call information and a call processing information, the initiation call information is used to indicate the address information of the second target system corresponding to the service identification information, and the call processing information is used to characterize the feedback manner when the second target system feeds back service output parameters, and the service output parameters correspond to the service input parameters; Send the call processing information and the service input parameters to the second target system according to the initiation call information; Receive the service output parameters fed back by the second target system according to the call processing information; Send the service output parameters to the first target system.
2. The method according to claim 1, characterized in that, The configuration information further includes traffic limiting rule information; Before sending the call processing information and the service input parameters to the second target system according to the initiation call information, the method further includes: Determine whether to limit the traffic of the target service according to the traffic limiting rule information; If it is determined not to limit the traffic of the target service, then determine to execute the step of "sending the call processing information and the service input parameters to the second target system according to the initiation call information".
3. The method according to claim 2, wherein The traffic limiting rule information is used to indicate that if the number of service information of the target service obtained within a preset time period is greater than a quantity threshold, then limit the traffic of the target service; Determining whether to limit the traffic of the service information according to the traffic limiting rule information includes: After obtaining the service information, update the quantity of the service information to obtain the updated quantity of the service information; If the updated quantity is greater than the quantity threshold, then determine to limit the traffic of the target service; If the updated quantity is less than or equal to the quantity threshold, then determine not to limit the traffic of the target service.
4. The method according to claim 1, wherein The configuration information further includes first authentication rule information, and the service information further includes first information to be authenticated; Before sending the call processing information and the service input parameters to the second target system according to the initiation call information, the method further includes: Authenticate the first information to be authenticated according to the first authentication rule information; If the authentication of the first information to be authenticated passes, then determine to execute the step of "sending the call processing information and the service input parameters to the second target system according to the initiation call information".
5. The method according to claim 1, wherein The configuration information further includes parameter verification rule information, and the parameter verification rule information is used to indicate verifying the attributes of the service input parameters; Before sending the call processing information and the service input parameters to the second target system according to the initiation call information, the method further includes: Verify the attributes of the service input parameters according to the parameter verification rule information; If the attribute verification of the service input parameters passes, determine to execute the step of "sending the call processing information and the service input parameters to the second target system according to the initiated call information".
6. The method according to any one of claims 1 to 5, characterized in that The call processing information is used to represent that the second target system provides real-time feedback on the service output parameters; Or, The call processing information is used to represent that the second target system provides feedback on the service output parameters through a callback function, and the call processing information includes: the callback function and the address information of the proxy server.
7. The method according to any one of claims 1 to 5, characterized in that, The configuration information further includes second authentication rule information; Before sending the call processing information and the service input parameters to the second target system according to the initiated call information, the method further includes: Generating second information to be authenticated according to the second authentication rule information; Sending the call processing information and the service input parameters to the second target system according to the initiated call information includes: Sending the call processing information, the service input parameters, and the second information to be authenticated to the second target system according to the initiated call information; wherein, after the second target system authenticates the second information to be authenticated according to the second authentication rule information, it sends the service output parameters.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the service proxy method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program is used to enable a processor to execute the service proxy method according to any one of claims 1 to 7 when executed.
10. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the service proxy method according to any one of claims 1 to 7.