Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a method and a system for configuring a service line, which reduce the development and maintenance cost of the service line, and a method and a system for executing the service. The method for configuring the service line comprises the steps of responding to a service party to connect at least one interface, determining at least one service operation included in a service to be configured and an operation sequence of the at least one service operation, wherein the at least one interface corresponds to the at least one service operation one by one, determining an operation code of the at least one service operation in an operation pool, wherein the operation code is used for uniquely indicating the service operation in the operation pool, and sequentially splicing the operation codes of the at least one service operation according to the operation sequence of the at least one service operation to obtain the service line corresponding to the service to be configured, wherein a plurality of service operations which are respectively indexed by a plurality of operation codes are stored in the operation pool.
Fig. 1 schematically illustrates an application scenario 100 of a method and system for configuring a service line, and a method and system for executing a service according to an embodiment of the present disclosure. It will be appreciated that fig. 1 illustrates only an example of an application scenario in which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, the application scenario 100 according to this embodiment may include terminal devices 111, 112, 113 and a database 120.
The terminal devices 111, 112, 113 may be, among other things, various devices having a display screen capable of communicating with the database 120 over a network, including but not limited to tablet computers, laptop computers, desktop computers or servers, etc. Database 120 is used to store one or more program segments.
According to embodiments of the present disclosure, one page submission or one single function point operation may be set as one business operation that may be performed. Each program segment may for example be integrated into a component, each component being adapted to perform said one business operation. For example, for a reservation system, where a user needs to select a city, package, store, and submit a reservation order, etc., each selection or each submission (a single point of functionality, such as selecting a city) is a business operation, stored in database 120 may be a component for performing the business operation.
Any one of the terminal devices 111, 112, 113 may for example comprise a front-end presentation module and a back-end processing module. The back-end processing module is configured to obtain one or more components in the database 120 through a network, and execute corresponding business operations by running the one or more components, and the front-end display module is responsible for rendering and displaying results obtained by the back-end processing module executing the one or more business operations, so as to provide browsing operations for users.
According to the embodiment of the present disclosure, any one of the terminal devices 111, 112, 113 may be further provided with a plurality of interfaces 131 to 134, for example, each of which is packaged with a function of calling a component in the database 120, and then the terminal device may operate the component corresponding to the interface by calling the interface, so as to be used for executing the corresponding service operation. The plurality of interfaces 131 to 134 may be, for example, software interfaces.
According to an embodiment of the present disclosure, when a service party needs a terminal device 111, 112, 113 to perform a service (e.g., a reserved service), an interface corresponding to a service operation included in the service among a plurality of interfaces provided by an access terminal device may be selected. The terminal equipment responds to the access of the interface to know the business operation included in the business which needs to be configured in order to meet the requirement of the business party, and therefore, the components corresponding to the business operation included in the business are selected from the database 120 to be spliced, and the codes of the components are spliced to form the business line corresponding to the business, so that the execution of the subsequent business is facilitated.
According to the embodiment of the disclosure, when the same component executes in different services, the service side can configure the data required by the execution of each component through the accessed interface, so that the terminal equipment can effectively execute the service. For example, when the configured service is a hotel reservation service, the data provided by the service party may include an optional city, store, number of rooms in each hotel, and the like.
According to an embodiment of the present disclosure, any one of the terminal devices 111, 112, 113 may be further used to configure a new service operation, i.e. to configure a new component, and write the configured new component into the database 120, so as to enrich the components in the database 120 for use in subsequent execution by the terminal device or other terminal devices.
It should be noted that, the method for configuring a service line and/or the method for executing a service provided by the embodiments of the present disclosure may be generally executed by the terminal devices 111, 112, 113. Accordingly, the system for configuring a service line and/or the system for executing a service provided by the embodiments of the present disclosure may be generally provided in the terminal devices 111, 112, 113.
It will be appreciated that the number and types of terminal devices, databases and interfaces in fig. 1 are merely illustrative. There may be any number and type of terminal devices, databases, and interfaces as desired for implementation.
Fig. 2A schematically illustrates a flowchart of a method of configuring a service line according to a first embodiment of the present disclosure, fig. 2B schematically illustrates a structural schematic diagram of an operation pool according to an embodiment of the present disclosure, and fig. 2C schematically illustrates a conceptual diagram of a service formed by stitching according to an embodiment of the present disclosure.
As shown in fig. 2A, the method for configuring a service line in the embodiment of the disclosure includes operations S201 to S203.
In operation S201, at least one service operation included in the service to be configured and an operation sequence of the at least one service operation are determined in response to the service side connecting the at least one interface, where the at least one interface corresponds to the at least one service operation one by one.
According to an embodiment of the present disclosure, the at least one interface may be, for example, part of a plurality of interfaces provided by the terminal device in fig. 1. Each interface corresponds to a component stored in the database for performing a business operation, the at least one interface may correspond to at least one business operation. Therefore, after the service party connects at least one interface, the service operation included in the service which the service party wants to configure can be determined according to the connected interface.
According to the embodiment of the disclosure, after the service side connects the interface, for example, the operation sequence of the service operation corresponding to the interface can be fed back to the interface. The operation sequence of at least one service operation included in the service to be configured can be determined at the same time according to the interface connected by the service party.
According to embodiments of the present disclosure, it is contemplated that some business operations are operations requiring presentation of options to the user, such as selecting a city, and some business operations are operations requiring presentation of forms for the user to fill in personal information, such as forms for the user to fill in information such as name, age, and/or identification number. The business operations may be classified into dynamic business operations and static business operations according to whether the business operations require user input data when being executed. Wherein the dynamic business operation includes an operation requiring a user to input data while executing, and the static business operation includes an operation not requiring a user to input data while executing. The at least one service operation comprised by the service to be configured may comprise only dynamic service operations, only static service operations, or both dynamic and static service operations.
For example, for a business to be configured for implementing hotel reservations, the business operations included may include a business operation for selecting a reservation city, a business operation for selecting a reservation store according to the city, a business operation for filling in personal information and submitting a generated reservation sheet, and a business operation for viewing reservation details. The business operation of booking city, business operation of booking store according to city and business operation of checking booking details are selected as static business operation, and business operation of filling personal information and submitting to generate booking list is dynamic business operation.
After determining the service operation of the service to be configured, operation S202 may be performed, and an operation code of at least one service operation in the operation pool is determined, where the operation code is used to uniquely indicate the service operation in the operation pool.
According to an embodiment of the disclosure, the operation pool may specifically be, for example, the database in fig. 1, where a plurality of components stored in the database are, because they are respectively used to perform a plurality of operations, the components stored in the database are essentially program segments of a plurality of business operations. For facilitating corresponding interface calls, the program segments of the plurality of business operations stored in the operation pool may be, for example, respectively encoded with a plurality of operations as indexes. Each business operation has a unique one of the operation codes (Page No), which is unique to the whole system. As shown in fig. 2B, the operation pool may have at least eight service operations, where the operation codes of the eight service operations are 1-8 respectively. The four business operations coded into 1-4 are static business operations, and the four business operations coded into 5-8 are dynamic business operations. According to the embodiment of the disclosure, the service operations in the operation pool can be shared by a plurality of services, so long as the numbers of the shared service operations are simultaneously allocated to the respective services.
In order to facilitate the subsequent execution of the service and the call of the corresponding component to execute the service operation, the operation S202 may store the operation code of at least one service operation included in the service to be configured in the terminal device after the operation code of the service operation is obtained.
Subsequently, in order to facilitate sequential execution of the service operations when executing the service, a service line corresponding to the service to be configured, which should include the coding and execution order of the respective service operations, may be configured through operation S203. Specifically, in operation S203, operation codes of at least one service operation are spliced in sequence according to an operation sequence of the at least one service operation, so as to obtain a service line corresponding to the service to be configured.
Specifically, when the service to be configured includes service operation 2, service operation 3, service operation 4 and service operation 6 in the operation pool, according to the operation sequence of the four service operations, the spliced service to be configured may be as shown in fig. 2C, and include service operation 2, service operation 6, service operation 4 and service operation 3 that are sequentially executed in sequence, and a service line corresponding to the service to be configured may be 2- >6- >4- >3.
According to the embodiment of the disclosure, under the condition of configuring a plurality of service lines, a service line identification code can be allocated to each configured service line, specifically, a code can be allocated to each service line, and the allocated code can be ensured to uniquely indicate one service line. Meanwhile, a service line configuration table may be configured, as shown in table 1, where the service line configuration table includes service line codes and service operation flows included in the service corresponding to the service (i.e., service lines obtained by operation codes of at least one service operation in operation S203).
TABLE 1
| Service line identification code |
Business operation flow |
| 1 |
1->2->3->5->6 |
| 2 |
2->6->4->3 |
| ...... |
...... |
In summary, it can be known that, in the method for configuring a service line according to the embodiment of the present disclosure, since a large number of service operations are maintained in the operation pool, when a service is configured in response to a requirement of a service party, only a service interface needs to be provided for the service party, and the service line can be directly spliced according to the service operations in the operation pool, without separately maintaining the service line. And if the business side adjusts the business according to the actual demands, the business line adjustment can be completed by adjusting the serial numbers and the serial number sequences of the business operations included in the business line, and the maintenance is convenient and quick. And therefore, the development and maintenance workload of the service line can be greatly reduced. Furthermore, because the service operation is unified in the operation pool, the service operation can be shared by a plurality of services, namely, each service operation can be multiplexed, the front-end and back-end development and maintenance cost can be effectively solved, and a new service line can be quickly accessed.
Fig. 3 schematically shows a flow chart of a method of configuring a service line according to a second embodiment of the present disclosure.
According to the embodiment of the present disclosure, considering that the dynamic service component is an operation requiring user input data when executing, and that the same service operation may be different in data requiring user input in different services, in case that the dynamic service operation is included in at least one service operation included in the service to be configured, it is also required to determine the type of data requiring user input in the current service to be configured by the dynamic service operation while configuring the service line. Then, as shown in fig. 3, the method for configuring service lines according to the embodiment of the disclosure should further include operations S304-S305 in addition to operations S201-S203. The operations S304 to S305 may be performed after the operation S203 or may be performed in synchronization with the operation S203.
In operation S304, configuration information of the dynamic business operation is obtained via an interface corresponding to the dynamic business operation, so as to serve as a basis for executing the dynamic business operation.
The configuration information of the dynamic service operation may specifically include the determined number and type of data that need to be input by the user. The configuration information may be specifically input by the service party via the interface after connecting the interface corresponding to the dynamic operation. The configuration information may specifically include, for example, personal information (name, address, age, identification number) and the like that require user input.
According to an embodiment of the present disclosure, in order to facilitate the invocation of the configuration information of the dynamic service operation when the service is subsequently executed, operation S305 may be executed to buffer the configuration information of the dynamic service operation in the first predetermined space. The first predetermined space may be, for example, a storage space of the terminal device in fig. 1, or another space in the database except for a space where the service operation is located.
According to the embodiments of the present disclosure, considering that the configuration information of the same dynamic service component in different service lines may be different, and the configuration information of different dynamic service components in the same service line is also different, for example, a dynamic service configuration table (see table 2) may be maintained in the first predetermined space to store the configuration information of each dynamic service component in each service line. The operation S305 is specifically writing the configuration information into the dynamic service configuration table. Meanwhile, in order to facilitate distinguishing different service lines, the dynamic service configuration table may store the corresponding relationship of the service line identification code, the service operation code and the configuration information.
TABLE 2
| Service line identification code |
Business operations 5 |
Business operations 6 |
...... |
| 1 |
Name, address |
Identification card number |
|
| 2 |
|
Name, age |
|
| ...... |
|
|
|
In summary, through the configuration of the configuration information of the dynamic service operation, the dynamic service operation can be multiplexed by a plurality of service lines, so as to ensure that the cost of service configuration maintenance is lower.
Fig. 4 schematically shows a flowchart of a method of configuring a service line according to a third embodiment of the present disclosure.
Considering that among the services required by the service party, there may be service operations that are not in the operation pool. In this case, it is necessary to configure the business operations that are not in the operation pool. Therefore, as shown in fig. 4, the method for configuring a service line according to the embodiment of the disclosure may further include operations S406 to S410 in addition to operations S201 to S204 described in fig. 2A.
In operation S406, it is determined whether the service to be configured includes a first service operation.
According to the embodiment of the disclosure, the first business operation is specifically a business operation that is not stored in the operation pool. This operation S406 is often determined based on additional information provided by the service party. For example, when the service party determines that the service party does not have an interface corresponding to the first service operation according to the provided interface, the service party may provide additional information. The service to be configured may be determined to include the first service operation in case the service party provides additional information.
In operation S407, in the case where the service to be configured includes the first service operation, the first service operation is configured in response to the configuration instruction.
According to an embodiment of the present disclosure, the configuration instruction may specifically be, for example, an instruction sent by the operation pool maintainer through the operation terminal device. In particular, the operation S407 may be specifically receiving a program code input by the operation pool maintainer through the terminal device, where the program code includes a code for implementing the first service operation.
In operation S408, a first interface corresponding to the first service operation is set for the service party to connect.
According to an embodiment of the present disclosure, the operation S408 may specifically be to set up a first interface corresponding to the first business operation by running a part of codes in the input program codes. The input program code includes code defining a first interface in addition to code for implementing the first business operation. The partial code is the code defining the first interface.
In operation S409, a first operation code uniquely indicating the first business operation is assigned to the first business operation.
According to the embodiment of the disclosure, after receiving the input program code, the code can be automatically allocated to the program code to obtain the first operation code. In particular, the terminal device may for example have integrated therein a random code generator or counter, through which the first operation code is available.
In operation S410, the first business operation is stored in the operation pool with the first operation code as an index.
Specifically, the first operation code is used as an index, and the code for executing the first business operation is stored in a storage space for storing the business operation in a database.
According to the embodiment of the disclosure, the operations S406 to S410 may be specifically implemented by firstly performing development of a front-end page in response to an operation of an operation pool maintainer, then defining an interface corresponding to the front-end page, then generating a service operation code for a code for implementing the front-end page, determining classification of the front-end page (i.e., determining whether the page corresponds to a dynamic service operation requiring data input by a user or a static service operation not requiring data input by the user), and finally submitting the service operation code, the code for implementing the front-end page and the determined classification result to a database for calling.
It is understood that the business operations stored in the operation pool may be obtained through operations S406 to S410, which are not described in detail herein.
According to an embodiment of the present disclosure, as can be seen from fig. 2A to fig. 4, when a service line is configured for the first time, the configuration method may include four portions as a whole. The first part is the definition of business operations, namely, a single function point operation is set as one business operation which can be called, and the code of each business operation can be packaged into a component. The second part is the storage of the business operation, namely, the business operation corresponding to each packaged component is classified (namely, the classification is divided into static business operation and dynamic business operation) and encoded, and the business operation encoding, the classification result and the components are uniformly maintained in a database. And the third part is to respond to the access of the service party and acquire the configuration information of the dynamic service operation. The fourth part is the process configuration process, i.e. the static business operation and the dynamic business operation are configured together in the whole process to obtain the business operation process shown in table 1, so as to complete the configuration of the business line. In the case that the operation pool has stored the corresponding service operation, the configuration of the new service can be performed only through the third portion and the fourth portion in response to the access of the service party.
As can be seen from the foregoing, in the method for configuring a service line according to the embodiment of the present disclosure, when the service operation stored in the operation pool cannot completely meet the new service requirement, the service operation in the operation pool may be expanded through the operations S406 to S410. Because the business operations in the operation pool are shared, the business operations in the operation pool are expanded continuously along with the increasing of the configured business lines, so that access of more business scenes can be provided.
Fig. 5 schematically shows a flowchart of a method of executing a service according to a first embodiment of the present disclosure.
According to the embodiment of the disclosure, after the service line is configured, corresponding service can be executed according to the service line. As shown in fig. 5, the method for executing a service according to the embodiment of the disclosure may include operations S501 to S504. Operations S502 to S504 are operations performed in a loop until at least one business operation corresponding to the operation code of the spliced business line is performed.
In operation S501, a service line corresponding to a service to be executed is acquired.
The service to be executed may be a service corresponding to the configured service line, and the service may include at least one service operation. The corresponding business line is formed by splicing operation codes of at least one business operation according to the operation sequence of the at least one business operation. Wherein the operation code is used for uniquely indicating the business operation. Specifically, the corresponding service line may be configured by the method for configuring the service line described in fig. 2A to fig. 4.
After the service line corresponding to the service to be executed is obtained, each service operation can be executed in sequence according to the operation codes of each service operation spliced to form the service line. Specifically, the execution of the service may be completed by performing operations S502 to S504 in a loop.
In operation S502, a second operation code located at the first position according to the splicing order among one or more operation codes for which the service line is not acquired is acquired. In operation S503, a second business operation corresponding to the second operation code in the operation pool is determined according to the second operation code. In operation S504, a second interface corresponding to the second service operation is called to execute the second service operation, so as to obtain service information corresponding to the second service operation.
According to an embodiment of the present disclosure, the operations S502 to S504 may specifically be determining the service operation arranged in the first position that is not executed according to the splicing order, and then calling, through an interface corresponding to the service operation, a component corresponding to the service operation code in the database to execute the service operation. The process of executing the service operation may specifically be that the information to be displayed to the user is obtained by running a code, then the information to be displayed is rendered and displayed through the front end of the terminal device, and then the service information corresponding to the second service operation is obtained in response to the operation of the user on the display page. According to the embodiment of the disclosure, when the service operation is the operation of selecting cities in hotel reservation service, namely, the cities needing to be displayed are determined through the running codes, then a city list is displayed to a user through front-end rendering, and then city information selected by the user is obtained in response to the selection of the user. The city information selected by the user is the service information corresponding to the second service operation.
In accordance with an embodiment of the present disclosure, in the case where the second business operation is a dynamic business operation, the business information corresponding to the second business operation may include, for example, input data of a user. In the case where the second service operation is a static service operation, the service information corresponding to the second service operation may include, for example, selection information of the user. The dynamic service operation and the static service operation are specifically the dynamic service operation and the static service operation described in fig. 2B, and are not described herein.
In order to facilitate determination of whether to end the loop operation according to an embodiment of the present disclosure, as shown in fig. 5, a method of executing a service may further include, for example, operation S505. In operation S505, it is determined whether at least one business operation corresponding to the operation codes spliced to form the business line is performed. If yes, the cycle is ended, and the execution of the service line is completed. If not, the operation returns to the operation S502, and the operations S502-S505 are continuously and circularly executed. That is, if there are operation codes in the plurality of operation codes included in the service line, the operation is returned to the operation S502 to the operation S505 of continuing to execute the loop, otherwise, the operation to be executed is described as being executed, and the loop is ended.
Fig. 6A schematically illustrates a flow chart of performing dynamic business operations according to an embodiment of the present disclosure.
In the case that the second service operation is a dynamic service operation, the operation S504 in fig. 5 may include operations S614 to S624, considering that the second service operation needs to be performed according to the configuration information.
In operation S614, configuration information of the second business operation is acquired from the first predetermined space according to the second operation code.
And the first preset space is cached with configuration information of dynamic service operation. Specifically, the configuration information of the dynamic service operation cached in the first predetermined space may be the configuration information stored in operation S304 to operation S305 described in fig. 3, where the configuration information may be stored by using the service identifier of the service and the operation code of the service operation as indexes. The operation S614 may specifically be to acquire configuration information from the dynamic service configuration table in the first predetermined space according to the service identification code of the currently performed service and the operation code of the second service operation.
In operation S624, according to the configuration information of the second service operation, the second interface corresponding to the second service operation is called to execute the second service operation, so as to obtain service information corresponding to the second service operation.
According to the embodiment of the disclosure, the process of invoking the second interface to execute the second service operation in the operation S624 may specifically be that the information to be displayed to the user is determined to be the information type of the information to be input by the user, which is included in the configuration information, for example, may be "name", "id card number" and/or "address", and the like, then the information is sent to the front end, then the information to be displayed to the user is rendered and displayed through the front end, and finally the information input by the user through the display page is received as the service information.
Fig. 6B schematically illustrates a flow chart of performing static business operations according to an embodiment of the disclosure.
In the case that the second business operation is a static business operation, considering that the business party is required to provide data when the subsequent rendering and displaying is performed, and each business line is only corresponding to one business party, in order to facilitate determining which business party the data of the static business operation is provided when the rendering and displaying is performed, each business line is further provided with a business line identification code. Then, as shown in fig. 6B, operation S504 in fig. 5 may be implemented by calling the second interface to execute operations S634 to S644 according to the service line identification code and the second operation code.
In operation S634, configuration information corresponding to the second service operation is acquired from the service party connected to the second interface.
According to the embodiment of the disclosure, when the second service operation is a static service operation, the configuration information is provided for the service party in real time through the interface. For example, in a business subscribed to a hotel, if a first business operation performed before the second business operation is an operation of selecting a city, the configuration information of the second business operation is store information included in the city indicated by the business information obtained by performing the first business operation.
In operation S644, the second service operation is performed according to the configuration information corresponding to the second service operation, and service information corresponding to the second service operation is obtained.
According to an embodiment of the present disclosure, the process of executing the second business operation in operation S644 may specifically be that the information to be displayed to the user is determined to be the configuration information acquired in operation S634, then the information is sent to the front end, then the information to be displayed to the user is rendered and displayed through the front end, and finally the information selected by the user through the display page is used as the business information.
Fig. 7 schematically shows a flowchart of a method of executing a service according to a second embodiment of the present disclosure.
It is contemplated that the service line is formed by a concatenation of a plurality of service operations and that the flow of the service line is configurable. The input parameters and the output parameters of each business operation need to be unified in order to enable different business operations to be arbitrarily plugged and unplugged. And the page displayed by each business operation or the returned result is related to the business attribute, so that the parameter output of each business operation cannot be unified.
In this case, in order to enable any insertion and extraction of each service operation, as shown in fig. 7, the method for executing a service according to the embodiment of the disclosure may further include operation S706 in addition to operation S501 to operation S505.
In operation S706, the service information corresponding to the second service operation is cached in a second predetermined space corresponding to both the user and the service line.
According to the embodiment of the present disclosure, considering that operation information obtained by each service operation may be different for different users in the process of executing the service, a unique predetermined space needs to be set for each service line for each user. For convenience in uniquely determining the second predetermined space, for example, for each user, there may be a user identifier that uniquely indicates the user, and the service line has a service line identifier that uniquely indicates the service line, where the second predetermined space is a space that matches both the user identifier and the service line identifier.
If the second service operation is the first service operation of the service to be executed, when the service information cache is written into the predetermined space, a user identifier (for example, an information identifier context ID) may be returned as a credential for writing the service information into the subsequent service operation of the service to be executed, so as to ensure that the service information of each service operation of the service to be executed is cached in the same predetermined space in the current execution process. According to the embodiment of the disclosure, after the execution of the service to be executed is completed, for example, the context ID may also be deleted to release the second predetermined space, so as to re-cache information when the service to be executed is executed next time or other services are executed.
Accordingly, in order to facilitate accurate writing of the service information into the second predetermined space and facilitate calling of the service information of the last service operation stored in the second predetermined space, the input parameters of the second interface may include a user identifier of the user and a service line identifier of the service line, so as to uniquely determine the second predetermined space.
By the setting of the above-mentioned operation S706, that is, the setting of the entry of each business operation, it is ensured that even when the business to be executed needs to change the execution sequence of each business operation, execution of the business can still be completed according to the execution sequence of the business operation after the change. Therefore, the method can realize random plug of each service operation, effectively expand the application range of the method for configuring the service line and the method for executing the service, and improve the flexibility of service line configuration.
According to the embodiment of the disclosure, in order to facilitate the service party to acquire the data after the service operation is executed, configuration information is provided for the execution of the subsequent static service operation. As shown in fig. 7, the method for executing a service according to the embodiment of the present disclosure further includes operation S707 of submitting the service information corresponding to the second service operation cached in the second predetermined space to the page address.
Wherein the configuration information of the second service operation includes the page address. The page address may specifically be URL (uniform resource locator) information included in the configuration information stored in the first predetermined space when the second service operation is a dynamic service operation. When the second service operation is a static service operation, the page address may specifically be provided by the service party in real time through the corresponding second interface.
Fig. 8 schematically shows a flowchart of a method of executing a service according to a third embodiment of the present disclosure.
According to an embodiment of the present disclosure, after a service line corresponding to a service to be executed is obtained, a specific implementation flow of the service to be executed may be shown in fig. 8.
Firstly, a service line flow configuration table (table 2) is queried according to a service line identification Code (business Code) and a current component Code (namely a current service operation Code current Page No), and a next component number (next Page No) is obtained. It is determined whether the current component code is empty. If the current Code is empty, the first component Code in the service line corresponding to the current Code is fed back as the current Page No by default, and the second component Code is the next Page No. If the current Page No is not null, the next component code of the current component code is passed into the next Page No.
And then searching whether the component is a dynamic component (namely whether the business operation for execution is a dynamic business operation) or not according to the business line identification code and the current component code in the component pool (namely the operation pool described above), and if the component is the dynamic component, feeding back relevant configuration information. If the component is static, only null is returned.
And then acquiring the components from the component pool to execute corresponding business operation for rendering. For example, in the case of a dynamic component, dynamic form items (i.e., forms requiring user input data) are rendered through the front end. And when the static component is the static component, acquiring the static component from the component pool and rendering through the front end.
And then acquiring service information in response to the user operation. For example, if the display form is a dynamic component, input data of a form filled in by a user is acquired after the display form is rendered, and the input data is submitted to a form URL. If the static component is the static component, the information selected by the user is obtained after the display option is rendered or submitted according to the page address provided by the service party after the information selected by the user is queried.
And finally judging whether the code of the next component is empty, if so, indicating that all components of the service to be executed are executed, and ending the operation if the service to be executed is executed. If not, assigning the next component code next Page No to the current Page No, and returning to redetermine whether the current component code is empty or not, and redetermining the next component code.
Fig. 9 schematically illustrates an overall architecture diagram suitable for implementing a method of configuring a service line or implementing a method of executing a service according to an embodiment of the present disclosure.
As shown in fig. 9, an architecture suitable for implementing the above-mentioned method for configuring a service line or method for executing a service may include a front-end, a service end, and a back-end gateway, and the service end includes a cache service and a gateway routing service. The service end is responsible for maintaining the operation pool, the components for executing the business operation are routed to the back-end gateway through the gateway routing service, and the information circulation and transfer are realized through the cache service. The business side provides corresponding information through accessing the back-end gateway, and the second preset space is the space provided by the cache service. The front end is responsible for rendering the display page according to the configuration information provided by the server. In the architecture, through designing the uniformly accessed back-end gateway, different service lines can finish the use of the component only by accessing the back-end gateway according to the interface specification, and the development of all contents between the front-end development gateway and the back-end development gateway is omitted, so that the purpose of rapidly uploading the service lines can be achieved.
According to the embodiment of the disclosure, the business process corresponding to the business line of the reserved hotel configured by the server in the architecture can be, for example, that firstly, a query of a service city is provided for a user, then, related service stores are provided for the user according to the city selected by the user, then, a form needing to fill in personal information is provided for the user, the form is submitted to generate a service form, and finally, the queried service details are provided for the user. Accordingly, the configured components may include a static component for configuring a city, a static component for displaying a store, a dynamic component including a configuration information name, gender, age, and a static component for displaying service details, wherein the submit form generation service form may be configured to display a submit button by executing the dynamic component and to set the submit button in a form of submitting to a URL link, for example. The correspondingly provided callable interfaces may include a city service interface, a store service interface, a service interface that submits personal information to a corresponding URL, and a service details interface.
According to the embodiment of the disclosure, the process of the server side in the architecture for executing the hotel reservation service can specifically include that the architecture platform obtains the service line obtained by the configuration by inquiring the service line configuration table according to the service identification Code business Code. Then, the city service interface is called to acquire city data from the business party and render the city data to a city selection page for the user to select. At this time, if the city selection page is found to be the first page (context ID is empty), a piece of cache space is opened up in the cache service, and the global unique number context ID of the cache space is obtained. Then in response to the user selecting a city (e.g., beijing), when the user switches to the next page or the program automatically performs the next rendering, the architecture platform stores Beijing in the cache service context ID: city Id=Beijing. And then the architecture platform calls a store service interface, wherein the entry of the interface is context ID (business side service interface implementation logic is used for fetching the city Id from the cache service context ID, inquiring store information according to the city Id and returning), and performing page rendering after a return result is obtained so as to display a store page to a user. And then, responding to the operation of selecting a store (such as SA) by the user, and storing SA into a cache service context ID when the user switches the next page or the program automatically performs the next rendering, wherein the context ID has the property Id=Beijing, and the store Id=SA. The dynamic submission box name, gender age, and submit button are then rendered. In response to user entered data, UN, woman, age 19, and user click submit button operation, the architecture platform invokes the caching service to store the filled information in context ID. At this time, there is a city id=beijing, store id=sa, name=un, age=19, and sex=female in context ID. And then the architecture platform calls a service interface for submitting personal information to a corresponding URL, takes a context ID as a reference, takes a store Id from a cache service context ID, generates an order Id by name=UN, age=19 and sex=female, stores the order Id into the cache service order Id=1, and returns. At this time, there is a city id=beijing, store id=sa, name=un, age=19, sex=female, order id=1 in context Id. And finally, the architecture platform calls a query service detail interface, takes context ID as an entry, takes order Id from the cache service context ID, queries details, and returns to obtain a result rendering page. If the user finishes the operation closing, the architecture platform judges whether the interface is the last page, and if so, the architecture platform empties the context ID cache.
Fig. 10 schematically illustrates a block diagram of a system for configuring a service line according to an embodiment of the present disclosure.
As shown in fig. 10, a system 1000 for configuring a service line in an embodiment of the present disclosure includes a plurality of interfaces 1010, a first processor 1020, and a first memory 1030.
The plurality of interfaces 1010 may be implemented as software interfaces for interfacing with business parties.
The first memory 1030 is used for storing a plurality of business operations indexed by a plurality of operation codes, respectively, wherein the operation codes are used for uniquely indicating one business operation, and the plurality of interfaces 1010 include interfaces corresponding to the plurality of business operations one by one. The first memory 1030 may also store a computer program 1031, which computer program 1031 may include code/computer executable instructions. In particular, the computer program 1031 may be configured with computer program code comprising, for example, computer program modules. For example, in an example embodiment, code in computer program 1031 may include one or more program modules, including, for example, module 1031A, module 1031B.
The computer program 1031, when executed by the first processor 1020, may cause the first processor 1020 to be configured to perform operations of determining at least one business operation and an operation order of the at least one business operation included in the business to be configured in response to the business side connecting at least one interface of the plurality of interfaces, determining an operation code of the at least one business operation in the first memory, and concatenating the operation codes of the at least one business operation in sequence according to the operation order of the at least one business operation, to obtain a business line corresponding to the business to be configured, in operation S201.
The first processor 1020 may be specifically configured to perform the method described in fig. 2A and fig. 3 to fig. 4 or any variation thereof according to the embodiments of the present disclosure, which will not be described herein.
Fig. 11 schematically illustrates a block diagram of a system for executing a service according to an embodiment of the present disclosure.
As shown in fig. 11, a system 1100 for performing a service according to an embodiment of the present disclosure includes a second processor 1110 and a second memory 1120.
The second memory 1120 is used to store one or more programs. The second memory 1120 may store, in particular, a computer program 1121, which computer program 1121 may comprise code/computer executable instructions. In particular, the computer program 1121 may be configured with computer program code comprising, for example, computer program modules. For example, in an example embodiment, code in the computer program 1121 may include one or more program modules, including for example, module 1121A, module 1121B.
The computer program 1121, when executed by the second processor 1110, may cause the second processor 1110 to perform operation S501 to obtain a service line corresponding to a service to be performed, the service to be performed including at least one service operation, the service line being formed by splicing operation codes of a plurality of service operations according to an operation order of the plurality of service operations, the operation codes being used to uniquely indicate the service operation, and cyclically performing operations S502 to S504 until the at least one service operation corresponding to the operation codes spliced to form the service line is performed. In operation S502, a second operation code which is positioned at the first position according to the splicing sequence in one or more operation codes of which the service lines are not acquired is acquired, in operation S503, a second service operation corresponding to the second operation code in an operation pool is determined according to the second operation code, and in operation S504, a second interface corresponding to the second service operation is called to execute the second service operation, so that service information corresponding to the second service operation is obtained. The second interface is connected with a service party corresponding to the service to be executed, and the operation pool stores service operation with operation codes as indexes.
The second processor 1110 may be specifically configured to perform the method described in fig. 5-8 or any variation thereof according to the embodiments of the present disclosure, which is not described herein.
In particular, first processor 1020 and/or second processor 1110 may include, for example, a general purpose microprocessor, an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The first processor 1020 and/or the second processor 1110 may also include on-board memory for caching purposes. The first processor 1020 and/or the second processor 1110 may be a single processing unit or a plurality of processing units for performing different actions of the method flow according to embodiments of the present disclosure.
The first memory 1030 and/or the second memory 1120 may be, for example, non-volatile computer readable storage media, specific examples of which include, but are not limited to, magnetic storage devices such as magnetic tape or hard disk (HDD), optical storage devices such as compact disk (CD-ROM), memory such as Random Access Memory (RAM) or flash memory, and the like. It should be noted that the division and number of program modules in the first memory 1030 and/or the second memory 1120 are not fixed, and a person skilled in the art may use suitable program modules or combinations of program modules according to the actual situation, which when executed by the first processor 1020 and/or the second processor 1110, enable the first processor 1020 and/or the second processor 1110 to perform the method according to the embodiments of the present disclosure or any variations thereof.
Fig. 12 schematically illustrates a block diagram of an electronic device adapted to implement a method of configuring a service line or to implement a method of executing a service, according to an embodiment of the present disclosure. The computer system illustrated in fig. 12 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 12, an electronic device 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. The processor 1201 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 1201 may also include on-board memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 1203, various programs and data required for the operation of the electronic apparatus 1200 are stored. The processor 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. The processor 1201 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1202 and/or RAM 1203. Note that the program may be stored in one or more memories other than the ROM 1202 and the RAM 1203. The processor 1201 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 1200 may also include an input/output (I/O) interface 1205, the input/output (I/O) interface 1205 also being connected to the bus 1204. The electronic device 1200 may also include one or more of an input section 1206 including a keyboard, mouse, etc., an output section 1207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc., a storage section 1208 including a hard disk, etc., and a communication section 1209 including a network interface card such as a LAN card, modem, etc., connected to the I/O interface 1205. The communication section 1209 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 1205 as needed. A removable medium 1211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 1210 so that a computer program read out therefrom is installed into the storage section 1208 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1209, and/or installed from the removable media 1211. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1201. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include the ROM1202 and/or the RAM1203 and/or one or more memories other than the ROM1202 and the RAM1203 described above.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.