CN110661792B - Service ordered calling method and device, electronic equipment and storage medium - Google Patents

Service ordered calling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110661792B
CN110661792B CN201910883156.1A CN201910883156A CN110661792B CN 110661792 B CN110661792 B CN 110661792B CN 201910883156 A CN201910883156 A CN 201910883156A CN 110661792 B CN110661792 B CN 110661792B
Authority
CN
China
Prior art keywords
service
execution
services
executed
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910883156.1A
Other languages
Chinese (zh)
Other versions
CN110661792A (en
Inventor
张生琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201910883156.1A priority Critical patent/CN110661792B/en
Publication of CN110661792A publication Critical patent/CN110661792A/en
Application granted granted Critical
Publication of CN110661792B publication Critical patent/CN110661792B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a service ordered calling method, a service ordered calling device, electronic equipment and a computer readable storage medium, and relates to the technical field of communication. The method comprises the following steps: receiving a calling request of a program end to a first service with first identification information; when the first service is an orderly execution service, acquiring an execution sequence of the first service in a plurality of services and acquiring execution results of all services with first identification information, wherein the execution results of each service comprise unexecuted or executed; based on an execution order of the first service among the plurality of services and an execution result of each service having the first identification information, the invocation request is rejected when there is an unexecuted service before the first service or there is an executed service after the first service. The method and the system can ensure that the ordered services are executed in sequence so as to prevent the system from being disordered.

Description

Service ordered calling method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a service ordered calling method, a service ordered calling apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of communication technology, the business behaviors of selling through each communication terminal are more convenient and faster. In insurance sales, diversified insurance application terminals such as computer terminals, mobile phone program terminals and the like have become the normal state of operation. However, because of the variety of insurance product sales channels, insurance application media and product types, each insurance application end builds a set of own insurance application system, and a great deal of development and maintenance cost is needed. Therefore, the application platform is produced at the same time to meet the requirement of accessing the application process at the application end.
The application platform provides application services and interfaces thereof for each application terminal, and some of the services are in sequence. The application terminal needs to call the services of the platform according to a preset sequence, for example, some insurance policies need to be checked and then accepted, and if the application terminal calls the acceptance service interface first and then calls the check and guarantee interface, the application terminal is not allowed.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide a service ordered calling method, a service ordered calling device, electronic equipment and a computer readable storage medium, so as to solve the problem that ordered services of an application platform are called out of order.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to one aspect of the disclosure, a service ordered calling method is provided, which includes:
receiving a calling request of a first program end to a first service with first identification information;
when the first service is an ordered execution service, acquiring an execution sequence of the first service in a plurality of services;
acquiring execution results of all the services with the first identification information, wherein the execution results of all the services comprise non-execution or execution;
rejecting the invocation request when there is an unexecuted service before the first service or an executed service after the first service based on an execution order of the first service among a plurality of services and an execution result of each of the services having the first identification information.
In an exemplary embodiment of the present disclosure, the first service being an in-order execution service includes: the first service is located in a service sequence list.
In an exemplary embodiment of the disclosure, the service sequence table includes a plurality of services and a sequence of execution of each service, whether each service is a necessary execution service, and an executable number of times of each service.
In one exemplary embodiment of the present disclosure,
when the first service is located in the service sequence table, obtaining a service execution result table with the first identification information;
the service execution result table having the first identification information includes execution results of all the services having the first identification information.
In an exemplary embodiment of the present disclosure, further comprising:
and when the first service is not necessarily executed, responding to the calling request and writing an execution result of the first program end to the first service with the first identification information.
In an exemplary embodiment of the present disclosure, further comprising:
and when the first service is an executed service and the first service is a service capable of being executed for multiple times, responding to the calling request and writing an execution result of the first program end to the first service with the first identification information.
In an exemplary embodiment of the present disclosure, further comprising:
receiving a modification request for the service sequence list, wherein the modification request comprises adding a newly added service, deleting an existing service, adjusting the sequence execution sequence of each service, and resetting whether each service is a necessary service and the executable times of each service;
and adjusting the service sequence list according to the modification request, and adjusting the service execution result list according to the adjusted service sequence list.
According to a second aspect of the present disclosure, there is provided a service ordered calling apparatus, including:
the calling request module is used for receiving a calling request of a first program end to a first service with first identification information;
the sequence acquisition module is used for acquiring the execution sequence of the first service in a plurality of services when the first service is an ordered execution service;
a result obtaining module, configured to obtain execution results of all the services with the first identification information, where the execution result of each service includes that the service is not executed or is executed;
a call judging module, configured to reject the call request when there is an unexecuted service before the first service or there is an executed service after the first service based on an execution order of the first service in a plurality of services and an execution result of each of the services having the first identification information.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute any of the service ordered call methods described above via execution of the executable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the service ordered calling method of any of the above.
In the service ordered calling method, the service ordered calling device, the electronic device, and the computer-readable storage medium provided in this exemplary embodiment, when it is detected that the called service with the unique identification information is an ordered service, it is determined whether to accept the call to the service according to a preset service order and execution results of all services with the unique identification information. The method and the system can judge whether the called service is intercepted or released or not by calling the service sequence and the service result, ensure that the ordered service is executed in sequence and prevent the system from being disordered; in addition, the execution sequence of the service can be flexibly adjusted through the configuration of the related attributes of the service sequence without changing the internal codes of each service and platform, and the method is safe and convenient.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 is a diagram illustrating an exemplary system architecture to which a service ordered calling method and apparatus of embodiments of the present disclosure may be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device used to implement embodiments of the present disclosure;
FIG. 3 is a flow chart that schematically illustrates a method for service ordered invocation in an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic flow chart diagram illustrating the processing of a service call using a sequence interceptor in an exemplary embodiment of the present disclosure;
fig. 5 schematically shows a block diagram of a service ordered calling apparatus in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating an exemplary system architecture to which a service ordered calling method and apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The service ordered calling method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the service ordered calling device is generally disposed in the server 105. However, it is easily understood by those skilled in the art that the service ordered calling method provided in the embodiment of the present disclosure may also be executed by the terminal devices 101, 102, and 103, and accordingly, the service ordered calling apparatus may also be disposed in the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, 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 present 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. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart 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.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer-readable storage medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 3, fig. 4, and the like.
The technical solution of the embodiment of the present disclosure is explained in detail below:
the exemplary embodiment first provides a service ordered calling method. The service ordered calling method may be applied to the server 105, and may also be applied to one or more of the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment. Referring to fig. 3, the service ordered calling method may include the following steps:
step S310, receiving a calling request of a first program end to a first service with first identification information;
s320, when the first service is an ordered execution service, acquiring an execution sequence of the first service in a plurality of services;
s330, acquiring execution results of all the services with the first identification information, wherein the execution results of all the services comprise non-execution or execution;
step s340, based on the execution order of the first service in the plurality of services and the execution result of each service with the first identification information, rejecting the invocation request when there is an unexecuted service before the first service or there is an executed service after the first service.
In the service ordered calling method provided in this exemplary embodiment, when it is detected that the called service with the unique identification information is an ordered service, whether to accept the call to the service may be determined according to a preset service sequence and execution results of all services with the unique identification information. The method and the system can judge whether the called service is intercepted or released or not by calling the service sequence and the service result, ensure that the ordered service is executed in sequence and prevent the system from being disordered; in addition, the execution sequence of the service can be flexibly adjusted through the configuration of the related attributes of the service sequence without changing the internal codes of each service and platform, and the method is safe and convenient.
In the related art, an application platform provides a series of application services. Among these services, some services are ordered services, that is, there is a sequential calling order for a plurality of services, and the precondition for executing a service arranged behind may depend on the result of executing a service in front. Further, some services may be executed repeatedly, while some may be executed only once.
Next, the above steps of the present exemplary embodiment will be described in more detail with reference to fig. 4.
Step S310, receiving a request for calling a first service having first identification information from a first program.
In this exemplary embodiment, the first program end may include a computer client, a computer web page end, a mobile phone program end, a web page end, and the like. The first service may include various insurance services that can be provided by the insurance platform, such as self-checking services, signature services, acceptance services, and the like. The first identification information may be unique identification information for identifying a policy, for example, a policy number of a certain policy is 000001, where 000001 is the identification information of the policy, and the policy number 000001 has uniqueness in an application platform.
In this step, each terminal initiates a call request for a first service with first identification information, for example, a user initiates a call request for a signature service in a policy with a policy number of 000001 through a mobile phone program terminal, and the platform receives the call request.
Step S320, when the first service is an ordered execution service, acquiring an execution sequence of the first service in a plurality of services.
After the platform receives the call request, the platform may first determine whether the first service is an ordered execution service. That is, whether the first service is located in a plurality of services, and the plurality of services have a sequential calling order. After determining that the first service is an ordered execution service, the platform may obtain an execution order of the first service in the plurality of services. The specific content of the execution sequence may include the name of each service, the sequence of execution of each service, whether each service is a necessary execution service, the number of executions of each service, and other related information.
Furthermore, because the insurance processes of each insurance application end are designed differently, in order to meet various process requirements, the platform can configure service lists which need to be executed in sequence under different insurance application ends in the database, and the service lists corresponding to each insurance application end can be uniformly arranged in the service sequence list of the platform. The service sequence table may include a plurality of service lists, and each service list may include a plurality of services corresponding to an application terminal, a sequence of execution of each service, whether each service is a necessary execution service, an executable number of each service, and the like.
Specifically, as shown in table 1, the service list of the application terminal a includes three services, which are a self-check service, a signature service, and a receiving service in sequence, and each service is an indispensable execution service, where the number of executions of the self-check service is N times (N represents multiple times), and the number of executions of the signature service and the receiving service is 1 time.
Insuring terminal Service name Sequence of Whether or not it is necessary to execute Number of executions Remarks for note
A Self-core 1 Is that N N stands for multiple executions
A Signature 2 Is that 1
A Acceptance of 3 Is that 1
TABLE 1 service List of the insuring end A
It should be added that the content in each service list in the service sequence list can be adjusted according to the actual requirement or variation. The user or the developer can initiate a modification request for the service sequence list, and the platform can adjust the service sequence list according to the modification request. The adjusted content may include adding a new service, deleting an existing service, adjusting the execution sequence of each service, resetting whether each service is a necessary execution service, the executable times of each service, and the like.
Furthermore, when each application terminal calls the service of the platform, the platform will firstly go to the service sequence table to inquire whether the called service is located in the service list corresponding to the corresponding application terminal. Once it is determined that the service is located in the service list corresponding to the corresponding application terminal, the service ordered calling program may be entered, and the service list corresponding to the application terminal of the called service may be obtained.
In some embodiments, in order to avoid frequent call of the database and ensure high efficiency and low consumption, the service list corresponding to the corresponding application terminal may be cached in the cache server when the platform queries the service sequence table for the first time, so that the application terminal can read the service list quickly after entering the service ordered call program.
In addition, when the platform judges that the first service is the unordered execution service, namely the first service is found not to be in the service list by querying the service list, the first service is unordered and can be directly called without entering a service ordered calling program.
Step S330, obtaining the execution results of all the services with the first identification information, wherein the execution results of each service comprise non-execution or execution.
In this exemplary embodiment, after the called first service is judged to be the ordered execution service, the validity of the current service call needs to be judged in combination with the execution results of all services with the first identification information. Typically, the execution result of each of the services includes either not executed or executed. Further, the execution results of all services having the first identification information may be queried through a service execution result table having the first identification information.
Company code Policy number Self-core Signature Acceptance of
1 000001 Has already executed Is not executing Is not executing
1 000002 Is not executing Is not executing Is not executing
1 000003 Has already executed Has already executed Has already executed
TABLE 2 executive results Table
For example, each time a service is successfully invoked and a service result is generated, the platform may write the execution result of each of the services into a service execution result table. Specifically, the execution result of all services having unique identification information may be written into the service execution result table of the unique identification information. The service execution result table may include service names of all services having unique identification information, service order, and execution results of the respective services. As shown in table 2, the execution result table includes the service execution result with the policy number 000001. It can be seen that in the service execution result with the policy number of 000001, the self-checking service is executed, and both the signature service and the acceptance service are not executed.
It should be added that the service name and the service order in the service execution result table can be adjusted in coordination with the corresponding service order table. For example, if the application terminal a has a new service a that needs to be executed sequentially, the piece of data may be configured in table 1, the order of other services may be adjusted, and the execution result field of a may be expanded in table 2.
In this exemplary embodiment, when a user initiates a call request for a signature service in a policy with a policy number of 000001 through an application terminal a, a platform receives the call request, and after determining that the signature service is located in a service list of the application terminal a in a service sequence table (i.e., after the signature service is an orderly execution service), obtains a service list (table 1) corresponding to the application terminal of the signature service, and obtains a service result table (table 2) with a policy number of 000001.
Step s340, based on the execution order of the first service in the plurality of services and the execution result of each service with the first identification information, rejecting the invocation request when there is an unexecuted service before the first service or there is an executed service after the first service.
In this example embodiment, the current call request may be determined based on the obtained service sequence table and the service execution result table. The judgment basis is as follows: in several services arranged in sequence, if other services before the current service have not executed results or other services after the current service have executed results, the current service call is in an illegal state, and the call fails. In order to improve efficiency, when the service sequence table is called for the first time, data in the table can be cached in the cache server so as to facilitate subsequent query.
For example, a user initiates a call request for a signature service in a policy with a policy number of 000001 through an application terminal a, and after determining that the signature service is located in a service list (table 1) of the application terminal a in a service sequence table, a platform receives the call request, acquires table 1, and acquires a service result table (table 2) containing a policy 000001 service result. Based on table 1 and table 2, the service before querying the signature service is the self-check service, the self-check service is the service that must be executed and is already executed, meanwhile, the service after querying the signature service is the acceptance service, and the acceptance service is not executed, so that the call is legal, and the platform accepts the call request and can continue to execute.
In the second example, the user initiates a call request for the acceptance service in the policy with the policy number of 000001 through the application terminal a, the platform receives the call request, and acquires table 1 and table 2 after determining that the acceptance service is in table 1. Based on table 1 and table 2, if the signature service before the acceptance service is found to be necessary but not yet executed, the call is not legal and fails.
In the third example, the user initiates a call request for the acceptance service in the policy with the policy number of 000003 through the application terminal a, the platform receives the call request, and acquires table 1 and table 2 after determining that the acceptance service is located in table 1. Based on tables 1 and 2, the acceptance service is required to be executed and can be executed only 1 time, and if the acceptance service is executed in table 2, the call is illegal and fails.
In this example embodiment, when the first service is an executed service and the first service is a service capable of being executed for multiple times, the call request may be responded, and an execution result of the first program for the first service having the first identification information may be written. In detail, when the first service is the service capable of being executed for multiple times, although the first service is found to be the executed service in the call result table, within the preset executable number range, the call request may be accepted again and the execution result may be written into the service execution result table. The service result table is still stored in the database after receiving a new execution result, and can be called again.
In the fourth example, the user initiates a call request for the self-core service in the policy with the policy number of 000001 through the application terminal a, the platform receives the call request, and obtains table 1 and table 2 after determining that the self-core service is located in table 1. Based on table 1 and table 2, there is no other service before querying the self-core service, the self-core service is a service that must be executed and the number of times of execution is multiple, although the self-core service is found in table 2 as an executed service, since the service is a service that can be executed multiple times, the call is still legal, and the platform receives the call request and can continue execution.
It should be added that, in some embodiments, if a certain service is a service capable of being executed multiple times, the number of times that certain service can be executed may also be set to be executed infinitely or limited. The number of limited executions may also be set to an explicit number of times, e.g. three, five, ten, etc. Accordingly, the service sequence table and the service execution result table may be provided with relevant option settings, and the service execution times and the like may be recorded in the service result table. The present disclosure is not particularly limited herein.
In addition, in some embodiments, when there is an unexecuted service before the first service and the unexecuted service is a non-essential service, the call is legal, and the result of the first program executing the first service with the first identification information may be written in response to the call request.
In addition, for the ordered services of each application terminal, in the present exemplary embodiment, the service order table and the service execution result table can be configured to set, so that the execution order of the services can be flexibly adjusted without changing the internal codes of each service and platform, and the method is safe and convenient.
In another embodiment of the present disclosure, referring to fig. 4, in the service ordered calling method, after the current service is judged to be the ordered service, whether the ordered service is executable or not may also be judged by the order interceptor. For example, in an embodiment of a service call, the service call may be processed according to the following process:
in step S410, a service invocation request is received from a client; in step S421, a service sequence table is queried in the database according to the application terminal, and the service sequence table is stored in the cache server; in step S422, whether the current service needs to enter the sequence interceptor is determined according to the query result in the service sequence table; when the current service is not found in the service sequence table, the process goes directly to step S424, that is, the current service can be executed directly without passing through a sequence interceptor; if yes, then go to step S423 and step S431, step S423, and obtain the service sequence table already cached in the cache server in step S421; step S431, obtaining a service execution result table of the current policy in a database; step S441, determining whether the current service is executable based on the service sequence table and the service execution result table; when the current service is determined not to be executable, the process proceeds to step S443, and the process is interrupted; when the current service is determined to be executable, the service call request is responded, the service is returned to the client, and after the client returns the execution result, the process goes to step S442, and the current service execution result is written into the database.
The disclosure also provides a device for orderly calling the service. As shown in fig. 5, the service ordered calling device 500 may include:
a call request module 510, configured to receive a call request of a first program to a first service having first identification information;
a sequence obtaining module 520, configured to obtain, when the first service is an ordered execution service, an execution sequence of the first service in a plurality of services;
a result obtaining module 530, configured to obtain execution results of all the services with the first identification information, where the execution result of each service includes that the service is not executed or executed;
a call judging module 540, configured to reject the call request when there is an unexecuted service before the first service or there is an executed service after the first service based on an execution order of the first service in a plurality of services and an execution result of each service having the first identification information.
It should be noted that, the specific details of each module in the service ordered calling apparatus have been described in detail in the corresponding service ordered calling method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (10)

1. A service ordered calling method is characterized by comprising the following steps:
receiving a calling request of a first program end to a first service with first identification information;
when the first service is an ordered execution service, acquiring an execution sequence of the first service in a plurality of services;
acquiring execution results of all the services with the first identification information, wherein the execution results of all the services comprise non-execution or execution;
rejecting the invocation request when there is an unexecuted service before the first service or an executed service after the first service based on an execution order of the first service among a plurality of services and an execution result of each of the services having the first identification information;
and when the first service is the executed service and the first service can be executed for multiple times, the calling request of the first service is accepted again within the range of preset executable times.
2. The method of claim 1, wherein the first service is an in-order execution service comprising: the first service is located in a service sequence list.
3. The method according to claim 2, wherein the service sequence table includes a plurality of services and a sequence of execution of each service, whether each service is a necessary service and an executable number of each service.
4. The service ordered calling method according to claim 3, further comprising:
when the first service is located in the service sequence table, obtaining a service execution result table with the first identification information;
the service execution result table having the first identification information includes execution results of all the services having the first identification information.
5. The service ordered calling method according to claim 4, further comprising:
and when the first service is not necessarily executed, responding to the calling request and writing an execution result of the first program end to the first service with the first identification information.
6. The service ordered calling method according to claim 4, further comprising:
and when the first service is an executed service and the first service is a service capable of being executed for multiple times, responding to the calling request and writing an execution result of the first program end to the first service with the first identification information.
7. The service ordered calling method according to claim 5 or 6, further comprising:
receiving a modification request for the service sequence list, wherein the modification request comprises adding a newly added service, deleting an existing service, adjusting the sequence execution sequence of each service, and resetting whether each service is a necessary service and the executable times of each service;
and adjusting the service sequence list according to the modification request, and adjusting the service execution result list according to the adjusted service sequence list.
8. An apparatus for ordered invocation of services, comprising:
the calling request module is used for receiving a calling request of a first program end to a first service with first identification information;
the sequence acquisition module is used for acquiring the execution sequence of the first service in a plurality of services when the first service is an ordered execution service;
a result obtaining module, configured to obtain execution results of all the services with the first identification information, where the execution result of each service includes that the service is not executed or is executed;
a call determination module configured to reject the call request when there is an unexecuted service before the first service or there is an executed service after the first service based on an execution order of the first service among a plurality of services and an execution result of each of the services having the first identification information;
the calling judgment module is further configured to accept the calling request of the first service again within a preset executable time range when the first service is an executed service and the first service is a service capable of being executed for multiple times.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the service ordered call method of any of claims 1-7 via execution of the executable instructions.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the service ordered calling method of any one of claims 1 to 7.
CN201910883156.1A 2019-09-18 2019-09-18 Service ordered calling method and device, electronic equipment and storage medium Active CN110661792B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910883156.1A CN110661792B (en) 2019-09-18 2019-09-18 Service ordered calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910883156.1A CN110661792B (en) 2019-09-18 2019-09-18 Service ordered calling method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110661792A CN110661792A (en) 2020-01-07
CN110661792B true CN110661792B (en) 2022-04-05

Family

ID=69038162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910883156.1A Active CN110661792B (en) 2019-09-18 2019-09-18 Service ordered calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110661792B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297456A (en) * 2012-02-24 2013-09-11 阿里巴巴集团控股有限公司 Method for accessing sharing resources in distributed system and distributed system
CN104601696A (en) * 2015-01-13 2015-05-06 北京京东尚科信息技术有限公司 Service processing method and service invoking frame, device and architecture
CN104660694A (en) * 2015-02-09 2015-05-27 北京博雅立方科技有限公司 Method and apparatus for calling service
CN108255467A (en) * 2016-12-27 2018-07-06 北京京东尚科信息技术有限公司 The method, apparatus and system of service are performed according to workflow sequence
CN110046052A (en) * 2018-12-04 2019-07-23 阿里巴巴集团控股有限公司 A kind of service calling method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187992A1 (en) * 2001-05-07 2003-10-02 Steenfeldt Rico Werni Service triggering framework
JP2011118587A (en) * 2009-12-02 2011-06-16 Hitachi Ltd System for executing cooperative service by plurality of servers
US8819640B2 (en) * 2012-07-24 2014-08-26 International Business Machines Corporation Establishing cloud debug breakpoints assigned to users
JP5664727B2 (en) * 2013-09-02 2015-02-04 株式会社リコー Image forming apparatus, information processing method, information processing system, and program
CN106375458B (en) * 2016-09-08 2019-12-13 上海银赛计算机科技有限公司 Service calling system, method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297456A (en) * 2012-02-24 2013-09-11 阿里巴巴集团控股有限公司 Method for accessing sharing resources in distributed system and distributed system
CN104601696A (en) * 2015-01-13 2015-05-06 北京京东尚科信息技术有限公司 Service processing method and service invoking frame, device and architecture
CN104660694A (en) * 2015-02-09 2015-05-27 北京博雅立方科技有限公司 Method and apparatus for calling service
CN108255467A (en) * 2016-12-27 2018-07-06 北京京东尚科信息技术有限公司 The method, apparatus and system of service are performed according to workflow sequence
CN110046052A (en) * 2018-12-04 2019-07-23 阿里巴巴集团控股有限公司 A kind of service calling method and device

Also Published As

Publication number Publication date
CN110661792A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN110225104B (en) Data acquisition method and device and terminal equipment
CN107302597B (en) Message file pushing method and device
CN109901987B (en) Method and device for generating test data
CN114189525B (en) Service request method and device and electronic equipment
CN113127168A (en) Service distribution method, system, device, server and medium
CN111461763A (en) Resource allocation method and device
CN113361838A (en) Business wind control method and device, electronic equipment and storage medium
CN110909022A (en) Data query method and device
CN110599277A (en) Inventory deduction method and device
CA3217578A1 (en) Payment processing method, device, medium and electronic device
CN113076153A (en) Interface calling method and device
CN110851207B (en) State transition management method and device, electronic equipment and storage medium
CN108647102B (en) Service request processing method and device of heterogeneous system and electronic equipment
CN113746904A (en) Service request processing method, system and computer readable storage medium
CN113010238A (en) Permission determination method, device and system for micro application call interface
CN110661792B (en) Service ordered calling method and device, electronic equipment and storage medium
CN112181817B (en) Test method and test device for SOA architecture platform
CN110968497A (en) Tree-shaped interceptor-based request verification method, device, medium and electronic equipment
US20220129332A1 (en) Handling of Metadata for Microservices Processing
CN112330366A (en) Redemption code redemption request verification method, apparatus, device and computer readable medium
CN112261072A (en) Service calling method, device, equipment and storage medium
CN111367694A (en) Event processing method, server and computer storage medium
CN111209014A (en) Parameter checking method and device
CN111461647B (en) Business collaboration processing method and system based on block chain
CN109918895B (en) Method, electronic device, and computer-readable medium for outputting data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant