CN108809730B - Method and device for controlling flow switching of machine room - Google Patents

Method and device for controlling flow switching of machine room Download PDF

Info

Publication number
CN108809730B
CN108809730B CN201810663985.4A CN201810663985A CN108809730B CN 108809730 B CN108809730 B CN 108809730B CN 201810663985 A CN201810663985 A CN 201810663985A CN 108809730 B CN108809730 B CN 108809730B
Authority
CN
China
Prior art keywords
flow
request message
machine room
information
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.)
Active
Application number
CN201810663985.4A
Other languages
Chinese (zh)
Other versions
CN108809730A (en
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.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201810663985.4A priority Critical patent/CN108809730B/en
Publication of CN108809730A publication Critical patent/CN108809730A/en
Application granted granted Critical
Publication of CN108809730B publication Critical patent/CN108809730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

After the construction of the remote dual-living machine room is completed, the service flow is finely controlled from multiple dimensions according to the request message type of the request message, such as information of merchants, interface information and the like, and the flow is switched from the gray level of a first machine room (or an old machine room) to a second machine room (or a new machine room) according to different granularities, so that smooth flow switching is achieved, and the influence of the service is ensured to be minimum.

Description

Method and device for controlling flow switching of machine room
Technical Field
One or more embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and an apparatus for gray scale verification drainage in a dual-living machine room.
Background
In order to ensure that the service is continuously available, in the case of a single machine room, a machine room is often built at a place with a relatively far geographical location for shunting or using in the case of a disaster, and the mode of the machine room is called a remote double-living machine room. When a remote double-living double-computer room supporting mutual disaster recovery is built, when the remote computer room is built, the reliability of a newly built computer room needs to be verified through verification services. The common practice is to perform service verification on a new machine room by testing traffic, and after the verification is completed, all traffic of an old machine room is switched to a newly-built machine room for operation. The method can not smoothly guide the flow from the old machine room to the newly-built machine room for operation, and if a problem occurs in the process of switching all the flow from the old machine room to the newly-built machine room, the influence on the service is great. And the service verification of the test flow hardly ensures the coverage of all services, and cannot realize comprehensive verification and authenticity verification.
Disclosure of Invention
One or more embodiments of the present specification describe a method and an apparatus for controlling traffic switching in a computer room, which control traffic switching from different dimensions according to different request type information (such as merchant information, interface information, and traffic switching proportion), thereby ensuring authenticity and comprehensiveness of service authentication.
According to a first aspect, there is provided a method of controlling a flow cut for controlling a message handover from a first room to a second room, the method may include:
receiving a request message, wherein the request message comprises request type information; judging whether the request type information meets a preset type condition related to the request type or not and judging whether a cut flow selection parameter generated based on the request message meets a cut flow selection condition related to a preset cut flow proportion or not; and when the request type information meets the preset type condition and the switching selection parameter meets the selection condition, determining that the switching request message is executed to the second machine room. The real flow is adopted, the flow cutting is controlled according to the granularity of information of different request types and the flow cutting proportion, and the real and comprehensive verification of the service is realized.
According to one possible design, the request type information may include merchant information and interface information, and the request type information satisfies a preset type condition related to the request type, including:
the merchant information satisfies a first preset condition related to the merchant information, and the interface information satisfies a second preset condition related to the interface information. And controlling the flow switching according to the merchant information, the interface information and the flow switching proportion, verifying the operation condition of each merchant and each interface in a second machine room (or called as a newly-built machine room), testing each merchant and each interface in the testing process, and ensuring the comprehensiveness of the test.
In one embodiment, the method may further comprise:
when the request type information does not meet a preset type condition related to the request type and/or a cut flow selection parameter generated based on the request message does not meet a cut flow selection condition related to a preset cut flow proportion, determining whether the request message comprises an identifier of a second machine room;
and when the request message comprises the identification of the second computer room, determining to switch the request message to the second computer room for execution.
In one embodiment, the method further comprises:
and when the request message does not comprise the identifier of the second machine room, transmitting the request message to a processing layer at the downstream of the gateway layer, so that the processing layer acquires corresponding service information according to the request message, and returns a switching indication message under the condition that the service information comprises the identifier of the second machine room.
In one embodiment, the method further comprises:
and when the flow switching indication message is received, determining to switch the request message to the second machine room for execution.
In one embodiment, the merchant information may include a merchant identification; the interface information may include an interface identification, an interface type, and the like.
In one embodiment, the flow cutting selection parameter is a random number generated in a range related to a preset flow cutting proportion based on the request type information, and the flow cutting selection condition is a random number of a preset value; alternatively, the first and second electrodes may be,
the flow switching selection parameter is a result of Hash operation based on the request type information; the cut stream selection condition is a hash result of a predetermined value.
According to a second aspect, there is provided a flow switching device for controlling a flow switching, the flow switching device being used for controlling message switching from a first machine room to a second machine room, the flow switching device comprising:
a receiving unit, configured to receive a request message, where the request message includes request type information;
the judging unit is used for judging whether the request type information meets a preset type condition related to the request type and whether a cut flow selection parameter generated based on the request message meets a cut flow selection condition related to a preset cut flow proportion;
and the determining unit is used for determining that the switching request message is executed to the second machine room when the request type information meets the preset type condition and the switching selection parameter meets the selection condition.
In one possible design, the request type information includes merchant information and interface information, and the determining unit is configured to determine that the request type information satisfies a preset type condition related to the request type, and includes:
the determination unit determines that the merchant information satisfies a first preset condition related to the merchant information and the interface information satisfies a second preset condition related to the interface information.
In one possible design, the determination unit is further configured to:
when the request type information does not meet a preset type condition related to the request type and/or a cut flow selection parameter generated based on the request message does not meet a cut flow selection condition related to a preset cut flow proportion, determining whether the request message comprises an identifier of a second machine room;
and when the request message comprises the identification of the second computer room, determining to switch the request message to the second computer room for execution.
In one embodiment, the flow cutting device further comprises an acquisition unit;
and the obtaining unit is used for transmitting the request message to a processing layer at the downstream of the gateway layer when the request message does not comprise the identifier of the second machine room, so that the processing layer obtains corresponding service information according to the request message, and returns a switching indication message under the condition that the service information comprises the identifier of the second machine room.
In one embodiment, the determining unit is further configured to determine to switch the request message to the second equipment room for execution when the flow switching indication message is received.
In one embodiment, the merchant information may include a merchant identification; the interface information may include an interface identification, an interface type.
In one embodiment, the flow cutting selection parameter is a random number generated in a range related to a preset flow cutting proportion based on the request type information, and the flow cutting selection condition is a random number of a preset value; alternatively, the first and second electrodes may be,
the flow switching selection parameter is a result of Hash operation based on the request type information; the cut stream selection condition is a hash result of a predetermined value.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
According to a fourth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and wherein the processor, when executing the executable code, implements the method of the first aspect.
By the method and the device for controlling the flow switching, which are provided by the embodiment of the specification, the flow switching is controlled by adopting the real flow according to different request type information and flow switching proportions, the smooth switching of the flow from the first machine room to the second machine room is realized, and the newly-built machine room is verified truly and comprehensively from a business perspective.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating an implementation scenario of an embodiment disclosed herein;
FIG. 2 illustrates a flow diagram of a method of controlling a cut flow according to one embodiment;
FIG. 3 shows a flow diagram of a method of controlling a cut flow according to another embodiment;
FIG. 4 shows a flow diagram of a method of controlling a cut flow according to another embodiment;
fig. 5 shows a schematic structural diagram of a flow cutting device according to an embodiment.
Detailed Description
The embodiment of the specification provides a method for controlling flow switching of a machine room and a flow switching device, wherein request type information in a service request is controlled through the flow switching device, gray level drainage of the machine room is controlled according to different request types (such as merchant information, interface information, commodity information and the like) and flow switching proportion, and therefore it is guaranteed that all services can be covered in a test flow service verification process, and comprehensive verification and authenticity verification are achieved.
The gray drainage refers to a distribution mode of flow in smooth transition between two machine rooms (for example, a machine room a and a machine room B), and the flow can slowly run from the machine room a to the machine room B, namely, one part of flow runs in the machine room a and the other part of flow runs in the machine room B. The machine room here refers to a server system.
The scheme provided by the specification is described below with reference to the accompanying drawings.
Fig. 1 is a schematic view of a scenario provided in an embodiment of the present disclosure, as shown in fig. 1, including a machine room a and a machine room B, where the embodiment is implemented between the machine room a and the machine room B. The machine room A and the machine room B respectively comprise a flow cutting device, an entrance gateway layer, a core application layer and a database. The whole flow switching device is arranged on an entrance gateway layer of the A/B machine room, flow interception is carried out on the entrance gateway layer, and whether flow switching or switching to the B/A machine room is carried out is judged. For example, when the flow switching device of the equipment room a receives a request message of a service, the flow switching device determines whether to forward the request message to the equipment room B for execution. The specific implementation of the flow cutting device is shown in fig. 2.
It should be noted that fig. 1 only shows a machine room a and a machine room B by way of example, and in the embodiment of this specification, at least one other machine room may also be included. When the flow switching device of the machine room a judges that the request message is switched to other machine rooms for execution, the request message can be switched to the machine room B or other machine rooms for execution according to the machine room identifier carried by the request message. The machine room A, the machine room B and other machine rooms can be different-place machine rooms or local machine rooms.
Fig. 2 is a schematic flow chart of a device for controlling flow cut provided in an embodiment of the present disclosure. The method is used for controlling message switching from a first machine room to a second machine room, for example, message switching from an A machine room to a B machine room shown in FIG. 1. In one embodiment, the first machine room includes a gateway layer, the method performed at the gateway layer of the first machine room, the method may include the steps of:
s110, receiving the request message.
The gateway layer receives a request message sent by the client, where the request message may include request message type information, and the request type information may be merchant information, interface information, and other information. The merchant information may include an identification of the merchant, and the identification of the merchant may be any identification information for identifying the merchant, such as a client identification of a client (client) sending the request message, a shop name of the merchant, and the like. The interface is an interface corresponding to a request message sent by the client, for example, an interface corresponding to a request message for purchase, payment, refund, etc. The interface information may include an Identification (ID) of the interface, a type of the interface, and the like.
Optionally, in this embodiment of the present specification, the gateway layer may simultaneously access one request message, and the one request message may be at least one request message.
And S120, judging whether the request type information meets a preset type condition related to the request type and whether a cut flow selection parameter generated based on the request message meets a cut flow selection condition related to a preset cut flow proportion.
In one embodiment of the present specification, it is assumed that the request type information is merchant information and interface information, the merchant information includes a merchant identifier, and the interface information includes an interface identifier. The preset condition corresponding to the merchant information is an identifier of some or specific merchant, for example, the specific merchant identifier is A, B or C; the preset condition corresponding to the interface information is the identification of some or specific interface, such as an interface identification X for identifying purchase, an interface identification Y for identifying payment, and an interface identification Z for identifying refund.
Judging whether the request type information meets a preset type condition related to the request type, wherein the judgment comprises the following steps: whether the merchant information meets preset conditions corresponding to the merchant information, whether the interface information meets preset conditions corresponding to the interface information, that is, whether the merchant identifier is a merchant identifier in the specific merchant identifier A, B, C, and whether the interface identifier of the interface information is an interface identifier X, Y, Z for identifying purchase, payment, and/or refund, is determined. If the merchant information and the interface information both meet the preset condition corresponding to the value, allowing the request message to be switched; and if any one of the merchant information and the interface information does not meet the corresponding preset condition, the flow cutting is not allowed. That is, if the merchant identification is a specific merchant identification and the interface identification is an interface identification identifying a purchase, payment and/or refund, the request message is allowed to be diverted; if the merchant identification is not a specific merchant identification and/or the interface identification is not an interface identification identifying a purchase, payment, and/or refund, the request message is not allowed to be diverted. .
In addition, the flow cutting judgment and control are carried out based on the preset flow cutting proportion. The preset tangential flow proportion is a self-defined proportion value for limiting tangential flow. In one embodiment, the flow switching selection parameter and the flow switching selection condition calculate the request message through a specific algorithm to generate a flow switching selection parameter, and determine whether the flow switching selection parameter meets a flow switching selection condition related to a preset flow switching proportion.
In one embodiment, the flow cutting selection parameter is a random number generated in a range related to a preset flow cutting proportion based on the request message, and the flow cutting selection condition is a random number of a preset value. Calculating each request message through a random number algorithm to obtain a random number X, determining whether the random number X is consistent with a random number of a preset value, and if so, allowing the request message corresponding to the random number X to be subjected to flow switching; and if not, not allowing the random number X to correspond to the request message to be switched.
In a more specific example, assume that the preset flow switching ratio is 1/10, i.e. 1 request message in every 10 request messages is allowed to be switched. Then for each request message it is selected to be cut with a probability of 1/10. Thus, for each request message to be processed, a random number between 1 and 10 is generated for it, and the cut-stream selection condition is set to a random number of 1 particular value between 1-10, for example a value of 7. Thus, for the current request message, if the random number generated for it happens to be 7, then it is determined that the request message is allowed to be cut; if the generated random number is not 7, the request message is not allowed to be cut, so that the probability that each request message is cut is guaranteed to be 10 percent and is consistent with the preset cut proportion.
In another embodiment, the range of the generated random numbers is not directly related to the preset cut-off ratio, for example, 1/10, but the result of calculating each message by the random number algorithm is 0 or 1. At this time, it may first compare whether the proportion of the request messages that have been cut into streams in the batch of request messages being processed reaches the preset cut stream proportion. If so, not allowing the subsequent message to be subjected to stream switching; if not, then randomly selecting a part to cut the stream in the following message. For example, a batch of request messages being processed contains 100 messages, and the batch of request messages is allowed to cut into 10 request messages at most according to the preset flow cutting proportion. For the current request message, firstly, it is determined whether 10 previous request messages have been switched, that is, it is determined whether the proportion of the switched messages reaches the preset switching proportion. If not, then the current request message may be cut. Next, it is determined whether or not to perform a stream cut based on the random number generated for the request message. For example, in the case where the random results are 1 and 0, if the generated random result is 1, the stream cutting is performed, and if 0, the stream cutting is not performed. In this way, on the basis of randomly selecting the request message, the message proportion of selecting to carry out stream switching is ensured not to be higher than the preset stream switching proportion.
In another embodiment of the present specification, the cut flow selection parameter may also be a result of a hash calculation operation based on the request type information, and the cut flow selection condition is a hash result of a predetermined value. The process is similar to the logic steps of calculating by using a random number algorithm, and is not described herein again for brevity.
It should be noted that the numerical values are merely examples of the technical solutions, and the technical solutions themselves are not limited. In the embodiments of the present specification, different values may be set as needed.
And S130, when the request type information meets the preset type condition related to the request type and the flow switching selection parameter meets the flow switching selection condition, determining that the switching request message is executed to the second machine room.
And when the request type information and the flow switching proportion both meet corresponding conditions, determining to switch the request message to a second machine room for execution.
Through setting the preset type conditions and the tangential flow proportion conditions, the grayscale drainage from a first machine room (or called an old machine room) to a second machine room (or called a newly-built new machine room) is realized by setting different request type information, such as the dimensionality (or granularity) of merchant information and interface information, and the tangential flow proportion control tangential flow, so that the comprehensive coverage of the service is ensured in the process of testing the flow service verification, and further the comprehensive verification and the authenticity verification are realized.
Alternatively, in the embodiments of the present specification, the request type information may also be other information, such as a type of goods (e.g., clothing, electronic goods, food), and the like. In the embodiment of the present specification, the request type information may be set according to the requirement.
Optionally, in an embodiment, as shown in fig. 3, the method may further include:
and S140, when the request type information does not meet the preset type condition related to the request type and/or the cut flow selection parameter generated based on the request message does not meet the cut flow selection condition related to the preset cut flow proportion, determining whether the request message comprises the identifier of the second machine room.
When at least one of the request type information does not satisfy the preset type condition related to the request type and the tangential flow selection parameter generated based on the request message does not satisfy the tangential flow selection condition related to the preset tangential flow proportion is satisfied, it is further required to determine whether the request message contains the identifier of the second machine room. If the request message contains the identifier of the second machine room, executing S130; if the request message does not contain the identity of the second room, S150 is performed.
And S150, transmitting the request message to a processing layer at the downstream of the gateway layer.
Then, the downstream processing layer may obtain the corresponding service information according to the request message, and return the flow switching indication message when the service information includes the identifier of the second equipment room.
The processing layers downstream of the gateway layer may include a core network layer and a database as in fig. 1. The service information is service basic information of a transaction performed by a user, for example, a user purchases a commodity Q, and the service information for purchasing the commodity Q may include a user account ABCDE for purchasing the commodity, a commodity name Q of the commodity Q, a purchase serial number 0101256 for purchasing the commodity Q, an ID of a client for purchasing the commodity Q, and information of a processing room B for processing an order for purchasing the commodity Q. After completing a purchase transaction, the system stores the transaction information for that transaction in a database.
In one embodiment, for example, the request message is a refund request message, and the request message includes service information such as a user account ABCDE requesting refund, a goods name Q requesting refund, and a purchase serial number 0101256 when the goods Q is purchased.
In S150, the gateway layer transmits the request message to a processing layer downstream of the gateway layer, and the processing layer acquires corresponding service information according to the request message, and determines whether the service information includes an identifier B of the processing equipment room when the product Q is purchased, that is, determines whether the service information includes an identifier of the second equipment room. When the identifier of the second machine room is included, the downstream processing layer returns a flow switching indication message to the gateway layer, and when the gateway layer receives the flow switching indication message, the request message is switched to the second machine room to be executed according to the flow switching indication message, that is, S130 is executed. In this way, forward business (such as commodity purchasing) and reverse request (such as refund request for commodity purchasing) are completed in the same machine room. That is, all transactions of the same commodity are ensured to be completed in the same machine room. For another example, a payment and a refund of the withholding are carried out by switching the refund request message to the target machine room to be executed by judging whether the refund request message includes the identifier of the different-place machine room, so that all processes of the service are ensured to be carried out in the same machine room.
When the service message does not include the identifier of the second equipment room, the equipment room to which the gateway layer belongs processes the request message, and the request type information is taken as merchant information and interface information as an example, so that the embodiment of the present specification is described.
Fig. 4 is a schematic flow chart of another apparatus for controlling a flow cut according to an embodiment of the present disclosure. As shown in fig. 4, the method is for controlling message switching from a first room to a second room, where in one embodiment the first room includes a gateway layer and the method is performed at the gateway layer of the first room. The method may comprise the steps of:
s210, receiving the request message.
The gateway layer receives a request message sent by a client of a merchant, wherein the request message comprises merchant information and interface information. The merchant information is an identifier of the client, and the interface information is interface information for identifying that the request message is a purchase request, a payment request or a refund request, such as an interface identifier.
The gateway layer receives the request message and analyzes the message information in the request message, namely the merchant information and the interface information.
S220, judging whether the merchant information meets a first preset condition related to the merchant information.
The first preset condition is the identification of the client allowing the stream cutting. The gateway layer judges whether the client identification of the merchant information is consistent with the identification of the client allowing the flow switching, if so, the request message is allowed to be subjected to the flow switching, and S230 is executed; if not, further determining whether to allow the request message to perform flow switching, i.e. executing S260.
And S230, judging whether the interface information meets a second preset condition related to the interface information.
The second preset condition is an identifier of an interface allowing for switching, for example, an identifier of an interface corresponding to a purchase request, an identifier of an interface corresponding to a payment request, an identifier of an interface corresponding to a refund request, and the like. The gateway layer judges whether the interface identifier of the interface information is consistent with the interface identifier of the allowed flow switching, if so, the flow switching of the request message is allowed, and S240 is executed; if not, further determining whether the conditions of the tangential flow ratio are satisfied, and executing step S260.
And S240, judging whether the cut flow selection parameters generated based on the request message meet cut flow selection conditions related to a preset cut flow proportion.
The preset flow switching ratio is a preset value, which is a ratio value of request messages allowed to be switched to other equipment rooms for execution in the request messages, for example, the preset flow switching ratio is 0.1, that is, 10 request messages are allowed to be switched to other equipment rooms for execution in 100 request messages.
On the basis of the steps S220 and S230, the gateway layer calculates the request message meeting the steps S220 and S230 through a specific algorithm, such as a hash algorithm or a random algorithm, generates a cut flow selection parameter, and judges whether the cut flow selection parameter meets a cut flow selection condition related to a preset cut flow proportion, and if the cut flow selection condition meets the requirement, the step S250 is executed; if not, execution S260 is performed. For a specific process, see description of whether the flow switching selection parameter generated based on the request message in S120 in fig. 3 satisfies the flow switching selection condition related to the preset flow switching ratio, which is not described herein again for brevity.
And S250, determining to switch the request message to a second machine room for execution.
And S260, judging whether the request message comprises the identifier of the second machine room.
When the merchant information does not meet a first preset condition related to the merchant information, the interface information does not meet a second preset condition related to the interface information, and any one of the tangential flow selection parameters generated based on the request message does not meet the tangential flow selection condition related to a preset tangential flow proportion, whether the request message contains an identifier of a second machine room for processing the request message in the second machine room is judged, if yes, S250 is executed, namely when the request message contains the identifier of the second machine room, S250 is executed, for example, the request is a refund request, and payment of the refund request is carried out in the machine room B, the machine room B is switched to execute the refund request. When the identifier of the second equipment room is not included in the request message, S270 is executed.
S270, the request message is transmitted to a processing layer downstream of the gateway layer.
The processing layer can obtain the corresponding service information according to the request message, and return the switching indication message under the condition that the service information includes the identifier of the second machine room. And when the gateway layer receives the switching indication message, determining to switch the request message to a second machine room for execution. The specific process is the same as the process of S150 in fig. 2, and is not repeated herein for brevity.
Optionally, in another embodiment of this description, the determination sequence of S220, S230, and S240 in fig. 4 may be arranged at will, and a technical effect of controlling the cut flow may also be achieved, which is not limited in this description. The data processing workload can be logically reduced by adopting the processing order of S220, S230, and S240 in fig. 4.
By adopting the method for controlling the flow switching provided by the embodiment of the specification, the new machine room can be verified more accurately by verifying the real flow. And controlling the tangential flow according to the merchant information, the interface information and the tangential flow proportion in a multi-dimensional mode, slowly adjusting the tangential flow proportion, and further achieving verification of the new machine room. Meanwhile, the operation condition of each merchant and each interface in the new machine room can be verified, and the problem that the merchant is not completely tested is solved.
Fig. 5 is a schematic view of a flow cutting device for controlling flow cutting provided in the present specification. As shown in fig. 5, the cut flow device is used to control message switching from a first room to a second room, and in one embodiment, the first room includes a gateway layer, and the cut flow device is at the gateway layer. The flow cutting apparatus may include a receiving unit 410, a judging unit 420, and a determining unit 430. A receiving unit 410, configured to receive a request message, where the request message includes request type information;
a determining unit 420, configured to determine whether the request type information meets a preset type condition related to the request type and whether a cut-stream selection parameter generated based on the request message meets a cut-stream selection condition related to a preset cut-stream proportion;
the determining unit 430 is configured to determine that the handover request message is executed to the second machine room when the request type information meets the preset type condition and the handover selection parameter meets the selection condition.
The flow cutting device obtains real flow, controls and controls flow cutting from request type information and flow cutting proportion, achieves flow guiding from the gray level of a first machine room to a second machine room, guarantees that all services can be covered in a test flow service verification process, and further achieves comprehensive verification and authenticity verification.
In an embodiment of the present specification, the request type information includes merchant information and interface information, and the determining unit 430 is configured to determine that the request type information satisfies a preset type condition related to the request type, including:
the determination unit 430 determines that the merchant information satisfies a first preset condition related to the merchant information and the interface information satisfies a second preset condition related to the interface information.
In an embodiment of the present specification, the determining unit 430 is further configured to determine whether the request message includes an identifier of the second equipment room when the request type information does not satisfy a preset type condition related to the request type and/or whether a cut flow selection parameter generated based on the request message satisfies a cut flow selection condition related to a preset cut flow ratio;
and when the request message comprises the identification of the second computer room, determining to switch the request message to the second computer room for execution.
In an embodiment of this specification, the flow switching apparatus further includes an obtaining unit 440, configured to, when the request message does not include an identifier of the second equipment room, transmit the request message to a processing layer downstream of the gateway layer, so that the processing layer obtains corresponding service information according to the request message, and returns a flow switching indication message when the service information includes the identifier of the second equipment room.
In the embodiment of the present specification, the determining unit 430 is further configured to determine to switch the request message to the second machine room for execution when the flow switching indication message is received.
Optionally, in this embodiment of the present specification, the merchant information includes a merchant identifier; the interface information comprises an interface identifier and an interface type.
Optionally, in an embodiment, the flow cutting selection parameter is a random number generated in a range associated with a preset flow cutting proportion based on the request type information, and the flow cutting selection condition is a random number of a predetermined value; alternatively, the first and second electrodes may be,
the flow switching selection parameter is a result of Hash operation based on the request type information; the cut stream selection condition is a hash result of a predetermined value.
The flow switching device in fig. 5 can implement the methods in fig. 2, fig. 3, and fig. 4 to achieve the technical effects corresponding to the techniques, and is not described herein again for brevity.
Embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods of fig. 2, 3 and 4.
The embodiment of the present specification further provides a computing device, which includes a memory and a processor, where the memory stores executable codes, and the processor executes the executable codes to implement the methods in fig. 2, fig. 3, and fig. 4.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (12)

1. A method of controlling flow switching for controlling message switching from a first room to a second room, the first room being a first server system, the first room including an ingress gateway layer and a processing layer, the processing layer including a core application layer and a database, the method being performed at the ingress gateway layer of the first room, the method comprising:
receiving a request message, wherein the request message comprises request type information;
judging whether the request type information meets a preset type condition related to a request type and whether a cut flow selection parameter generated based on the request message meets a cut flow selection condition related to a preset cut flow proportion;
when the request type information meets the preset type condition and the switching selection parameter meets the selection condition, determining to switch the request message to a second machine room for execution;
when the request type information does not meet a preset type condition related to a request type and/or a cut flow selection parameter generated based on the request message does not meet a cut flow selection condition related to a preset cut flow proportion, determining whether the request message comprises an identifier of a second machine room;
when the request message comprises the identifier of the second machine room, determining to switch the request message to the second machine room for execution;
when the request message does not include the identifier of the second machine room, the request message is transmitted to the downstream processing layer, so that the processing layer acquires the corresponding service information from the database according to the request message, and returns a switching indication message under the condition that the service information includes the identifier of the second machine room.
2. The method of claim 1, wherein the request type information includes merchant information and interface information, and the request type information satisfying a preset type condition related to a request type includes:
the merchant information satisfies a first preset condition related to merchant information, and the interface information satisfies a second preset condition related to interface information.
3. The method of claim 1, further comprising:
and when the flow switching indication message is received, determining to switch the request message to a second machine room for execution.
4. The method of claim 2, the merchant information comprising a merchant identification; the interface information comprises an interface identifier and an interface type.
5. The method of claim 1, wherein the first and second light sources are selected from the group consisting of,
the flow cutting selection parameter is a random number generated in a range related to the preset flow cutting proportion based on the request type information, and the flow cutting selection condition is a random number of a preset value; alternatively, the first and second electrodes may be,
the flow cutting selection parameter is a result of Hash operation based on the request type information; the cut flow selection condition is a hash result of a predetermined value.
6. A flow switching device for controlling flow switching, the flow switching device being configured to control message switching from a first machine room to a second machine room, the first machine room being a first server system, the first machine room including an entry gateway layer and a processing layer, the processing layer including a core application layer and a database, the flow switching device being disposed at the entry gateway layer of the first machine room, the flow switching device comprising:
a receiving unit, configured to receive a request message, where the request message includes request type information;
the judging unit is used for judging whether the request type information meets a preset type condition related to the request type and whether a cut flow selection parameter generated based on the request message meets a cut flow selection condition related to a preset cut flow proportion;
the determining unit is used for determining to switch the request message to a second machine room for execution when the request type information meets the preset type condition and the switching selection parameter meets the selection condition;
the determining unit is further configured to:
when the request type information does not meet a preset type condition related to a request type and/or a cut flow selection parameter generated based on the request message does not meet a cut flow selection condition related to a preset cut flow proportion, determining whether the request message comprises an identifier of a second machine room;
when the request message comprises the identifier of the second machine room, determining to switch the request message to the second machine room for execution;
the flow switching device further comprises an obtaining unit, configured to transmit the request message to a downstream processing layer when the request message does not include an identifier of the second equipment room, so that the processing layer obtains corresponding service information from the database according to the request message, and returns a flow switching indication message when the service information includes the identifier of the second equipment room.
7. The flow cutting device of claim 6, wherein the request type information includes merchant information and interface information, and the determining unit is configured to determine that the request type information satisfies a preset type condition related to a request type, and includes:
the determination unit determines that the merchant information satisfies a first preset condition related to merchant information and the interface information satisfies a second preset condition related to interface information.
8. The flow switching device according to claim 6, wherein the determining unit is further configured to determine to switch the request message to a second machine room for execution when the flow switching indication message is received.
9. The flow cutting apparatus of claim 7, the merchant information comprising a merchant identification; the interface information comprises an interface identifier and an interface type.
10. The flow cutting device according to claim 6,
the flow cutting selection parameter is a random number generated in a range related to the preset flow cutting proportion based on the request type information, and the flow cutting selection condition is a random number of a preset value; alternatively, the first and second electrodes may be,
the flow cutting selection parameter is a result of Hash operation based on the request type information; the cut flow selection condition is a hash result of a predetermined value.
11. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-5.
12. A computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, implements the method of any of claims 1-5.
CN201810663985.4A 2018-06-25 2018-06-25 Method and device for controlling flow switching of machine room Active CN108809730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810663985.4A CN108809730B (en) 2018-06-25 2018-06-25 Method and device for controlling flow switching of machine room

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810663985.4A CN108809730B (en) 2018-06-25 2018-06-25 Method and device for controlling flow switching of machine room

Publications (2)

Publication Number Publication Date
CN108809730A CN108809730A (en) 2018-11-13
CN108809730B true CN108809730B (en) 2021-11-19

Family

ID=64071331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810663985.4A Active CN108809730B (en) 2018-06-25 2018-06-25 Method and device for controlling flow switching of machine room

Country Status (1)

Country Link
CN (1) CN108809730B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587068B (en) * 2018-12-03 2022-08-12 深圳前海微众银行股份有限公司 Flow switching method, device, equipment and computer readable storage medium
CN110022265B (en) * 2018-12-06 2022-12-23 创新先进技术有限公司 Flow control method and device and electronic equipment
CN112866030B (en) * 2021-02-03 2022-08-12 挂号网(杭州)科技有限公司 Flow switching method, device, equipment and storage medium
CN116033015B (en) * 2022-12-29 2024-03-12 联通智网科技股份有限公司 Flow segmentation method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188098A (en) * 2011-12-30 2013-07-03 中国移动通信集团河南有限公司 Method, system and device for disaster recovery switching
CN105630590A (en) * 2014-11-28 2016-06-01 阿里巴巴集团控股有限公司 Business information processing method and device
CN106302611A (en) * 2015-06-09 2017-01-04 深圳市腾讯计算机系统有限公司 Service request distribution system, method and apparatus

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1287570C (en) * 2004-03-25 2006-11-29 上海复旦光华信息科技股份有限公司 High speed filtering and stream dividing method for keeping connection features
US20090259736A1 (en) * 2008-04-15 2009-10-15 Juniper Networks, Inc. Label-based target host configuration for a server load balancer
CN103905225B (en) * 2012-12-25 2017-09-05 中国移动通信集团浙江有限公司 A kind of service control method, service control device and service system
US10489345B2 (en) * 2016-03-25 2019-11-26 Netapp, Inc. Multiple retention period based representations of a dataset backup
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing
CN106789362B (en) * 2017-02-20 2020-04-14 京信通信系统(中国)有限公司 Equipment management method and network management system
CN107861810A (en) * 2017-09-25 2018-03-30 平安普惠企业管理有限公司 Service distributing control method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188098A (en) * 2011-12-30 2013-07-03 中国移动通信集团河南有限公司 Method, system and device for disaster recovery switching
CN105630590A (en) * 2014-11-28 2016-06-01 阿里巴巴集团控股有限公司 Business information processing method and device
CN106302611A (en) * 2015-06-09 2017-01-04 深圳市腾讯计算机系统有限公司 Service request distribution system, method and apparatus

Also Published As

Publication number Publication date
CN108809730A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108809730B (en) Method and device for controlling flow switching of machine room
KR101814989B1 (en) Method of detecting fraud financial trade and server performing the same
CN108470298B (en) Method, device and system for transferring resource numerical value
CN110599174B (en) Block chain information processing method and related equipment
WO2018102533A1 (en) Systems and methods for generation and selection of access rules
CN111552942B (en) Identity authentication method, system, device and computer storage medium
CN111861472B (en) Service monitoring processing method and device
CN111083013A (en) Test method and device based on flow playback, electronic equipment and storage medium
CN110955677A (en) Identity verification method, device and system
CN116909913A (en) Financial payment system testing method, device, equipment and readable storage medium
CN111078560A (en) Test method and device based on flow pruning, electronic equipment and storage medium
US20230050176A1 (en) Method of processing a transaction request
CN107239813B (en) Method and device for authenticating information medium
CN115114642A (en) Financing lease verification method, device and equipment based on under-chain trusted computing
CN115708339A (en) Data processing method, device and storage medium
CN114925077A (en) Transaction state query method and device
CN112595824A (en) COD (chemical oxygen demand) online detection method, device and platform
CN108881513B (en) Method, device, equipment and storage medium for generating equipment code
CN111210301A (en) Unique identification code generation method and device
CN111311102A (en) Resource ratio adjusting method, device, equipment and computer readable storage medium
CN111967061B (en) Block chain-based trusted account transfer transaction method and device
CN116703395B (en) Digital RMB payment method, device, equipment, system and medium
CN115379009B (en) Data processing method, device, equipment and medium
CN117520020B (en) Data interaction method, device and system for realizing privacy calculation
KR101998853B1 (en) Method for verifying computation, apparatus and system for executing the method

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240221

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: United Kingdom