CN117075910B - Signal service conversion system, code generation method, vehicle, and program product - Google Patents

Signal service conversion system, code generation method, vehicle, and program product Download PDF

Info

Publication number
CN117075910B
CN117075910B CN202311317953.6A CN202311317953A CN117075910B CN 117075910 B CN117075910 B CN 117075910B CN 202311317953 A CN202311317953 A CN 202311317953A CN 117075910 B CN117075910 B CN 117075910B
Authority
CN
China
Prior art keywords
service
signal
module
information
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311317953.6A
Other languages
Chinese (zh)
Other versions
CN117075910A (en
Inventor
陈志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jidu Technology Co Ltd
Original Assignee
Beijing Jidu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jidu Technology Co Ltd filed Critical Beijing Jidu Technology Co Ltd
Priority to CN202311317953.6A priority Critical patent/CN117075910B/en
Publication of CN117075910A publication Critical patent/CN117075910A/en
Application granted granted Critical
Publication of CN117075910B publication Critical patent/CN117075910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a signal service conversion system, a code generation method, a vehicle and a program product, and belongs to the technical field of communication. The system is used for a vehicle and comprises a service agent module and a signal service conversion frame, wherein the service agent module comprises a plurality of services, the signal service conversion frame comprises a service signal conversion module, and the service signal conversion module comprises format information of control signals and control requirement information of an actuator; after the target service is called, the target service is used for sending a target instruction; the service signal conversion module is used for receiving the target instruction, analyzing the target instruction and acquiring parameter information of the target service; the service transfer signal module is also used for sending a control signal to the controller according to the format information of the control signal and the control requirement information of the actuator. The method and the device are used for solving the technical problem that after the whole vehicle communication protocol is changed, a service developer needs to repeatedly develop the service. The invention is used for signal service conversion of the vehicle.

Description

Signal service conversion system, code generation method, vehicle, and program product
Technical Field
The present invention relates to the field of communication technology, and more particularly, to a signal service conversion system, a code generation method, a vehicle, and a program product.
Background
Under a Service-oriented architecture (SOA) of a vehicle, a plurality of services are included in the vehicle, each corresponding to a function of the vehicle, such as door opening, positioning, and the like. When the client calls the service, a control signal is sent to the corresponding controller, wherein the control signal comprises control parameters. For example, after the client invokes the door service of the vehicle, a control signal is sent to the door controller of the vehicle to control the opening or closing of the vehicle door. In order for the controller to perform the correct actions, the control parameters need to be transmitted according to format information predefined in the whole vehicle communication protocol. For the service developer, development of the service is required in accordance with format information predetermined in the whole vehicle communication protocol. If the whole vehicle communication protocol changes, the corresponding format information also changes, so that a service developer also needs to re-develop the service.
Disclosure of Invention
It is an object of the present invention to provide a new solution for signal service conversion.
According to a first aspect of the present invention, there is provided a signal service conversion system for a vehicle, the system comprising a service agent module and a signal service conversion framework, the service agent module comprising a plurality of services, the signal service conversion framework comprising a service-to-signal module, the service-to-signal module being generated from a database file of a communication protocol of the vehicle;
after a target service in the plurality of services is called, the target service is used for sending a target instruction to the service transfer signal module;
the service signal conversion module is used for receiving the target instruction, analyzing the target instruction and acquiring parameter information of the target service;
the service transfer signal module is further configured to send a control signal to a controller according to format information of a control signal required by an actuator corresponding to the target service and control requirement information of the actuator, where the control signal is used to instruct the controller to control the actuator corresponding to the target service to execute a corresponding operation according to parameter information of the target service.
Optionally, the service conversion framework further comprises a signal conversion service module;
The signal conversion service module is used for judging whether a state signal forwarded by the controller is received or not at intervals of a preset period, wherein the state signal is a signal sent to the controller after the executor executes corresponding operation according to the parameter information of the target service, and the state signal comprises the state information of a control object corresponding to the controller;
the signal conversion service module is further configured to, after receiving the status signal, parse the status signal according to a pre-configured parsing interface, obtain the status information included in the status signal, and send the status information to a service corresponding to the status signal according to a mapping relationship between the service and the status signal, where the parsing interface is generated according to a database file of a communication protocol of the vehicle.
Optionally, the status signal further includes E2E check information corresponding to the status information;
the signal conversion service module is further configured to obtain E2E verification information included in the status signal, verify the security of the status signal according to the E2E verification information, and send a security verification result of the status signal to a service corresponding to the status signal.
Optionally, the signal conversion service module is further configured to store the status information in the signal conversion service module after obtaining the status information included in the status signal;
the signal transfer service module is further configured to determine whether the state information is the same as the last state information of the control object after obtaining the state information included in the state signal;
the signal conversion service module is further configured to send, when the state information is different from the last state information of the control object, content in the state information, which is different from the last state information, to a service corresponding to the state signal according to a mapping relationship between the service and the state signal;
the signal conversion service module is further configured to send all contents in the state information to a service corresponding to the state signal according to a mapping relationship between the service and the state signal when the state information is the same as the last state information of the control object.
Optionally, the signal service conversion framework further comprises a storage module;
the target service is further used for judging whether the parameter information of the target service contains data needing to be stored in a durable manner, and when the parameter information of the target service contains the data needing to be stored in a durable manner, the data needing to be stored in the parameter information of the target service is sent to the storage module for storage;
And the storage module is used for providing the data needing to be stored in a persistent mode for the target service after the target service is restarted, and indicating the target service to operate according to the data needing to be stored in the persistent mode in the storage module.
Optionally, the service transfer signal module is further configured to generate E2E check information corresponding to the target instruction according to a preconfigured E2E check rule at intervals of a preset period, and send a control signal to the controller according to format information of a control signal required by an actuator corresponding to the target service and control requirement information of the actuator, where the control signal includes parameter information of the target service and the E2E check information;
the controller is used for controlling the executor corresponding to the target service to verify the target instruction according to the E2E verification information corresponding to the target instruction, and the executor executes corresponding operation according to the parameter information of the target service under the condition that verification is passed.
Optionally, the signal service conversion framework further comprises a connection management module;
the connection management module is used for realizing network connection between the signal service conversion frame and the controller according to a preset communication mode after the signal service conversion system is started;
The connection management module is further configured to monitor a network connection state between the signal service conversion frame and the controller, and after the signal service conversion frame is disconnected from the controller, implement network connection between the signal service conversion frame and the controller according to the preset communication mode again.
Optionally, the service agent module and the signal service conversion framework are deployed in different processes of the same host;
or the service agent module and the signal service conversion framework are deployed in the same process of the same host;
alternatively, the service agent module and the signal service conversion framework are deployed on different hosts.
According to a second aspect of the present invention, there is provided a code generation method based on the signal service conversion system of the first aspect of the present invention, including:
determining a correspondence between each service of the vehicle and a control signal;
analyzing a database file of a communication protocol of a vehicle and a configuration file of an actuator to obtain a full-quantity analysis interface and control requirement information of the actuator, wherein format information corresponding to various control signals is configured in the full-quantity analysis interface;
Screening the full-quantity analysis interfaces according to the corresponding relation between each service of the vehicle and the control signal, and determining an analysis interface corresponding to each service;
and generating a frame code of each service module, a code of a signal conversion service module and a code of a service signal conversion module according to the analysis interface corresponding to each service and a pre-configured template code.
According to a third aspect of the present invention there is provided a vehicle comprising the signal service conversion system of the first aspect of the present invention.
According to a fourth aspect of the present invention there is provided a computer program product comprising computer programs/instructions which when executed by a processor implement a method according to the second aspect of the present invention.
According to one embodiment of the invention, the service signal conversion module is arranged in the signal service conversion frame, and the format of the control signal and the control requirement of the executor are realized in the service signal conversion module and decoupled from the service module, so that a service developer does not need to care about the format of the control signal and the requirement of the controller, and after the database file of the communication protocol of the vehicle is changed, repeated development is not needed, thereby simplifying the work of the service developer.
Other features of the present invention and its advantages will become apparent from the following detailed description of exemplary embodiments of the invention, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic diagram of a signal service conversion system in an embodiment of the present application.
Fig. 2 is a flowchart of a code generation method of the signal service conversion system in the embodiment of the present application.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Under the service-oriented architecture of the vehicle, a plurality of services are included in the vehicle, each corresponding to a function of the vehicle, such as door opening, positioning, etc. When the client calls the service, a control signal is sent to the corresponding controller, wherein the control signal comprises control parameters. For example, after the client invokes the door service of the vehicle, a control signal is sent to the door controller of the vehicle to control the opening or closing of the vehicle door. In order for the controller to perform the correct actions, the control parameters need to be transmitted according to a data structure predefined in the overall vehicle communication protocol. For the service developer, development of the service is required in accordance with a data structure predetermined in the whole vehicle communication protocol. If the whole vehicle communication protocol changes, the corresponding data structure also changes, resulting in the need for the service developer to re-develop the service.
As shown in fig. 1, the present embodiment introduces a signal service conversion system for a vehicle, the system including a service agent module including a plurality of services and a signal service conversion frame including a service conversion signal module.
After a target service in the plurality of services is called, the target service is used for sending a target instruction to the service transfer signal module.
The service signal conversion module is used for receiving the target instruction, analyzing the target instruction and obtaining the parameter information of the target service.
The service transfer signal module is further configured to send a control signal to a controller according to format information of a control signal required by an actuator corresponding to the target service and control requirement information of the actuator, where the control signal is used to instruct the controller to control the actuator corresponding to the target service to execute a corresponding operation according to parameter information of the target service.
The service agent module comprises a plurality of services, and the client can call any service. When the client calls the target service, some parameters are transferred, and the parameter information of the target service comprises the parameters transferred by the client.
Such as the need to open a vehicle door, the client needs to invoke a door service. Vehicles include a plurality of doors, such as a driver's seat door, a passenger's seat door, a rear seat left side door, a rear seat right side door, etc., where a client needs to specify a door when invoking a door service, the parameters passed by the client include the ID of the door. Meanwhile, the client can also specify the opening angle of the vehicle door, and then the parameters transmitted by the client also comprise the opening angle of the vehicle door.
After the client calls the target service, the target service sends a target instruction to a service signal conversion module in the signal service conversion frame, wherein the target instruction comprises parameters transferred when the client calls the target service. For example, the client calls the door service, and then the target instruction includes the ID of the door and the opening angle of the door.
One service may have multiple functions, each corresponding to a different service transfer signal module. The service provides a plurality of interfaces to the client, and different functions of the service correspond to different interfaces. The client calls the required interface according to the own requirement. And the service sends a target instruction to the corresponding service transfer signal module according to the interface called by the client. For example, a service has a function 1 and a function 2, and when the client calls the interface of the function 1 of the service, the service sends a target instruction to the service transfer signal module corresponding to the function 1.
The service transfer signal module is generated according to the database file of the communication protocol of the vehicle, and format information of control signals required by the actuator corresponding to the service transfer signal module and control requirement information of the actuator are configured in the service transfer signal module. The format information of the control signals required for all actuators in the vehicle is specified in a database file of the communication protocol of the vehicle. For example, the vehicle uses the CAN (Controller Area Network ) communication protocol, then the database file of the communication protocol of the vehicle is DBC (Data Base CAN) file. By parsing the database file of the communication protocol of the vehicle, the format information of the control signals required by each actuator in the vehicle can be obtained. The format information of the control signal specifies the structure of the data message, e.g. the first four bits of the data message represent the ID of the control signal, and the last four bits of the data message represent specific control parameters. The format information of different control signals can be different, and the format information of the control signals is specified according to actual needs. A configuration file storing control requirement information of each actuator is also included in the vehicle. The manner in which the data message is received may vary from one actuator to another. For example, the corresponding operation may be performed after the executor a needs to continuously receive three frames of data messages, and the executor B may perform the corresponding operation only by receiving one frame of data messages. And generating a corresponding service transfer signal module according to the format information of the control signal required by the actuator and the control requirement information of the actuator. After receiving the target instruction, the service transfer signal module analyzes the target instruction to obtain parameter information of the target service, namely parameters transferred when the client calls the target service. And then generating a corresponding control signal according to the format information of the control signal required by the actuator, and sending the control signal to the controller according to the control requirement information of the actuator.
A controller and an actuator are included in the vehicle, the controller may control the actuator to perform corresponding actions. The controller may be a vehicle control unit. The actuators for controlling specific components of the vehicle, such as the actuators may include a door actuator for controlling a door of the vehicle, a lamp actuator for controlling a lamp of the vehicle, an air conditioner actuator for controlling an air conditioner, and the like.
The control signal sent by the service transfer signal module to the controller contains the parameter information of the target service. The controller sends a control signal to an actuator corresponding to the target service according to the parameter information of the target service, and the actuator executes corresponding operation after receiving the control signal. For example, the parameter information of the target service includes the ID of the driver's door, and the actuator controls the driver's door to open.
The invention sets the service signal conversion module in the signal service conversion frame, realizes the control requirement of the control signal format and the executor in the service signal conversion module, and decouples the service signal conversion module from the service module, so that a service developer does not need to care about the control signal format and the requirement of the controller, and does not need to repeatedly develop after the database file of the communication protocol of the vehicle changes, thereby simplifying the development work.
In this embodiment, the service conversion framework further includes a signal conversion service module.
The signal conversion service module is used for judging whether a state signal forwarded by the controller is received or not at intervals of a preset period, wherein the state signal is a signal sent to the controller after the executor executes corresponding operation according to the parameter information of the target service, and the state signal comprises the state information of a control object corresponding to the controller.
The signal conversion service module is further configured to parse the status signal according to a pre-configured parsing interface (Application Program Interface ) after receiving the status signal, obtain the status information included in the status signal, and send the status information to a service corresponding to the status signal according to a mapping relationship between the service and the status signal, where the parsing interface is generated according to a database file of a communication protocol of the vehicle.
After the executor finishes execution, the executor can return the state of the control object. The status signal sent by the actuator to the controller contains the status information of the control object, for example, the actuator is the actuator for controlling the vehicle door, and then the status signal includes the status of the vehicle door.
The actuator transmits the status signal once at regular intervals, and the number of times of transmitting the status signal is determined according to the control requirement of the actuator itself. After the signal transfer service module receives the state signal sent by a certain executor for the first time, the signal transfer service module calls a timer to start timing, and periodically detects the state signal. The signal transfer service module detects whether the state signal of the actuator is received or not at regular intervals, and the detection period of the signal transfer service module is the same as the period of the actuator for sending the state signal. If the signal transfer service module does not receive the status signal after starting the periodic detection, the status signal is lost. If the time interval between two adjacent signal transfer service modules receives the state signal exceeds the detection period, the state signal is delayed, and the state signal is considered to be an unsafe signal and is discarded.
After the signal conversion service module receives the state signal, the state signal is analyzed. And a resolving interface is pre-configured in the signal conversion service module, and the state signal is resolved through the resolving interface. The status signal transmitted by the actuator is also in compliance with a data format specified in a database file of a communication protocol of the vehicle, and the analysis interface is also generated from the database file of the communication protocol of the vehicle, so that the status information contained in the status signal can be analyzed by the analysis interface.
The signal transfer service module is also pre-configured with the corresponding relation between each status signal and the service. The signal conversion service module sends the state information to the service corresponding to the state signal. A status signal may correspond to a plurality of services, and the signal transfer service module may send status information of the status signal to the plurality of services corresponding to the status signal. There are various services that decide how to use the state information based on their own business logic.
For example, the vehicle has a speed service by which the speed of the vehicle can be controlled. When the vehicle speed service is called, the vehicle speed of the vehicle is adjusted by the actuator of the vehicle according to the parameter called by the vehicle speed service, and the current vehicle speed of the vehicle is contained in the state signal returned by the actuator after the vehicle speed is adjusted. The speed service requires the current speed of the vehicle. The display service in the vehicle also requires the current speed of the vehicle, which the display service can display on the display screen of the vehicle. The signal transduction service module transmits the current speed of the vehicle to the speed service and the display service.
In this embodiment, the status signal further includes E2E (End to End) check information corresponding to the status information. The signal conversion service module is further configured to obtain E2E verification information included in the status signal, verify the security of the status signal according to the E2E verification information, and send a security verification result of the status signal to a service corresponding to the status signal.
The status signal contains both status information and E2E check information, and the E2E check information is generated based on the status information. After the state signal is analyzed, state information and E2E verification information contained in the state signal are obtained. And the signal conversion service module verifies the state signal according to the E2E verification information, and verifies the safety of the state signal. For example, whether the message of the state signal is lost or not is judged through E2E verification, and if the message frame is lost, E2E verification is not passed. The E2E check information includes CRC (Cyclic Redundancy Check ) check information and a counter, and the value of the counter is incremented each time the E2E check information is generated. After the signal transfer service module acquires the E2E check information, the accuracy of the state information is verified according to the CRC check information in the E2E check information. The signal transfer service module also verifies continuity of the status signal according to the value of the counter in the E2E check information, for example, if the value of the counter in the E2E check information in the previous status signal is 3, then the value of the counter in the E2E check information in the current status signal should be 4. If the value of the counter in the E2E check information in the present status signal is 6, indicating that the status signal is not continuous, then the status signal is considered unsafe.
In this embodiment, the signal conversion service module is further configured to store the status information in the signal conversion service module after obtaining the status information included in the status signal.
The signal transfer service module is further configured to determine whether the status information is the same as the last status information of the control object after obtaining the status information included in the status signal.
The signal conversion service module is further configured to send, when the state information is different from the last state information of the control object, content in the state information, which is different from the last state information, to a service corresponding to the state signal according to a mapping relationship between the service and the state signal.
The signal conversion service module is further configured to send all contents in the state information to a service corresponding to the state signal according to a mapping relationship between the service and the state signal when the state information is the same as the last state information of the control object.
After the signal conversion service module analyzes the state signal, the signal conversion service module stores the state information. And the signal conversion service modules store state information corresponding to different controls respectively.
The signal conversion service module compares the state information which is analyzed currently with the state information of the same control object which is stored in the signal conversion service module and is the last time, and if the comparison result is different, the content which is different from the state information of the last time in the current state information is sent to the corresponding service. For example, the state in which the window of the vehicle is stored in the signal transduction service module is a closed state. When the window actuator controls the window to be opened, the window actuator sends a state signal containing the state of the window as the opening state, the signal conversion service module obtains the state of the window as the opening state after analyzing the state signal, and the state of the window is compared to obtain that the state of the window is changed, so that the opening state of the window is sent to corresponding service.
In this embodiment, the signal service conversion framework further includes a storage module.
The target service is further configured to determine whether the parameter information of the target service includes data to be stored in a persistent manner, and send the data to be stored in the persistent manner included in the parameter information of the target service to the storage module for storage when the parameter information of the target service includes the data to be stored in the persistent manner.
And the storage module is used for providing the data needing to be stored in a persistent mode for the target service after the target service is restarted, and indicating the target service to operate according to the data needing to be stored in the persistent mode in the storage module.
The data to be persisted may be parameters set by the user. For example, the vehicle comprises an air-conditioning service, the air-conditioning service receives a calling instruction of the client, the temperature of the air conditioner is designated as 25 ℃ in the calling instruction, and the temperature parameter of the air conditioner is data of a preset type, and then the air-conditioning service sends the temperature parameter to the storage module for storage. And after the vehicle is powered on again, the air conditioning service reads the temperature parameter from the storage module and adjusts the temperature according to the read temperature parameter.
The data to be persistently stored may also be a combined mode of operation of multiple components of the vehicle. For example, the exterior lamp mode of the vehicle includes the states of a plurality of lamps such as a low beam lamp, a fog lamp, a position lamp, and the like of the vehicle. When the user selects the exterior lamp mode, the lamp actuator of the vehicle controls the lamp actuator according to the states of the lamps corresponding to the exterior lamp mode.
According to the embodiment, the data needing to be stored in a lasting mode are stored in the storage module, and after the service is restarted, the corresponding data can be directly read from the storage module and executed, so that the user does not need to manually set parameters, and convenience is improved.
In this embodiment, the service transfer signal module is further configured to generate E2E check information corresponding to the target instruction according to a preconfigured E2E check rule at intervals of a preset period, and send a control signal to the controller according to format information of a control signal required by an actuator corresponding to the target service and control requirement information of the actuator, where the control signal includes parameter information of the target service and the E2E check information.
The controller is used for controlling the executor corresponding to the target service to verify the target instruction according to the E2E verification information corresponding to the target instruction, and the executor executes corresponding operation according to the parameter information of the target service under the condition that verification is passed.
When the client calls the target service, the target service can send out a target instruction. For example, the target instruction is a periodic type of instruction, then it is stated that the target instruction needs to be issued multiple times at a specified period. For example, for an actuator for controlling a vehicle door, the actuator is configured to control the vehicle door after repeating the receiving of the control signal three times. If the actuator receives the control signal only once, the door is not controlled. And after the client calls the gate service, the target instruction sent by the gate service is received by the service transfer signal module. The service signal transfer module calls the timer module to time, and repeatedly sends the control signal for three times according to a preset period, so that the actuator can repeatedly receive the control signal for three times, and the actuator can control the vehicle door.
E2E verification information corresponding to the target instruction is generated in the service transfer signal module according to a pre-configured E2E verification rule. The service transfer signal module generates a corresponding control signal according to the format information of the control signal required by the executor, and the generated control signal contains the parameter information of the target service and E2E verification information. For example, the format information of the control signal required by the executor specifies the position of the parameter information in the message and the position of the E2E check information in the message, and the service transfer signal module fills the parameter information of the target service into the message according to the position of the parameter information in the message, and fills the E2E check information into the message according to the position of the E2E check information in the message.
After receiving the control signal, the executor analyzes the control signal to obtain the parameter information of the target service and the corresponding E2E verification information. And the executor performs verification according to the E2E verification, and if the verification passes, the executor performs execution according to the parameter information of the target service. If the check is not passed, the actuator does not perform.
In this embodiment, the signal service conversion framework further includes a connection management module. And the connection management module is used for realizing network connection between the signal service conversion frame and the controller according to a preset communication mode after the signal service conversion system is started.
The connection management module is further configured to monitor a network connection state between the signal service conversion frame and the controller, and after the signal service conversion frame is disconnected from the controller, implement network connection between the signal service conversion frame and the controller according to the preset communication mode again.
The connection management module may manage a network connection between the controller and the service transfer signaling module. Such as a TCP connection between the service transfer signal module and the controller.
The connection management module may also manage network connections between the controller and the signal transfer service module, such as TCP or UDP connections between the signal transfer service module and the controller.
In this embodiment, the service proxy module and the signal service conversion framework are deployed in different processes of the same host.
In this embodiment, the service proxy module and the signal service conversion framework are deployed in the same process of the same host.
In this embodiment, the service proxy module and the signal service conversion framework are deployed on different hosts.
The service agent module and the signal service conversion frame are split, so that the service agent module and the signal service conversion frame can be freely deployed, and the flexibility of the system is improved.
As shown in fig. 2, the present embodiment describes a code generation method of a signal service conversion system, including steps 2100-2400.
Step 2100: a correspondence between each service of the vehicle and a control signal is determined.
And carrying out service design according to the actual service requirements of the vehicle, and determining the service corresponding to each service. One service may be completed by one service alone, or one service may be completed by a plurality of services in cooperation. Different services are performed by different actuators, each actuator corresponding to a respective control signal. The services and signals required by the services can be correspondingly saved in the configuration document.
Step 2200: analyzing a database file of a communication protocol of a vehicle and a configuration file of an actuator to obtain a full-quantity analysis interface and control requirement information of the actuator, wherein format information corresponding to various control signals is configured in the full-quantity analysis interface.
The format information of all control signals is specified in a database file of the communication protocol of the vehicle. The full resolution interface includes an interface used in the process of transferring a signal to a service and an interface used in the process of transferring a signal to a service. The configuration file of the actuator stores control requirement information of each actuator of the vehicle, for example, the actuator needs to send a few frames of data messages.
Step 2300: and screening the full-quantity analysis interfaces according to the corresponding relation between each service of the vehicle and the control signal, and determining the analysis interface corresponding to each service.
And for each service, screening out a corresponding analysis interface according to the signal required by the service, and filtering out the analysis interface corresponding to the signal not required by the service. The signal can be resolved through the resolution interface selected by the screen.
Step 2400: and generating a frame code of each service module, a code of a signal conversion service module and a code of a service signal conversion module according to the analysis interface corresponding to each service and a pre-configured template code.
After the frame code of the service module is generated, the service developer only needs to fill the code of the service processing logic in the frame code of the service according to specific service requirements. The code of the signal service conversion framework comprises the code of the service conversion signal module and the code of the signal conversion service module. The code of the signal transfer service module and the code of the service transfer signal module are also automatically generated. For other modules in the signal service conversion framework, such as a timer module, a storage module, a connection management module, a state machine, etc., manual development by a developer is required.
The embodiment reduces the code quantity manually developed by a user by automatically generating the frame code of the service and the code of the signal service conversion frame.
This embodiment describes a vehicle including a signal service conversion system according to any one of the embodiments of the present invention.
This embodiment describes a computer program product comprising a computer program/instruction which when executed by a processor implements a code generation method of a signal service conversion system according to any of the embodiments of the invention.
The methods in this application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described herein are performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a network device, a user device, a core network device, an OAM, or other programmable apparatus.
The computer program or instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program or instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired or wireless means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The usable medium may be a magnetic medium, e.g., floppy disk, hard disk, tape; but also optical media such as digital video discs; but also semiconductor media such as solid state disks. The computer readable storage medium may be volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage medium.
The computer programs/instructions described herein may be downloaded from a computer readable storage medium to the individual computing/processing devices or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present invention may be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information for computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvement of the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (9)

1. A signal service conversion system for a vehicle, the system comprising a service agent module and a signal service conversion framework, the service agent module comprising a plurality of services, the signal service conversion framework comprising a service-to-signal module, the service-to-signal module being generated from a database file of a communication protocol of the vehicle;
after a target service in the plurality of services is called, the target service is used for sending a target instruction to the service transfer signal module;
The service signal conversion module is used for receiving the target instruction, analyzing the target instruction and acquiring parameter information of the target service;
the service transfer signal module is further configured to generate a corresponding control signal according to format information of a control signal required by an actuator corresponding to the target service, and send the control signal to a controller according to control requirement information of the actuator, where the control signal is used to instruct the controller to control the actuator corresponding to the target service to execute a corresponding operation according to parameter information of the target service;
the format information of the control signal comprises the structure of the data message of the control signal, and the control requirement information of the actuator comprises the requirement of the actuator on the frame number of the data message of the control signal;
the service conversion framework also comprises a signal conversion service module;
the signal conversion service module is used for judging whether a state signal forwarded by the controller is received or not at intervals of a preset period, wherein the state signal is a signal sent to the controller after the executor executes corresponding operation according to the parameter information of the target service, and the state signal comprises the state information of a control object corresponding to the controller; the signal conversion service module is further configured to, after receiving the status signal, parse the status signal according to a pre-configured parsing interface, obtain the status information included in the status signal, and send the status information to a service corresponding to the status signal according to a mapping relationship between the service and the status signal, where the parsing interface is generated according to a database file of a communication protocol of the vehicle.
2. The system of claim 1, wherein the status signal further comprises E2E verification information corresponding to the status information;
the signal conversion service module is further configured to obtain E2E verification information included in the status signal, verify the security of the status signal according to the E2E verification information, and send a security verification result of the status signal to a service corresponding to the status signal.
3. The system of claim 1, wherein the signal transfer service module is further configured to store the status information in the signal transfer service module after obtaining the status information contained in the status signal;
the signal transfer service module is further configured to determine whether the state information is the same as the last state information of the control object after obtaining the state information included in the state signal;
the signal conversion service module is further configured to send, when the state information is different from the last state information of the control object, content in the state information, which is different from the last state information, to a service corresponding to the state signal according to a mapping relationship between the service and the state signal;
The signal conversion service module is further configured to send all contents in the state information to a service corresponding to the state signal according to a mapping relationship between the service and the state signal when the state information is the same as the last state information of the control object.
4. The system of claim 1, wherein the signal service conversion framework further comprises a memory module;
the target service is further used for judging whether the parameter information of the target service contains data needing to be stored in a durable manner, and when the parameter information of the target service contains the data needing to be stored in a durable manner, the data needing to be stored in the parameter information of the target service is sent to the storage module for storage;
and the storage module is used for providing the data needing to be stored in a persistent mode for the target service after the target service is restarted, and indicating the target service to operate according to the data needing to be stored in the persistent mode in the storage module.
5. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
the service transfer signal module is further configured to generate E2E check information corresponding to the target instruction according to a preconfigured E2E check rule at intervals of a preset period, and send a control signal to the controller according to format information of a control signal required by an actuator corresponding to the target service and control requirement information of the actuator, where the control signal includes parameter information of the target service and the E2E check information;
The controller is used for controlling the executor corresponding to the target service to verify the target instruction according to the E2E verification information corresponding to the target instruction, and the executor executes corresponding operation according to the parameter information of the target service under the condition that verification is passed.
6. The system of claim 1, wherein the signal service conversion framework further comprises a connection management module;
the connection management module is used for realizing network connection between the signal service conversion frame and the controller according to a preset communication mode after the signal service conversion system is started;
the connection management module is further configured to monitor a network connection state between the signal service conversion frame and the controller, and after the signal service conversion frame is disconnected from the controller, implement network connection between the signal service conversion frame and the controller according to the preset communication mode again.
7. The system of claim 1, wherein the service agent module and the signal service transformation framework are deployed at different processes of the same host;
or the service agent module and the signal service conversion framework are deployed in the same process of the same host;
Alternatively, the service agent module and the signal service conversion framework are deployed on different hosts.
8. A code generation method of a signal service conversion system according to any one of claims 1 to 7, comprising:
determining a correspondence between each service of the vehicle and a control signal;
analyzing a database file of a communication protocol of a vehicle and a configuration file of an actuator to obtain a full-quantity analysis interface and control requirement information of the actuator, wherein the full-quantity analysis interface is configured with format information corresponding to various control signals;
screening the full-quantity analysis interfaces according to the corresponding relation between each service of the vehicle and the control signal, and determining an analysis interface corresponding to each service;
and generating a frame code of each service module, a code of a signal conversion service module and a code of a service signal conversion module according to the analysis interface corresponding to each service and a pre-configured template code.
9. A vehicle comprising the signal service conversion system of any one of claims 1-7.
CN202311317953.6A 2023-10-12 2023-10-12 Signal service conversion system, code generation method, vehicle, and program product Active CN117075910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311317953.6A CN117075910B (en) 2023-10-12 2023-10-12 Signal service conversion system, code generation method, vehicle, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311317953.6A CN117075910B (en) 2023-10-12 2023-10-12 Signal service conversion system, code generation method, vehicle, and program product

Publications (2)

Publication Number Publication Date
CN117075910A CN117075910A (en) 2023-11-17
CN117075910B true CN117075910B (en) 2024-01-16

Family

ID=88717340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311317953.6A Active CN117075910B (en) 2023-10-12 2023-10-12 Signal service conversion system, code generation method, vehicle, and program product

Country Status (1)

Country Link
CN (1) CN117075910B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535740A (en) * 2019-08-29 2019-12-03 华人运通(江苏)技术有限公司 Signal processing method, device, storage medium and terminal
KR102122376B1 (en) * 2019-01-09 2020-06-12 주식회사 지쓰리 Connected gateway for vehicle
CN114285691A (en) * 2021-12-22 2022-04-05 重庆金康赛力斯新能源汽车设计院有限公司 Vehicle function implementation method and device and electronic equipment
CN114884912A (en) * 2022-04-12 2022-08-09 阿尔特汽车技术股份有限公司 Communication method, system, equipment and computer readable storage medium of SOA architecture
CN115421728A (en) * 2022-09-22 2022-12-02 联仁健康医疗大数据科技股份有限公司 Business code generation method and device, electronic equipment and storage medium
CN116009461A (en) * 2023-02-21 2023-04-25 长城汽车股份有限公司 Vehicle controller, system, method, vehicle and storage medium
CN116684455A (en) * 2023-06-25 2023-09-01 中国第一汽车股份有限公司 Method and device for remotely controlling vehicle, storage medium and vehicle

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102122376B1 (en) * 2019-01-09 2020-06-12 주식회사 지쓰리 Connected gateway for vehicle
CN110535740A (en) * 2019-08-29 2019-12-03 华人运通(江苏)技术有限公司 Signal processing method, device, storage medium and terminal
CN114285691A (en) * 2021-12-22 2022-04-05 重庆金康赛力斯新能源汽车设计院有限公司 Vehicle function implementation method and device and electronic equipment
CN114884912A (en) * 2022-04-12 2022-08-09 阿尔特汽车技术股份有限公司 Communication method, system, equipment and computer readable storage medium of SOA architecture
CN115421728A (en) * 2022-09-22 2022-12-02 联仁健康医疗大数据科技股份有限公司 Business code generation method and device, electronic equipment and storage medium
CN116009461A (en) * 2023-02-21 2023-04-25 长城汽车股份有限公司 Vehicle controller, system, method, vehicle and storage medium
CN116684455A (en) * 2023-06-25 2023-09-01 中国第一汽车股份有限公司 Method and device for remotely controlling vehicle, storage medium and vehicle

Also Published As

Publication number Publication date
CN117075910A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN106796538B (en) Gateway device, in-vehicle network system, and firmware update method
US9923893B2 (en) Simplified IoT services for cloud environments
EP2013575B1 (en) Communication device for emulating a behavior of a navigation device
US10922113B2 (en) Method for vehicle based data transmission and operation among a plurality of subscribers through formation of virtual machines
US10261772B2 (en) Method and device for generating image file
CN111193602B (en) Automatic operation and maintenance management system and method
US20240073292A1 (en) Universal software communication bus
CN109614147A (en) A kind of PHY register reading/writing method and device
CN111611054A (en) Application deployment method and device
CN115618567A (en) Drive-by-wire function test method for vehicle, electronic device, medium, and program product
CN117075910B (en) Signal service conversion system, code generation method, vehicle, and program product
CN114416169A (en) Data processing method, medium, device and computing equipment based on micro front end
CN112394675B (en) Monitoring system, method and server for rail transit
CN111124417B (en) Industrial control program compiling method and device, computer equipment and storage medium
KR100824298B1 (en) Method for scheduling device management and terminal thereof
KR20200087673A (en) Electronic message adaptation
CN116360969B (en) Intelligent edge computing gateway and method for automatically accessing video and audio equipment
JP2022500740A (en) How to deploy resources required for network functions, equipment, storage media and electronic equipment
CN113852474B (en) Task processing method, gateway, computer readable storage medium and electronic device
CN114567559A (en) Training method and device of data analysis model and storage medium
CN112579235A (en) Method, transcoding center, client, device and medium for internationalizing response data
CN111988283A (en) Data transmission method, system, device and computer readable storage medium
EP4155844A1 (en) Remote function customization method and apparatus, device, and storage medium
CN116405573B (en) Service-oriented architecture based system, communication method and computer program product
CN111158928B (en) Distributed system and communication method

Legal Events

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