CN115277707A - Service processing method, device, electronic equipment and storage medium - Google Patents

Service processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115277707A
CN115277707A CN202210830944.6A CN202210830944A CN115277707A CN 115277707 A CN115277707 A CN 115277707A CN 202210830944 A CN202210830944 A CN 202210830944A CN 115277707 A CN115277707 A CN 115277707A
Authority
CN
China
Prior art keywords
service
service system
user
service processing
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210830944.6A
Other languages
Chinese (zh)
Inventor
韩立元
王芳
张玉良
石朕邦
韩威旺
刘�文
周越佳
高晨峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210830944.6A priority Critical patent/CN115277707A/en
Publication of CN115277707A publication Critical patent/CN115277707A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a service processing method, a service processing device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises: receiving a first service processing request sent by a first service system, and acquiring a first user identifier and a service processing type in the first service processing request; inquiring a second service system associated with the service processing type to call a preset mapping relation of user identifications among the systems and determine a second user identification corresponding to the first user identification in the second service system; acquiring a request generation model of a second service system to generate a second service processing request based on a second user identifier; and sending a second service processing request to the second service system. The method and the system can solve the problems that a large number of identifications in other systems are stored in each system, so that system resources are greatly occupied, and system performance is reduced.

Description

Service processing method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service processing method and apparatus, an electronic device, and a storage medium.
Background
For an enterprise, with the establishment and improvement of the platform capability in the business, the development of new business of the enterprise usually needs to be in business series connection with other platform systems in the business to be able to perform business processing, so that the business processing of the enterprise usually needs to be completed by the cooperation among a plurality of systems. However, because the operation of each system is independent, each system configures a unique identifier for each enterprise, and the identifiers between the systems are not necessarily universal, in order to facilitate the cooperation between the systems, the identifiers of the enterprises in other systems need to be stored in each system, so as to facilitate data communication with other systems. As the number of systems gradually increases, each system needs to store a large number of identifiers in other systems, which results in a large amount of occupied system resources and reduced system performance.
Disclosure of Invention
In view of this, embodiments of the present invention provide a service processing method, an apparatus, an electronic device, and a storage medium, which can solve the problem that a large number of identifiers in other systems are stored in each system, so that system resources are greatly occupied, and system performance is reduced.
To achieve the above object, according to an aspect of an embodiment of the present invention, a service processing method is provided.
The business processing method of the embodiment of the invention comprises the following steps: receiving a first service processing request sent by a first service system, and acquiring a first user identifier and a service processing type in the first service processing request; querying a second service system associated with the service processing type to call a preset mapping relationship of user identifiers among systems, and determining a second user identifier corresponding to the first user identifier in the second service system, wherein the mapping relationship comprises an annular mapping relationship among the user identifiers of at least three service systems corresponding to each user; acquiring a request generation model of the second service system to generate a second service processing request based on the second user identifier; and sending the second service processing request to the second service system.
In one embodiment, after sending the second service processing request to the second service system, the method further includes:
receiving a service processing result sent by the second service system;
and updating the second user identification in the service processing result into the first user identification so as to send the updated service processing result to the first service system.
In yet another embodiment, further comprising:
receiving a registration request of a service system, wherein the service system comprises a first service system and a second service system;
acquiring user information included in the registration request, and inquiring a target mapping relation of a corresponding user identifier between systems based on the user information, wherein the target mapping relation is an annular mapping relation;
and acquiring a user identifier and a system identifier in the registration request so as to update the user identifier and the system identifier to the target mapping relation.
In yet another embodiment, updating the user identification and the system identification to the target mapping relationship comprises:
in response to the target mapping relation not existing, generating a corresponding mapping relation of the user identifier between the systems based on the user identifier and the system identifier;
in response to the target mapping relationship existing, updating the user identification and the system identification to the target mapping relationship.
In yet another embodiment, further comprising:
receiving a query request sent by a first service system, and acquiring a first user identifier and a second service system identifier in the query request;
based on the first user identification, calling a mapping relation of corresponding user identifications among systems to acquire a second user identification corresponding to the first user identification in the second service system;
and sending the second user identification to the first service system.
In another embodiment, obtaining a request generation model for the second business system to generate a second business process request based on the second user identification comprises:
acquiring a service request template of the second service system to extract service parameters from the first service processing request;
and updating the service parameters and the second user identification to the service request template to obtain a second service processing request.
In another embodiment, querying the second service system associated with the service processing type includes:
and inquiring a service system set associated with the service processing type, acquiring the priority of each service system in the service system set, and determining a second service system from the service system set based on the priority.
To achieve the above object, according to another aspect of the embodiments of the present invention, a service processing apparatus is provided.
A service processing device of the embodiment of the invention comprises: the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a first service processing request sent by a first service system and acquiring a first user identifier and a service processing type in the first service processing request; a determining unit, configured to query a second service system associated with the service processing type to invoke a preset mapping relationship of inter-system user identifiers, and determine a second user identifier corresponding to the first user identifier in the second service system, where the mapping relationship includes an annular mapping relationship between user identifiers of at least three service systems corresponding to each user; a generating unit, configured to obtain a request generation model of the second service system, so as to generate a second service processing request based on the second user identifier; a sending unit, configured to send the second service processing request to the second service system.
In an embodiment, the receiving unit is further configured to receive a service processing result sent by the second service system;
the sending unit is further configured to update the second subscriber identity in the service processing result to the first subscriber identity, so as to send the updated service processing result to the first service system.
In another embodiment, the receiving unit is further configured to receive a registration request of a service system, where the service system includes the first service system and a second service system;
the device further comprises:
the query unit is used for acquiring user information included in the registration request and querying a target mapping relation of a corresponding user identifier between systems based on the user information, wherein the target mapping relation is an annular mapping relation;
and the updating unit is used for acquiring the user identifier and the system identifier in the registration request so as to update the user identifier and the system identifier to the target mapping relation.
In another embodiment, the update unit is specifically configured to:
responding to the target mapping relation not existing, and generating a corresponding mapping relation of the user identification between the systems based on the user identification and the system identification;
and in response to the target mapping relationship existing, updating the user identification and the system identification to the target mapping relationship.
In another embodiment, the receiving unit is further configured to receive an inquiry request sent by a first service system, and obtain a first subscriber identity and a second service system identity in the inquiry request;
the device further comprises:
the obtaining unit is used for calling the mapping relation of the corresponding user identifiers among the systems based on the first user identifier so as to obtain a second user identifier corresponding to the first user identifier in the second service system;
the sending unit is further configured to send the second subscriber identity to the first service system.
In another embodiment, the generating unit is specifically configured to:
acquiring a service request template of the second service system to extract service parameters from the first service processing request;
and updating the service parameters and the second user identification to the service request template to obtain a second service processing request.
In another embodiment, the determining unit is specifically configured to:
and querying a service system set associated with the service processing type, acquiring the priority of each service system in the service system set, and determining a second service system from the service system set based on the priority.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the service processing method provided by the embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, and the computer program, when executed by a processor, implements a service processing method provided by an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
A computer program product according to an embodiment of the present invention includes a computer program, and when the computer program is executed by a processor, the computer program implements a service processing method according to an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the present invention, the intermediate system may receive a first service processing request sent by the first service system, acquire the first user identifier and the service processing type therein to indicate which user performs which type of service processing, then may query the second system that implements the service processing type, determine, through a mapping relationship of the user identifiers between the systems, the second user identifier corresponding to the first user identifier in the second service system, and further may generate a second service processing request based on the second user identifier, so as to send the second service processing request to the second service system for service processing. In the embodiment of the invention, the mapping relation of the user identification among the storage systems in the intermediate system can interact with the data of each service system, and each service system can send the service processing request to the intermediate system when needing to cooperate with other systems, so that the intermediate system converts the service processing request of the service system into the service request of the service system needing to cooperate and sends the service request, thereby leading the cooperating service system to carry out service processing and realizing the data intercommunication among the systems. Meanwhile, in the embodiment of the invention, when the new service system needs to cooperate to perform service processing, only the user identification of the new service system needs to be updated and stored in the mapping relation, and the new service system does not need to be customized to develop the structure of the relation data and analyze the mapping codes, so that the system expansibility is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a system architecture of an intermediate system according to an embodiment of the invention;
FIG. 2 is a diagram illustrating a mapping relationship according to an embodiment of the invention;
fig. 3 is a schematic diagram of a main flow of a service processing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a main flow of a business system registration method according to an embodiment of the present invention;
FIG. 5 is an architectural diagram of an intermediate system deployment in accordance with an embodiment of the present invention;
fig. 6 is a schematic diagram of the main elements of a traffic processing apparatus according to an embodiment of the present invention;
FIG. 7 is a diagram of yet another exemplary system architecture to which embodiments of the present invention may be applied;
FIG. 8 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
The embodiment of the invention provides an intermediate system which can be used for a scene of performing business processing in cooperation among multiple systems.
For example, a newly hatched business system a of an enterprise is used for providing business processing of product query for an organization, and as the business develops, the system a needs to add the capability of publishing articles, and at this time, the business system B in the business platform can provide this capability, so the system a can perform the business processing of publishing articles by cooperating with the system B. However, because the identifiers registered by the mechanisms in the service system a and the service system B are different, the service system a needs to store the identifier of the mechanism in the service system B, and establish a relationship table between the identifier of the mechanism in the service system a and the identifier in the service system B, so as to perform data conversion through the relationship table, perform data intercommunication with the service system B, and similarly, in the service system B, in order to perform data intercommunication with the service system a, the identifier of the mechanism in the service system a needs to be stored, so that each service system needs the identifiers in other systems, occupies system resources, the coupling between each service system is more and more serious, reduces system performance, and needs to re-customize and develop the structure of the relationship data and analyze mapping codes when a new function needs to be expanded, thereby causing the system to be difficult to expand.
In the embodiment of the invention, the intermediate system is established, and the mapping relation of the user identifications among the service systems is stored in the intermediate system, namely the annular mapping relation among the user identifications of a plurality of (such as at least three) service systems corresponding to each user, so that the service systems can carry out data intercommunication through the intermediate system, and the service systems do not need to store identifications in other systems, thereby reducing the occupation of system resources and improving the system performance. Taking the example that the service system a, the service system B and the service system C need to cooperate to perform service processing, the intermediate system may store the ring mapping relationship of the user identifiers among the service system a, the service system B and the service system C, so that the service system a, the service system B and the service system C may perform service cooperation through the intermediate system. Fig. 1 is a system architecture diagram of an intermediate system according to an embodiment of the present invention.
In a scenario where each service system stores identifiers of other service systems, each service system may implement service cooperation processing by respectively establishing mapping relationships with the identifiers of the other systems, taking service system a as an example, it needs to respectively establish mapping relationships with identifiers of service system B and service system C, add service system D when a new service is extended, and needs to add mapping relationships with the identifiers of service system D, that is, store a-B, a-C, and a-D, where the mapping relationships may be as shown in the left ID relationship diagram in fig. 2, where asid represents a user identifier in service system a, bsid represents a user identifier in service system B, cID represents a user identifier in service system C, and dID represents a user identifier in service system D. In the embodiment of the invention, the intermediate system can abstract the annular mapping relation of the bottom system which depends on the intermediate system, the annular mapping relation reflects the mapping of the user identifiers among all the service systems, so that the user identifiers in any system can be used for directly inquiring the corresponding user identifiers in other systems to realize the access of service related services among the service systems, the common capacity among all the service systems is clearly shown, when a new service is expanded, only the user identifiers of the service systems need to be added into the annular mapping relation, the cost and threshold of the new system for re-integrating the bottom system capacity are reduced, the complexity and the coupling degree among the service systems are simplified, and the delivery speed of the new service system is improved. As shown in the right ID relationship diagram of fig. 2, it is a schematic diagram of the ring mapping relationship of the identifiers between the service systems stored in the intermediate system.
An embodiment of the present invention provides a service processing method, which may be executed by an intermediate system in a system architecture shown in fig. 1, and as shown in fig. 3, the method includes:
s301: receiving a first service processing request sent by a first service system, and acquiring a first user identifier and a service processing type in the first service processing request.
When the first service system needs the capability of other service systems to perform service processing, the first service system may send a service processing request, that is, the first service processing request, to the intermediate system. The first service processing request may include a first user identifier and a service processing type, where the first user identifier indicates a user to perform the first service processing, and the service processing type indicates a service processing to be performed on the user by the first service processing request.
For example, in the system architecture shown in fig. 1, a service system a has a product query capability, a service system B has an article publishing capability, and a service system C has a staff query capability, and a certain system is registered in each of the service system a, the service system B, and the service system C, and the user identifier registered in the service system a is asid, the user identifier registered in the service system B is bID, and the user identifier registered in the service system C is cID. The intermediate system stores mapping relationships of user identifiers in the service system a, the service system B, and the service system C, and may be specifically as shown in table 1.
TABLE 1
Service system A Service system B Service system C
aID bID cID
When the service system a needs the service process of the article release, a first service process request may be sent to the intermediate system, where the first service process request includes the first user identifier asid and the service process type of the article release.
In some embodiments, a corresponding service type array may be set in the intermediate system for each service system, where the service type array includes service parameters that need to be input when the service system processes a service of a corresponding service type; therefore, in this step, the service parameter set included in the first service processing request can be extracted from the first service processing request, and then the service parameter set is matched with each preset service type array. If the matching is successful, the service type to be processed by the first service processing request can be determined, that is, the service type corresponding to the successfully matched service type array is determined as the service type of the first service processing request.
S302: and querying a second service system associated with the service processing type to call a preset mapping relation of the user identifiers between the systems, and determining a second user identifier corresponding to the first user identifier in the second service system.
The mapping relation comprises an annular mapping relation between user identifications of at least three service systems corresponding to each user. The intermediate system may store the service processing capability, i.e., the service processing type, of each service system, so that when other systems need each service capability, the service system with the service capability may be determined. Specifically, in the embodiment of the present invention, the association relationship between each service system and the service processing type may be pre-established, so that in this step, the associated second service system may be queried based on the service processing type in the first service processing request, that is, the service processing requested by the first service processing request is implemented.
In still other embodiments, in some scenarios, multiple service systems may execute services having the same service processing capability, and at this time, the multiple service systems may correspond to one service processing type.
Therefore, the step of querying the second service system in this step may be specifically executed as: and inquiring the service system set associated with the service processing type, and acquiring the priority of each service system in the service system set so as to determine a second service system from the service system set based on the priority.
The service system set includes service systems having service processing capabilities corresponding to service processing types, and then the priority of each service system in the service system set can be obtained, so that the second service system is determined from the service system set based on the priority, and specifically, the service system with the highest priority in the service system set can be determined as the second service system.
It should be noted that, since the processing capability, the idle degree, and other characteristics of each service system may change over time, the intermediate system may update the priority of each service system based on a preset period.
After the second service system is determined, that is, the service system for executing the first service processing request is determined, the intermediate system may determine, based on a pre-stored mapping relationship between the inter-system user identifiers, a user identifier of the user of the first user identifier registered in the second service system, that is, the second user identifier, so that the second service system may explicitly perform service processing on which user.
The mapping relationship of the user identifiers between the systems can be as shown in table 1, and thus the mapping relationship can be called to correspond to the second user identifier in the second service through the first user identifier.
S303: and acquiring a request generation model of the second service system to generate a second service processing request based on the second user identification.
After the second user identifier is determined, a service processing request matched with the second service system, that is, a second service processing request, may be generated so that the second service system may perform service processing according to the requirements of the first service system. In the embodiment of the invention, a corresponding request generation model can be configured for each service system so as to generate the service processing request matched with each service system.
Specifically, the request generation model may include a service request template, and the service request template may update personalized data such as service parameters and user identifiers required for service processing, so as to generate a corresponding service processing request. So the generation of the second service processing request in this step can be performed as: acquiring a service request template of a second service system to extract service parameters from the first service processing request; and updating the service parameters and the second user identification to a service request template to obtain a second service processing request. The service parameter may be a parameter required for service processing, for example, in a scenario where an employee queries a service, the service parameter may be a query condition, such as a working age.
S304: and sending a second service processing request to the second service system.
After the intermediate system generates the second service processing request, the second service processing request can be sent to the second service system, so that the second service system performs service processing.
After executing the step, the second service system may process the second service processing request and obtain a processing result, and then may return the processing result to the intermediate system, so as to be transferred to the first service system through the intermediate system. Specifically, after step S304, the embodiment of the present invention may further include: receiving a service processing result sent by a second service system; and updating the second user identifier in the service processing result into the first user identifier so as to send the updated service processing result to the first service system.
After receiving the service processing result sent by the second service system, the intermediate system needs to update the second subscriber identity therein to the first subscriber identity, so that the first service system can identify and process the second subscriber identity.
In some embodiments, each service system may need the user identifier in another service system in the service processing to perform data parsing and other processing, so that the user identifier in another service system may be obtained from the intermediate system. Taking the example that the first service system acquires the user identifier in the other service system, the following steps may be specifically performed: receiving a query request sent by a first service system, and acquiring a first user identifier and a second service system identifier in the query request; based on the first user identification, calling a mapping relation of the corresponding user identifications among the systems to acquire a second user identification corresponding to the first user identification in the second service system; and sending the second user identification to the first service system.
And the query request sent by the first service system comprises a first user identifier and a second service system identifier so as to query the user identifier corresponding to the first user identifier in the second service system at this time. After receiving the query request, the intermediate system can obtain a second user identifier corresponding to the first user identifier in the second service system based on the mapping relation of the user identifiers between the systems, and then sends the second user identifier to the first service system.
In the embodiment of the invention, the mapping relation of the user identification among the systems is stored in the intermediate system, the user identification can interact with data of each service system, each service system can send the service processing request to the intermediate system when needing to cooperate with other systems, so that the intermediate system converts the service processing request of the service system into the service request of the service system needing to cooperate and sends the service request, the service system needing to cooperate is enabled to process the service, the data intercommunication among the systems is realized, the identification of other systems is not required to be stored in each service system, the storage resource of the service system is saved, and the performance of the service system is improved.
In the embodiment of the invention, each service system can establish connection with the intermediate system in a registration mode. An embodiment of the present invention provides a method for registering a service system, and as shown in fig. 4, the method includes:
s401: a registration request for a business system is received.
The service system may include a first service system and a second service system. The registration request may include a system identifier of the service system, a service processing type, user information, and a corresponding user identifier of the user information in the service system.
S402: and acquiring user information included in the registration request, and inquiring a target mapping relation of the corresponding user identification between the systems based on the user information.
The target mapping relationship may be an annular mapping relationship, and the user information may specifically be information uniquely identifying a user identity, so as to indicate which user the user identity corresponds to in the registration request. The intermediate system can inquire the target mapping relation of the corresponding user identification between the systems based on the user information, and the target mapping relation stores the mapping relation between the user identifications registered by the user in different service systems.
S403: and acquiring the user identifier and the system identifier in the registration request so as to update the user identifier and the system identifier to the target mapping relation.
After the intermediate system queries the target mapping relationship, the intermediate system can update the user identifier and the system identifier of the service system to the target mapping relationship, so as to expand the service system.
Specifically, the intermediate system may not have a target mapping relationship, so the query target mapping relationship does not exist in step S402, and the intermediate system may generate a corresponding mapping relationship for the user information. This step can be performed as: responding to the condition that the target mapping relation does not exist, and generating a corresponding mapping relation of the user identification between the systems based on the user identification and the system identification; and in response to the target mapping relationship existing, updating the user identification and the system identification to the target mapping relationship.
It should be noted that, when registering in each service system, the intermediate system may allocate a corresponding port to each service system, so that each system may perform data transmission with the intermediate system through the corresponding port.
In the embodiment of the invention, the mapping relation of the user identification among the systems is stored in the intermediate system through the registration processing of each service system, and the mapping relation can be interacted with the data of each service system, each service system can send the service processing request to the intermediate system when needing to cooperate with other systems, so that the intermediate system converts the service processing request of the service system into the service request of the service system needing to cooperate and sends the service request, thereby enabling the cooperating service systems to carry out service processing, realizing the data intercommunication and the service processing intercommunication among the systems, avoiding the need of storing the identification of other systems in each service system, saving the storage resource of the service system and improving the performance of the service system.
It should be noted that, in the embodiment of the present invention, the intermediate system may deploy the service provided by the intermediate system in a manner of virtual machine (sure) and containerization (jdos). Fig. 5 is an architecture diagram of an intermediate system deployment. In the embodiment of the present invention, rooms (e.g., a room a and a room B) in which an intermediate system is deployed may be determined, an application server (e.g., a virtual server) for deployment is determined in each room, and then the application server is deployed in a manner of virtual machine (sure) and containerization (jdos), and the intermediate system is deployed in different rooms and multiple containers (application servers) are also deployed in the same room, so that high-availability deployment of the intermediate system is achieved, and even if one container in an application is down or the entire room cannot be accessed, containers of other rooms also provide services. And the CPU of the application and the memory utilization rate alarm can be configured in the intermediate system, so that the number of containers in the intermediate system can be adjusted based on the alarm, and dynamic capacity expansion and capacity reduction can be carried out on the intermediate system. Each port in the intermediate system can be registered in the JSF, so that services can be provided outwards, a user invokes the services by introducing the jar packet, and meanwhile, the JSF can perform load balancing on the intermediate system. Meanwhile, a plurality of sets of databases (such as mysql and the like) are deployed for the intermediate system, such as DB1, DB2 and the like in fig. 5, a master-slave mutual backup mode may be adopted, the master database may perform data writing, the slave databases may perform data reading, and when one slave database fails, corresponding services may be provided through other slave databases. In the embodiment of the present invention, a data warehouse, such as NOSQL in fig. 5, may also be configured for the intermediate system, and the data warehouse may periodically synchronize data in the database in an asynchronous replication manner to serve as a data asset for data analysis and the like, so that the availability of the data may be ensured to the maximum extent.
In the embodiment of the invention, in order to enable the intermediate system to perform high-performance mapping relation query service, the key system can be configured with a multi-level cache structure. Specifically, the embodiment of the present invention takes a three-level cache structure as an example: the local cache (Guava) of the corresponding caller of the intermediate system is a first-level cache, the local cache (Redis) of the service end of the intermediate system is a second-level cache, and the database cache of the service end of the intermediate system is a third-level cache. Therefore, through the three-level cache structure, data query is sequentially carried out in the sequence of the first-level cache, the second-level cache and the third-level cache until required data are queried, and the intermediate system can maintain the data in the caches through timing tasks.
In order to solve the problems in the prior art, an embodiment of the present invention provides a service processing apparatus 600, as shown in fig. 6, where the apparatus 600 includes:
a receiving unit 601, configured to receive a first service processing request sent by a first service system, and obtain a first user identifier and a service processing type in the first service processing request;
a determining unit 602, configured to query a second service system associated with the service processing type, to invoke a preset mapping relationship of inter-system user identifiers, and determine a second user identifier corresponding to the first user identifier in the second service system, where the mapping relationship includes an annular mapping relationship between user identifiers of at least three service systems corresponding to each user;
a generating unit 603, configured to obtain a request generation model of the second service system, so as to generate a second service processing request based on the second user identifier;
a sending unit 604, configured to send the second service processing request to the second service system.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 3, and the description thereof is omitted.
In an embodiment, the receiving unit 601 is further configured to receive a service processing result sent by the second service system;
the sending unit 604 is further configured to update the second subscriber identity in the service processing result to the first subscriber identity, so as to send the updated service processing result to the first service system.
In another embodiment, the receiving unit 601 is further configured to receive a registration request of a service system, where the service system includes the first service system and a second service system;
the apparatus 600 further comprises:
the query unit is used for acquiring the user information included in the registration request and querying a target mapping relation of the corresponding inter-system user identifier based on the user information, wherein the target mapping relation is an annular mapping relation;
and the updating unit is used for acquiring the user identifier and the system identifier in the registration request so as to update the user identifier and the system identifier to the target mapping relation.
In another embodiment, the update unit is specifically configured to:
in response to the target mapping relation not existing, generating a corresponding mapping relation of the user identifier between the systems based on the user identifier and the system identifier;
in response to the target mapping relationship existing, updating the user identification and the system identification to the target mapping relationship.
In another embodiment, the receiving unit 601 is further configured to receive an inquiry request sent by a first service system, and obtain a first subscriber identity and a second service system identity in the inquiry request;
the apparatus 600 further comprises:
an obtaining unit, configured to invoke a mapping relationship of corresponding inter-system user identifiers based on the first user identifier, so as to obtain a second user identifier corresponding to the first user identifier in the second service system;
the sending unit 604 is further configured to send the second subscriber identity to the first service system.
In another embodiment, the generating unit 603 is specifically configured to:
acquiring a service request template of the second service system to extract service parameters from the first service processing request;
and updating the service parameters and the second user identification to the service request template to obtain a second service processing request.
In another embodiment, the determining unit 602 is specifically configured to:
and inquiring a service system set associated with the service processing type, acquiring the priority of each service system in the service system set, and determining a second service system from the service system set based on the priority.
It should be understood that the embodiment of the present invention is implemented in the same manner as the embodiment shown in fig. 3 or fig. 4, and is not repeated herein.
The mapping relation of the user identification among the storage systems in the intermediate system can interact with data of all the service systems, and all the service systems can send the service processing request to the intermediate system when needing to cooperate with other systems, so that the intermediate system converts the service processing request of the service system into the service request of the service system needing to cooperate and sends the service request, thereby enabling the cooperating service systems to process the service, realizing the data intercommunication among all the systems, so that the identification of other systems is not needed to be stored in all the service systems, saving the storage resources of the service systems and improving the performance of the service systems.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic device of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the service processing method provided by the embodiment of the invention.
Fig. 7 shows an exemplary system architecture 700 to which a service processing method or a service processing apparatus according to an embodiment of the present invention can be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communications links between terminal devices 701, 702, 703 and the server 705. Network 704 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. Various client applications may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, and the server may analyze and perform other processes on the received data such as the service processing request, and feed back the processing result (for example, the processing result — just an example) to the terminal device.
It should be noted that the service processing method provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the service processing apparatus is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, a block diagram of a computer system 800 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 8 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that the computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes a receiving unit, a determining unit, a generating unit, and a transmitting unit. The names of these units do not in some cases form a limitation on the unit itself, and for example, a receiving unit may also be described as a "unit of a service processing request receiving function".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the service processing method provided by the present invention.
As another aspect, the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the service processing method provided in the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing a service, comprising:
receiving a first service processing request sent by a first service system, and acquiring a first user identifier and a service processing type in the first service processing request;
querying a second service system associated with the service processing type to call a preset mapping relationship of user identifiers among systems, and determining a second user identifier corresponding to the first user identifier in the second service system, wherein the mapping relationship comprises an annular mapping relationship among the user identifiers of at least three service systems corresponding to each user;
acquiring a request generation model of the second service system to generate a second service processing request based on the second user identifier;
and sending the second service processing request to the second service system.
2. The method of claim 1, wherein after sending the second service processing request to the second service system, further comprising:
receiving a service processing result sent by the second service system;
and updating the second user identification in the service processing result into the first user identification so as to send the updated service processing result to the first service system.
3. The method of claim 1, further comprising:
receiving a registration request of a service system, wherein the service system comprises a first service system and a second service system;
acquiring user information included in the registration request, and inquiring a target mapping relation of a corresponding inter-system user identifier based on the user information, wherein the target mapping relation is an annular mapping relation;
and acquiring a user identifier and a system identifier in the registration request so as to update the user identifier and the system identifier to the target mapping relation.
4. The method of claim 3, wherein updating the user identifier and the system identifier to the target mapping relationship comprises:
responding to the target mapping relation not existing, and generating a corresponding mapping relation of the user identification between the systems based on the user identification and the system identification;
in response to the target mapping relationship existing, updating the user identification and the system identification to the target mapping relationship.
5. The method of claim 1, further comprising:
receiving a query request sent by a first service system, and acquiring a first user identifier and a second service system identifier in the query request;
based on the first user identification, calling a mapping relation of corresponding user identifications among systems to acquire a second user identification corresponding to the first user identification in the second service system;
and sending the second user identification to the first service system.
6. The method of claim 1, wherein obtaining a request generation model for the second business system to generate a second business process request based on the second user identification comprises:
acquiring a service request template of the second service system to extract service parameters from the first service processing request;
and updating the service parameters and the second user identification to the service request template to obtain a second service processing request.
7. The method of claim 1, wherein querying the second business system associated with the business process type comprises:
and inquiring a service system set associated with the service processing type, acquiring the priority of each service system in the service system set, and determining a second service system from the service system set based on the priority.
8. A traffic processing apparatus, comprising:
a receiving unit, configured to receive a first service processing request sent by a first service system, and obtain a first user identifier and a service processing type in the first service processing request;
a determining unit, configured to query a second service system associated with the service processing type to invoke a preset mapping relationship of inter-system user identifiers, and determine a second user identifier corresponding to the first user identifier in the second service system, where the mapping relationship includes an annular mapping relationship between user identifiers of at least three service systems corresponding to each user;
a generating unit, configured to obtain a request generation model of the second service system, so as to generate a second service processing request based on the second user identifier;
and the sending unit is used for sending the second service processing request to the second service system.
9. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202210830944.6A 2022-07-15 2022-07-15 Service processing method, device, electronic equipment and storage medium Pending CN115277707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210830944.6A CN115277707A (en) 2022-07-15 2022-07-15 Service processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210830944.6A CN115277707A (en) 2022-07-15 2022-07-15 Service processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115277707A true CN115277707A (en) 2022-11-01

