SOA architecture-based vehicle end service calling processing method and system, storage medium and vehicle
By introducing call queue management of action sequence numbers and priority information into the automotive SOA architecture, the problem of functional conflicts in remote procedure calls is solved, efficiency and security are improved, and development and maintenance costs are reduced.
Patent Information
- Application Number
- CN202310158952.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2024-08-23
AI Technical Summary
In the automotive SOA architecture, the service requester cannot be identified during remote procedure calls, resulting in functional abnormalities and difficulty in permission management, affecting development efficiency and maintenance costs.
By introducing action sequence numbers and priority information into service call requests, a call queue management mechanism is established, dynamic arbitration is performed to avoid functional conflicts, and priority management and call history tracing of method services are achieved.
It reduces application layer monitoring behavior and repeated calls, reduces the amount of code and communication data, improves the efficiency and security of remote procedure calls, and reduces development and maintenance costs.
Smart Images

Figure CN118540376A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile service-oriented architecture (SOA), and in particular to a vehicle-side service call processing method, system, storage medium and vehicle based on SOA architecture. Background Art
[0002] In smart cars, software is becoming more and more important. In recent years, service-oriented architecture (SOA) has been slowly introduced into the automotive field, and SOME / IP (Scalable service-oriented Middleware over IP) protocol has been increasingly used in vehicle Ethernet communications.
[0003] Among them, the automotive SOA architecture abstracts and decouples the functions and capabilities of the current traditional automotive electronic control system to form an independent logical unit - Service, and provides other modules with the service interface for calling. The service interface is defined in a neutral way, which is independent of the hardware platform, operating system and programming language that implements the service. This allows services built in various systems to interact in a unified and universal way.
[0004] SOME / IP is a service-oriented, scalable protocol. As a user-controlled message middleware, it realizes resource sharing (information, functions, etc.) across platforms or operating systems through serialization, remote procedure call (RPC), service discovery, publishing and subscription mechanisms. Remote procedure call (RPC) is a communication protocol that allows a program running on one terminal to call a subroutine on another terminal without the programmer having to program the interaction. Figure 1 As shown, a schematic diagram of a process of using a remote procedure call (RPC) mechanism to perform a service call in an existing SOME / IP protocol is shown. During transmission, the data must be transmitted in the form of a binary byte stream according to certain rules (serialization operation); as the data receiver, the binary data stream must also be parsed according to the agreed rules to obtain a data structure consistent with the sender, such as a structure, array, etc. This is a deserialization operation. In the service call request using SOME / IP, request parameter information such as service ID, method ID, requester ID (ClientID), session ID (SessionID), and load (Payload) must be carried.
[0005] However, there are some shortcomings in remote procedure calls in the automotive SOA architecture. Specifically, the method service provider cannot identify the service requester at the application layer, and the corresponding controlled load cannot distinguish the control source, so it is impossible to implement operations such as intra-group arbitration and control authority management.
[0006] In the current SOA distributed service architecture, when the client (service requester) remotely calls the specified service of the server (service provider) through protocols such as SOME / IP, some functions may be abnormal due to failure to identify the specific caller. The following example is used to illustrate, for example, in a typical functional scenario, it is assumed that the speaker (service provider) has two method classes (Method) services, StartHorn and StopHorn, and callers A and B are service requesters in the same group.
[0007] Among them, caller A calls StartHorn due to a warning reminder to turn on the horn, with an expected working cycle of 30s;
[0008] Caller B calls StartHorn due to a fault reminder, turns on the horn, and expects a working cycle of 10 seconds;
[0009] Caller B completes the expected function and calls StopHorn to turn off the horn.
[0010] Because callers A and B have the same priority, caller B turns off the speaker that caller A has turned on at the same time, causing caller A's speaker work sequence number to terminate abnormally. The action sequence diagram of this RPC application scenario is as follows: Figure 2 As shown, Figure 2 The word "ON" here only indicates the working state, not the continuous whistle state. The working state can also be the intermittent whistle state according to the working template. The corresponding workflow of each participant is as follows: Figure 3 As shown, it is clear that there are disputes in this workflow that need to be arbitrated.
[0011] To resolve the dispute, the following solutions are generally adopted:
[0012] First, in some examples, other modules or caller A monitors the operating status of the horn all the time, and when it detects that the horn is turned off, it calls StartHorn again to turn on the horn due to its own needs; or
[0013] Second, caller B determines whether the speaker can be turned off before calling StopHorn.
[0014] However, both existing solutions impose additional functional logic requirements on the caller, which is inconsistent with the loose coupling, flexibility and reusability of the SOA service architecture. At the same time, the uncertainty and anonymity of the caller result in extremely low development efficiency, great development difficulty and high maintenance cost. Summary of the invention
[0015] The technical problem to be solved by the present invention is to provide a vehicle-side service call processing method, system, storage medium and vehicle based on SOA architecture, which can arbitrate when making remote procedure calls to avoid affecting the functions of other callers. It can effectively reduce the monitoring behavior and repeated calling behavior of the application layer, reduce the amount of code and communication data, and thus improve the efficiency and security of remote procedure calls.
[0016] In order to solve the above technical problems, as one aspect of the present invention, a vehicle-side service call processing method based on SOA architecture is provided, which is applied to the service provider and at least includes the following steps:
[0017] Receive a service call request for a method class (Method) service from a service requester, and obtain request parameters in the service call request;
[0018] Obtaining an action number (ActionID) corresponding to the request parameter and priority information corresponding to the action number, and storing at least part of the request parameter, the action number and the priority information in a current call queue corresponding to the requested service;
[0019] Arbitrate the service call request according to the priority information corresponding to the action sequence number, and after the arbitration is passed, call the method class service and execute it;
[0020] After the execution is completed, the service requester related information corresponding to the current action sequence number in the call queue is deleted.
[0021] The step of obtaining the action number (Action ID) corresponding to the request parameter and the priority information corresponding to the action number, and storing at least part of the request parameter, the action number and the priority information in the current call queue corresponding to the requested service further includes:
[0022] According to the request parameters, a pre-stored call source tracing list is queried to determine whether the requested method service needs to be included in the call source management, wherein the request parameters at least include: service ID, method ID, requester ID (ClientID), session ID (SessionID) and payload (Payload);
[0023] Generate or query the call source traceability list according to the request parameter mapping to obtain the action number corresponding to the current service call request and the priority information corresponding to the action number;
[0024] At least part of the request parameters, action sequence number and priority information are stored in the current call queue corresponding to the requested service through the adding interface.
[0025] The step of arbitrating the service call request according to the priority information corresponding to the action sequence number includes:
[0026] According to the action sequence number, it is checked whether there are other action sequences with the same name in the current call queue;
[0027] If it does not exist, the arbitration will be directly determined to be successful;
[0028] If so, the priority information of the current action number is compared with the priority information of other action numbers with the same name. When the priority of the current action number is the highest priority, it is determined that the arbitration is passed.
[0029] The step of arbitrating the service call request according to the priority information corresponding to the action sequence number further includes:
[0030] Determine whether there is a preceding action sequence of the current action number in the current call queue. If so, compare the priority information of the current action number with the priority information of the preceding action number in the current call queue. When the priority of the current action number is the highest priority, determine that the arbitration is passed.
[0031] Among them, the step of deleting the service requester related information corresponding to the current action sequence number in the call queue after the execution is completed specifically includes:
[0032] After the current method service is executed, the information corresponding to the current action number is deleted from the call queue, including: service number, method number, requester number, session number, current action number and priority information.
[0033] Wherein, after the execution is completed, the step of deleting the service requester related information corresponding to the current action sequence number in the call queue further includes:
[0034] After the current method service is executed, the information corresponding to the preceding action number of the current action number is deleted from the call queue, including: service number, method number, requester number, session number, preceding action number and priority information.
[0035] Among them, further include:
[0036] Preset the leading action sequence number for the action sequence numbers in the function items that appear in pairs in advance;
[0037] When the vehicle is initialized, it queries and obtains the latest call source traceability list from the cloud and stores it. The call source traceability list contains multiple records, each of which contains a service number, method number, action number and priority information. The priority information includes priority and sub-priority values.
[0038] Accordingly, another aspect of the present invention provides a vehicle-side service call processing system based on SOA architecture, which at least includes:
[0039] A service call acquisition unit, used to receive a service call request for a method class (Method) service from a service requester, and obtain request parameters in the service call request;
[0040] A call queue establishment unit, used to obtain an action number (ActionID) corresponding to the request parameter and priority information corresponding to the action number, and store at least part of the request parameter, the action number and the priority information into a current call queue corresponding to the service requested to be called;
[0041] An arbitration processing unit, used for arbitrating the service call request according to the priority information corresponding to the action sequence number;
[0042] A service calling processing unit, used to call and execute the method service after the arbitration result of the arbitration processing unit is that the arbitration is passed;
[0043] The calling queue information deleting unit deletes the service requester related information corresponding to the current action sequence number in the calling queue after execution is completed.
[0044] Wherein, the calling queue establishing unit further comprises:
[0045] A call source determination unit, used to query a pre-stored call source tracing list according to the request parameters to determine whether the requested method service needs to be included in the call source management, wherein the request parameters at least include: service number (ServiceID), method number (MethodID), requester number (ClientID), session number (SessionID) and load (Payload);
[0046] An action sequence number information acquisition unit, used to obtain the action sequence number corresponding to the current service call request and the priority information corresponding to the action sequence number by generating or querying the call source traceability list according to the request parameter mapping;
[0047] The storage unit is used to store at least part of the request parameters, action sequence number and priority information into the current call queue corresponding to the requested service through the adding interface.
[0048] Wherein, the arbitration processing unit further includes:
[0049] A query unit, used to query whether there are other action numbers with the same name in the current call queue according to the action number;
[0050] The current action sequence number arbitration processing unit is used to directly determine that the arbitration is passed if the query unit finds that the action sequence number does not exist; and if the query unit finds that the action sequence number exists, compare the priority information of the current action sequence number with the priority information of other action sequence numbers with the same name, and determine that the arbitration is passed when the priority of the current action sequence number is the highest priority;
[0051] The predecessor action sequence number arbitration processing unit is used to determine whether there is a predecessor action sequence of the current action sequence number in the current calling queue. If so, the priority information of the current action sequence number is compared with the priority information of the predecessor action sequence number in the current calling queue. When the priority of the current action sequence number is the highest priority, it is determined that the arbitration is passed.
[0052] The calling queue information deleting unit specifically includes:
[0053] The current action sequence number information deletion unit is used to delete the information corresponding to the current action sequence number in the call queue after the current method service is executed, including: service sequence number, method sequence number, requester sequence number, session sequence number, current action sequence number and priority information;
[0054] The predecessor action sequence number information deletion unit is used to delete the information corresponding to the predecessor action sequence number of the current action sequence number in the call queue after the current method type service is executed, including: service sequence number, method sequence number, requester sequence number, session sequence number, predecessor action sequence number and priority information.
[0055] Among them, further include:
[0056] An action number association setting unit, used to pre-set a leading action number for the action numbers in the function items that appear in pairs;
[0057] The call source traceability list update unit is used to query and obtain the latest call source traceability list from the cloud and store it when the vehicle is initialized. The call source traceability list contains multiple records, each record contains a service number, a method number, an action number and priority information, and the priority information includes priority and sub-priority values.
[0058] Correspondingly, another aspect of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the aforementioned method when executed by a processor.
[0059] Correspondingly, another aspect of the present invention further provides a vehicle, which is provided with a service provider and a service requester of a vehicle-side service, and the service provider and the service requester implement remote procedure calls through the SOME / IP protocol, and the aforementioned vehicle-side service call processing system based on the SOA architecture is integrated in the SOME / IP middleware.
[0060] The implementation of the embodiments of the present invention has the following beneficial effects:
[0061] The embodiment of the present invention provides a vehicle-side service call processing method, system, storage medium and vehicle based on SOA architecture. By adding a call source management function to the RPC call process in the current SOME / IP protocol, a queue management mechanism is established, and the history of method service calls can be traced by using the current call queue; and an action sequence number is generated according to specific call parameters, and arbitration is performed for the current remote procedure call according to the priority information corresponding to the action sequence number.
[0062] By implementing the present invention, by establishing a queue management mechanism within the service and a dynamic ID (action sequence number) between service callers and providers, on the one hand, all valid callers of the current function can be dynamically monitored, and on the other hand, function arbitration can be implemented for specific callers to avoid affecting the functions of other callers. It can effectively reduce the monitoring behavior and repeated calling behavior at the application layer, reduce the amount of code and communication data, and improve the bad experience caused by function switching, thereby improving the efficiency and security of remote procedure calls; at the same time, it can reduce the cost of developing and maintaining the automotive SOA service architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, without paying creative labor, other drawings obtained based on these drawings still belong to the scope of the present invention.
[0064] Figure 1 A schematic diagram of the overall application environment using the RPC mechanism for service calls in an existing SOME / IP protocol;
[0065] Figure 2 This is an action sequence diagram of an existing RPC application scenario;
[0066] Figure 3 for Figure 2 Schematic diagram of the workflow of each participant in the process;
[0067] Figure 4 A schematic diagram of the main process of an embodiment of a vehicle-side service call processing method based on SOA architecture provided by the present invention;
[0068] Figure 5 A schematic diagram of the overall application environment of the present invention using the RPC mechanism to perform service calls;
[0069] Figure 6 It is a functional schematic diagram of the call source management module involved in the present invention;
[0070] Figure 7 The present invention relates to an action sequence diagram of an RPC application scenario;
[0071] Figure 8 for Figure 7 Schematic diagram of the workflow of each participant in the process;
[0072] Fig. 9 A schematic diagram of the structure of an embodiment of a vehicle-side service call processing system based on SOA architecture provided by the present invention;
[0073] Fig.10 for Fig. 9 A schematic diagram of the structure of the call queue establishment unit;
[0074] Fig.11 for Fig. 9 A schematic diagram of the structure of the arbitration processing unit;
[0075] Fig.12 for Fig. 9 Schematic diagram of the structure of the call queue information deletion unit. DETAILED DESCRIPTION
[0076] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0077] like Figure 4 FIG. 1 is a schematic diagram showing a main flow of an embodiment of a vehicle-side service call processing method based on SOA architecture provided by the present invention; and FIG. Figure 5 to Figure 6 As shown, in this embodiment, the method is applied to the service provider side. Specifically, the following method can be used: Figure 5 The deployed call source management module (SourcingManager) is implemented, from Figure 6It can be seen that the call source management module can implement functions such as listening, filtering, adding, querying, deleting, and data management (DataMgr). More specifically, the method provided by the present invention includes at least the following steps:
[0078] Step S10, receiving a service call request for a method class (Method) service from a service requester, and obtaining request parameters in the service call request; the request parameters at least include: a service serial number (ServiceID), a method serial number (MethodID), a requester serial number (ClientID), a session serial number (SessionID) and a payload (Payload), wherein the payload includes specific call input parameters of the method class request;
[0079] The service call request may be, for example, a start request (StartRequest) or a stop request (StopRequest).
[0080] Step S11, obtaining the action number (ActionID) corresponding to the request parameter and the priority information corresponding to the action number, and storing at least part of the request parameter, the action number and the priority information into the current call queue corresponding to the requested service;
[0081] More specifically, the step S11 further includes:
[0082] Step S110, querying a pre-stored call source tracing list according to the request parameters to determine whether the requested method service needs to be included in the call source management; for example, in some embodiments, it can be marked in the call source tracing list;
[0083] It is understandable that a call source tracing list needs to be pre-stored on the vehicle side. The call source tracing list includes multiple records, each of which contains a service number, a method number, an action number, and priority information (priority and sub-priority). The priority information includes priority and sub-priority values. As shown in Table 1 below, this is an example table of a call source tracing list;
[0084] Table 1. Example table of call source traceability list
[0085]
[0086] In actual examples, an initial call source traceability list is provided when the vehicle leaves the factory; during the vehicle's life cycle, if the call source traceability list needs to be updated due to new services or scenarios, the list will be updated to the cloud. The main information contained in the list is the same as the example information in the above table; therefore, when the vehicle is initialized (when the vehicle is powered on), it is necessary to query the cloud to see if there is an update to the list, and then download the latest call source traceability list from the cloud and store it.
[0087] In the actual example, after monitoring the relevant call information parameters, the call source management module queries the call source tracing list through the command SourcingManager.Filter(ServiceID,MethodID) to determine whether the method class service of the request needs to be included in the call source management;
[0088] At the same time, it is necessary to set the pre-action sequence number for the action sequence number in the function items that appear in pairs in advance. For the function items that appear in pairs (such as Start / Stop, TurnOn / TurnOff, etc.), if you need to limit the specific call source when executing Stop, TurnOff, etc. (for example, the caller can only close the components that he opened), you need to specify its pre-action sequence number (pre-ActionID) in advance. The following Table 2 shows the corresponding relationship table between each action sequence number and its pre-action sequence number.
[0089] Table 2 Correspondence between action numbers and their preceding action numbers
[0090] Prepend ActionID ActionID ACT_HORN_START ACT_HORN_STOP ACT_FLFLASHER_START ACT_FLFLASHER_STOP
[0091] Step S111, obtaining the action number corresponding to the current service call request and the priority information corresponding to the action number by generating or querying the call source tracing list according to the request parameter mapping;
[0092] It can be understood that, in some examples, the call source management module can obtain relevant method service request parameters according to the requested method serial number (MethodID) and the corresponding load (Payload), and generate the action serial number (ActionID) and the corresponding priority information (PriorityLevel, SubPriorityLevel) according to pre-defined rules;
[0093] In another example, the action number corresponding to the current service call request and the priority information corresponding to the action number may also be obtained by querying the call source tracing list according to the request parameter mapping.
[0094] The corresponding relationship between the request parameters and the action sequence numbers may be shown in the following table 3:
[0095] Table 3. Correspondence between request parameters and action numbers
[0096] ServiceID MethodID Parameter 1 Parameter 2 Parameter n… AcitonID 0x0001 0x0123 xxx xxx xxx ACT_HORN_START 0x0002 0x0123 xxx xxx xxx ACT_FLFLASHER_START 0x0001 0x0155 xxx xxx xxx ACT_003 0x0002 0x0155 xxx xxx xxx ACT_004 … … … … … …
[0097] Step S112: Store at least part of the request parameters, action sequence number and priority information into the current call queue corresponding to the requested service through the adding interface.
[0098] The service provider calls the source management module to call SourcingManager.Add to add the caller related information in the interface. Specifically, at least part of the request parameters, action sequence number and priority information are stored in the current call queue corresponding to the requested service through the add interface. Table 4 below is a schematic table of a call queue:
[0099] Table 4. Current call queue diagram
[0100]
[0101]
[0102] Step S12, arbitrating the service call request according to the priority information corresponding to the action sequence number, and after the arbitration is passed, calling the method service and executing it;
[0103] In a specific example, only the actions performed may be arbitrated, including:
[0104] Use SourcingManager.Query(ActionID) to query whether there are other action numbers with the same name in the current call queue according to the action number;
[0105] If it does not exist, the arbitration will be directly determined to be successful;
[0106] If it exists, the priority information of the current action number is compared with the priority information of other action numbers with the same name. When the priority of the current action number is the highest priority, it is determined that the arbitration is passed, the arbitration right is obtained, and the method class service is allowed to be called and executed. Otherwise, an indication of call failure is returned, where the failure reason is arbitration failure.
[0107] In another specific example, arbitration may be performed on the sequence number of the preceding action of the currently executed action.
[0108] For example, if ACT_HORN_STOP is executed this time, arbitration is more concerned with whether the preceding action ACT_HORN_START is for which the caller has arbitration rights. Specifically:
[0109] Use SourcingManager.Query(prefixActionID) to check whether the prefix AcitonID exists in the current call queue;
[0110] If it does not exist, the arbitration will be directly determined to be successful;
[0111] If it exists, the priority information of the current action number is compared with the priority information of the previous action number in the current call queue. When the priority of the current action number is the highest priority, the arbitration is determined to be passed; otherwise, the call fails and the reason for the failure is arbitration failure.
[0112] Step S13, after the execution is completed, delete the service requester related information corresponding to the current action sequence number in the call queue.
[0113] In a specific example, the executed ActionID information needs to be deleted. The step S13 further includes:
[0114] After the execution of the current method class service is completed, the service provider deletes the caller-related information in the interface of the calling source management module (SourcingManager); specifically, the information corresponding to the current action sequence number is deleted, that is, the information related to the action sequence number executed by the requester sequence number and the session sequence number is deleted, including: service sequence number (ServiceID), method sequence number (MethodID), requester sequence number (ClientID), session sequence number (SessionID), current action sequence number (ActionID) and priority information (PriorityLevel, SubPriorityLevel).
[0115] In another specific example, it is necessary to delete the preceding ActionID information of the executed actions individually or collectively, and the step S13 further includes:
[0116] Call SourcingManager.Delete to delete the information related to the sequence of preceding actions executed by the requester number (ClientID) and session number (SessionID), including: service number (ServiceID), method number (MethodID), requester number (ClientID), session number (SessionID), preceding action number (pre-ActionID) and priority information (PriorityLevel, SubPriorityLevel).
[0117] Recombination Figure 5 and Figure 6 The method provided by the present invention is mainly applied Figure 5The calling source management link shown in the figure, and at the same time, in the implementation link, the relevant interfaces provided by the calling source management module (SourcingManager) are used to perform query and other application tasks on demand.
[0118] It can be understood that the system of the present invention forms a call source tracing list dynamically by adding a call source management module in the middleware service proxy related components, marking the ServiceID, MethodID, ClientID, SessionID, ActionID, and priority related information of the service call when the service is called. When the related service is called later, the call source of the currently executed action can be identified by querying the list, and call arbitration based on SessionID, ClientID or ActionID can be realized by comparing the ActionID priority in the list;
[0119] More specifically, by storing and managing the caller information (ClientID) of the service when the service user calls the service, the call queue information of the service is provided, so that the execution module can query all existing callers of the service when needed, and at the same time provide a queue member deletion function so that the execution module can release the caller information after completing the required function.
[0120] After completing the current caller's work instruction, the implementation execution module implements the interrupt recovery operation and more detailed authority management for specific callers based on the queue information provided by the call source management module. Figure 7 and Figure 8 As shown, Figure 7 The present invention relates to an action timing diagram of an RPC application scenario (speaker control). Figure 8 for Figure 7 The workflow diagram of each participant in the process; by performing queue query and priority comparison, it can avoid Figure 3 disputes and conflicts arising in the
[0121] like Fig. 9 FIG. 1 is a schematic diagram showing a structure of an embodiment of a vehicle-side service call processing system based on SOA architecture provided by the present invention. Figures 10 to 12 As shown, in this embodiment, the system 1 is integrated into the SOME / IP middleware between the service provider and the service requester, and at least includes:
[0122] The service call acquisition unit 10 is used to receive a service call request for a method class (Method) service from a service requester, and obtain request parameters in the service call request; the request parameters at least include: a service serial number (ServiceID), a method serial number (MethodID), a requester serial number (ClientID), a session serial number (SessionID) and a load (Payload);
[0123] A call queue establishment unit 11 is used to obtain an action number (Action ID) corresponding to the request parameter and priority information corresponding to the action number, and store at least part of the request parameter, the action number and the priority information into a current call queue corresponding to the requested service;
[0124] The arbitration processing unit 12 is used to perform arbitration processing on the service call request according to the priority information corresponding to the action sequence number;
[0125] A service calling processing unit 13, configured to call and execute the method service after the arbitration result of the arbitration processing unit is that the arbitration is passed;
[0126] A calling queue information deleting unit 14, after execution is completed, deletes the service requester related information corresponding to the current action sequence number in the calling queue;
[0127] An action number association setting unit 16, used to pre-set a leading action number for the action numbers in the function items that appear in pairs;
[0128] The call source traceability list update unit 15 is used to query and obtain the latest call source traceability list from the cloud and store it when the vehicle is initialized. The call source traceability list contains multiple records, each record contains a service number, a method number, an action number and priority information, and the priority information includes priority and sub-priority values.
[0129] like Fig.10 As shown, the calling queue establishing unit 11 further includes:
[0130] The call source determination unit 110 is used to query the pre-stored call source tracing list according to the request parameters to determine whether the requested method service needs to be included in the call source management;
[0131] The action sequence number information acquisition unit 111 is used to obtain the action sequence number corresponding to the current service call request and the priority information corresponding to the action sequence number by generating or querying the call source traceability list according to the request parameter mapping;
[0132] The storage unit 112 is used to store at least part of the request parameters, action sequence number and priority information into the current call queue corresponding to the requested service through the adding interface.
[0133] like Fig.11 As shown, the arbitration processing unit 12 further includes:
[0134] A query unit 120, configured to query whether there are other action numbers with the same name in the current call queue according to the action number;
[0135] The current action sequence number arbitration processing unit 121 is used to directly determine that the arbitration is passed if the query unit finds that the action sequence number does not exist; and if the query unit finds that the action sequence number exists, compare the priority information of the current action sequence number with the priority information of other action sequence numbers with the same name, and determine that the arbitration is passed when the priority of the current action sequence number is the highest priority;
[0136] The predecessor action sequence number arbitration processing unit 122 is used to determine whether there is a predecessor action sequence of the current action sequence number in the current calling queue. If so, the priority information of the current action sequence number is compared with the priority information of the predecessor action sequence number in the current calling queue. When the priority of the current action sequence number is the highest priority, it is determined that the arbitration is passed.
[0137] like Fig.12 As shown, the calling queue information deleting unit 13 specifically includes:
[0138] The current action sequence number information deletion unit 130 is used to delete the information corresponding to the current action sequence number in the call queue after the current method service is executed, including: service sequence number, method sequence number, requester sequence number, session sequence number, current action sequence number and priority information;
[0139] The predecessor action sequence number information deletion unit 131 is used to delete the information corresponding to the predecessor action sequence number of the current action sequence number in the call queue after the current method type service is executed, including: service sequence number, method sequence number, requester sequence number, session sequence number, predecessor action sequence number and priority information.
[0140] For more details, please refer to and combine the above Figures 4 to 8 The described method will not be described in detail here.
[0141] Accordingly, another aspect of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the aforementioned Figures 4 to 8 For more details, please refer to and combine the above Figures 4 to 8 The described method will not be described in detail here.
[0142] Accordingly, another aspect of the present invention further provides a vehicle, which is provided with a vehicle-side service provider and a service requester, wherein the service provider and the service requester implement remote procedure calls via the SOME / IP protocol, and the aforementioned Figures 9 to 12 For more details, please refer to and combine the above Figures 9 to 12 The contents described are not repeated here.
[0143] The implementation of the embodiments of the present invention has the following beneficial effects:
[0144] The embodiment of the present invention provides a vehicle-side service call processing method, system, storage medium and vehicle based on SOA architecture. By adding a call source management function to the RPC call process in the current SOME / IP protocol, a queue management mechanism is established, and the history of method service calls can be traced by using the current call queue; and an action sequence number is generated according to specific call parameters, and arbitration is performed for the current remote procedure call according to the priority information corresponding to the action sequence number.
[0145] By implementing the present invention, by establishing a queue management mechanism within the service and a dynamic ID (action sequence number) between service callers and providers, on the one hand, all valid callers of the current function can be dynamically monitored, and on the other hand, function arbitration can be implemented for specific callers to avoid affecting the functions of other callers. It can effectively reduce the monitoring behavior and repeated calling behavior at the application layer, reduce the amount of code and communication data, and improve the bad experience caused by function switching, thereby improving the efficiency and security of remote procedure calls; at the same time, it can reduce the cost of developing and maintaining the automotive SOA service architecture.
[0146] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0147] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0148] The above disclosure is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A vehicle-side service call processing method based on SOA architecture, characterized in that: At least the following steps are included: Receive a service call request for a method class (Method) service from a service requester, and obtain request parameters in the service call request; Obtaining an action number (ActionID) corresponding to the request parameter and priority information corresponding to the action number, and storing at least part of the request parameter, the action number and the priority information in a current call queue corresponding to the requested service; Arbitrate the service call request according to the priority information corresponding to the action sequence number, and after the arbitration is passed, call the method class service and execute it; After the execution is completed, the service requester related information corresponding to the current action sequence number in the call queue is deleted.
2. The method according to claim 1, characterized in that The step of obtaining the action number (Action ID) corresponding to the request parameter and the priority information corresponding to the action number, and storing at least part of the request parameter, the action number and the priority information in the current call queue corresponding to the requested service further includes: According to the request parameters, a pre-stored call source tracing list is queried to determine whether the requested method service needs to be included in the call source management, wherein the request parameters at least include: service ID, method ID, requester ID (ClientID), session ID (SessionID) and payload (Payload); Generate or query the call source traceability list according to the request parameter mapping to obtain the action number corresponding to the current service call request and the priority information corresponding to the action number; At least part of the request parameters, action sequence number and priority information are stored in the current call queue corresponding to the requested service through the adding interface.
3. The method according to claim 2, characterized in that The step of arbitrating the service call request according to the priority information corresponding to the action sequence number includes: According to the action sequence number, it is checked whether there are other action sequences with the same name in the current call queue; If it does not exist, the arbitration will be directly determined to be successful; If so, the priority information of the current action number is compared with the priority information of other action numbers with the same name. When the priority of the current action number is the highest priority, it is determined that the arbitration is passed.
4. The method according to claim 3, characterized in that The step of arbitrating the service call request according to the priority information corresponding to the action sequence number further includes: Determine whether there is a preceding action sequence of the current action number in the current call queue. If so, compare the priority information of the current action number with the priority information of the preceding action number in the current call queue. When the priority of the current action number is the highest priority, determine that the arbitration is passed.
5. The method according to claim 4, characterized in that After the execution is completed, the step of deleting the service requester related information corresponding to the current action sequence number in the call queue specifically includes: After the current method service is executed, the information corresponding to the current action number is deleted from the call queue, including: service number, method number, requester number, session number, current action number and priority information.
6. The method according to claim 4, characterized in that After the execution is completed, the step of deleting the service requester related information corresponding to the current action sequence number in the call queue further includes: After the current method service is executed, the information corresponding to the preceding action number of the current action number is deleted from the call queue, including: service number, method number, requester number, session number, preceding action number and priority information.
7. The method according to any one of claims 1 to 6, characterized in that: Further including: Preset the leading action number for the action numbers in the function items that appear in pairs.
8. The method according to any one of claims 1 to 6, characterized in that Further including: When the vehicle is initialized, it queries and obtains the latest call source traceability list from the cloud and stores it. The call source traceability list contains multiple records, each of which contains a service number, method number, action number and priority information. The priority information includes priority and sub-priority values.
9. A vehicle-side service call processing system based on SOA architecture, characterized in that: At least: A service call acquisition unit, used to receive a service call request for a method class (Method) service from a service requester, and obtain request parameters in the service call request; A call queue establishment unit, used to obtain an action number (ActionID) corresponding to the request parameter and priority information corresponding to the action number, and store at least part of the request parameter, the action number and the priority information into a current call queue corresponding to the service requested to be called; An arbitration processing unit, used for arbitrating the service call request according to the priority information corresponding to the action sequence number; A service calling processing unit, used to call and execute the method service after the arbitration result of the arbitration processing unit is that the arbitration is passed; The calling queue information deleting unit deletes the service requester related information corresponding to the current action sequence number in the calling queue after execution is completed.
10. The system according to claim 9, characterized in that The calling queue establishing unit further comprises: A call source determination unit, used to query a pre-stored call source tracing list according to the request parameters to determine whether the requested method service needs to be included in the call source management, wherein the request parameters at least include: service number (ServiceID), method number (MethodID), requester number (ClientID), session number (SessionID) and load (Payload); An action sequence number information acquisition unit, used to obtain the action sequence number corresponding to the current service call request and the priority information corresponding to the action sequence number by generating or querying the call source traceability list according to the request parameter mapping; The storage unit is used to store at least part of the request parameters, action sequence number and priority information into the current call queue corresponding to the requested service through the adding interface.
11. The system according to claim 10, characterized in that The arbitration processing unit further comprises: A query unit, used to query whether there are other action numbers with the same name in the current call queue according to the action number; The current action sequence number arbitration processing unit is used to directly determine that the arbitration is passed if the query unit finds that the action sequence number does not exist; and if the query unit finds that the action sequence number exists, compare the priority information of the current action sequence number with the priority information of other action sequence numbers with the same name, and determine that the arbitration is passed when the priority of the current action sequence number is the highest priority; The predecessor action sequence number arbitration processing unit is used to determine whether there is a predecessor action sequence of the current action sequence number in the current calling queue. If so, the priority information of the current action sequence number is compared with the priority information of the predecessor action sequence number in the current calling queue. When the priority of the current action sequence number is the highest priority, it is determined that the arbitration is passed.
12. The system according to claim 11, characterized in that The calling queue information deleting unit specifically includes: The current action sequence number information deletion unit is used to delete the information corresponding to the current action sequence number in the call queue after the current method service is executed, including: service sequence number, method sequence number, requester sequence number, session sequence number, current action sequence number and priority information; The predecessor action sequence number information deletion unit is used to delete the information corresponding to the predecessor action sequence number of the current action sequence number in the call queue after the current method type service is executed, including: service sequence number, method sequence number, requester sequence number, session sequence number, predecessor action sequence number and priority information.
13. The system according to any one of claims 9 to 12, characterized in that Further including: An action number association setting unit, used to pre-set a leading action number for the action numbers in the function items that appear in pairs; The call source traceability list update unit is used to query and obtain the latest call source traceability list from the cloud and store it when the vehicle is initialized. The call source traceability list contains multiple records, each record contains a service number, a method number, an action number and priority information, and the priority information includes priority and sub-priority values.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
15. A vehicle, characterized in that: It is provided with a service provider and a service requester of the vehicle-side service, and the service provider and the service requester implement remote procedure call through the SOME / IP protocol. It is characterized in that, in one place, a vehicle-side service call processing system based on SOA architecture as described in any one of claims 9 to 13 is integrated in the SOME / IP middleware.
