CN116233254A - Business cut-off method, device, computer equipment and storage medium - Google Patents

Business cut-off method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116233254A
CN116233254A CN202310266749.XA CN202310266749A CN116233254A CN 116233254 A CN116233254 A CN 116233254A CN 202310266749 A CN202310266749 A CN 202310266749A CN 116233254 A CN116233254 A CN 116233254A
Authority
CN
China
Prior art keywords
target
service
business
business service
class instance
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
CN202310266749.XA
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310266749.XA priority Critical patent/CN116233254A/en
Publication of CN116233254A publication Critical patent/CN116233254A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a business cut-off method, a business cut-off device, computer equipment, a storage medium and a computer program product, and relates to the technical field of cloud computing. The method comprises the following steps: receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system; inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance; reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service; determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system. By adopting the method, the service switching between the systems can be realized.

Description

Business cut-off method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a service tangential flow method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
How to quickly bring on business functions is an important consideration for many computer systems in the early stages of construction, especially for some "high-rise" systems. With the increase of business volume and service user groups, the old systems are often overwhelmed, and the problems of long time consumption of online service return, slow execution speed of batch tasks, rapid increase of database pressure and the like are presented. At this point, a new system, e.g., a unitized system, needs to be reconfigured. A thousand business systems can make a thousand personalized solutions. But in either scheme, the process of traffic cut-off is not escaped finally, i.e. background data and foreground access of the old system are cut off to the new system.
Therefore, a traffic-switching method is needed to implement inter-system traffic switching.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a traffic slicing method, apparatus, computer device, computer readable storage medium, and computer program product that enable inter-system traffic slicing.
In a first aspect, the present application provides a traffic-switching method. The method comprises the following steps:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
Inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the method further comprises:
receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance;
and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the updating the variable attribute of the target configuration class instance according to the modified tangential flow policy corresponding to the target business service includes:
And updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, before the receiving the configuration modification information, the method further comprises:
determining the service type of the target business service according to the business volume and the execution time of the target business service;
inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the second system is a unitized system, the second system comprising a common parameter service node; in the case where the target system is the second system, the method further includes:
judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service;
and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the method further comprises:
if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
In a second aspect, the present application further provides a service traffic switching device. The device comprises:
the first receiving module is used for receiving a business request aiming at a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
the first query module is used for querying the configuration class instance corresponding to the target business service in the corresponding relation between the preset business service and the configuration class instance;
the reading module is used for reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
the first determining module is used for determining a target system corresponding to the service request based on the client information and the target tangential policy and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the apparatus further comprises:
the second receiving module is used for receiving the configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
the second query module is used for querying a target configuration class instance corresponding to the target business service in a corresponding relation between the preset business service and the configuration class instance;
and the updating module is used for updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the updating module is specifically configured to:
and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the apparatus further comprises:
the second determining module is used for determining the service type of the target business service according to the business volume and the execution time of the target business service;
the third query module is used for querying the tangential policy corresponding to the target business service according to the service type of the target business service in the corresponding relation between the preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the second system is a unitized system, the second system comprising a common parameter service node; in the case where the target system is the second system, the apparatus further includes:
the judging module is used for judging whether the target business service meets the preset public parameter service condition according to the business type, the execution frequency and the execution time of the target business service;
and the forwarding module is used for forwarding the service request to the public parameter service node if the target service meets the preset public parameter service condition.
In one embodiment, the apparatus further comprises:
and the third determining module is used for determining a target unit corresponding to the service request according to the client information and a preset unit determining rule if the target service does not meet the preset public parameter service condition, and forwarding the service request to the target unit.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the method further comprises:
receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance;
and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the updating the variable attribute of the target configuration class instance according to the modified tangential flow policy corresponding to the target business service includes:
and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, before the receiving the configuration modification information, the method further comprises:
determining the service type of the target business service according to the business volume and the execution time of the target business service;
inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the second system is a unitized system, the second system comprising a common parameter service node; in the case where the target system is the second system, the method further includes:
judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service;
And if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the method further comprises:
if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
Determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the method further comprises:
receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance;
and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the updating the variable attribute of the target configuration class instance according to the modified tangential flow policy corresponding to the target business service includes:
and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, before the receiving the configuration modification information, the method further comprises:
Determining the service type of the target business service according to the business volume and the execution time of the target business service;
inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the second system is a unitized system, the second system comprising a common parameter service node; in the case where the target system is the second system, the method further includes:
judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service;
and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the method further comprises:
if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the method further comprises:
receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
Inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance;
and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the updating the variable attribute of the target configuration class instance according to the modified tangential flow policy corresponding to the target business service includes:
and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, before the receiving the configuration modification information, the method further comprises:
determining the service type of the target business service according to the business volume and the execution time of the target business service;
inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the second system is a unitized system, the second system comprising a common parameter service node; in the case where the target system is the second system, the method further includes:
judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service;
and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the method further comprises:
if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
The business cut-off method, the business cut-off device, the computer equipment, the storage medium and the computer program product are characterized in that a terminal receives a business request aiming at a target business service, queries a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance, reads the variable attribute of the configuration class instance to obtain a target cut-off strategy corresponding to the target business service, determines a target system corresponding to the business request in a first system and a second system based on client information and the target cut-off strategy, and forwards the business request to the target system to realize business cut-off between the first system and the second system.
Drawings
FIG. 1 is a flow diagram of a traffic-switching method in one embodiment;
FIG. 2 is a flow chart of a traffic cut-off method according to another embodiment;
FIG. 3 is a flow chart of a traffic cut-off method according to another embodiment;
FIG. 4 is a flow diagram of a traffic cut-off method in the case that the target system is the second system in one embodiment;
FIG. 5 is a block diagram of a traffic switching device in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a service cut-flow method is provided, where this embodiment is applied to a terminal to illustrate the method, and it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. The terminal can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things equipment and portable wearable equipment, and the internet of things equipment can be smart speakers, smart televisions, smart air conditioners, smart vehicle-mounted equipment and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. In this embodiment, the method includes the steps of:
Step 101, a business request for a target business service is received.
Wherein the business request includes customer information requesting a target business service. The target business service is a service supported by the first system and the second system.
In the embodiment of the application, the terminal receives a service request for a target service. The first system and the second system are systems for performing traffic cut-off, namely, the traffic cut-off is performed between the first system and the second system. The first system may be a flow cut-in system and the second system may be a flow cut-in system. The first system may be an old system and the second system may be a new system. The client information is information of a client for which the service request is directed. The customer information may include a customer number and may also include the region in which the customer is located.
Step 102, inquiring the configuration class instance corresponding to the target business service in the corresponding relation between the preset business service and the configuration class instance.
In the embodiment of the application, the terminal stores the corresponding relation between the business service and the configuration class instance in advance. Then, in the corresponding relation between the service and the configuration class instance, the terminal inquires the configuration class instance corresponding to the target service. The configuration class instance is used for recording information for realizing target business service operation. The information for realizing the operation of the target business service comprises a tangential flow strategy corresponding to the target business service.
In one example, the terminal pre-stores the correspondence between business services and configuration class instances in memory.
And 103, reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service.
In the embodiment of the application, the terminal reads the variable attribute of the configuration class instance to obtain the target tangential flow strategy corresponding to the target business service. The target traffic policy is used for indicating how the target traffic service performs the traffic cutting among the systems. For example, the target cut policy may be a white list route, a gray region route, or a full cut. The white list routing is that if the client number is in the white list, the service of the client number is implemented on the new system, and if the client number is not in the white list, the service of the client number is continuously completed on the old system. The gray region route is that if the region where the customer is located is in the white list, the business service of the region where the customer is located is realized on the new system, and if the region where the customer is located is not in the white list, the business service of the region where the customer is located is continuously finished on the old system. The full cut is realized by forwarding all business services to the new system.
In one example, the terminal obtains the inheritance chain from the cache according to the configuration class full class name. And then, the terminal acquires a configuration class instance corresponding to the target business service on the inheritance chain. And then, the terminal reads the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service.
And 104, determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system.
Wherein the target system is one of the first system and the second system.
In the embodiment of the application, the terminal determines a target system corresponding to the service request based on the client information and the target tangential policy. The terminal then forwards the service request to the target system.
In one example, the target cut policy is white list routing and the customer information includes a customer number. The terminal judges whether the client number is in the white list. If the client number is in the white list, the terminal determines that the target system corresponding to the service request is the second system. If the client number is not in the white list, the terminal determines that the target system corresponding to the service request is the first system.
In one example, the target cut policy is gray area routing and the customer information includes a customer number. And the terminal inquires the region where the client of the service request is located in a preset mapping relation between the client number and the region where the client is located according to the client number. Then, the terminal judges whether the region where the client is located is in the white list. If the region where the client is located is in the white list, the terminal determines that the target system corresponding to the service request is the second system. If the region where the client is located is not in the white list, the terminal determines that the target system corresponding to the service request is the first system.
In the above business cut-stream method, a terminal receives a business request for a target business service, queries a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance, reads a variable attribute of the configuration class instance to obtain a target cut-stream strategy corresponding to the target business service, determines a target system corresponding to the business request in a first system and a second system based on client information and the target cut-stream strategy, and forwards the business request to the target system to realize business cut-stream between the first system and the second system. Moreover, the terminal presets the corresponding relation between the business service and the configuration class instance, so that each business service can correspond to different tangential strategies, each business service can carry out business tangential according to the different tangential strategies, business tangential of service level is realized, and accuracy and adaptability of tangential among multiple service systems are improved.
In one embodiment, as shown in fig. 2, the traffic-cutting method further includes the following steps:
in step 201, configuration modification information is received.
The configuration modification information comprises target business service and modified tangential flow strategy corresponding to the target business service.
In the embodiment of the application, the terminal receives configuration modification information. Wherein the configuration modification information is used to represent a change in the tangential flow policy of the target business service.
In one example, a terminal receives configuration modification information through a listener.
Step 202, querying a target configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance.
In the embodiment of the application, the terminal queries a target configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance.
And 203, updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In the embodiment of the application, the terminal updates the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service. The variable attribute of the target configuration class instance is used for representing the tangential flow strategy corresponding to the target business service.
In the business cut-flow method, when the cut-flow strategy of the target business service is changed, configuration modification information of the target business service is received in time, a target configuration class instance corresponding to the target business service is inquired in the corresponding relation between the preset business service and the configuration class instance, and then the variable attribute of the target configuration class instance is updated according to the modified cut-flow strategy, so that the real-time update and the effectiveness of the cut-flow strategy of the target business service can be realized, and the upgrading or the rollback of the cut-flow strategy is convenient. Moreover, the method does not need to restart the system and regenerate the container, does not influence the operation of the system, and is short in time consumption. And the configuration of the tangential flow strategy is realized outside the service code and registered as a service, the service is transmitted to a system needing to be tangential flow through a network, and then the validation of the configuration at the application side is realized through reflection, so that the decoupling of the tangential flow strategy and the service code is realized. Moreover, the developer can use the method by only writing JavaBean and introducing notes, does not need to write complex logic codes, and has unified and simple use mode.
In one embodiment, the specific process of updating the variable attribute of the target configuration class instance according to the modified tangential flow policy corresponding to the target business service includes the following steps: and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In the embodiment of the application, the terminal updates the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service. The preset function is used for updating the variable attribute of the target configuration class instance. For example, the preset function may be a set function.
In the business cut-flow method, the terminal updates the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified cut-flow strategy corresponding to the target business service, so that the real-time update and effectiveness of the cut-flow strategy of the target business service can be realized, a system is not required to be restarted and a container is not required to be regenerated, the system operation is not influenced, and the time consumption is short.
In one embodiment, as shown in fig. 3, the traffic-switching method further includes the following steps, before receiving the configuration modification information:
Step 301, determining the service type of the target business service according to the traffic volume and the execution time of the target business service.
In the embodiment of the application, the terminal determines the service type of the target business service according to the business volume and the execution time of the target business service. Wherein the service types may include a first service type and a second service type. The first service type may be traffic-heavy and time-sensitive for the traffic service. The second service type may be small or time insensitive to traffic of the business service.
Specifically, the terminal compares the traffic of the target traffic service with a preset traffic threshold. Meanwhile, the terminal compares the execution time of the target business service with a preset execution time threshold. If the traffic volume of the target business service is greater than or equal to a preset traffic volume threshold value and the execution time of the target business service is less than or equal to a preset execution time threshold value, the terminal determines that the service type of the target business service is the first service type. If the traffic volume of the target business service is smaller than the preset traffic volume threshold value and the execution time of the target business service is larger than the preset execution time threshold value, the terminal determines that the service type of the target business service is the second service type.
Step 302, in the corresponding relation between the preset service type and the tangential policy, according to the service type of the target business service, inquiring the tangential policy corresponding to the target business service.
Wherein the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In the embodiment of the application, the terminal stores the corresponding relation between the service type and the tangential policy in advance. And then, the terminal inquires the tangential strategy corresponding to the target business service according to the service type of the target business service in the corresponding relation between the preset service type and the tangential strategy. The traffic service is used for switching between systems. For example, the cut-flow rule may be a white list route, a gray region route, or a full cut-flow.
Specifically, if the service type of the target service is the first service type, the terminal determines that the tangential policy corresponding to the target service is the first tangential policy. If the service type of the target business service is the second service type, the terminal determines that the tangential flow strategy corresponding to the target business service is the second tangential flow strategy. In one example, the first cut policy may be whitelist routing, gray region routing, and full cut. The second cut policy may be a whitelist route followed by a full cut.
In the above-mentioned business cut-off method, the terminal confirms the service type of the goal business service according to business volume and execution time of the goal business service, and then in the corresponding relation of preset service type and cut-off strategy, according to the service type of the goal business service, inquire about the cut-off strategy corresponding to the goal business service. In this way, according to the traffic volume and the execution time of the target business service, the appropriate tangential policy of the target business service is determined, so that the determination of the tangential policy of the target business service can be realized, different tangential policies are allocated to the target business service of different service types, and the tangential policy is a tangential rule sequence consisting of at least one tangential rule, so that the stability of the tangential flow of the target business service of different service types can be improved.
In one embodiment, as shown in FIG. 4, the second system is a unitized system, the second system comprising a common parameter service node. In the case that the target system is the second system, the traffic cut-off method further includes the following steps:
step 401, judging whether the target business service meets the preset public parameter service condition according to the business type, the execution frequency and the execution time of the target business service.
In an embodiment of the present application, the unitized system comprises at least two units. The traffic types may include a first traffic type and a second traffic type. The first traffic type may be that service splitting is not possible. The second traffic type may be service splitting capable.
And the terminal compares the execution frequency of the target business service with a preset execution frequency threshold value. Meanwhile, the terminal compares the execution time of the target business service with a preset execution time threshold. If the service type of the target service is the first service type, the execution frequency of the target service is smaller than or equal to a preset execution frequency threshold, and the execution time of the target service is larger than or equal to a preset execution time threshold, the terminal determines that the target service meets the preset public parameter service condition. If the service type of the target service is the second service type, or the execution frequency of the target service is greater than a preset execution frequency threshold, or the execution time of the target service is less than a preset execution time threshold, the terminal determines that the target service does not meet the preset public parameter service condition.
In one example, the terminal presets a traffic type of the target traffic service.
In one example, the terminal identifies the traffic type of the target traffic service according to a preset identification algorithm.
And step 402, if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In the embodiment of the application, if the target service meets the preset public parameter service condition, the terminal forwards the service request to the public parameter service node.
In the above service cut-flow method, the second system is a unitized system, and the second system includes a common parameter service node. And under the condition that the target system is a second system, judging whether the target business service meets the preset public parameter service condition according to the business type, the execution frequency and the execution time of the target business service, and if the target business service meets the preset public parameter service condition, forwarding the business request to a public parameter service node. In this way, by setting the public parameter service node in the newly constructed unitized system, and according to the service type, the execution frequency and the execution time of the target service, the service request of the target service which cannot be split, is low-frequency and is insensitive in time is forwarded to the public parameter service node for processing, so that the method is more in line with the diversity of the target service, and the accuracy of service cut-off can be further improved.
In one embodiment, the traffic-switching method further comprises the steps of: if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and the preset unit determination rule, and forwarding the business request to the target unit.
In the embodiment of the present application, if the target service does not meet the preset common parameter service condition, the terminal determines the target unit corresponding to the service request according to the client information and the preset unit determination rule. The terminal then forwards the service request to the target unit. Wherein the target unit is one of the units in the unitized system. Specifically, the terminal determines a target unit corresponding to the service request according to the client number and the Ha Xiqu remainder algorithm.
In one example, the terminal hashes the client number to obtain a hash value of the client number. And then, the terminal takes the remainder of the preset array length through the hash value of the client number to obtain a calculation result corresponding to the service request. And then, the terminal determines a target unit corresponding to the service request according to the calculation result corresponding to the service request. In the case where the number of units of the second system is 4, the preset array length may be 128.
In the above-mentioned business cut-off method, if the target business service does not meet the preset public parameter service condition, according to customer information and preset unit determining rule, determining the target unit corresponding to the business request, and forwarding the business request to the target unit. In this way, the service request of the target service which does not meet the preset public parameter service condition is forwarded to the target unit for processing through the preset unit determining rule, so that the accuracy of service cut-off can be further improved.
In one embodiment, the setup procedure of the second system comprises the steps of: determining the number of units of the first system according to the traffic of the first system; copying the first system according to the number of the units to obtain a plurality of units of the number of the units; creating a front node and a public parameter service node; the front node is used for distributing service requests and service cut streams; and establishing a second system according to the number of units, the front node and the public parameter service node.
In an embodiment of the present application, a first system may include a database, a service node, and a bulk node. The terminal determines the number of units of the first system according to the traffic of the first system. Then, the terminal copies the first system of the unit number according to the unit number to obtain the unit number. The terminal then creates a pre-node and a common parameter service node. Then, the terminal constructs a second system from the number of units, the front node and the common parameter service node. Thus, by copying the first system, constructing the front node and the public parameter service node, constructing the second system as a unitized system, each unit can process the corresponding target business service of the customer in a closed loop manner, and can thoroughly divide the database and the table, thereby solving the performance problem of the new and old system caused by the increase of business volume and service user groups.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a service switching device for realizing the above related service switching method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more service switching devices provided below may be referred to the limitation of the service switching method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 5, a traffic-switching device 500 is provided, including: a first receiving module 510, a first querying module 520, a reading module 530, and a first determining module 540, wherein:
a first receiving module 510, configured to receive a service request for a target service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
the first query module 520 is configured to query a configuration class instance corresponding to the target service in a preset corresponding relationship between the service and the configuration class instance;
a reading module 530, configured to read the variable attribute of the configuration class instance, and obtain a target tangential policy corresponding to the target business service;
a first determining module 540, configured to determine a target system corresponding to the service request based on the client information and the target tangential policy, and forward the service request to the target system; the target system is one of the first system and the second system.
Optionally, the apparatus 500 further includes:
the second receiving module is used for receiving the configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
The second query module is used for querying a target configuration class instance corresponding to the target business service in a corresponding relation between the preset business service and the configuration class instance;
and the updating module is used for updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
Optionally, the updating module is specifically configured to:
and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
Optionally, the apparatus 500 further includes:
the second determining module is used for determining the service type of the target business service according to the business volume and the execution time of the target business service;
the third query module is used for querying the tangential policy corresponding to the target business service according to the service type of the target business service in the corresponding relation between the preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
Optionally, the second system is a unitized system, and the second system includes a common parameter service node; in the case where the target system is the second system, the apparatus 500 further includes:
The judging module is used for judging whether the target business service meets the preset public parameter service condition according to the business type, the execution frequency and the execution time of the target business service;
and the forwarding module is used for forwarding the service request to the public parameter service node if the target service meets the preset public parameter service condition.
Optionally, the apparatus 500 further includes:
and the third determining module is used for determining a target unit corresponding to the service request according to the client information and a preset unit determining rule if the target service does not meet the preset public parameter service condition, and forwarding the service request to the target unit.
The modules in the service switching device can be realized in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a traffic-cutting method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the processor when executing the computer program further performs the steps of: receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service; inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance; and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the processor when executing the computer program further performs the steps of: and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the processor when executing the computer program further performs the steps of: determining the service type of the target business service according to the business volume and the execution time of the target business service; inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the processor when executing the computer program further performs the steps of: judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service; and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the processor when executing the computer program further performs the steps of: if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
Inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service; inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance; and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the computer program when executed by the processor further performs the steps of: and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining the service type of the target business service according to the business volume and the execution time of the target business service; inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the computer program when executed by the processor further performs the steps of: judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service; and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service; inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance; and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the computer program when executed by the processor further performs the steps of: and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining the service type of the target business service according to the business volume and the execution time of the target business service; inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
In one embodiment, the computer program when executed by the processor further performs the steps of: judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service; and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A traffic-switching method, the method comprising:
receiving a business request for a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
inquiring a configuration class instance corresponding to the target business service in a preset corresponding relation between the business service and the configuration class instance;
Reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
determining a target system corresponding to the service request based on the client information and the target cut-off strategy, and forwarding the service request to the target system; the target system is one of the first system and the second system.
2. The method according to claim 1, wherein the method further comprises:
receiving configuration modification information; the configuration modification information comprises target business service and a modified tangential flow strategy corresponding to the target business service;
inquiring a target configuration class instance corresponding to the target service in a preset corresponding relation between the service and the configuration class instance;
and updating the variable attribute of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
3. The method of claim 2, wherein updating the variable attribute of the target configuration class instance according to the modified tangential flow policy corresponding to the target business service comprises:
and updating the variable attribute of the target configuration class instance by calling the preset function of the target configuration class instance according to the modified tangential flow strategy corresponding to the target business service.
4. The method of claim 2, wherein prior to the receiving configuration modification information, the method further comprises:
determining the service type of the target business service according to the business volume and the execution time of the target business service;
inquiring a tangential policy corresponding to the target business service according to the service type of the target business service in a corresponding relation between a preset service type and the tangential policy; the tangential policy is a sequence of tangential rules consisting of at least one tangential rule.
5. The method of claim 1, wherein the second system is a unitized system, the second system comprising a common parameter service node; in the case where the target system is the second system, the method further includes:
judging whether the target business service meets preset public parameter service conditions according to the business type, the execution frequency and the execution time of the target business service;
and if the target business service meets the preset public parameter service condition, forwarding the business request to the public parameter service node.
6. The method of claim 5, wherein the method further comprises:
If the target business service does not meet the preset public parameter service condition, determining a target unit corresponding to the business request according to the client information and a preset unit determination rule, and forwarding the business request to the target unit.
7. A traffic-switching device, the device comprising:
the first receiving module is used for receiving a business request aiming at a target business service; the business request comprises client information for requesting the target business service; the target business service is a service supported by the first system and the second system;
the first query module is used for querying the configuration class instance corresponding to the target business service in the corresponding relation between the preset business service and the configuration class instance;
the reading module is used for reading the variable attribute of the configuration class instance to obtain a target tangential flow strategy corresponding to the target business service;
the first determining module is used for determining a target system corresponding to the service request based on the client information and the target tangential policy and forwarding the service request to the target system; the target system is one of the first system and the second system.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310266749.XA 2023-03-20 2023-03-20 Business cut-off method, device, computer equipment and storage medium Pending CN116233254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310266749.XA CN116233254A (en) 2023-03-20 2023-03-20 Business cut-off method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310266749.XA CN116233254A (en) 2023-03-20 2023-03-20 Business cut-off method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116233254A true CN116233254A (en) 2023-06-06

