CN118540376A - SOA-based vehicle-end service call processing method, system, storage medium and vehicle - Google Patents
SOA-based vehicle-end service call processing method, system, storage medium and vehicle Download PDFInfo
- Publication number
- CN118540376A CN118540376A CN202310158952.5A CN202310158952A CN118540376A CN 118540376 A CN118540376 A CN 118540376A CN 202310158952 A CN202310158952 A CN 202310158952A CN 118540376 A CN118540376 A CN 118540376A
- Authority
- CN
- China
- Prior art keywords
- service
- action
- call
- sequence number
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
- H04L41/0273—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
- H04L41/0286—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP] for search or classification or discovery of web services providing management functionalities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
- H04L41/0273—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/133—Protocols for remote procedure calls [RPC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/61—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephonic Communication Services (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及汽车面向服务架构(Service-Oriented Architecture,SOA)技术领域,特别是涉及一种基于SOA架构的车端服务调用处理方法、系统、存储介质及车辆。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
在智能汽车中,软件的地位越来越重要。近年来,面向服务架构(SOA)在近几年慢慢地被引入汽车领域,随之而来SOME/IP(Scalable service-Oriented Middleware overIP,基于IP的可扩展面向服务的中间件)协议也被更多地用于车载以太网通信中。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.
其中,汽车SOA架构通过将当前传统汽车电子控制系统的功能、能力进行抽象、解耦后形成独立的逻辑单元——服务(Service),并以服务接口的形式供其他模块进行调用。服务接口是采用中立的方式进行定义的,它独立于实现服务的硬件平台、操作系统和编程语言。这使得构建在各种各样的系统中的服务可以以统一和通用的方式进行交互。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.
SOME/IP是一种面向服务的可伸缩的协议,作为用户控制消息的汽车中间件,通过序号化、远程过程调用(Remote Procedure Call,RPC)、服务发现、发布及订阅等机制实现跨平台或操作系统之间的资源(信息、功能等)共享;远程过程调用(RPC)是一种通信协议,其允许运行于一台终端的程序调用另一台终端的子程序,而程序员无需额外地为这个交互作用编程。如图1所示,示出了现有的一种SOME/IP协议中使用远程过程调用(RPC)机制进行服务调用的流程示意图。在传输时要按照一定规则将数据以二进制字节流的形式进行传输(序号化操作);作为数据的接收方,同样要按照约定好的规则去解析这个二进制数据流,以得到和发送方一致的数据结构,如结构体、数组等类型,此即为反序号化操作。而在采用SOME/IP的服务调用请求中需要携带服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)以及负载(Payload)等请求参数信息。SOME/IP is a service-oriented scalable protocol. As a user-controlled message automotive middleware, it realizes resource (information, function, etc.) sharing across platforms or operating systems through mechanisms such as serialization, remote procedure call (RPC), service discovery, publishing and subscription. 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 need for programmers to program this interaction. As shown in Figure 1, a flow chart of using the remote procedure call (RPC) mechanism to perform service calls in an existing SOME/IP protocol is shown. During transmission, 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, it is necessary to carry request parameter information such as service number (ServiceID), method number (MethodID), requester number (ClientID), session number (SessionID) and load (Payload).
不过在汽车SOA架构中,进行远程过程调用也存在一些不足之处。具体地,方法类(Method)服务提供方在应用层无法识别服务请求方,对应所控制的负载无法区分控制源,因而无法实施组内仲裁、控制权限管理等操作。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.
在当前SOA分布式服务架构中客户端(服务请求方)通过SOME/IP等协议远程调用服务端(服务提供方)指定服务时,因未鉴别特定的调用者而可能导致部分功能异常。下述举例进行说明,例如在一个典型的功能场景中,假设喇叭(服务提供方)存在StartHorn、StopHorn两个方法类(Method)服务,调用者A、B为同一群组内的服务请求方。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.
其中,调用者A因警示提醒调用StartHorn,开启喇叭,期望工作周期30s;Among them, caller A calls StartHorn due to a warning reminder to turn on the horn, with an expected working cycle of 30s;
调用者B因故障提醒调用StartHorn,开启喇叭,期望工作周期10s;Caller B calls StartHorn due to a fault reminder to turn on the horn with an expected working cycle of 10s;
调用者B因完成预期功能,调用StopHorn,关闭喇叭;Caller B completes the expected function and calls StopHorn to turn off the horn.
因调用者A、B为具有同等优先级调用源,调用者B在关闭喇叭时同时关闭了调用者A开启的喇叭,导致调用者A的喇叭工作序号异常终止,此RPC应用场景的动作时序图如下图2所示,图2中ON仅表示工作状态,不特指持续鸣笛状态,该工作状态也可以为依据工作模板间歇性鸣笛的状态。对应的各参与方的工作流程如图3所示,明显地,在该工作流程中存在需要仲裁的争端。Because callers A and B are call sources with the same priority, caller B turns off the horn that caller A has turned on at the same time when turning off the horn, causing the horn work sequence number of caller A to terminate abnormally. The action sequence diagram of this RPC application scenario is shown in Figure 2 below. In Figure 2, ON only represents the working state, not specifically the continuous horn state. The working state can also be the intermittent horn state according to the work template. The corresponding workflow of each participant is shown in Figure 3. Obviously, there are disputes that need to be arbitrated in this workflow.
而要解决该争端问题,一般采用如下的方案进行处理:To resolve the dispute, the following solutions are generally adopted:
其一,在一些例子中,其他模块或调用者A一直监控喇叭运行状态,在监测到喇叭关闭时因自身需要再次调用StartHorn开启喇叭;或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
其二,调用者B在调用StopHorn前判断是否可以关闭喇叭。Second, caller B determines whether the speaker can be turned off before calling StopHorn.
但是,现有的两种解决方案均对调用者提出了额外功能逻辑需求,不符合SOA服务架构的松耦合、灵活性及重用性思想;同时,因为调用者的不确定性、匿名性导致开发效率极低、开发难度极大、维护成本极高。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
本发明所要解决的技术问题在于,提供一种基于SOA架构的车端服务调用处理方法、系统、存储介质及车辆,可以在进行远程过程调用时进行仲裁,以避免对其他调用者功能产生影响。可以有效地减少应用层的监控行为及重复调用行为,减少代码量及通信数据量,从而提高远程过程调用的效率以及安全性。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.
为解决上述技术问题,作为本发明的一方面,提供一种基于SOA架构的车端服务调用处理方法,应用于服务提供方,其至少包括如下步骤: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:
接收来自服务请求方的对方法类(Method)服务的服务调用请求,并获得服务调用请求中的请求参数;Receive a service call request for a method class (Method) service from a service requester, and obtain request parameters in the service call request;
获得所述请求参数对应的动作序号(ActionID)以及所述动作序号所对应的优先级信息,并将至少部分请求参数、动作序号及优先级信息存储进所请求调用的服务对应的当前调用队列中;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.
其中,所述获得所述请求参数对应的动作序号(ActionID)以及所述动作序号所对应的优先级信息,并将至少部分请求参数、动作序号及优先级信息存储进所请求调用的服务对应的当前调用队列中的步骤进一步包括: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:
根据所述请求参数查询预先存储的调用源溯源清单,确定所述请求的方法类服务是否需要纳入调用源管理,所述请求参数至少包括:服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)以及负载(Payload);According to the request parameters, a pre-stored call source tracing list is searched 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.
其中,所述根据所述动作序号对应的优先级信息对本次服务调用请求进行仲裁处理的步骤包括: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.
其中,所述根据所述动作序号对应的优先级信息对本次服务调用请求进行仲裁处理的步骤进一步包括: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.
其中,所述在执行完成后,删除所述调用队列中当前动作序号对应的服务请求方相关信息的步骤具体包括: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:
在当前方法类服务执行完成后,在调用队列中删除当前动作序号对应的信息,包括:服务序号、方法序号、请求方序号、会话序号、当前动作序号及优先级信息。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.
其中,所述在执行完成后,删除所述调用队列中当前动作序号对应的服务请求方相关信息的步骤进一步包括: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:
在当前方法类服务执行完成后,在调用队列中删除当前动作序号的前置动作序号所对应的信息,包括:服务序号、方法序号、请求方序号、会话序号、前置动作序号及优先级信息。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.
其中,进一步包括:Among them, further include:
预先为成对出现的功能项中的动作序号设置前置动作序号;Preset the leading action sequence number for the action sequence numbers in the function items that appear in pairs;
车辆端在初始化时,从云端查询并获得最新的调用源溯源清单并存储,所述调用源溯源清单中包含有多条记录,每一记录包含服务序号、方法序号、动作序号以及优先级信息,所述优先级信息包含优先级及子优先级值。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.
相应地,本发明的另一方面,提供一种基于SOA架构的车端服务调用处理系统,其至少包括:Accordingly, another aspect of the present invention provides a vehicle-side service call processing system based on SOA architecture, which at least includes:
服务调用获取单元,用于接收来自服务请求方的对方法类(Method)服务的服务调用请求,并获得服务调用请求中的请求参数;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;
调用队列建立单元,用于获得所述请求参数对应的动作序号(ActionID)以及所述动作序号所对应的优先级信息,并将至少部分请求参数、动作序号及优先级信息存储进所请求调用的服务对应的当前调用队列中;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.
其中,所述调用队列建立单元进一步包括:Wherein, the calling queue establishing unit further comprises:
调用源确定单元,用于根据所述请求参数查询预先存储的调用源溯源清单,确定所述请求的方法类服务是否需要纳入调用源管理,所述请求参数至少包括:服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)以及负载(Payload);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 tracing 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.
其中,所述仲裁处理单元进一步包括:Wherein, the arbitration processing unit further includes:
查询单元,用于根据所述动作序号查询当前调用队列中是否存在具有相同名称的其他动作序号;A query unit, used for querying 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.
其中,所述调用队列信息删除单元具体包括: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.
其中,进一步包括:Among them, further include:
动作序号关联设置单元,用于预先为成对出现的功能项中的动作序号设置前置动作序号;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.
相应地,本发明的再一方面,还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现前述的方法的步骤。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.
相应地,本发明的再一方面,还提供一种车辆,其设置有车端服务的服务提供方与服务请求方,所述服务提供方与所述服务请求方之间通过SOME/IP协议实现远程过程调用,在SOME/IP中间件中集成的有前述的基于SOA架构的车端服务调用处理系统。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.
实施本发明实施例,具有如下的有益效果:The implementation of the embodiments of the present invention has the following beneficial effects:
本发明实施例提供一种基于SOA架构的车端服务调用处理方法、系统、存储介质及车辆。通过在当前SOME/IP协议中的RPC调用流程中加入了调用源管理功能,建立队列管理机制,通过采用当前调用队列可实现对方法类服务调用的历史进行溯源;并根据特定调用参数生成动作序号,根据动作序号对应的优先级信息为当前远程过程调用进行仲裁。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.
实施本发明,通过在服务内部建立队列管理机制及服务调用者、提供者之间的动态ID(动作序号),一方面可动态监控当前功能的所有有效调用者,另一方面可针对具体的调用者实施功能仲裁避免对其他调用者功能产生影响。可以有效地减少应用层的监控行为及重复调用行为,减少代码量及通信数据量及改善因功能切换产生的不良体验,从而提高远程过程调用的效率以及安全性;同时,可以降低汽车SOA服务架构开发及维护的成本。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
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,根据这些附图获得其他的附图仍属于本发明的范畴。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.
图1为现有的一种SOME/IP协议中使用RPC机制进行服务调用的整体应用环境示意图;FIG1 is a schematic diagram of an overall application environment for using the RPC mechanism to perform service calls in an existing SOME/IP protocol;
图2为现有的一个RPC应用场景的动作时序图;FIG2 is an action sequence diagram of an existing RPC application scenario;
图3为图2中的各参与方的工作流程示意图;FIG3 is a schematic diagram of the workflow of each participant in FIG2 ;
图4为本发明提供的一种基于SOA架构的车端服务调用处理方法的一个实施例的主流程示意图;FIG4 is 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;
图5为本发明的使用RPC机制进行服务调用的整体应用环境示意图;5 is a schematic diagram of the overall application environment of the present invention using the RPC mechanism for service invocation;
图6为本发明中涉及的调用源管理模块的功能示意图;FIG6 is a functional schematic diagram of a call source management module involved in the present invention;
图7为本发明涉及一个RPC应用场景的动作时序图;FIG7 is an action sequence diagram of an RPC application scenario according to the present invention;
图8为图7中的各参与方的工作流程示意图;FIG8 is a schematic diagram of the workflow of each participant in FIG7;
图9为本发明提供的一种基于SOA架构的车端服务调用处理系统的一个实施例的结构示意图;FIG9 is a schematic structural diagram of an embodiment of a vehicle-side service call processing system based on SOA architecture provided by the present invention;
图10为图9中调用队列建立单元的结构示意图;FIG10 is a schematic diagram of the structure of the call queue establishment unit in FIG9;
图11为图9中仲裁处理单元的结构示意图;FIG11 is a schematic diagram of the structure of the arbitration processing unit in FIG9;
图12为图9中调用队列信息删除单元的结构示意图。FIG. 12 is a schematic diagram of the structure of the call queue information deletion unit in FIG. 9 .
具体实施方式DETAILED DESCRIPTION
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述。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.
如图4所示,示出了本发明提供的一种基于SOA架构的车端服务调用处理方法的一个实施例的主流程示意图;一并结合图5至图6所示,在本实施例中,所述方法应用于服务提供方侧,具体地,可以采用如图5部署的调用源管理模块(SourcingManager)来实现,从图6可以看出,该调用源管理模块可以实现诸如监听(Listen)、过滤(Filter)、添加(Add)、查询(Query)、删除(Delete)以及数据管理(DataMgr)等功能。更具体地,本发明提供的方法至少包括如下步骤:As shown in FIG4, 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 is shown; in combination with FIG5 to FIG6, in this embodiment, the method is applied to the service provider side, specifically, it can be implemented by using a call source management module (SourcingManager) deployed as shown in FIG5. As can be seen from FIG6, the call source management module can implement functions such as listening (Listen), filtering (Filter), adding (Add), querying (Query), deleting (Delete) and data management (DataMgr). More specifically, the method provided by the present invention includes at least the following steps:
步骤S10,接收来自服务请求方的对方法类(Method)服务的服务调用请求,并获得服务调用请求中的请求参数;所述请求参数至少包括:服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)以及负载(Payload),在负载中包含方法类请求的具体调用输入参数;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;
其中所述服务调用请求,可以是诸如开始工作请求(StartRequest)以及结束工作请求(StopRequest)等。The service call request may be, for example, a start request (StartRequest) or a stop request (StopRequest).
步骤S11,获得所述请求参数对应的动作序号(ActionID)以及所述动作序号所对应的优先级信息,并将至少部分请求参数、动作序号及优先级信息存储进所请求调用的服务对应的当前调用队列中;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;
更具体地,所述步骤S11进一步包括:More specifically, the step S11 further includes:
步骤S110,根据所述请求参数查询预先存储的调用源溯源清单,确定所述请求的方法类服务是否需要纳入调用源管理;例如在一些实施例中,可以在调用源溯源清单中进行标示;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;
可以理解的是,需要在车辆端预先存储调用源溯源清单,所述调用源溯源清单包括有多条记录,每一记录包含服务序号、方法序号、动作序号以及优先级信息(优先级和子优先级),所述优先级信息包含优先级及子优先级值。如下表1所示,即为一个调用源溯源清单的示例表;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, it is an example table of a call source tracing list;
表1、调用源溯源清单的示例表Table 1. Example table of call source traceability list
在实际的例子中,车辆出厂时会提供初始调用源溯源清单;而在车辆使用生命周期中,如因新增服务、场景等需要更新调用源溯源清单时,所述清单会被更新至云端,该清单包含的主要信息与上表中示例信息相同;故在车辆端在初始化时(车辆上电时),需要查询云端是否有清单更新,然后从云端下载获得最新的调用源溯源清单并存储。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.
在实际的例子中,调用源管理模块在监控到相关调用信息参数后,通过命SourcingManager.Filter(ServiceID,MethodID)查询调用源溯源清单判断该请求的方法类服务是否需要纳入调用源管理;In the actual example, after monitoring the relevant call information parameters, the call source management module queries the call source traceability 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;
同时,需要预先为成对出现的功能项中的动作序号设置前置动作序号。对于成对出现的功能项(如Start/Stop、TurnOn/TurnOff等),如需在执行Stop、TurnOff等操作时限定特定调用源(例如调用者只能关闭自己开启的部件),则需预先指定其前置动作序号(前置ActionID),下表2示出了各动作序号与其前置动作序号对应关系表。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.
表2动作序号与其前置动作序号对应关系表Table 2 Correspondence between action numbers and their preceding action numbers
步骤S111,根据所述请求参数映射生成或查询所述调用源溯源清单的方式获得当前服务调用请求对应的动作序号,以及所述动作序号所对应的优先级信息;Step S111, generating or querying the call source tracing 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;
可以理解的是,在一些例子中,调用源管理模块可以根据所请求的方法序号民(MethodID)及对应的负载(Payload)中获取相关方法类服务请求参数,并依据预先制定的规则生成动作序号(ActionID)及对应的优先级信息(PriorityLevel、SubPriorityLevel);It can be understood that, in some examples, the call source management module can obtain relevant method class 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;
在另外的例了中,也可以根据所述请求参数映射查询所述调用源溯源清单的方式获得当前服务调用请求对应的动作序号,以及所述动作序号所对应的优先级信息。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.
其中,请求参数与动作序号的对应关系可以例如下表3所示:The corresponding relationship between the request parameters and the action sequence numbers may be shown in the following table 3:
表3、请求参数与动作序号的对应关系表Table 3. Correspondence between request parameters and action numbers
步骤S112,将至少部分请求参数、动作序号及优先级信息通过添加接口存储进所请求调用的服务对应的当前调用队列中。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.
服务提供方调用源管理模块调用SourcingManager.Add在接口中添加调用者相关信息,具体地,将至少部分请求参数、动作序号及优先级信息通过添加接口存储进所请求调用的服务对应的当前调用队列中。下表4为一个调用队列示意表: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 call queue diagram:
表4、当前的调用队列示意表Table 4. Current call queue diagram
步骤S12,根据所述动作序号对应的优先级信息对本次服务调用请求进行仲裁处理,在仲裁通过后,调用所述方法类服务并执行;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;
在一个具体的例子中,可以只对所执行的动作进行仲裁,具体包括:In a specific example, only the actions performed may be arbitrated, including:
通过SourcingManager.Query(ActionID)根据所述动作序号查询当前调用队列中是否存在具有相同名称的其他动作序号;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;
如不存在则直接确定仲裁通过;If it does not exist, the arbitration will be directly determined to be successful;
如存在,则将当前动作序号的优先权信息与相同名称的其他动作序号的优先级信息进行对比,在当前动作序号的优先权为最高优先权时,确定仲裁通过,获得仲裁权,允许调用所述方法类服务并执行。否则,返回调用失败的指示,其中,失败原因为仲裁失败。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.
在另一个具体的例子中,可以对当前执行动作的前置动作序号进行仲裁。In another specific example, arbitration may be performed on the sequence number of the preceding action of the currently executed action.
例如,如本次执行ACT_HORN_STOP,仲裁更关注其前置动作ACT_HORN_START是否为调用者拥有仲裁权。具体包括: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:
通过SourcingManager.Query(前置ActionID)查询当前调用队列中是否存在该前置AcitonID;Use SourcingManager.Query(prefixActionID) to check whether the prefixAcitonID exists in the current call queue;
如不存在则直接确定仲裁通过;If it does not exist, the arbitration will be directly determined to be successful;
如果存在,则将当前动作序号的优先权信息与当前调用队列中前置动作序号的优先级信息进行对比,在当前动作序号的优先权为最高优先权时,确定仲裁通过;否则返回调用失败,失败原因为仲裁失败。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.
步骤S13,在执行完成后,删除所述调用队列中当前动作序号对应的服务请求方相关信息。Step S13, after the execution is completed, delete the service requester related information corresponding to the current action sequence number in the call queue.
在一个具体的例子中,需删除所执行的ActionID信息。所述步骤S13进一步包括:In a specific example, the executed ActionID information needs to be deleted. The step S13 further includes:
在当前方法类服务执行完成后,服务提供方在调用源管理模块(SourcingManager)的接口中删除调用者相关信息;具体地,删除当前动作序号对应的信息,即删除该请求方序号、会话序号所执行动作序号相关的信息,包括:服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)、当前动作序号(ActionID)及优先级信息(PriorityLevel、SubPriorityLevel)。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).
在另一个具体的例子中,需要单独或共同删除所执行动作的前置ActionID信息,所述步骤S13进一步包括: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:
调用SourcingManager.Delete,删除该请求方序号(ClientID)、会话序号(SessionID)所执行前置动作序列相关的信息,包括:服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)、前置动作序号(前置ActionID)及优先级信息(PriorityLevel、SubPriorityLevel)。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 (preceding ActionID) and priority information (PriorityLevel, SubPriorityLevel).
再次结合图5和图6所述,本发明所提供的方法主要应用图5中所示的调用源管理环节,同时在实现执行环节利用调用源管理模块(SourcingManager)提供的相关接口按需进行查询等应用工作。5 and 6 , the method provided by the present invention mainly applies the call source management link shown in FIG. 5 , and at the same time utilizes the relevant interface provided by the call source management module (SourcingManager) to perform query and other application tasks on demand in the implementation link.
可以理解的是,本发明所述系统通过在中间件服务代理相关组件中增加调用源管理模块,在服务被调用时标记服务调用的ServiceID、MethodID、ClientID、SessionID、ActionID、优先级相关信息动态形成调用源溯源清单,在后续相关服务调用时,通过查询清单可实现对当前执行动作的调用源识别以及通过对比清单中ActionID优先级可实现基于SessionID、ClientID或ActionID的调用仲裁;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;
更具体地,通过在服务使用方调用服务时,对该服务的调用者信息(ClientID)进行存储管理,提供了该服务的调用队列信息,供实现执行模块在需要时对该服务的现存所有调用者进行查询,并同时提供队列成员删除功能,供实现执行模块在完成所需功能后释放调用者信息。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.
所述实现执行模块在完成当前调用者工作指令后依据调用源管理模块提供的队列信息实现中断恢复操作以及更详细的针对特定调用者的权限管控。如图7和图8所示,图7为本发明涉及一个RPC应用场景(喇叭控制)的动作时序图,图8为图7中的各参与方的工作流程示意图;通过进行队列查询以及优先级对比的措施,可以避免图3中出现的争端和冲突。After completing the current caller's work instruction, the implementation execution module implements the interrupt recovery operation and more detailed permission management for specific callers according to the queue information provided by the call source management module. As shown in Figures 7 and 8, Figure 7 is an action timing diagram of an RPC application scenario (speaker control) of the present invention, and Figure 8 is a schematic diagram of the workflow of each participant in Figure 7; By performing queue query and priority comparison measures, disputes and conflicts in Figure 3 can be avoided.
如图9所示,示出了本发明提供的一种基于SOA架构的车端服务调用处理系统一个实施例的结构示意图。一并结合图10至图12所示,在本实施例中,所述系统1集成于服务提供方与服务请求方之间的SOME/IP中间件中,其至少包括:As shown in FIG9 , 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 is shown. Combined with FIGS. 10 to 12 , in this embodiment, the system 1 is integrated into the SOME/IP middleware between the service provider and the service requester, which at least includes:
服务调用获取单元10,用于接收来自服务请求方的对方法类(Method)服务的服务调用请求,并获得服务调用请求中的请求参数;所述请求参数至少包括:服务序号(ServiceID)、方法序号(MethodID)、请求方序号(ClientID)、会话序号(SessionID)以及负载(Payload);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);
调用队列建立单元11,用于获得所述请求参数对应的动作序号(ActionID)以及所述动作序号所对应的优先级信息,并将至少部分请求参数、动作序号及优先级信息存储进所请求调用的服务对应的当前调用队列中;A call queue establishment unit 11 is 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 requested service;
仲裁处理单元12,用于根据所述动作序号对应的优先级信息对本次服务调用请求进行仲裁处理;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;
服务调用处理单元13,用于在仲裁处理单元的仲裁结果为仲裁通过后,调用所述方法类服务并执行;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;
调用队列信息删除单元14,在执行完成后,删除所述调用队列中当前动作序号对应的服务请求方相关信息;A call queue information deleting unit 14, after execution is completed, deletes the service requester related information corresponding to the current action sequence number in the call queue;
动作序号关联设置单元16,用于预先为成对出现的功能项中的动作序号设置前置动作序号;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;
调用源溯源清单更新单元15,用于在车辆端在初始化时,从云端查询并获得最新的调用源溯源清单并存储,所述调用源溯源清单中包含有多条记录,每一记录包含服务序号、方法序号、动作序号以及优先级信息,所述优先级信息包含优先级及子优先级值。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.
如图10所示,所述调用队列建立单元11进一步包括:As shown in FIG10 , the calling queue establishing unit 11 further includes:
调用源确定单元110,用于根据所述请求参数查询预先存储的调用源溯源清单,确定所述请求的方法类服务是否需要纳入调用源管理;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;
动作序号信息获取单元111,用于根据所述请求参数映射生成或查询所述调用源溯源清单的方式获得当前服务调用请求对应的动作序号,以及所述动作序号所对应的优先级信息;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;
存储单元112,用于将至少部分请求参数、动作序号及优先级信息通过添加接口存储进所请求调用的服务对应的当前调用队列中。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.
如图11所示,所述仲裁处理单元12进一步包括:As shown in FIG11 , the arbitration processing unit 12 further includes:
查询单元120,用于根据所述动作序号查询当前调用队列中是否存在具有相同名称的其他动作序号;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;
当前动作序号仲裁处理单元121,用于在查询单元在查询到不存在则直接确定仲裁通过;以及在查询单元查询到存在,则将当前动作序号的优先权信息与相同名称的其他动作序号的优先级信息进行对比,在当前动作序号的优先权为最高优先权时,确定仲裁通过;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;
前置动作序号仲裁处理单元122,用于判断当前调用队列中是否存在所述当前动作序号的前置动作序列,如果存在,则将当前动作序号的优先权信息与当前调用队列中前置动作序号的优先级信息进行对比,在当前动作序号的优先权为最高优先权时,确定仲裁通过。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.
如图12所示,所述调用队列信息删除单元13具体包括:As shown in FIG. 12 , the calling queue information deleting unit 13 specifically includes:
当前动作序号信息删除单元130,用于在当前方法类服务执行完成后,在调用队列中删除当前动作序号对应的信息,包括:服务序号、方法序号、请求方序号、会话序号、当前动作序号及优先级信息;The current action sequence number information deleting 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;
前置动作序号信息删除单元131,用于在当前方法类服务执行完成后,在调用队列中删除当前动作序号的前置动作序号所对应的信息,包括:服务序号、方法序号、请求方序号、会话序号、前置动作序号及优先级信息。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.
更多的细节,可以参考并结合前述对图4至图8所描述的方法,在此不进行赘述。For more details, please refer to and combine the methods described in Figures 4 to 8 above, which will not be described in detail here.
相应地,本发明的再一方面,还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现前述的图4至图8描述方法的步骤。更多的细节,可以参考并结合前述对图4至图8所描述的方法,在此不进行赘述。Accordingly, another aspect of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method described in the aforementioned Figures 4 to 8 are implemented. For more details, reference can be made to and in combination with the aforementioned method described in Figures 4 to 8, which will not be described in detail here.
相应地,本发明的再一方面,还提供一种车辆,其设置有车端服务的服务提供方与服务请求方,所述服务提供方与所述服务请求方之间通过SOME/IP协议实现远程过程调用,在SOME/IP中间件中集成的有前述图9至图12描述的基于SOA架构的车端服务调用处理系统。更多的细节,可以参考并结合前述对图9至图12所描述的内容,在此不进行赘述。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, wherein the service provider and the service requester implement remote procedure calls through the SOME/IP protocol, and the vehicle-side service call processing system based on the SOA architecture described in the above-mentioned Figures 9 to 12 is integrated in the SOME/IP middleware. For more details, please refer to and combine the above-mentioned contents described in Figures 9 to 12, which will not be repeated here.
实施本发明实施例,具有如下的有益效果:The implementation of the embodiments of the present invention has the following beneficial effects:
本发明实施例提供一种基于SOA架构的车端服务调用处理方法、系统、存储介质及车辆。通过在当前SOME/IP协议中的RPC调用流程中加入了调用源管理功能,建立队列管理机制,通过采用当前调用队列可实现对方法类服务调用的历史进行溯源;并根据特定调用参数生成动作序号,根据动作序号对应的优先级信息为当前远程过程调用进行仲裁。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.
实施本发明,通过在服务内部建立队列管理机制及服务调用者、提供者之间的动态ID(动作序号),一方面可动态监控当前功能的所有有效调用者,另一方面可针对具体的调用者实施功能仲裁避免对其他调用者功能产生影响。可以有效地减少应用层的监控行为及重复调用行为,减少代码量及通信数据量及改善因功能切换产生的不良体验,从而提高远程过程调用的效率以及安全性;同时,可以降低汽车SOA服务架构开发及维护的成本。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.
本领域内的技术人员应明白,本发明的实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。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.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box 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 produce a device for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosure is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights 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 (15)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310158952.5A CN118540376A (en) | 2023-02-23 | 2023-02-23 | SOA-based vehicle-end service call processing method, system, storage medium and vehicle |
| PCT/CN2023/114538 WO2024174486A1 (en) | 2023-02-23 | 2023-08-23 | Soa architecture-based vehicle-side service call processing method, system, storage medium, and vehicle |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310158952.5A CN118540376A (en) | 2023-02-23 | 2023-02-23 | SOA-based vehicle-end service call processing method, system, storage medium and vehicle |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118540376A true CN118540376A (en) | 2024-08-23 |
Family
ID=92390278
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310158952.5A Pending CN118540376A (en) | 2023-02-23 | 2023-02-23 | SOA-based vehicle-end service call processing method, system, storage medium and vehicle |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN118540376A (en) |
| WO (1) | WO2024174486A1 (en) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9800644B2 (en) * | 2014-08-08 | 2017-10-24 | Software Ag | Service oriented query and service query language framework |
| CN112291124B (en) * | 2020-09-27 | 2021-12-14 | 上海赫千电子科技有限公司 | Vehicle-mounted network ECU communication method based on SOME/IP protocol |
| CN114785474B (en) * | 2022-03-31 | 2024-02-20 | 上海赫千电子科技有限公司 | In-vehicle SOME/IP transmission method and device based on TSN time-sensitive network |
| CN114844839A (en) * | 2022-04-14 | 2022-08-02 | 重庆长安汽车股份有限公司 | Service call request arbitration method of vehicle-mounted SOA system |
| CN114978880B (en) * | 2022-05-23 | 2024-02-13 | 南昌智能新能源汽车研究院 | Service call chain tracking method, system, computer and storage medium |
| CN115687015A (en) * | 2022-10-25 | 2023-02-03 | 重庆长安汽车股份有限公司 | Service state feedback method, device, equipment and medium based on SOA (service oriented architecture) |
-
2023
- 2023-02-23 CN CN202310158952.5A patent/CN118540376A/en active Pending
- 2023-08-23 WO PCT/CN2023/114538 patent/WO2024174486A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| WO2024174486A1 (en) | 2024-08-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106452841A (en) | Method for using transport quality of service in Robot Operating System | |
| CN110289965B (en) | Application service management method and device | |
| CN113556359B (en) | Communication protocol conversion method, device, system and gateway device | |
| CN110933188A (en) | Remote service calling method, system, server and storage medium | |
| CN111984561A (en) | A kind of IPMI command processing method, system, device and medium of BMC | |
| CN115357403A (en) | Micro-service system for task scheduling and task scheduling method | |
| CN118921652A (en) | IMS DC application program downloading method, system, device and IMS network | |
| CN114979157A (en) | Load balancing method, system, storage medium and computer based on SOME/IP protocol | |
| CN116248629B (en) | A registration optimization method for SCA device components | |
| GB2607871A (en) | Improvements in and relating to multi-access edge computing (MEC) | |
| CN117453428A (en) | Service message pushing method and device, electronic equipment and storage medium | |
| EP2372544A1 (en) | Distributed system | |
| CN111615819B (en) | A method and apparatus for transmitting data | |
| CN118540376A (en) | SOA-based vehicle-end service call processing method, system, storage medium and vehicle | |
| CN105760973A (en) | Business processing method and device | |
| CN105427149A (en) | Cross-border e-commerce BPO service method and device based on SOA expansion framework | |
| CN113315689B (en) | Information processing method, system, electronic device and readable storage medium | |
| CN118646808A (en) | Communication protocol switching method, device, storage medium and electronic device | |
| CN113472687A (en) | Data processing method and device | |
| CN118646714A (en) | Vehicle data transmission method, device, electronic device and storage medium | |
| CN113141387A (en) | Service subscription method, device and system | |
| CN116881040A (en) | Service operation processing method and device, electronic device and storage medium | |
| CN117319224A (en) | Implementation method and implementation system of automobile bus virtual channel | |
| CN115914340A (en) | BMC communication method, system, equipment and storage medium | |
| CN114390097A (en) | Block chain operation method and system based on message queue and application thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |