Detailed Description
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one or more embodiments of the present disclosure without inventive effort by one of ordinary skill in the art, are intended to be within the scope of the present disclosure.
The method for switching the service flow provided in at least one embodiment of the present disclosure may be used to determine whether to execute the service with an old service flow or execute the service with a new service flow for a service execution request. And, the method separates the cut instruction from the definition of the cut content as follows:
for example, assume that a condition is defined: if a certain service execution request is aimed at the service related to the merchant b1 under the product P1, a new service flow is adopted for the service; otherwise, the old business process is adopted to execute the business. In this condition, "product", "merchant" are each referred to as a switch dimension.
Referring to fig. 1, fig. 1 illustrates a tangential dimension library, in which tangential contents corresponding to each tangential dimension may be preconfigured, and the following table 1 illustrates a partial mapping relationship:
table 1 mapping relationship in tangential dimension library
Identification bit 1 (tangential dimension 1)
|
Product 1
|
Sign bit 2 (tangential dimension 2)
|
Merchant 1
|
Identification bit n (tangential dimension n)
|
*** |
It should be noted that, when configured in the tangential dimension library, the set of mapping relationships in table 1 corresponds to one type of tangential command. For example, the format of the tangential instructions corresponding to table 1 is as follows:
TABLE 2 tangential flow instruction
Identification bit 1
|
Identification bit 2
|
Identification bit 3
|
……
|
Identification bit n |
The cut instruction may include a plurality of identification bits, e.g., identification bit 1, identification bit 2, etc. Wherein each identification bit corresponds to one tangential dimension, for example, tangential dimension 1 corresponding to identification bit 1 may be "product" and tangential dimension 2 corresponding to identification bit 2 may be "merchant". While "product 1" and "merchant 1" in table 1 are tangential content corresponding to a tangential dimension. In addition, the value of the identification bit may be used to indicate whether the tangential dimension is in effect, e.g., a value of 1 indicates that it is in effect, and a value of 0 indicates that it is not in effect.
Taking the above example as still, in order to realize the flow switching under the above conditions: if a certain service execution request is directed to the service related to the merchant b1 under the product P1, a new service flow is adopted for the current service. The following three settings can be made:
A. defining the format of a tangential flow instruction: the tangential dimension corresponding to the identification bit 1 in the tangential instruction is "product", and the tangential dimension corresponding to the identification bit 2 is "merchant".
B. The tangential content corresponding to each tangential dimension is configured in table 1: the tangential content corresponding to the identification bit 1 is set as "product 1", and the tangential content corresponding to the identification bit 2 is set as "merchant 1".
C. Setting the value of each identification bit of the tangential flow instruction: and setting the value of the identification bit 1 to be 1, indicating that the tangential dimension corresponding to the identification bit 1 is effective, and taking the tangential content 'product 1' corresponding to the tangential dimension as a condition. Similarly, the value of the set identification bit 2 is also 1.
As described above, the mapping relationship in the tangential dimension library may be preconfigured, and after the configuration is completed, the tangential content corresponding to each dimension may be unchanged, and the setting of the tangential instruction only needs to set the effective value of the identification bit to be effective. For example, when controlling in one dimension, the flag bit 1 may be set to be valid; alternatively, when the multi-dimensional combination control is performed, the identification bit 1 and the identification bit 2 may be set to be simultaneously effective.
In addition, the mapping relationship in the tangential dimension library may also be changed, for example, the tangential dimension corresponding to the identification bit may be changed, for example, the tangential dimension of the identification bit 1 is changed to "service department"; alternatively, the tangential content corresponding to the tangential dimension may be changed, for example, "product 1" corresponding to the identification bit 1 is changed to "product 2".
The method for setting the tangential instructions and the tangential contents separately ensures that the change setting of the tangential instructions is more convenient and quicker on the one hand, for example, when whether different tangential dimensions are effective or not to be changed, the value of the identification bit in the tangential instructions is only changed; for another example, when the tangential dimension or tangential content is to be changed, the tangential instruction still takes the form of a simple string of identification bits as long as the mapping relationship is configured. On the other hand, the method can provide a general tangential instruction configuration method, and the separated deployment method can be adopted for the business tangential under different scenes.
Fig. 2 is a schematic diagram of a method for switching a business process according to at least one embodiment of the present disclosure, where the method may describe how to switch a flow in the above-mentioned configuration manner of a switching instruction, and as shown in fig. 2, the method may include the following processes, without limiting an execution sequence between steps:
in step 200, a service execution request is received. The request is used for requesting to execute the target service, and the request can carry: service information of the target service. The service information may include, for example: the business is directed to a product or merchant, for example, the target business is a business directed to product 1 or merchant 2.
In step 202, the tangential instruction is parsed to obtain the effective tangential dimension.
The tangential instruction may include a plurality of identification bits, each identification bit corresponds to a tangential dimension, and the value of the identification bit is used to indicate whether the tangential dimension is effective. In this step, each identification bit in the tangential instruction may be traversed, and which tangential dimensions are validated may be determined according to the value of the identification bit. For example, the two tangential dimensions "product", "merchant" take effect.
In step 204, a mapping relationship corresponding to the tangential instruction is queried, where the mapping relationship includes: and obtaining the tangential content corresponding to the effective tangential dimension by the tangential content corresponding to each tangential dimension in the tangential instruction.
In this step, the mapping relationship corresponding to the tangential command may be shown in table 1, where the mapping relationship includes tangential content corresponding to each tangential dimension in the tangential command, for example, tangential content corresponding to a tangential dimension "product" is "product 1", and tangential content corresponding to a tangential dimension "merchant" is "merchant 1".
In step 206, if the current service execution request meets the cut-stream content, a new service flow is executed.
In this step, if the service information of the target service accords with the tangential content, a new service flow can be executed for the target service. For example, if the target service requested to be executed is the service of the product 1, that is, the service of the merchant 1, it indicates that the service information of the target service accords with the tangential content, or it can be said that the service execution request accords with the tangential content, and the service can be executed according to the new service flow; otherwise, the service may be executed according to the old service flow.
According to the switching method of the business flow, by separating the configuration of the tangential flow instruction and the configuration of the tangential flow content, the tangential flow instruction is modified more quickly and conveniently, the processing efficiency of flow switching is improved, and the configuration mode of the tangential flow instruction can be suitable for various scenes and has universality.
In one or more embodiments of the present disclosure, each identification bit in the tangential flow instruction may further include: and the tangential dimension range corresponding to each identification bit in the funnel identification bit sequence is sequentially reduced. Wherein, the funnel identification bit sequence is a visual description, and the identification bit sequence is characterized in that:
referring to fig. 3, assume that the identification bits 1 to n are a funnel identification bit sequence, and the tangential dimension ranges corresponding to the identification bits in the sequence are sequentially narrowed. For example, the range may be sequentially narrowed from left to right, for example, the identification bit 1 corresponds to the largest tangential dimension range, the tangential dimension range of the identification bit 2 is slightly smaller, the tangential dimension range of the identification bit 3 is slightly smaller, and the identification bit n is sequentially smaller.
The tangential dimension range may be sequentially reduced by: for example, an exemplary progressively smaller tangential dimension range is that a product family > product model > merchant, may include multiple product models in a product family, and multiple merchants may be included in a product model, i.e., multiple merchants sell the model product.
The tangential instruction adopting the funnel identification bit sequence can be suitable for the following tangential scene: if a certain service meets a certain tangential flow condition, executing the service by using a new service flow; otherwise, if the service does not meet the tangential flow condition, the old service flow is used for executing the service. The tangential flow conditions are set in a manner that the funnel-shaped range is sequentially narrowed when the tangential flow conditions are set, for example, when single tangential flow dimension control is performed, a new business flow can be used as long as the business of the product 1 is satisfied. For another example, when multi-tangential dimension control, it may be that both product 1 and merchant 1 are satisfied, and both conditions are satisfied before a new business process is used.
Fig. 4 is a flow chart of a method of switching a business process provided in at least one embodiment of the present disclosure, which may be adapted to control a cut using a cut instruction of a funnel identification bit sequence. May include:
in step 400, a service execution request is received.
In step 402, a cut instruction is parsed to obtain an identification bit in a sequence of funnel identification bits.
For example, each identification bit may be traversed sequentially starting with the identification bit corresponding to the largest tangential dimension range in the funnel identification bit sequence. For example, in the example of fig. 3, the value of the leftmost flag bit 1 in the cut instruction may be obtained first.
In step 404, it is determined whether the tangential dimension corresponding to the identification bit is in effect.
If so, execution continues with step 406.
If not, the end of the traversal is confirmed, and step 412 is performed directly. For example, the first identification bit of the funnel identification bit sequence is validated by default.
In step 406, the mapping relation corresponding to the tangential command is queried, and the tangential content corresponding to the effective tangential dimension is obtained. For example, table 1 may be queried to obtain that the tangential content corresponding to the product dimension is "product 1", and the tangential content corresponding to the merchant dimension is "merchant 1".
In step 408, it is determined whether the current service execution request meets the cut-stream content.
If the number of the adjacent next tangential dimension ranges is smaller, and each identification bit is not traversed, the method returns to the step 402 to be continuously executed, and the adjacent identification bit with the smaller tangential dimension range is acquired. If the identification bits are met and have been traversed to end, then execution continues with step 412.
If not, step 410 is performed.
In step 412, the business is performed using the old business process.
In the flow of fig. 4, the tangential command may be in the form of a numeric string, and each identification bit indicates whether the corresponding switching dimension is valid using a different number. For example, the cut instruction may be 111111, where the number "1" indicates that the cut dimension is in effect and the number "0" indicates that the cut dimension is not in effect.
In addition, the tangential flow instruction may be 111000, for example. When the flow shown in fig. 4 is used to parse the tangential command, if the fourth identification bit is traversed, the value of the fourth identification bit is "0", which indicates that the corresponding tangential dimension is not effective, and at this time, the end of the traversal can be confirmed. Meanwhile, the tangential dimension corresponding to the previous three identification bits 111 is effective, and the corresponding tangential content accords with the current service execution request, so that the service can be executed according to the new service flow.
In the method for switching a service flow provided in at least one embodiment of the present disclosure, each identification bit in the tangential flow instruction may not be a funnel identification bit sequence. For example, the tangential dimensions corresponding to each identification bit in the tangential instruction may be parallel relationship, when the tangential instruction is analyzed, all the identification bits may be traversed, at least one tangential dimension effective in the identification bits is obtained according to the value of the identification bits, and then the tangential content corresponding to the tangential dimension is obtained according to the mapping relationship. If the service execution request accords with all the tangential content, executing the requested service by using the new service flow; otherwise, if the tangential content is not met, the old business process is used.
In other examples, different services may also employ different formats of the tangential instructions, e.g., for service S1, one format of the tangential instructions is configured, and for service S2, another format of the tangential instructions is configured. As illustrated in table 3 below, the tangential instruction used by service S1 may include three identification bits corresponding to three tangential dimensions; and the traffic S2 cut instruction may include four identification bits corresponding to four cut dimensions. And, the tangential dimension library can define tangential content configuring each tangential dimension in each tangential instruction.
TABLE 3 tangential dimension library and corresponding tangential instructions
Fig. 5 is a schematic diagram of a business process switching method according to at least one embodiment of the present disclosure, where the method is exemplified by a plurality of types of tangential flow instructions shown in table 3. May include:
in step 500, a tangential command with a preset value and a service identifier corresponding to the tangential command are received.
For example, assuming that the switching device of a service flow is responsible for performing switching of the service flow, the device may receive a service execution request and may perform the switching method of the embodiment of the present disclosure to determine to execute a corresponding service using a new service flow or an old service flow.
The switching device may be preconfigured with a tangential instruction, and a service identifier corresponding to the tangential instruction may be configured. When the switching equipment receives the service execution request of the service identifier, a corresponding tangential instruction is acquired to judge whether to execute a new service flow for the service.
In addition, the corresponding relation between the tangential flow instruction and other information except the service identifier can also be set.
In step 502, a service execution request is received, where the service execution request carries a service identifier of a target service. For example, the service identifier may be carried in the service execution request. This step may obtain the service identity, e.g. S1.
In step 504, according to the service identifier, a tangential flow instruction corresponding to the identifier is acquired.
For example, a plurality of tangential instructions may be stored in the switching device of the service flow, and different instructions may correspond to different service identifiers, so as to be used for selecting new and old service flows when receiving service execution requests of different services. In this step, the switching device may obtain a corresponding tangential flow instruction according to the service identifier obtained in step 502.
In step 506, the tangential instruction is parsed, and the effective tangential dimension is obtained according to the value of the identification bit.
For example, each identification bit in the cut instruction may be traversed to obtain the effective cut dimension.
In step 508, according to the service identifier corresponding to the service execution request, the tangential dimension library is queried to obtain the mapping relationship corresponding to the service identifier.
Likewise, multiple sets of mapping relationships may also be stored in the tangential dimension library, for example, as in the example of table 3, one set of mapping relationships corresponds to the service identifier S1, and another set of mapping relationships corresponds to the service identifier S2. Different mapping relations can correspond to the tangential instructions with different formats, and the number of identification bits of the tangential instructions or tangential content corresponding to tangential dimensions can be different. In this step, a mapping relationship corresponding to the service identifier S1 may be obtained.
In step 510, the tangential content corresponding to the effective tangential dimension is obtained from the mapping relationship.
For example, obtaining the tangential content according to the mapping relationship may include: product 1+ merchant 1, etc.
In step 512, if the current service execution request meets the cut-stream content, a new service flow is executed.
For example, if the current business execution request is a request for merchant 1 under product 1, then a new business process may be executed; otherwise, the old business process is used.
According to the switching method of the business flow, different tangential instructions are set for different businesses, so that tangential conditions can be managed conveniently, and the tangential instructions are formed by separating the tangential instructions from tangential contents and adopting the identification bit to take values, so that the tangential instructions are simpler to generate, and the tangential instructions are more convenient and faster to modify.
Fig. 6 is a schematic structural diagram of a switching device for a business process according to at least one embodiment of the present disclosure, where, as shown in fig. 6, the device may include: a request receiving module 61, an instruction parsing module 62, a content determining module 63 and a flow determining module 64.
A request receiving module 61, configured to receive a service execution request for a target service, where the service execution request carries: service information of the target service;
the instruction parsing module 62 is configured to parse a tangential instruction for determining a service flow of the target service, so as to obtain an effective tangential dimension; the tangential flow instruction comprises: the system comprises a plurality of identification bits, a plurality of control units and a plurality of control units, wherein each identification bit corresponds to one tangential dimension, and the value of each identification bit is used for indicating whether the corresponding tangential dimension is effective or not;
the content determining module 63 is configured to query a mapping relationship corresponding to the tangential instruction, where the mapping relationship includes: the tangential content corresponding to each tangential dimension in the tangential instruction is obtained;
the flow determining module 64 is configured to execute a new business flow for the target business when the business information of the target business conforms to the cut-stream content.
In one example, the content determination module 63 is specifically configured to: starting from an identification bit corresponding to the largest tangential dimension range in the funnel identification bit sequence, if the tangential dimension corresponding to the identification bit takes effect and tangential content corresponding to the effective tangential dimension accords with the current service execution request, continuing to judge the next adjacent identification bit; a plurality of identification bits in the cut instruction, comprising: and the tangential dimension range corresponding to each identification bit in the funnel identification bit sequence is sequentially reduced.
The flow determining module 64 is specifically configured to: and if the tangential content corresponding to the effective tangential dimension in the funnel identification bit sequence accords with the current service execution request, executing a new service flow on the service execution request.
In one example, the cut instruction is a string of digits, each identification bit using a different number to indicate whether the switching dimension is in effect or not.
In one example, instruction parsing module 62 is also configured to: and obtaining a mapping relation corresponding to the service identifier according to the service identifier corresponding to the target service.
The apparatus or module set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in one or more pieces of software and/or hardware when implementing one or more embodiments of the present description.
The order of execution of the steps in the flowcharts shown in the above figures is not limited to the order in the flowcharts. Furthermore, the descriptions of the individual steps may be implemented in the form of software, hardware, or a combination thereof, for example, those skilled in the art may implement them in the form of software code, or may be computer-executable instructions capable of implementing the logic functions corresponding to the steps. When implemented in software, the executable instructions may be stored in memory and executed by a processor in the device.
For example, corresponding to the above method, one or more embodiments of the present specification also provide a switching device for a business process, which may include a processor, a memory, and computer instructions stored on the memory and executable on the processor, by executing the instructions, for performing the steps of:
receiving a service execution request for a target service, wherein the service execution request carries: service information of the target service;
analyzing a tangential instruction for determining the business flow of the target business to obtain the effective tangential dimension; the tangential flow instruction comprises: the system comprises a plurality of identification bits, a plurality of control units and a plurality of control units, wherein each identification bit corresponds to one tangential dimension, and the value of each identification bit is used for indicating whether the corresponding tangential dimension is effective or not;
inquiring a mapping relation corresponding to the tangential flow instruction, wherein the mapping relation comprises the following steps: the tangential content corresponding to each tangential dimension in the tangential instruction is obtained;
and if the service information of the target service accords with the tangential content, executing a new service flow on the target service.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, merchant, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, merchant, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of additional identical elements in a process, method, merchant or device comprising the element.
One skilled in the relevant art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for data processing apparatus embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.