Family

ID=83764482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210830944.6A Pending CN115277707A (en) 2022-07-15 2022-07-15 Service processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115277707A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702104A (en) * 2023-08-08 2023-09-05 阿里健康科技(中国)有限公司 Method, device, equipment and storage medium for associating account information

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000025468A2 (en) * 1998-10-27 2000-05-04 Ultramind International Limited Direct communication link between a plurality of users independent of a server
CN101433050A (en) * 2006-05-02 2009-05-13 艾利森电话股份有限公司 Method for multi-interface registration
WO2014015525A1 (en) * 2012-07-27 2014-01-30 华为技术有限公司 Method and device for querying for user online state
CN106204383A (en) * 2016-07-20 2016-12-07 中国银联股份有限公司 Trans-sectoral business information processing system
CN106339176A (en) * 2015-07-08 2017-01-18 阿里巴巴集团控股有限公司 Intermediate file processing method, client, server and system
US20170344703A1 (en) * 2006-12-29 2017-11-30 Kip Prod P1 Lp Multi-services application gateway and system employing the same
CN110457141A (en) * 2019-07-04 2019-11-15 阿里巴巴集团控股有限公司 A kind of processing method of service message, system, device and equipment
CN110618911A (en) * 2019-08-15 2019-12-27 中国平安财产保险股份有限公司 Data monitoring method and device, storage medium and server
CN113689206A (en) * 2020-05-19 2021-11-23 腾讯科技(深圳)有限公司 Resource transfer method, device, system, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000025468A2 (en) * 1998-10-27 2000-05-04 Ultramind International Limited Direct communication link between a plurality of users independent of a server
CN101433050A (en) * 2006-05-02 2009-05-13 艾利森电话股份有限公司 Method for multi-interface registration
US20170344703A1 (en) * 2006-12-29 2017-11-30 Kip Prod P1 Lp Multi-services application gateway and system employing the same
WO2014015525A1 (en) * 2012-07-27 2014-01-30 华为技术有限公司 Method and device for querying for user online state
CN106339176A (en) * 2015-07-08 2017-01-18 阿里巴巴集团控股有限公司 Intermediate file processing method, client, server and system
CN106204383A (en) * 2016-07-20 2016-12-07 中国银联股份有限公司 Trans-sectoral business information processing system
CN110457141A (en) * 2019-07-04 2019-11-15 阿里巴巴集团控股有限公司 A kind of processing method of service message, system, device and equipment
CN110618911A (en) * 2019-08-15 2019-12-27 中国平安财产保险股份有限公司 Data monitoring method and device, storage medium and server
CN113689206A (en) * 2020-05-19 2021-11-23 腾讯科技(深圳)有限公司 Resource transfer method, device, system, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡显伟;杨雷;代钰;张斌;: "服务网格中面向业务用户的服务组合方法", 沈阳航空工业学院学报, no. 04 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702104A (en) * 2023-08-08 2023-09-05 阿里健康科技(中国)有限公司 Method, device, equipment and storage medium for associating account information

