Detailed Description
The principles and spirit of the embodiments of the present specification will be described below with reference to several exemplary implementations. It should be understood that these embodiments are presented merely to enable one skilled in the art to better understand and implement the present description embodiments and are not intended to limit the scope of the present description embodiments in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that the implementations of the embodiments of the present description may be implemented as a system, apparatus, method, or computer program product. Accordingly, the present specification embodiment disclosure may be embodied in the form of entirely hardware, entirely software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software.
While the flow described below includes a number of operations occurring in a particular order, it should be apparent that these processes may include more or fewer operations, which may be performed sequentially or in parallel (e.g., using a parallel processor or a multi-threaded environment).
In one scenario example of the present application, a service invocation system is provided, as shown in fig. 1, and may include a terminal device 101 and a server 102, where a user may initiate a target service request through the terminal device 101. The server 102 may respond to the user submitting the target service request, obtain the service call relationship information set of the target service, and call the multiple services related to the target service in turn by using multiple threads according to the call relationship of the multiple services related to the target service, so that the flexible call of the multiple services related to the target service may be implemented efficiently without depending on any flow platform. In some scenario examples, the server 102 may also feed back the execution results of the plurality of services related to the invoked target service to the terminal device 101.
The terminal device 101 may be a terminal device or software used by a user operation. Specifically, the terminal device may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch or other wearable devices, or may be a robot device or the like. Of course, the terminal device 101 may be software that can be executed in the terminal device. Such as application software for system applications, payment applications, browsers, weChat applets, etc.
The server 102 may be a single server or a server cluster, and of course, the functions of the server may be implemented by using a cloud computing technology. The server 102 may be connected to a plurality of terminal devices or may be a server having a strong information set library, and may obtain a service call relationship information set of a target service based on a target service request initiated by a user, and call a plurality of services related to the target service in turn by using a plurality of threads according to a call relationship of a plurality of services related to the target service, so that efficient flexible call of a plurality of services related to the target service may be implemented independently of any flow platform.
Referring to fig. 2, the present embodiment may provide a service calling method. The service calling method can be used for calling a plurality of services related to the target service in sequence by utilizing a plurality of threads according to the calling relation of the plurality of services related to the target service based on the target service request initiated by the user, so that the flexible calling of the plurality of services related to the target service can be realized efficiently. The service invocation method may include the following steps.
S201, a service calling relation information set of a target service is obtained in response to a target service request initiated by a user, wherein the service calling relation information set of the target service contains calling relations of a plurality of services related to the target service.
In this embodiment, a service call relationship information set of a target service is acquired in response to a target service request issued by a user. In some embodiments, the server used for processing the service request and scheduling the resources in the institutions such as banks responds to the target service request sent by the user, or the process responds to the target service request sent by the user, and the method and the system can be specifically determined according to actual conditions, and are not limited in this aspect.
In this embodiment, the target service request may be a request sent by a user for a target service, and the target service request may be transmitted in a message form. The target service may be a service that the user desires to realize, and in one scenario example, the target service may include transferring money, depositing money, withdrawing money, inquiring balance, handling credit card, applying for loan, etc., and of course, the target service is not limited to the above example, and other modifications may be made by those skilled in the art in light of the technical spirit of the embodiments of the present specification, but it is intended to cover the protection scope of the embodiments of the present specification as long as the functions and effects implemented by the target service are the same as or similar to those of the embodiments of the present specification.
In this embodiment, since a plurality of services may need to be invoked in a certain order after completing one service, a service invocation relationship information set of a target service may be obtained after receiving a target service request initiated by a user, where the service invocation relationship information set of the target service includes invocation relationships of a plurality of services related to the target service. In the case that the target service is a transfer service, the plurality of services related to the transfer service may include, but are not limited to, a transfer function, registration information, an accumulated amount, and the like.
In this embodiment, a plurality of services related to the target service and call relations of the plurality of services related to the target service may be determined according to a service call relation information set of the target service, where the call relations of the plurality of services may be a manner, a sequence, and the like of calling each service, and the manner of calling the services may include at least one of serial and parallel. And when the service calling mode is serial, the service is characterized as synchronous calling, and when the service calling mode is parallel, the service is characterized as asynchronous calling. Synchronous call is a blocking type call mode, namely, a main calling party code is always blocked and waits until a called party returns, and if a page needs to be made in three things, A, B, C, the synchronous call mode is generally that B is made after A is made and C is made after B is made, while asynchronous call is that when A is started, B can be started after A is not made, and C can be started after B is not made. If all three things take 5s, the synchronous call mode needs to be completed for 15s at least, and if asynchronous, the asynchronous call is completed for 5s at least, so that the efficiency of the asynchronous call is higher compared with that of the synchronous call. Asynchronous calls are only applicable where there is no correlation between the various services that need to be called. If there are interrelated, interdependent situations, e.g., B must make a call after execution of A is complete, C must make a call after execution of B is complete, then a synchronous call is needed.
In this embodiment, the service call relation information set of the target service may further include feature information related to each service, for example, a service ID (identity), a waiting synchronization flag, and the like. The service ID can be a character string, one service can be uniquely identified through the service ID, and the synchronous waiting identification can be used for identifying whether the calling of a plurality of services related to the target service synchronously waits for a processing result.
In one embodiment, service call relation information sets of each service available in the system may be stored in a preset database in advance, and when an initiated target service request is received, the service call relation information set of the target service may be obtained from the preset database according to the target service request. The preset database may be a database storing business data in a bank or other institutions. It will be understood that, of course, other possible ways may be used to obtain the service call relationship information set of the target service, for example, the service call relationship information set of the target service is searched in the web page according to a certain search condition, which may be specifically determined according to the actual situation, and the embodiment of the present disclosure is not limited to this.
In some embodiments, the target service request may include identification information of the target service, so that the service to be processed may be uniquely determined according to the identification information of the target service.
S202, according to the calling relation of a plurality of services related to the target business, a plurality of threads are utilized to call the plurality of services related to the target business in sequence.
In the present embodiment, since the service call relationship information of the target service includes the call relationships of the plurality of services related to the target service in a concentrated manner, the plurality of services related to the target service can be sequentially called by a plurality of threads according to the call relationships of the plurality of services related to the target service.
In this embodiment, the plurality of threads and the plurality of services may be in one-to-one correspondence, that is, one thread may be used to call and process one service. Of course, in the case of executing the synchronous call, a thread may be used to call and process a service, which may be specifically determined according to practical situations, and the present application is not limited thereto.
In this embodiment, the multiple threads may be created simultaneously or sequentially, for example, a thread of a next service of the current service may be created when successful call or successful execution of the current service is confirmed, and the steps are repeated in a loop until all the multiple services related to the target service are called. Of course, the manner of sequentially calling the plurality of services related to the target service by the plurality of threads is not limited to the above example, and other modifications may be made by those skilled in the art in light of the technical spirit of the embodiments of the present specification, but all the functions and effects implemented by the method are the same as or similar to those of the embodiments of the present specification, and are included in the protection scope of the embodiments of the present specification.
In this embodiment, the thread (thread) is a term in operating system technology, is the smallest unit that an operating system can perform operation scheduling, is included in a process, and is the actual unit of operation in the process. A process is a memory area containing some resources, and an operating system divides its work into functional units by using a process, where one or more execution units contained in the process are called threads (threads), a thread refers to a single sequential control flow in the process, multiple threads can be parallel in a process, and each thread can execute different tasks in parallel.
From the above description, it can be seen that the embodiment of the present specification achieves the technical effect that a service call relationship information set of a target service can be obtained in response to a target service request initiated by a user. Because the service call relationship information of the target service contains the call relationship of a plurality of services related to the target service in a centralized manner, the plurality of services related to the target service can be sequentially called by utilizing a plurality of threads according to the call relationship of the plurality of services related to the target service, and the package of the combined service is not needed to be dependent on any flow platform, so that the flexible call of the plurality of services related to the target service requested by the user can be efficiently performed.
In one embodiment, the method for sequentially calling the plurality of services related to the target service by using the plurality of threads according to the calling relation of the plurality of services related to the target service may include creating a thread of a current service according to the calling relation of the plurality of services related to the target service, wherein the current service is a service to be called currently. Further, the thread of the current service can be called based on the reflection mechanism, and when the current service is determined to be synchronously called according to the service calling relation information set of the target service, the thread of the next service of the current service can be created according to the calling relation of a plurality of services related to the target service when the current service is determined to be successfully executed. The thread of the next service of the current service can be used as the thread of the current service until the plurality of service calls related to the target service are completed.
In this embodiment, the multiple services and the multiple threads are in one-to-one correspondence, each created thread is only used for processing the corresponding service, and after the corresponding service is successfully executed, the resources of the thread can be released.
In this embodiment, since the synchronous call needs to wait for the current service to be executed before the next service is called, when it is determined that the current service is the synchronous call, a thread of the next service of the current service may be created according to the call relationships of the plurality of services related to the target service when it is determined that the current service has been successfully executed, so that the thread of the next service of the current service may be used to call and execute the next service of the current service, and the above steps may be looped until the plurality of services related to the target service are all called.
In this embodiment, reflection refers to a class of applications where the reflection mechanism is self-describing and self-controlling. That is, such applications implement self-presenting and monitoring (appearance) of their own behavior by employing some mechanism, and can adjust or modify the state and related semantics of the behavior described by the application according to the state and result of their own behavior. In one embodiment, the current service may be invoked with its threads based on a reflection mechanism.
In one embodiment, in a process of sequentially calling a plurality of services related to a target service by using a plurality of threads, if it is determined that one service has not been successfully called or has not been successfully executed, the processing of the threads may be ended, and the compensation service of the plurality of services related to the target service may be sequentially called by using the plurality of threads in the reverse order of the order of calling the plurality of services related to the target service.
In the present embodiment, the compensation service of the plurality of services related to the target service is called in the reverse order of the calling order of the plurality of services related to the target service, and the continuity and consistency of the data can be ensured. The compensation service may be a direction service of one service, and may also be called a flushing service (a remedy method adopted when the system considers that the system may fail), wherein the compensation service needs to be invoked in a serial manner.
In one embodiment, after the current service is called by the thread of the current service based on the reflection mechanism, the method can further comprise creating the thread of the next service of the current service according to the calling relation of a plurality of services related to the target service under the condition that the current service is determined to be asynchronously called according to the service calling relation information set of the target service. Further, the thread of the next service of the current service may be used as the thread of the current service until the multiple service calls related to the target service are completed.
In this embodiment, since the asynchronous call can call the next service of the current service without waiting until the current service is successfully executed, after it is determined that the current service is successfully called, a thread of the next service of the current service can be created according to the calling relationships of the plurality of services related to the target service, and the next service of the current service can be called by using the thread of the next service of the current service, so that the above steps can be circularly executed until the plurality of services related to the target service are all called.
In one embodiment, the message may be used to transmit information, so before the service is invoked by the thread of the current service based on the reflection mechanism, the method may further include reading a message configuration information set of the current service, where the message configuration information set includes configuration information configured by metadata of an input message and an output message of the current service. Further, a request message and a target response message of the current service can be constructed according to the message configuration information set of the current service, wherein the request message and the target response message are transmitted in a MAP mode.
In this embodiment, the MAP is a container for storing several elements, and the elements are composed of key value and mapping value pairs, so that the MAP can be used for flexibly storing and retrieving data. MAPs may provide one-to-one (where the first may be referred to as a key, each key may occur only once in the MAP, and the second as a value for the key).
In this embodiment, a message configuration information set of a service may be preconfigured for each service and stored in a preset database, where a message is a data unit exchanged and transmitted in a network, that is, a data block to be sent by a station at one time, and the message includes complete data information to be sent, where the length is inconsistent, and the length is unlimited and variable. The message configuration information set can be displayed and stored in the form of a table, an image or a text, and can be stored in a preset database so as to be convenient to read and modify. The preset database may be a database storing business data in a bank or other institutions.
In this embodiment, since the standard format of the message is required before the message is transmitted, the message configuration information set may include configuration information of an input message and an output message of the current service, where the configuration information of the input message and the output message of the current service may be used to characterize the standard format of the request message required to be sent by invoking the current service and the standard format of the corresponding message generated when the current service is successfully executed. It will be understood, of course, that the message configuration information set may also include other information, for example, a service ID (identity), which may be a character string, and a service may be uniquely identified by the service ID.
In this embodiment, a request message and a target response message of a current service may be constructed according to configuration information of an input message and an output message of the current service. The target response message may be a message that needs to be generated when the current service is executed successfully, so that whether the current service is executed successfully or not may be determined according to the target response message.
In this embodiment, the input message and the output message may be configured by using metadata, where metadata and types thereof use unified naming and definition specifications, each metadata has a unique naming, and a definition type thereof uses unified data standards. Metadata is mainly information describing data attributes and is used for supporting functions such as indicating storage locations, historical data, resource searching, file recording and the like. The most intrinsic and abstract definition is data about data, which is a widely-existing phenomenon, and the concrete definition and application of the data are in many fields. It will be understood, of course, that in some embodiments, the input message and the output message may be configured in other manners, and specifically may be determined according to practical situations, which is not limited by the present application.
In the embodiment, the corresponding method for calling the current service by using the thread of the current service based on the reflection mechanism can comprise the steps of calling the current service by using the request message of the current service and the thread based on the reflection mechanism.
In one embodiment, since resources for processing the target service request need to be allocated before the target service request is processed, before the service calling relation information set of the target service is acquired in response to the target service request initiated by the user, the method can further comprise the step of calling a service calling process according to the target service request, wherein the service calling process is used for executing calling processing of a plurality of services related to the target service. Further, in the case that the target service request involves an asynchronous call, an asynchronous service receiving process may be called, where the asynchronous service receiving process is configured to receive a result returned by the service of the asynchronous call, and information is exchanged between the service calling process and the asynchronous service receiving process through a message mechanism.
In this embodiment, the plurality of services related to realizing the target service may be invoked by the service invocation process according to the service invocation relation information set of the target service. Since an asynchronous call can call a next service immediately without waiting for the call result of the current service, it is necessary to receive the result returned by the asynchronously called service through the asynchronous service receiving process, thereby determining whether the asynchronously called service is successfully executed.
In this embodiment, in order for the asynchronous service receiving process to send the received result returned by the asynchronously invoked service to the service invoking process, the service invoking process and the asynchronous service receiving process exchange information through a message mechanism.
Wherein, since all time of occurrence can be represented by a message, the message is used for telling the operating system what happens, and the parameters of the message contain important information. A message queue may be maintained for the asynchronous service receiving process using a message mechanism, and after the asynchronous service receiving process receives the results returned by the asynchronously invoked service, the asynchronous service receiving process may convert the event into a message and place the message into the message queue. Further, messages may be fetched from the message queue through a message loop, which is the task of retrieving a message from the message queue and then passing the message to the appropriate process.
In one embodiment, the method for sequentially calling the plurality of services related to the target service by using the plurality of threads according to the calling relation of the plurality of services related to the target service can comprise the step that a service calling process creates a thread of a current service according to the calling relation of the plurality of services related to the target service, wherein the current service is the service needing to be called currently. Further, the thread of the current service calls the current service based on the reflection mechanism, and when the thread of the current service receives the call result of the current service under the condition that the current service is determined to be synchronously called according to the service call relation information set of the target service, the call result of the current service is sent to the service call process. And under the condition that the current service is successfully executed according to the calling result of the current service, the service calling process creates a thread of the next service of the current service according to the calling relation of a plurality of services related to the target service, and takes the thread of the next service of the current service as the thread of the current service until the calling of the plurality of services related to the target service is completed.
In this embodiment, the multiple services and the multiple threads are in one-to-one correspondence, each created thread is only used for processing the corresponding service, and after the corresponding service is successfully executed, the resources of the thread can be released.
In this embodiment, since the synchronous call needs to wait for the current service to be executed before the next service is called, when it is determined that the current service is the synchronous call, a thread of the next service of the current service may be created according to the call relationships of the plurality of services related to the target service when it is determined that the current service has been successfully executed, so that the thread of the next service of the current service may be used to call and execute the next service of the current service, and the above steps may be looped until the plurality of services related to the target service are all called.
In one embodiment, after the thread of the current service invokes the current service based on the reflection mechanism, the service invocation process may determine an invocation order of the plurality of services related to the target service according to the service invocation relationship information set of the target service, if it is determined that the current service is not successfully executed. Further, the service calling process sequentially calls the compensation service of each service related to the target service by using a plurality of threads according to the reverse order of the calling order of the plurality of services related to the target service.
In the present embodiment, the compensation service of the plurality of services related to the target service is called in the reverse order of the calling order of the plurality of services related to the target service, and the continuity and consistency of the data can be ensured. The compensation service may be a direction service of one service, and may also be called a flushing service (a remedy method adopted when the system considers that the system may fail), wherein the compensation service needs to be invoked in a serial manner.
In one embodiment, in order to enable each called service related information to be queried, after the current service thread calls the current service based on the reflection mechanism, the method further comprises the steps that when the current service is determined to be synchronously called according to the service call relation information set of the target service, the current service thread generates service flowing water of the current service according to the call result of the current service when receiving the call result of the current service, and the service flowing water of the current service is stored in a preset database.
In this embodiment, the service flow may be used to characterize the call and execution of the service, and in some embodiments, the service flow may include, but is not limited to, a service ID, an input message, an output message, a service execution result, and an ID of a last call service of a current service.
In this embodiment, the preset database may be a database storing business data in a bank or other institutions.
In one embodiment, after the current service thread calls the current service based on the reflection mechanism, the method can further comprise that in the case that the current service is determined to be asynchronously called according to the service call relation information set of the target service, the current service thread sends a call result of the current process to the service call process, and in the case that the current process is determined to have been successfully called according to the call result of the current process, the service call process can create a next service thread of the current service according to call relations of a plurality of services related to the target service. Further, the thread of the next service of the current service may be used as the thread of the current service until the multiple service calls related to the target service are completed.
In this embodiment, the call result may be used to indicate whether the service is successfully invoked, and the call result may be used to indicate whether the service is successfully executed. In the asynchronous call scenario, after confirming that the current service has been successfully invoked, a thread of a next service of the current service may be created by the service invocation process according to the invocation relationship of the plurality of services involved in the target service.
In this embodiment, since the asynchronous call can call the next service of the current service without waiting until the current service is successfully executed, after it is determined that the current service is successfully called, a thread of the next service of the current service can be created according to the calling relationships of the plurality of services related to the target service, and the next service of the current service can be called by using the thread of the next service of the current service, so that the above steps can be circularly executed until the plurality of services related to the target service are all called.
In one embodiment, after the thread of the current service sends the call result of the current process to the service call process, the method further comprises the step that when the asynchronous service receiving process determines that the call result returned by the thread of the current service is successfully received, the asynchronous service receiving process generates a response message of the current service according to the service call relation information set of the target service and the call result of the current service. Further, the asynchronous service receiving process puts the response message of the current service into the target message queue, and the service calling process determines whether the current service is successfully executed or not according to the response message of the current service in the target message queue. And ending the call flow of the current service under the condition that the current service is successfully executed.
In this embodiment, since the service call relationship information set of the target service includes the output message configured in advance, the response message of the current service may be generated according to the service call relationship information set of the target service and the call result of the current service.
In this embodiment, when the asynchronous service receiving process successfully receives the call result returned by the current service thread, the asynchronous service receiving process may preliminarily determine the call result returned by the current service thread. The output message configured in the service calling relation information set of the target service is a message which is normally responded under the condition that the current service is successfully executed, so that the response message of the current service can be directly generated according to the service calling relation information set of the target service and the calling result of the current service under the condition that the current service is successfully executed, and the output message configured in the service calling relation information set of the target service can be adjusted according to the calling result of the current service under the condition that the current service is not successfully executed, thereby generating the response message of the current service.
In this embodiment, when it is determined that the current service is successfully executed, the thread resource of the current service may be released, so as to end the call flow of the current service.
In one embodiment, after the service calling process determines whether the current service is successfully executed according to the response message of the current service in the target message mechanism, the method can further comprise determining calling sequences of a plurality of services related to the target service according to the service calling relation information set of the target service under the condition that the current service is not successfully executed, and calling the compensation service of the feature service related to the target service by using a plurality of threads in turn according to the reverse sequence of the calling sequences of the plurality of services related to the target service by the service calling process. The feature service is a service related to the target service and needing to call the compensation service.
In this embodiment, the service calling process sequentially calls the compensation service of at least one feature service related to the target service by using a plurality of threads according to the reverse order of the calling order of the plurality of services related to the target service, and may further include the service calling process reading a plurality of service flows related to the target service from a preset database, sequentially re-creating the plurality of threads according to the reverse order of the calling order of the plurality of services related to the target service according to the service flows of the respective feature services, and sequentially calling the compensation service of the feature service related to the target service by using the re-created plurality of threads.
In the embodiment, the method for sequentially calling the compensation service of the feature service related to the target business by using the recreated multiple threads can comprise the steps that the thread of the target feature service determines the compensation service ID of the target feature service according to the target feature service ID in the service flow of the target feature service. Further, the compensation service of the target feature service may be invoked according to the compensation service ID of the target feature service based on the reflection mechanism until the compensation service invocation of the at least one feature service related to the target service is completed.
In this embodiment, when the thread of the current service receives the call result of the current service, the service flow of the current service may be generated according to the call result of the current service, and the service flow of the current service may be stored in the preset database. Therefore, before the compensation service is invoked, a plurality of service flows of the target service history record can be acquired from the preset database.
In this embodiment, the service flow may be used to characterize the call and execution of the service, and in some embodiments, the service flow may include, but is not limited to, a service ID, an input message, an output message, a service execution result, and an ID of a last call service of a current service.
In this embodiment, since the plurality of threads are newly created according to the service flow of each feature service, there is no record of the service flow in the non-invoked service among the plurality of services related to the target service, it is only necessary to execute the compensation service in reverse order from the service whose execution failed, and it is not necessary to execute the corresponding compensation service from the last service among the plurality of services related to the target service.
In this embodiment, a compensation service information set may be preset and stored in a preset database, so as to configure a correspondence between each service and its compensation service. The set of compensation service information may include a service ID, a service name, whether a compensation service is required (identifying whether the service requires a compensation service), a compensation service ID (if not configured, i.e., the ID of the compensation service may be directly the ID of the service).
In this embodiment, the compensation service ID of the target feature service may be determined according to the compensation service information set and the target feature service ID, so that the compensation service of the target feature service may be called according to the compensation service ID of the target feature service.
In this embodiment, since the service flow of the feature service includes the input message and the output message of the service, before the compensation service of the target feature service is invoked, the request message and the response message of the compensation service of the target feature service may also be constructed according to the service flow of the feature service. Correspondingly, the compensation service of the target feature service can be called according to the constructed request message.
In this embodiment, after the compensation service of the target feature service is invoked, the invocation result of the compensation service may be waited, and in the case that it is determined that the compensation service of the target feature service is successfully executed, the compensation service of the next feature service may be continuously invoked in reverse order until the compensation services of all feature services related to the target service have been successfully executed.
In one embodiment, if the execution of the compensation service fails, the call may be continued, or a prompt of the abnormal execution of the target service may be directly returned to the user side, or the relevant information of the failure execution of the target service may be fed back to the corresponding processor, and the cause of the failure execution may be confirmed manually, which may be specifically determined according to the actual situation, which is not limited in the present application.
Based on the same inventive concept, a service calling device is also provided in the embodiments of the present specification, as follows. Because the principle of the service calling device for solving the problem is similar to that of the service calling method, the implementation of the service calling device can refer to the implementation of the service calling method, and the repetition is not repeated. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated. Fig. 3 is a block diagram of a service invocation apparatus according to an embodiment of the present disclosure, and as shown in fig. 3, may include a processing module 301 and an invocation module 302, and this structure will be described below.
The processing module 301 may be configured to obtain a service call relationship information set of a target service in response to a target service request initiated by a user, where the service call relationship information set of the target service includes call relationships of a plurality of services related to the target service;
the calling module 302 may be configured to call, in sequence, the plurality of services related to the target service by using the plurality of threads according to a calling relationship of the plurality of services related to the target service.
The embodiment of the present disclosure further provides an electronic device, which may specifically refer to a schematic diagram of an electronic device composition based on the service invocation method provided in the embodiment of the present disclosure shown in fig. 4, where the electronic device may specifically include an input device 41, a processor 42, and a memory 43. Wherein the input device 41 may be specifically used for entering a target service request. The processor 42 may be specifically configured to obtain a service call relationship information set of a target service in response to a target service request initiated by a user, where the service call relationship information set of the target service includes call relationships of a plurality of services related to the target service, and sequentially call the plurality of services related to the target service by using a plurality of threads according to the call relationships of the plurality of services related to the target service. The memory 43 may be used for storing parameters such as a service invocation relation information set.
In this embodiment, the input device may specifically be one of the main means for exchanging information between the user and the computer system. Input devices may include a keyboard, mouse, camera, scanner, light pen, handwriting input pad, voice input device, etc., for inputting raw data and programs for processing these numbers into a computer. The input device may also obtain data transmitted from other modules, units, and devices. The processor may be implemented in any suitable manner. For example, a processor may take the form of, for example, a microprocessor or processor, and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application SPECIFIC INTEGRATED Circuits (ASICs), programmable logic controllers, and embedded microcontrollers, among others. The memory may in particular be a memory device for storing information in modern information technology. The memory may comprise multiple levels, in a digital system, the memory may be any memory as long as it can hold binary data, in an integrated circuit, a circuit with a memory function without a physical form, such as RAM, FIFO, etc., and in a system, a memory device with a physical form, such as a memory bank, TF card, etc.
In this embodiment, the specific functions and effects of the electronic device may be explained in comparison with other embodiments, which are not described herein.
The embodiment of the specification also provides a computer storage medium based on the service calling method, wherein the computer storage medium stores computer program instructions, and the computer program instructions can be implemented when executed, the computer program instructions can be used for responding to a target service request initiated by a user to obtain a service calling relation information set of the target service, wherein the service calling relation information set of the target service comprises calling relations of a plurality of services related to the target service, and the plurality of services related to the target service are sequentially called by a plurality of threads according to the calling relations of the plurality of services related to the target service.
In the present embodiment, the storage medium includes, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), a Cache (Cache), a hard disk (HARD DISK DRIVE, HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, the functions and effects of the program instructions stored in the computer storage medium may be explained in comparison with other embodiments, and are not described herein.
It will be apparent to those skilled in the art that the modules or steps of the embodiments described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module. Thus, embodiments of the present specification are not limited to any specific combination of hardware and software.
Although the present description provides the method operational steps as described in the above embodiments or flowcharts, more or fewer operational steps may be included in the method, either on a routine or non-inventive basis. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided in the embodiments of the present specification. The described methods, when performed in an actual apparatus or an end product, may be performed sequentially or in parallel (e.g., in a parallel processor or multithreaded environment) as shown in the embodiments or figures.
It is to be understood that the above description is intended to be illustrative, and not restrictive. Many embodiments and many applications other than the examples provided will be apparent to those of skill in the art upon reading the above description. The scope of the embodiments of the specification should, therefore, be determined not with reference to the above description, but instead should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
The above description is only of the preferred embodiments of the present embodiments and is not intended to limit the present embodiments, and various modifications and variations can be made to the present embodiments by those skilled in the art. Any modification, equivalent replacement, improvement, or the like made within the spirit and principles of the embodiments of the present specification should be included in the protection scope of the embodiments of the present specification.