Information processing method, device, server and storage medium
By introducing the grayscale agent module and the decision function module into the business system, the problem of strong code coupling in the smooth upgrade of the business system is solved, fast and convenient business request processing is achieved, maintenance costs are reduced, and the openness and openness of the system are improved. flexibility.
Patent Information
- Application Number
- CN202011330117.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-11-24
AI Technical Summary
During the smooth upgrade process of the business system, the programming language of the updated business logic code is inconsistent with the original code, resulting in strong code coupling, high operation error rate, and high maintenance costs.
By introducing the grayscale proxy module and the decision function module into the server, it receives the client's business request, determines the attribute information of the request, and decides whether to forward the request to the original service or the reconstructed service based on the attribute information to avoid code intrusion and achieve zero Invasive system upgrades.
It realizes fast and convenient processing of business requests, reduces code running error rate and maintenance costs, and improves the openness of technology selection and system flexibility.
Smart Images

Figure CN113760318B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to an information processing method, device, server, and storage medium. Background Art
[0002] At present, the main technical means used for the smooth upgrade of business systems is to modify the relevant business logic code, that is, to retain the original code and update the relevant business logic code, or to change the code implantation based on the interceptor.
[0003] When implementing the technical solution based on the above method, the inventor found the following problems:
[0004] When new technologies emerge, the updated business logic code may not be consistent with the programming language used by the original code. Since logic codes corresponding to different programming languages cannot be mixed in a business system, unresponsiveness problems may occur. When the interceptor is used to change the code implantation, the implantation point is usually in the original code. At this time, there will be problems with the coupling of business processing codes, resulting in a high error rate in code operation and high subsequent maintenance costs. Summary of the invention
[0005] The present invention provides an information processing method, device, server and storage medium to solve the problems of poor openness of technology selection and strong intrusiveness of business code during the smooth upgrade of business systems, and achieves the technical effect of convenience and efficiency of information processing in a system based on strong openness of technology selection and zero business intrusion.
[0006] In a first aspect, an embodiment of the present invention provides an information processing method, the method comprising:
[0007] Receive a pending service request sent by a client, and determine attribute information of the pending service request;
[0008] Determine, according to the attribute information, a target service identifier for processing the pending service request; the target service identifier includes an original service identifier or a reconstructed service identifier;
[0009] Based on the target service identifier, a target service corresponding to the target service identifier is retrieved, and a response result corresponding to the pending business request is determined based on the target service.
[0010] In a second aspect, an embodiment of the present invention further provides an information processing device, the device comprising:
[0011] The original service grayscale proxy module is used to receive the pending service request sent by the client and determine the attribute information of the pending service request;
[0012] A decision function module, used to determine a target service identifier for processing the pending service request according to the attribute information; the target service identifier includes an original service identifier or a reconstructed service identifier;
[0013] The response module is used to call the target service corresponding to the target service identifier based on the target service identifier, and determine a response result corresponding to the pending business request based on the target service.
[0014] In a third aspect, an embodiment of the present invention further provides a server, the server comprising:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method as described in any one of the embodiments of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the information processing method as described in any one of the embodiments of the present invention.
[0019] The technical solution of the embodiment of the present invention determines the target service identifier corresponding to the business request to be processed through the grayscale proxy of the original service in the server side, and calls the corresponding service to process the business request according to the target service identifier, thereby avoiding the technical problems of code intrusion and inconvenient request information processing when the updated service is implanted in the original service in the prior art, and achieves the technical effect of fast and convenient business request processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A schematic diagram of a flow chart of an information processing method provided in Embodiment 1 of the present invention;
[0022] Figure 2 A schematic diagram of a system architecture for executing an information processing method provided in Embodiment 1 of the present invention;
[0023] Figure 3Another flowchart of an information processing method provided by Embodiment 2 of the present invention;
[0024] Figure 4 A schematic diagram of the structure of an information processing device provided in Embodiment 3 of the present invention;
[0025] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] Embodiment 1
[0028] Figure 1 This is a flow chart of an information processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where business request information is processed after a smooth upgrade of a business system. The method can be executed by an information processing device, which can be implemented in the form of software and / or hardware. The device can be an electronic device, which can be a mobile terminal or a PC, etc.
[0029] like Figure 1 The method of this embodiment includes:
[0030] Before introducing the technical solution of the present embodiment, an exemplary description of the system architecture for executing the technical solution of the present embodiment may be given.
[0031] The smooth upgrade of the business system provided in this embodiment means that the smooth upgrade of the business system is realized based on the technical environment of the Remote Procedure Call Protocol (RPC). The existing service on the front line of the business system upgrade can be called the local original service JP origin, and the updated code service can be called the remote reconstruction service WTrefactor. The original service and the remote reconstruction service can be separated so that the remote reconstruction service can be implemented independently, such as the programming language and the operating environment are independent.
[0032] After the original service and the remote reconstruction service are separated, if the service request information is received, the service request information can be processed based on the following modules provided by the smooth service system of this embodiment, mainly including: online existing code module, change code module, decision function module of the splitter, change code adaptation module and implantation point module of the splitter. The system architecture built based on the above modules can be as follows: Figure 2 As shown, it can be combined Figure 2 To understand the functions of each module:
[0033] Among them, the existing online code module, that is, the code module corresponding to the original service, has the following main functions: this module uses RPC Interface to describe the business service, the service interface is the original service JPService, and the service signature is JPResponse doService. The original service includes a server and a client. The server of the original service is called JPServiceSupply, which is the core of processing business logic; the client of the original service is called JPServiceDemand, which is automatically generated by the RPC framework. It should be noted that after the business system is upgraded, no modification can be made to the code in JPServiceSupply to achieve zero intrusion on the original service.
[0034] The changed code module, that is, the code module corresponding to the reconstructed service, is mainly responsible for the upgraded business logic. Among them, the service signature of the reconstructed service can be the same as or different from the signature of the original service. Assuming that the signature of the reconstructed service is WTReponse doService(WTRequest r), the request of the reconstructed service and the response of the reconstructed service can be marked as WTRequest and WTResponse respectively. In terms of implementation technology, the technology stack of the reconstructed service WTService and the original service JPService may not be consistent, thereby achieving re-technology selection. Similarly, according to the RPC principle, the reconstructed service is also divided into server-side implementation and client-side implementation. The server is WTServiceSupply (the server-side implementation of the reconstructed service), which is the core logic of the new business; the client is WTServiceDemand (the client-side implementation of the reconstructed service).
[0035] The decision function module of the splitter is set in the server. It is used to determine under what conditions the business request traffic is distributed to the original service or the reconstructed service. In order to achieve better scalability, each business request can be abstracted into a decision function with a definition domain of the request attribute set Map attributes and a value range of True / Fasle. The request attribute set can include the business request and the running context.
[0036] The change code adaptation module, namely the service adaptation module (JPServiceWTAdaptor), is integrated in the server to achieve service compatibility. Optionally, it converts the request corresponding to the original service into the change request corresponding to the reconstructed service. At the same time, after receiving the response from the reconstructed service, it converts the response from the reconstructed service into the response corresponding to the original service.
[0037] The implantation point module of the splitter includes the grayscale proxy (JPServiceGrayProxy) implementation class for the original service and its loading. The grayscale proxy (JPServiceGrayProxy) uses the object-oriented polymorphic characteristics to achieve non-invasive implantation of the reconstructed service (WTService).
[0038] Based on the above architecture, the reconstructed service and the original service code can be separated so that the changed code can be implemented independently, and optionally, the programming language and the operating environment can be independent. At the same time, the original service and the reconstructed service can be encapsulated, and the grayscale proxy module, service adapter module and decision function for the original service can be connected to the interface corresponding to the original service and the reconstructed service on the server side, so that when receiving the request sent by the client corresponding to the original service, the grayscale proxy module takes over the request information and calls the decision function to determine whether the original service or the reconstructed service processes the request information. If it is a reconstructed service, the grayscale proxy module forwards and calls the reconstructed service, and the corresponding service adapter module converts the request information into a request corresponding to the reconstructed service, so that the reconstructed service can process the request alone.
[0039] Based on the above system structure, the method of this embodiment can be executed as follows:
[0040] S110: Receive a pending service request sent by a client, and determine attribute information of the pending service request.
[0041] Among them, the business request initiated by the client corresponding to the original service can be used as the pending business request. The specific content of the pending business request is different in different application scenarios, and the specific content of the pending business request can be determined according to actual needs. The attribute information can be the class of the pending business request. After the server receives the business request, the grayscale proxy JPServiceGrayProxy for the original service can take over and determine the attribute information of the pending business request.
[0042] Specifically, the server can receive the pending service request sent by the client, and after receiving the pending service request, the request of the server is taken over by the JPServiceGrayProxy gray proxy module. The JPServiceGrayProxy gray proxy module can determine the attribute information of the pending service request after receiving the pending service request.
[0043] S120. Determine, according to the attribute information, a target code identifier for processing the pending service request; the target code identifier includes a pre-update code identifier or a post-update code identifier.
[0044] Among them, the attribute information of the pending business request may be the class corresponding to the pending business request. An implantation point module of the diverter may be provided in the server, and the implantation point module includes a grayscale proxy implementation class for the original service and its loading. The grayscale proxy module for the original service uses the object-oriented polymorphic characteristics to achieve non-invasive implantation of code changes. The target service identifier includes the original service identifier or the reconstructed service identifier. The original service identifier can be understood as the code identifier corresponding to the code before the code is updated, and the reconstructed service identifier refers to the service identifier after the code is updated.
[0045] Specifically, after determining the attribute information of the pending business request, the JPServiceGrayProxy grayscale proxy module can call the whitelist decision function module. Based on the request attribute set in the whitelist decision function module, it can be determined whether the local service or the reconstructed service executes the pending business request, that is, the target service identifier for executing the pending business request can be determined.
[0046] In this embodiment, determining the target service identifier for executing the pending business request includes: calling a traffic decision function to process the attribute information and determining a decision function value corresponding to the attribute information; based on the decision function value, determining the target service identifier corresponding to the pending business request.
[0047] It should be noted that the whitelist decision function module may include a request attribute set, which includes the request JPResqeust of the original service and the running context environment. Therefore, after the server receives the pending business request, the original service grayscale agent in the server determines the attribute information of the pending business request, and calls the whitelist decision function module to determine whether the attribute information is in the request attribute set. According to the function value, the target service identifier for processing the pending business request can be determined.
[0048] Specifically, after receiving the pending business request, the grayscale proxy module can call the whitelist decision function module to determine the attribute category of the attribute information of the pending business request in the pre-set request attribute set. According to the attribute category corresponding to the pending request, the decision function can determine the decision function value corresponding to the attribute information, and optionally, the decision function value can be true or false.
[0049] It can be understood that the calling of the traffic decision function processes the attribute information and determines the decision function value corresponding to the attribute information, including: calling the traffic decision function to determine the attribute category of the attribute information in a pre-set request attribute set; based on the attribute category, determining the decision function value corresponding to the attribute information.
[0050] In this embodiment, the target service identifier may be a reconstruction service identifier. Before calling the target service corresponding to the target service identifier based on the target service identifier, it also includes: when the target service identifier is a reconstruction service identifier, calling a service compatible program to convert the request format of the to-be-processed business request into a request format corresponding to the reconstruction service identifier, and obtaining the target business request, so that the target service processes the target business request.
[0051] It can be understood that the reconstruction service identifier corresponds to the reconstruction service. When it is determined that the updated reconstruction service will process the pending business request, the service adapter module (JPServiceWTAdaptor) in the server can switch the traffic to the reconstruction service. At the same time, the pending business request is converted into a reconstruction service request for the adapted reconstruction service, that is, the target business request. The target business request is processed based on the reconstruction service to obtain a response result that can be fed back to the client.
[0052] In this embodiment, the determined target service identifier may also be the original service identifier, that is, the function value determined according to the output result of the decision function determines that the service for processing the pending business request is the original service. In this case, the pending business request may be used as the target business request, and the target business request may be processed based on the original service to obtain a response result corresponding to the pending business request.
[0053] For example, if the function value output by the traffic decision function is true, it means that the reconstruction service needs to be called to process the target business request. If the output function value is false, it means that the local service can be called to process the pending business request to obtain the corresponding response result.
[0054] S130: Based on the target service identifier, retrieve the target service corresponding to the target service identifier, and determine a response result corresponding to the pending business request based on the target service.
[0055] Specifically, after determining the target service identifier, the target service corresponding to the target service identifier can be determined. Optionally, if the target service identifier is the service identifier corresponding to the changed code, the refactoring service can be called, and the pending business request can be converted into the target business request corresponding to the target service identifier, and the target business request can be processed based on the target service. Correspondingly, if the target service identifier is the original service identifier, the pending business request can be processed based on the local original service.
[0056] On the basis of the above technical solution, after obtaining the response result, the response result can be fed back to the client that initiated the service request to be processed.
[0057] It should be noted that the client that initiates the pending business request is usually initiated by the client corresponding to the original service. Therefore, after processing the target business request based on the reconstructed service and obtaining the response result, the response result needs to be processed to match the client corresponding to the original service.
[0058] Optionally, the service compatible program is called to convert the format of the response result into a target response result format corresponding to the target code identifier being the code identifier before the update, and the response result corresponding to the target response result format is fed back to the client.
[0059] The service compatibility program is a change code adaptation module, which is used to convert the pending business request initiated by the original client into a target business request that matches the reconstructed service. At the same time, it is also used to convert the response fed back by the reconstructed service into the response corresponding to the original service after receiving the response fed back by the reconstructed service. The advantage of this module setting is that it can smooth the heterogeneity of services before and after the upgrade.
[0060] The technical solution of the embodiment of the present invention determines the target service identifier corresponding to the business request to be processed through the grayscale proxy of the original service in the server side, and calls the corresponding service to process the business request according to the target service identifier, thereby avoiding the technical problems of code intrusion and inconvenient request information processing when the updated service is implanted in the original service in the prior art, and achieves the technical effect of fast and convenient business request processing.
[0061] Embodiment 2
[0062] As an alternative embodiment of the above embodiment, Figure 3 This is a flow chart of an information processing method provided by Embodiment 2 of the present invention, wherein the technical terms identical or corresponding to those in the above embodiments are not repeated here.
[0063] like Figure 3 As shown, the method includes:
[0064] S210: The client initiates a request.
[0065] Specifically, the client at this time mainly refers to the client corresponding to the original service. The client of the original service (JPServiceDemand) initiates a pending service request JPRequest to the server.
[0066] S202: The server receives the request.
[0067] Specifically, before the server processes the pending business request, the implantation point module of the diverter can implant a new reconstructed service in the server, that is, an upgraded and updated service, and include the grayscale proxy implementation class for the original service and its loading. Since the grayscale proxy of the original service is an object-oriented dynamic binding technology, it can achieve the effect of separating the function of the code from the implementation. After the server corresponding to the original service receives the pending business request, the grayscale proxy for the original service in the server takes over, and the specific traffic distribution can be determined at this time.
[0068] S203, calling the traffic decision function, and determining whether the target service of the execution request is an updated service, if so, executing S204; if not, executing S205.
[0069] Specifically, after receiving the request, the original service grayscale agent in the server can call the whitelist decision function module to determine whether the target code service executing the request is an updated service, that is, whether it is a reconstructed service based on the traffic decision function in the whitelist decision function module.
[0070] Exemplarily, if the value output by the traffic decision function is false, the local original service is called through the server, that is, S205 is executed; if the value of the traffic decision function is true, the above-mentioned change code adaptation module can switch the traffic to the upgraded reconstructed service, that is, S204 is executed.
[0071] S204: Call the code change adaptation module to process the request into a request corresponding to the reconstruction service.
[0072] Specifically, the code change adaptation module can achieve service compatibility, that is, it can convert the online request before the upgrade, that is, the pending business request JPRequest initiated by the original client, into the upgraded change request, that is, the request WTRequest corresponding to the reconstruction service. Correspondingly, after receiving the response result feedback from the reconstruction service, the code change adaptation module can be called to convert the response result WTResponse of the reconstruction service into the response result JPResponse corresponding to the original service, thereby achieving smooth service heterogeneity before and after the upgrade.
[0073] That is, the signatures corresponding to the original service and the reconstructed service are different. Therefore, after determining that the service processing the request is the reconstructed service, the change code adaptation module can be called to process the request into a request corresponding to the reconstructed service adaptation.
[0074] S205: Call the local original service.
[0075] It can be understood that when the value output by the diversion decision function is false, the request initiated by the client can be processed based on the local original service to obtain a response result corresponding to the request.
[0076] S206: Call the remote reconstruction service to process the request and obtain a reconstruction response result corresponding to the reconstruction service.
[0077] Specifically, the client of the reconstruction service side calls the reconstruction service and transmits a request adapted to the reconstruction service to the reconstruction service. The request can be processed based on the reconstruction service to obtain a reconstruction response result fed back by the reconstruction service.
[0078] S207. Convert the reconstructed response result into a response result corresponding to the local original service based on the changed code adaptation module.
[0079] Specifically, the code adaptation module is changed to convert the reconstructed response result into a response result corresponding to the local original service.
[0080] S208: Feedback the response result to the client.
[0081] Specifically, after the original service grayscale agent in the server obtains the response result, it can feed back the response structure to the client that initiated the request.
[0082] The specific implementation process of S202 to S205 in this embodiment can be: the original service grayscale proxy in the server is consistent with the service signature of the original service, is the implementation class of the original service, and when the whitelist decision function is triggered, the service request can be delegated to the reconstruction service. The original service request and the context environment variables are packaged into the decision factor Map data structure, the decision factor Map is used as input, the decision function is called, and a Boolean return value is obtained. When the decision function return value is true, the upgraded reconstruction service is called through the wide process of the change code adaptation module, and the response result is obtained based on the reconstruction service. In order to feed back the response result to the client, the response result can be converted into the response result corresponding to the original service based on the change code adaptation module again, and this result is fed back to the client corresponding to the original service; when the decision function returns false, the local original service can be called to process the request to obtain the corresponding response result.
[0083] The technical solution of the embodiment of the present invention determines the target service identifier corresponding to the business request to be processed through the grayscale proxy of the original service in the server side, and calls the corresponding service to process the business request according to the target service identifier, thereby avoiding the technical problems of code intrusion and inconvenient request information processing when the updated service is implanted in the original service in the prior art, and achieves the technical effect of fast and convenient business request processing.
[0084] Embodiment 3
[0085] Figure 4 This is a schematic diagram of the structure of an information processing device provided in Embodiment 3 of the present invention. The device includes: an original service grayscale proxy module 310, a decision function module 320 and a response module 330.
[0086] Among them, the original service grayscale proxy module 310 is used to receive the pending business request sent by the client and determine the attribute information of the pending business request; the decision function module 320 is used to determine the target service identifier for processing the pending business request based on the attribute information; the target service identifier includes the original service identifier or the reconstructed service identifier; the response module 330 is used to call the target service corresponding to the target service identifier based on the target service identifier, and determine the response result corresponding to the pending business request based on the target service.
[0087] On the basis of the above technical solutions, the decision function module includes:
[0088] A decision function calling unit is used to call a traffic decision function to process the attribute information and determine a decision function value corresponding to the attribute information; a target service identifier determination unit is used to determine a target service identifier corresponding to the service request to be processed based on the decision function value.
[0089] Based on the above technical solutions, the decision function calling unit is also used to: call the traffic decision function to determine the attribute category of the attribute information in a preset request attribute set; based on the attribute category, determine the decision function value corresponding to the attribute information.
[0090] On the basis of the above-mentioned technical solutions, the target service identifier is a reconstruction service identifier. In the response module, before calling the target service corresponding to the target service identifier based on the target service identifier, it is also used for: when the target service identifier is a reconstruction service identifier, calling the service compatible program to convert the request format of the to-be-processed business request into the request format corresponding to the reconstruction service identifier, and obtaining the target business request, so that the target service processes the target business request.
[0091] On the basis of the above technical solutions, the response module is further used to: call the reconstruction service, and process the target business request based on the reconstruction service to obtain a response result corresponding to the target business request.
[0092] On the basis of the above-mentioned technical solutions, the target service identifier is the original service identifier. In the response module, before the target service corresponding to the target service identifier is called based on the target service identifier, it is also used to: when the target service identifier is the original service identifier, use the to-be-processed business request as the target business request; accordingly, calling the target service corresponding to the target service identifier and determining the response result corresponding to the target business request based on the target service includes: calling the original service to process the target business request and obtaining a response result corresponding to the target business request.
[0093] Based on the above technical solutions, the device also includes: a response result conversion module, which is used to call the service compatible program, convert the format of the response result into a target response result format corresponding to the target service identifier as the original service identifier, and feed back the response result corresponding to the target response result format to the client.
[0094] The technical solution of the embodiment of the present invention determines the target service identifier corresponding to the business request to be processed through the grayscale proxy of the original service in the server side, and calls the corresponding service to process the business request according to the target service identifier, thereby avoiding the technical problems of code intrusion and inconvenient request information processing when the updated service is implanted in the original service in the prior art, and achieves the technical effect of fast and convenient business request processing.
[0095] The information processing device provided by the embodiment of the present invention can execute the information processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0096] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0097] Embodiment 4
[0098] Figure 5 A schematic diagram of the structure of a server provided in Embodiment 4 of the present invention. Figure 5 A block diagram of an exemplary server 40 suitable for use in implementing exemplary embodiments of the present invention is shown. Figure 5 The server 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0099] like Figure 5As shown, the server 40 is in the form of a general-purpose computing device. The components of the server 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).
[0100] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0101] The server 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the server 40, including volatile and non-volatile media, removable and non-removable media.
[0102] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Server 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.
[0103] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.
[0104] The server 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), one or more devices that enable a user to interact with the server 40, and / or any device that enables the server 40 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the server 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with other modules of the server 40 via the bus 403. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with server 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0105] The processing unit 401 executes various functional applications and data processing by running the programs stored in the system memory 402, such as implementing the information processing method provided by the embodiment of the present invention.
[0106] Embodiment 5
[0107] Embodiment 5 of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute an information processing method when executed by a computer processor.
[0108] The method includes:
[0109] Receive a pending service request sent by a client, and determine attribute information of the pending service request;
[0110] Determine, according to the attribute information, a target service identifier for processing the pending service request; the target service identifier includes an original service identifier or a reconstructed service identifier;
[0111] Based on the target service identifier, a target service corresponding to the target service identifier is retrieved, and a response result corresponding to the pending business request is determined based on the target service.
[0112] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0113] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0114] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0115] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a 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 may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0116] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An information processing method, characterized in that: include: Receive a pending service request sent by a client, and determine attribute information of the pending service request; Determining, according to the attribute information, a target service identifier for processing the pending service request; The target service identifier includes an original service identifier or a reconstructed service identifier; Based on the target service identifier, calling the target service corresponding to the target service identifier, and determining a response result corresponding to the pending business request based on the target service; When the target service identifier is a reconstruction service identifier, calling a service compatible program to convert the request format of the to-be-processed service request into a request format corresponding to the reconstruction service identifier, and obtaining a target service request, so that the target service processes the target service request; When the target service identifier is the original service identifier, taking the pending service request as the target service request; Correspondingly, the calling of the target service corresponding to the target service identifier and determining a response result corresponding to the target business request based on the target service includes: The original service is called to process the target business request to obtain a response result corresponding to the target business request.
2. The method according to claim 1, characterized in that The step of determining, according to the attribute information, a target service identifier for processing the pending service request includes: Calling a traffic decision function to process the attribute information and determine a decision function value corresponding to the attribute information; Based on the decision function value, a target service identifier corresponding to the pending service request is determined.
3. The method according to claim 2, characterized in that The calling of the traffic decision function to process the attribute information and determine a decision function value corresponding to the attribute information includes: Calling a traffic decision function to determine an attribute category of the attribute information in a preset request attribute set; Based on the attribute category, a decision function value corresponding to the attribute information is determined.
4. The method according to claim 1, characterized in that: The calling of the target service corresponding to the target service identifier, and determining a response result corresponding to the pending service request based on the target service, includes: The reconstruction service is called, and the target business request is processed based on the reconstruction service to obtain a response result corresponding to the target business request.
5. The method according to claim 1, characterized in that After determining a response result corresponding to the target service request based on the target service, the method further includes: The service compatible program is called to convert the format of the response result into a target response result format corresponding to when the target service identifier is the original service identifier, and the response result corresponding to the target response result format is fed back to the client.
6. An information processing device, characterized in that: include: The original service grayscale proxy module is used to receive the pending service request sent by the client and determine the attribute information of the pending service request; A decision function module, used to determine a target service identifier for processing the pending service request according to the attribute information; The target service identifier includes an original service identifier or a reconstructed service identifier; A response module, configured to retrieve a target service corresponding to the target service identifier based on the target service identifier, and determine a response result corresponding to the pending business request based on the target service; The response module is further configured to, when the target service identifier is a reconstruction service identifier, call a service compatible program to convert the request format of the pending service request into a request format corresponding to the reconstruction service identifier, and obtain a target service request, so that the target service processes the target service request; The response module is further configured to use the pending service request as the target service request when the target service identifier is the original service identifier; Correspondingly, the calling of the target service corresponding to the target service identifier and determining a response result corresponding to the target business request based on the target service includes: The original service is called to process the target business request to obtain a response result corresponding to the target business request.
7. A server, characterized in that: The server comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method according to any one of claims 1 to 5.
8. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the information processing method according to any one of claims 1 to 5 when executed by a computer processor.
Citation Information
Patent Citations
Service connection system and design method therefor
CN105446819A
Interface calling method and device
CN111045833A