Similar Documents

Publication Publication Date Title
CN104125208B (en) Data transmission method and device
CN111447257B (en) Message conversion method and device
CN112445626B (en) Data processing method and device based on message middleware
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
CN113495921A (en) Routing method and device of database cluster
CN111538605B (en) Distributed data access layer middleware and command execution method and device
CN111797091A (en) Method and device for querying data in database, electronic equipment and storage medium
CN110837409A (en) Method and system for executing task regularly
CN113691635B (en) Method and device for calling microservice, electronic equipment and readable storage medium
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN111124589A (en) Service discovery system, method, device and equipment
CN114090388A (en) Information acquisition method, server cluster, server and equipment
CN110321252B (en) Skill service resource scheduling method and device
CN116303608A (en) Data processing method and device for application service
CN115277707A (en) Service processing method, device, electronic equipment and storage medium
CN113067860B (en) Method, apparatus, device, medium and product for synchronizing information
CN110798495A (en) Method and server for end-to-end message push in cluster architecture mode
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN115629909A (en) Service data processing method and device, electronic equipment and storage medium
CN110661857B (en) Data synchronization method and device
CN113760487A (en) Service processing method and device
CN113242313A (en) Data synchronization method, system, device, server and storage medium
CN112231405A (en) Data storage device
CN113556370A (en) Service calling method and device
CN114072768A (en) Controller for bridging database architectures

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination