Call service control retry method, device, equipment and medium based on SOA architecture
By introducing service priority and retry mechanisms into the SOA architecture, the unsuccessful service call caused by high communication load rate and loss in cross-domain calls is solved, and the balance between reducing communication load rate and improving service call success rate is achieved.
Patent Information
- Application Number
- CN202211305580.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-10-24
AI Technical Summary
Under the SOA architecture, cross-domain calls are unsuccessful due to problems such as high communication load rate and communication loss, making it difficult to find a balance between reducing communication load rate and ensuring successful service calls.
By introducing a service priority mechanism in the SOA architecture, when the priority of the target system service is lower than the priority of the enhanced service, the system service call retry mode is entered, and the call is retryed according to the preset time period until the priority of the target system service is preferred Retry is terminated when the level is higher than or equal to the priority of the enhanced service; similarly, the call to the atomic service also adopts the retry mechanism until the call is successful.
It effectively avoids the unsuccessful service call problems caused by high communication load rate and communication loss in cross-domain calls, and realizes a balance between reducing communication load rate and improving service call success rate.
Smart Images

Figure CN115695558B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle-mounted SOA systems, and in particular to a method, device, equipment and medium for controlling and retrying a calling service based on an SOA architecture. Background Art
[0002] Currently, automotive software architecture has begun to adopt SOA service-oriented design. SOA architecture standardization can improve development efficiency and reduce development and maintenance costs. Under the SOA architecture, application deployment is flexible, cross-domain calls can be made, service functions can be orchestrated, and user experience is better.
[0003] Under the SOA architecture, generally there is no cross-domain call between atomic services and IO abstract services, but there may be cross-domain calls between services at all levels above the atomic service. The cross-domain service call has to consider the impact of situations such as communication debt rate and communication loss. In order to reduce the communication load rate, the driver service is generally called down only once when the control instruction changes, and a single cross-domain service call will inevitably face the problem of unsuccessful service calls due to high communication load, communication loss, and asynchronous sleep and wake-up of each controller. Therefore, cross-domain service calls must seek a balance between reducing the communication load rate and seeking successful service calls. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method, device, equipment and medium for controlling retry of calling services based on SOA architecture to solve the above-mentioned technical problems.
[0005] The present invention proposes a method for controlling and retrying a calling service based on a SOA architecture, comprising:
[0006] When the basic conditions of the target system service are met, the target system service transmits a control request including its own priority to the enhanced service;
[0007] The enhanced service obtains the priority of the target system service according to the control request, and compares it with the priority of the system service currently executed by the enhanced service;
[0008] If the priority of the system service currently executed by the enhanced service is higher than the priority of the target system service itself, the target system service is notified of the call failure and the system service call retry mode is entered;
[0009] Among them, in the system service call retry mode, the target system service calls the enhanced service according to the first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service, the call is successful, and the service call retry is terminated.
[0010] In one embodiment of the present invention, the priority of each system service is a preset priority, and the priority of each system service is fixed and unique.
[0011] In one embodiment of the present invention, the method further comprises: in the system service call retry mode, if it is detected that the basic condition of the target system service is not satisfied, terminating the service call retry.
[0012] In one embodiment of the present invention, when the target system service is a steering and lane changing system service, the method includes:
[0013] When the basic conditions of the steering and lane changing system service are met, the steering and lane changing system service transmits a control request including its own priority to the enhanced service;
[0014] The enhanced service obtains the priority of the steering and lane changing system service according to the control request, and compares the priority of the system service currently executed by the enhanced service;
[0015] If the priority of the system service currently executed by the enhanced service is higher than the priority of the steering and lane changing system service itself, the steering and lane changing system service is notified of a call failure and the system service call retry mode is entered;
[0016] Among them, in the system service call retry mode, the steering and lane changing system service calls the enhanced service according to the first preset time period until the priority of the steering and lane changing system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service. The call is successful and the service call retry is terminated.
[0017] In one embodiment of the present invention, the method further includes retrying the call of the atomic service by the enhanced service, and the retrying the call of the atomic service by the enhanced service includes:
[0018] The enhanced service receives a request to invoke an atomic service;
[0019] The enhanced service calls the atomic service and determines whether the call is successful through a back reference detection method;
[0020] If the call is not successful, enter the atomic service call retry mode;
[0021] Among them, in the atomic service call retry mode, the enhanced service calls the atomic service according to the second preset time period until the call is successful, and then terminates the service call retry.
[0022] In one embodiment of the present invention, the enhanced service retrying the call to the atomic service further includes: if it is detected that the enhanced service receives a new system service control request, terminating the service call retry.
[0023] In one embodiment of the present invention, the method for retrying the call of the enhanced service to the atomic service also includes: if it is detected that the enhanced service has a new control request for the atomic service, re-determining whether the call is successful through the back reference detection method.
[0024] In one embodiment of the present invention, when the enhanced service is a turn signal enhanced service and the atomic service is a right front turn signal driving atomic service, the enhanced service retrying the call to the atomic service includes:
[0025] Receive a request from the turn signal enhancement service to call the right front turn signal driving atomic service;
[0026] The turn signal enhancement service calls the right front turn signal driving atomic service and determines whether the call is successful through the back reference detection method;
[0027] If the call is not successful, enter the atomic service call retry mode;
[0028] Among them, in the atomic service call retry mode, the turn signal enhancement service calls the right front turn signal drive atomic service according to the second preset time period until the call is successful, and then terminates the service call retry.
[0029] The present invention also proposes a method for controlling and retrying a calling service based on a SOA architecture, comprising:
[0030] The enhancement service receives a request to invoke the atomic service;
[0031] The enhanced service calls the atomic service and determines whether the call is successful through the return reference detection method;
[0032] If the call is not successful, enter the atomic service call retry mode;
[0033] In the atomic service call retry mode, the atomic service is called once every second preset time period until the call is successful or it is detected that the enhanced service receives a new system service control request, and then the service call retry is terminated.
[0034] The present invention also proposes a service call control retry device based on SOA architecture, comprising:
[0035] a communication unit, configured to, when a basic condition of a target system service is met, transmit a control request including its own priority to the enhanced service by the target system service;
[0036] a determination unit, configured to obtain the priority of the target system service according to the control request, and compare the priority of the target system service with the priority of the system service currently executed by the enhanced service;
[0037] A calling unit, configured to notify the target system service that the calling has failed and enter a system service calling retry mode if the priority of the system service currently executed by the enhanced service is higher than the priority of the target system service itself;
[0038] Among them, in the system service call retry mode, the target system service calls the enhanced service according to the first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service, the call is successful, and the service call retry is terminated.
[0039] The present invention further provides an electronic device, comprising:
[0040] one or more processors;
[0041] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the SOA architecture-based service call control retry method as described in any one of the above embodiments.
[0042] The present invention also proposes a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer is enabled to execute the SOA architecture-based service call control retry method as described in any one of the above embodiments.
[0043] The beneficial effects of the present invention are as follows: it can avoid the problem of unsuccessful service calls caused by high communication load rate, communication loss, and asynchronous sleep and wake-up of controllers in cross-domain calls, it can reduce the communication load rate, and achieve a balance between reducing the communication load rate and seeking successful service calls.
[0044] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0046] Figure 1 It is a schematic diagram of an implementation environment of a calling service control retry device shown in an exemplary embodiment of the present application.
[0047] Figure 2It is a flowchart of a method for controlling and retrying a calling service based on an SOA architecture, shown in an exemplary embodiment of the present application.
[0048] Figure 3 This is a schematic diagram of the cross-domain call of the turn signal VIU.
[0049] Figure 4 This is the flowchart of the turn signal enhancement service retry procedure called by the turn signal change system service.
[0050] Figure 5 Shows the retry flow chart for calling the turn signal enhancement service for the turn lane change system service.
[0051] Figure 6 Flowchart showing call retries to an atomic service for an enhanced service.
[0052] Figure 7 This is the flowchart of the turn signal enhancement service calling the right front turn signal atomic service retry program.
[0053] Figure 8 This is the retry flow chart of the turn signal enhancement service calling the right front turn signal drive atomic service.
[0054] Fig. 9 It is a block diagram of a device for calling service control retry shown in an exemplary embodiment of the present application.
[0055] Fig.10 Shown is an exemplary enhanced service calling an atomic service calling service control retry device.
[0056] Fig.11 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0057] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0058] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0059] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0060] First of all, it should be noted that under the SOA architecture, application services are generally divided into five layers, including: providing service interfaces to the outside world and supporting scenario services for scenario orchestration; providing system services for fixed usage scenarios; enhancing services related to service functions; achieving software and hardware isolation with atomic services; and IO abstract services related to the underlying hardware. From the perspective of the actuator's drive control flow, scenario services and system services each call enhanced services downward, enhanced services call atomic services, and atomic services call IO abstract services.
[0061] Figure 1 FIG. 1 is a schematic diagram of an implementation environment of a service control retry device according to an exemplary embodiment of the present application. Figure 1 As shown, the calling service control retry device is used to re-initiate a call every preset time period by calling the service control retry device when there is a cross-domain call during the calling process of the system service, enhanced service and atomic service in the car, resulting in an unsuccessful service call.
[0062] The main body of the turn signal SOA architecture is composed of system services, enhanced services, atomic services, and IO abstract services. The turn signal is controlled by priority, and each system service is assigned a fixed priority, with high-priority services taking precedence. The enhanced service is responsible for accepting control requests from various system services, arbitrating high-priority valid control instructions, parsing control modes and executing service functions, and notifying external information such as the priority of the function being executed. The atomic service mainly plays a role in hardware and software isolation, while the IO abstract service is responsible for the abstraction of the actuator drive interface, switch interface, and fault interface.
[0063] The system services, enhanced services, and atomic services of turn signals may have cross-domain calls due to the influence of the service deployment location. Cross-domain calls may lead to unsuccessful service calls due to high communication load rate, communication loss, and asynchronous sleep and wake-up of controllers. In order to reduce the communication load rate, the conventional practice is to dispatch a service request only when the control request changes. However, a single service call is very likely to fail in certain circumstances. Such cross-domain call failures include: unsuccessful calls from system services to enhanced services and unsuccessful calls from enhanced services to atomic services.
[0064] The problems pointed out above are generally applicable to general automobiles. To solve these problems, the embodiments of the present application respectively propose a calling service control retry method based on SOA architecture, a calling service control retry device based on SOA architecture, an electronic device, a computer-readable storage medium and a computer program product. These embodiments will be described in detail below.
[0065] See also Figure 2 As shown, Figure 2 is a flowchart of a method for controlling a retry of a calling service based on an SOA architecture, shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 It should be understood that the method can also be applied to other exemplary implementation environments and specifically executed by devices in other implementation environments, and this embodiment does not limit the implementation environment to which the method is applicable.
[0066] See also Figure 2 As shown, in an exemplary embodiment, the call service control retry method based on the SOA architecture includes the call retry of the system service to the enhanced service and the call retry of the enhanced service to the atomic service. The two call retries can be performed independently or step by step according to the call relationship of the services. Among them, the call retry of the system service to the enhanced service includes steps S210 to S230, which are detailed as follows:
[0067] Step S210: When the basic conditions of the target system service are met, the target system service transmits a control request including its own priority to the enhanced service.
[0068] It should be noted that the calling retry method includes: judging whether the basic conditions of the target system service are met, and if so, the target system service calls the enhanced service; that is, if the target system service meets the function request conditions, initiating a call enhanced service control request to call the corresponding enhanced service. Among them, the target system service calling the corresponding enhanced service includes: the system service transmits a control request containing its own priority to the enhanced service to call the enhanced service.
[0069] It should be noted that the priority of the system service is pre-set, that is, before determining whether the basic conditions of the target system service are met, the method also includes: pre-setting the priority value of each system service, and the priority of each system service is fixed and unique. It should be noted that the lower the priority value, the higher the priority.
[0070] It should also be noted that if the basic conditions of the target system service are not met, the enhanced service will not be called.
[0071] Step S220: the enhanced service obtains the priority of the target system service according to the control request, and compares it with the priority of the system service currently executed by the enhanced service.
[0072] For example, the interface feedback method is used to compare the priority of the system service's own functions and the priority of the system service functions performed by the enhanced service.
[0073] Step S230: If the priority of the system service currently executed by the enhanced service is higher than the priority of the target system service itself, the target system service call failure is notified and the system service call retry mode is entered.
[0074] Among them, in the system service call retry mode, the target system service calls the enhanced service according to the first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service, the call is successful, and the service call retry is terminated.
[0075] Specifically, the target system service call retry is entered, and the enhanced service is called once every first preset time period until the priority of the system service itself is higher than the priority of the system service executed by the enhanced service, the enhanced service is successfully called, and the service call retry is terminated. In some embodiments, when the priority of the system service itself is equal to the priority of the system service executed by the enhanced service, it is also determined that the enhanced service is successfully called, and the service call retry is terminated.
[0076] See also Figure 2 As shown, in this embodiment, it should be noted that if the priority of the target system service itself is higher than or equal to the priority of the system service executed by the enhanced service, the target system service calls the corresponding enhanced service successfully, and the system service executed by the enhanced service is interrupted to execute the target system service.
[0077] See also Figure 2 As shown, in this embodiment, the service call control retry method further includes: in the system service call retry mode, when it is detected that the basic conditions of the target system service are no longer satisfied, the service call retry is terminated. That is, during the call retry process, the basic conditions of the target system service are detected, and if it is detected that the basic conditions of the target system service are no longer satisfied, the service call retry is terminated.
[0078] See also Figure 2In the present embodiment, the first preset time period can be timed by a first call retry cycle timer, and the first call retry cycle timer is started when the system service call retry mode is entered; that is, if the priority of the target system service itself is lower than the priority of the system service executed by the enhanced service, the first call retry cycle timer is started to time the call cycle time when the call retry is entered.
[0079] Specifically, after the first call retry cycle timer is started, the call retry cycle timer starts timing from "0" and the enhanced service is re-called every first preset time period until the priority of the system service itself is higher than or equal to the priority of the system service executed by the enhanced service. The call to the enhanced service is successful, the service call retry is terminated, and the first call retry cycle timer is closed.
[0080] It should be noted that each time the first call retry cycle timer reaches a cycle, the timer is reset and restarted, and when the timer is turned off, the timer reset operation is also performed to facilitate restarting the timing when it is enabled next time.
[0081] See also Figure 2 As shown, in this embodiment, the method further includes: setting a timing period of the first call retry cycle timer. For example, this step can be set before starting the first call retry cycle timer.
[0082] See also Figure 2 , Figure 3 and Figure 4 As shown, Figure 3 This is a schematic diagram of the cross-domain call of the turn signal VIU. Figure 4 This is the flowchart of the retry procedure of the turn signal enhancement service called by the turn signal system service. To represent the cross-domain call, the turn signal enhancement service is deployed in VIU2 and the turn signal enhancement service is deployed in VIU1. The following only takes the turn signal enhancement service as the target system service as an example to explain the retry of the call:
[0083] Step S410: When the basic conditions of the steering and lane changing system service are met, the steering and lane changing system service transmits a control request including its own priority to the enhanced service;
[0084] Step S420: the enhanced service obtains the priority of the steering and lane changing system service according to the control request, and compares it with the priority of the system service currently executed by the enhanced service;
[0085] Step S430: If the priority of the system service currently executed by the enhanced service is higher than the priority of the steering and lane changing system service itself, the steering and lane changing system service is notified of a call failure, and a system service call retry mode is entered;
[0086] Among them, in the system service call retry mode, the steering and lane changing system service calls the enhanced service according to the first preset time period until the priority of the steering and lane changing system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service. The call is successful and the service call retry is terminated.
[0087] Please refer to 4 and Figure 5 As shown, Figure 5 The flowchart of calling the turn signal enhancement service retry for the turn lane change system service is shown. Specifically,
[0088] Step S510, enabling the steering and lane changing system service;
[0089] Step S520, determine whether the basic conditions of the steering and lane changing system service are met, for example, the power is in the ON position and the left turn switch is turned on. If so, the steering and lane changing system service transmits a control request including its own priority to the enhanced service and executes step S530. If not, execute step S570.
[0090] Step S530, determine whether the priority of the steering and lane changing system service is higher than the priority of the system service executed by the enhanced service; if lower, notify the steering and lane changing system service call failure and execute step S540; if higher, execute step S570.
[0091] Step S540, set a first preset time period (for example, 1 second), start a first call retry cycle timer, call once the enhanced service RtnCd_General=Enh_TurnLi_RR_TurnON (TurnLiCtrlCmd), and transmit a left turn control request, the control parameters are as follows:
[0092] TurnLiCtrlCmd.TurnLiCtrlPosn=1,
[0093] TurnLiCtrlCmd.TurnLiOffDurn=360,
[0094] TurnLiCtrlCmd.TurnLiOnDurn=360,
[0095] TurnLiCtrlCmd.TurnLiPRI=20,
[0096] TurnLiCtrlCmd.TurnLiCnt=0,
[0097] TurnLiCtrlCmd.TurnLiRecover=0;
[0098] Step S550, determining whether the first call retry cycle timer overflows;
[0099] Step S560: If yes, the timer is reset and the enhanced service is called again to transmit the left turn control request; otherwise, the timer is accumulated and the process jumps to step S520.
[0100] Specifically, the overflow of the call retry cycle timer indicates the end of a cycle, that is, the system service is called once every first preset time period until the priority of the system service itself is higher than or equal to the priority of the system service executed by the enhanced service, and the call to the enhanced service is successful.
[0101] Step S570, terminate the service call retry, and close the first call retry cycle timer.
[0102] See also Figure 6 As shown, Figure 6 The flowchart of the enhanced service calling and retrying the atomic service is shown. The calling service control retry method also includes the enhanced service calling and retrying the atomic service, and the enhanced service calling and retrying the atomic service includes steps S610 to S630:
[0103] Step S610: the enhanced service receives a request for invoking an atomic service.
[0104] Step S620, the enhanced service calls the atomic service and determines whether the call is successful through a back reference detection method;
[0105] Step S630, if the call is not successful, enter the atomic service call retry mode;
[0106] Among them, in the atomic service call retry mode, the enhanced service calls the atomic service according to the second preset time period until the call is successful, and then terminates the service call retry.
[0107] Similarly, the second preset time period can be timed by a second call retry cycle timer. When entering the atomic service call retry mode, the second call retry cycle timer is started; that is, if the call is not successful, the second call retry cycle timer is started to time the call cycle time when entering the call retry. Similarly, the timing period of the second call retry cycle timer can be set. For example, this step can be set before starting the second call retry cycle timer.
[0108] See also Figure 6As shown, the enhanced service calling and retrying the atomic service further includes: if it is detected that the enhanced service receives a new system service control request, the service calling and retrying is terminated. That is, during the process of the enhanced service calling and retrying the atomic service, it is detected whether the enhanced service receives a new system service control request, and if so, the service calling and retrying is terminated.
[0109] See also Figure 6 As shown, the enhanced service calling and retrying method for the atomic service also includes: if it is detected that the enhanced service has a new control request for the atomic service, then re-judging whether the calling is successful by the return reference detection method. That is, during the call retry process of the enhanced service to the atomic service, it is detected whether the enhanced service has a new control request for the atomic service, and if so, re-judging whether the calling is successful by the return reference detection method.
[0110] See also Figure 3 , Figure 6 and Figure 7 As shown, the turn signal actuator includes left front, right front, left rear, and right rear turn signals. To represent cross-domain calls, the turn signal enhancement service is deployed in VIU1, the right front turn signal atomic service is deployed in VIU2, and the left rear and right rear turn signal atomic services are deployed in VIU3. Figure 7 This is a flowchart of the turn signal enhancement service calling the right front turn signal atomic service retry program. When the enhanced service is the turn signal enhancement service and the atomic service is the right front turn signal drive atomic service, combined with Figure 7 Instructions for retrying the call of the turn signal enhancement service to the right front turn signal atomic service:
[0111] Step S710: receiving a request from the turn signal enhancement service to call the right front turn signal driving atomic service;
[0112] Step S720: the turn signal enhancement service calls the right front turn signal driving atomic service, and determines whether the call is successful through a back reference detection method;
[0113] Step S730: If the call is not successful, enter the atomic service call retry mode;
[0114] Among them, in the atomic service call retry mode, the turn signal enhancement service calls the right front turn signal drive atomic service according to the second preset time period until the call is successful, and then terminates the service call retry.
[0115] See also Figure 8 , Figure 8 This is the flow chart of the turn signal enhancement service calling the right front turn signal drive atomic service retry. Figure 8 Instructions for retrying the call of the turn signal enhancement service to the right front turn signal drive atomic service:
[0116] Step S810, detecting whether the turn signal enhancement service has called the right front turn signal driving atomic service request; if so, executing step S820, otherwise, executing step S870.
[0117] Step S820: calling an atomic service, such as the right front turn signal driving atomic service, and transmitting a control command:
[0118] RtnCd_General=Atm_FrntRiTurnLi_RR_Ctrl(LiCtrlCmd);
[0119] In step S830, the call is judged whether it is successful by the return parameter detection method, that is, by determining whether the return parameter RtnCd_General in step S820 is equal to 0 ("SUCCESS") to judge whether the call is successful. If so, the call is successful and step S870 is executed; otherwise, the call fails and step S840 is executed.
[0120] Step S840, setting a second preset time period (eg, 0.5 s) and starting to call a second retry cycle timer.
[0121] Step S850, determine whether the second call retry cycle timer overflows; if so, jump to step S520 and re-call the right front turn signal drive atomic service, otherwise, the timer is accumulated and step S860 is executed.
[0122] Step S860, detect whether the enhanced service has a new control request for the right front turn signal driving atomic service; if so, jump to step S820 to execute the new control request; otherwise, jump to step S550.
[0123] Step S870, terminate the service call retry, and turn off the second call retry cycle timing.
[0124] In summary, the service call control retry method can reduce the communication load rate and achieve a balance between reducing the communication load rate and seeking service call success.
[0125] Fig. 9 is a block diagram of a service control retry device according to an exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown in the figure, and the device applies the call service control retry method described in the above embodiment. The device can also be applied to other exemplary implementation environments and specifically configured in other implementation environments. This embodiment does not limit the implementation environment to which the device is applicable.
[0126] See also Fig. 9As shown, the exemplary calling service control retry device includes: a first calling retry module 900, the first calling retry module 900 is used to execute the calling retry method of the system service calling the enhanced service, the first calling retry module 900 includes a first communication unit 910, a first judgment unit 920 and a first calling unit 930.
[0127] A first communication unit 910, configured to, when a basic condition of a target system service is met, transmit a control request including its own priority to the enhanced service;
[0128] A first determining unit 920 is configured to obtain the priority of the target system service according to the control request, and compare it with the priority of the system service currently executed by the enhanced service;
[0129] The first calling unit 930 is used to notify the target system service of the call failure and enter the system service call retry mode when the priority of the system service currently executing the enhanced service is higher than the priority of the target system service itself; wherein, in the system service call retry mode, the target system service calls the enhanced service according to a first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executing the enhanced service, and the call is successful, terminating the service call retry.
[0130] See also Fig. 9 As shown, in some other embodiments, the exemplary first call retry module 900 further includes:
[0131] The second judgment unit 940 is used to judge whether the basic conditions of the target system service are met, such as whether the power is in the ON position and the left turn switch is turned on. If so, the target system service transmits a control request including its own priority to the enhanced service through the communication unit 910.
[0132] The first call retry cycle timer 950 is used to start the first call retry cycle timer 950 if the priority of the target system service itself is lower than the priority of the system service executed by the enhanced service. When entering the system service call retry mode, the first preset time period of its call retry is set and the timing is started.
[0133] Specifically, in the call retry of the system service to the enhanced service, the first communication unit 910, the first judgment unit 920, the second judgment unit 940, the first calling unit 930 and the first call retry cycle timer 950 are enabled to execute the corresponding process:
[0134] The second determination unit 940 determines whether the basic conditions of the target system service are met;
[0135] If satisfied, the target system service transmits a control request including its own priority to the enhanced service through the first communication unit 910;
[0136] The first determination unit 920 obtains the priority of the target system service according to the control request, and compares it with the priority of the system service currently executed by the enhanced service;
[0137] If the priority of the system service currently executed by the enhanced service is higher than the priority of the target system service itself, the target system service is notified of the call failure, and the first call retry cycle timer 950 is started to enter the system service call retry mode;
[0138] Enter the system service call retry, the target system service calls the enhanced service through the first calling module 930 according to the first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executing the enhanced service. The call is successful, the service call retry is terminated, and the first call retry cycle timer 950 is closed.
[0139] In some embodiments, see Fig.10 As shown, Fig.10 The exemplary enhanced service calling atomic service control retry device is shown. The exemplary calling service control retry device includes: a second calling retry module 1000, the second calling retry module 1000 is used to execute the calling retry method of the enhanced service calling the atomic service, specifically, the second calling retry module 1000 includes:
[0140] The second communication unit 1010 is used to receive a request for invoking an atomic service; the enhanced service receives the request for invoking an atomic service through the second communication unit 1010 .
[0141] The second calling unit 1020 is used to call the atomic service; the enhanced service calls the atomic service through the second calling unit 1020.
[0142] The third judgment unit 1030 is used to judge whether the call is successful by using a back-reference detection method;
[0143] The detection unit 1040 is used to detect whether the enhanced service receives a new system service control request, and if so, terminate the service call and retry.
[0144] If the call is not successful, the atomic service call retry mode is entered; wherein, in the atomic service call retry mode, the enhanced service calls the atomic service according to the second preset time period through the second calling unit 1020 until the call is successful, and then terminates the service call retry.
[0145] See also Fig.10 As shown, in some other embodiments, the exemplary second call retry module 1000 further includes:
[0146] The second call retry cycle timer 1050 is used to set the second preset time period of the call retry and start the timing when the enhanced service calls the atomic service. After starting the second call retry cycle timer 1040, the enhanced service calls the atomic service through the second calling unit 1020, and calls it once every second preset time period.
[0147] In the call retry of the enhanced service to the atomic service, the second communication unit 1010, the second call unit 1020, the third judgment unit 1030, the detection unit 1040 and the second call retry cycle timer 1050 are enabled to execute the corresponding process:
[0148] The enhanced service receives a control request for invoking the atomic service through the second communication unit body 1010;
[0149] The enhanced service second calling unit 1020 calls the atomic service, and the third judging unit 1030 uses the back reference detection method to judge whether the calling is successful;
[0150] If the call fails, the second call retry cycle timer 632 is started to enter the atomic service call retry mode;
[0151] In the atomic service call retry mode, the enhanced service calls the atomic service through the second calling unit 1020 according to the second preset time period until the call is successful or the detection unit 1040 detects that the enhanced service receives a new system service control request, terminates the service call retry, and closes the second call retry cycle timer 1050.
[0152] It should be noted that the service call control retry device provided in the above embodiment and the service call control retry method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the service call control retry device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0153] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the calling service control retry method provided in the above-mentioned embodiments.
[0154] Fig.11 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.11 The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0155] like Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103, such as executing the method described in the above embodiment. In the RAM 1103, various programs and data required for system operation are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0156] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; a storage section 1108 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc.; a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0157] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 1101, various functions defined in the system of the present application are executed.
[0158] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0159] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0160] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0161] Another aspect of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor of a computer, the computer executes the aforementioned method for calling a service control retry. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0162] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the service call control retry method provided in each of the above embodiments.
[0163] To sum up, the present invention can avoid the problem of unsuccessful service calls caused by high communication load rate, communication loss, and asynchronous sleep and wake-up of controllers in cross-domain calls, and can reduce the communication load rate, achieving a balance between reducing the communication load rate and seeking successful service calls.
[0164] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for controlling and retrying a calling service based on SOA architecture, characterized in that: include: When the basic conditions of the target system service are met, the target system service transmits a control request including its own priority to the enhanced service; The enhanced service obtains the priority of the target system service according to the control request, and compares it with the priority of the system service currently executed by the enhanced service; If the priority of the system service currently executed by the enhanced service is higher than the priority of the target system service itself, the target system service is notified of the call failure and the system service call retry mode is entered; Among them, in the system service call retry mode, the target system service calls the enhanced service according to the first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service, the call is successful, and the service call retry is terminated.
2. The method for controlling and retrying a calling service based on SOA architecture according to claim 1, characterized in that: The priority of each system service is a pre-set priority, and the priority of each system service is fixed and unique.
3. The method for controlling and retrying a calling service based on SOA architecture according to claim 1, characterized in that: The method further comprises: in the system service call retry mode, if it is detected that the basic condition of the target system service is not satisfied, terminating the service call retry.
4. The method for controlling and retrying a calling service based on SOA architecture according to claim 1, characterized in that: When the target system service is a steering and lane changing system service, the method includes: When the basic conditions of the steering and lane changing system service are met, the steering and lane changing system service transmits a control request including its own priority to the enhanced service; The enhanced service obtains the priority of the steering and lane changing system service according to the control request, and compares the priority of the system service currently executed by the enhanced service; If the priority of the system service currently executed by the enhanced service is higher than the priority of the steering and lane changing system service itself, the steering and lane changing system service is notified of a call failure and the system service call retry mode is entered; Among them, in the system service call retry mode, the steering and lane changing system service calls the enhanced service according to the first preset time period until the priority of the steering and lane changing system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service. The call is successful and the service call retry is terminated.
5. The method for controlling and retrying a calling service based on SOA architecture according to claim 1, characterized in that: The method further includes retrying the call of the atomic service by the enhanced service, wherein the retrying the call of the atomic service by the enhanced service includes: The enhanced service receives a request to invoke an atomic service; The enhanced service calls the atomic service and determines whether the call is successful through a back reference detection method; If the call is not successful, enter the atomic service call retry mode; Among them, in the atomic service call retry mode, the enhanced service calls the atomic service according to the second preset time period until the call is successful, and then terminates the service call retry.
6. The method for controlling and retrying a calling service based on SOA architecture according to claim 5, characterized in that: The enhanced service calling and retrying the atomic service further includes: if it is detected that the enhanced service receives a new system service control request, terminating the service calling and retrying.
7. The method for controlling and retrying a calling service based on SOA architecture according to claim 5, characterized in that: The enhanced service's call retry method for the atomic service also includes: if it is detected that the enhanced service has a new control request for the atomic service, re-determining whether the call is successful through the back reference detection method.
8. The method for controlling and retrying a calling service based on SOA architecture according to claim 5, characterized in that: When the enhanced service is the turn signal enhanced service and the atomic service is the right front turn signal driving atomic service, the enhanced service retrying the call to the atomic service includes: Receive a request from the turn signal enhancement service to call the right front turn signal driving atomic service; The turn signal enhancement service calls the right front turn signal driving atomic service and determines whether the call is successful through the back reference detection method; If the call is not successful, enter the atomic service call retry mode; Among them, in the atomic service call retry mode, the turn signal enhancement service calls the right front turn signal drive atomic service according to the second preset time period until the call is successful, and then terminates the service call retry.
9. A method for controlling and retrying a calling service based on SOA architecture, characterized in that: include: The enhancement service receives a request to invoke the atomic service; The enhanced service calls the atomic service and determines whether the call is successful through the return reference detection method; If the call is not successful, enter the atomic service call retry mode; In the atomic service call retry mode, the atomic service is called once every second preset time period until the call is successful or it is detected that the enhanced service receives a new system service control request, and then the service call retry is terminated.
10. A service call control retry device based on SOA architecture, characterized in that: include: a communication unit, configured to, when a basic condition of a target system service is met, transmit a control request including its own priority to the enhanced service by the target system service; a determination unit, configured to obtain the priority of the target system service according to the control request, and compare the priority of the target system service with the priority of the system service currently executed by the enhanced service; A calling unit, configured to notify the target system service that the calling has failed and enter a system service calling retry mode if the priority of the system service currently executed by the enhanced service is higher than the priority of the target system service itself; Among them, in the system service call retry mode, the target system service calls the enhanced service according to the first preset time period until the priority of the target system service itself is higher than or equal to the priority of the system service currently executed by the enhanced service, the call is successful, and the service call retry is terminated.
11. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the SOA architecture-based service call control retry method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method for controlling and retrying a calling service based on an SOA architecture as claimed in any one of claims 1 to 9.