Family

ID=86576850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310266749.XA Pending CN116233254A (en) 2023-03-20 2023-03-20 Business cut-off method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116233254A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719652A (en) * 2023-08-08 2023-09-08 支付宝(杭州)信息技术有限公司 Message-based multi-sub-job dynamic distribution method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719652A (en) * 2023-08-08 2023-09-08 支付宝(杭州)信息技术有限公司 Message-based multi-sub-job dynamic distribution method, device and system
CN116719652B (en) * 2023-08-08 2024-04-19 支付宝(杭州)信息技术有限公司 Message-based multi-sub-job dynamic distribution method, device and system

Similar Documents

Publication Publication Date Title
US9830333B1 (en) Deterministic data replication with conflict resolution
US20100318968A1 (en) Catalog-based software component management
JP2019519025A (en) Division and movement of ranges in distributed systems
US10430441B1 (en) Tagging resources of a remote computing service based on locality
US11567943B1 (en) Restricted queries in a database clean room
EP3497586A1 (en) Discovery of calling application for control of file hydration behavior
US20230418699A1 (en) Data clean rooms using defined access
US20200379982A1 (en) Information processing system and method of controlling information processing system
CN116233254A (en) Business cut-off method, device, computer equipment and storage medium
US11636139B2 (en) Centralized database system with geographically partitioned data
US11429311B1 (en) Method and system for managing requests in a distributed system
CN112860953A (en) Data importing method, device, equipment and storage medium of graph database
CN109614089B (en) Automatic generation method, device, equipment and storage medium of data access code
US11928157B2 (en) Projection constraints in a query processing system
CN109857719B (en) Distributed file processing method, device, computer equipment and storage medium
CN113194127B (en) Data storage method, data transmission method and computing equipment
US11176108B2 (en) Data resolution among disparate data sources
CN112965952B (en) Data asset processing method and device
CN117608677B (en) Plug-in generation method, cloud service system and service access method
US11816088B2 (en) Method and system for managing cross data source data access requests
CN116540934A (en) Data storage method and device
US10747729B2 (en) Device specific chunked hash size tuning
CN116541145A (en) Data calling method, device, computer equipment and computer storage medium
CN117149404A (en) Method, device, computer equipment and storage medium for allocating detection task resources
CN116112279A (en) Access control method, device, computer equipment and storage medium

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