A vehicle terminal data access and processing method based on Actor model

By using the Actor model to encapsulate and decouple the data access processing of on-board terminals in the Internet of Vehicles platform, the problems of thread resource waste and coupling are solved, efficient, secure and traceable data processing is achieved, and user experience and system maintenance capabilities are improved.

CN113986584BActive Publication Date: 2025-08-08WUHAN INTEST ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111382368.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2025-08-08
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

The prior art has problems such as wasted thread resources, high code complexity, serious coupling, difficulty in maintenance and poor user experience in the data access processing of on-board terminals in the Internet of Vehicles platform, which is difficult to meet the needs of efficient, safe and traceable data processing.

Method used

The Actor model is used to encapsulate the data access processing process of the vehicle terminal, and four Actor models are established: data reception, analysis, business logic, data delivery and resource release. The decoupling of each link is achieved through the message delivery mechanism, and the DDD design and reflection injection behavior expansion is expanded to build a directional acyclic graph for business processing.

Benefits of technology

It realizes efficient, secure and traceable access processing of on-board terminal data, reduces the complexity of thread management, simplifies code maintenance, supports business expansion and rapid response, and adapts to different production environment needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986584B_ABST
    Figure CN113986584B_ABST
Patent Text Reader

Abstract

The present invention provides an on-vehicle terminal data access and processing method based on the Actor model. First, an Actor model is established according to the Internet of Vehicles access process. Next, each on-vehicle terminal reports its own on-vehicle data at a set frequency. Each piece of on-vehicle data is processed sequentially by a data reception and parsing Actor, a business logic Actor, a data delivery Actor, and a resource release Actor. Each Actor model is isolated and independent from each other during the processing process. The present invention provides an on-vehicle terminal data access and processing method based on the Actor model. This method encapsulates each process and object in business processing using an Actor model, effectively decoupling each link and avoiding the explicit thread usage and management required in traditional Internet of Vehicles data access methods. It effectively encapsulates each functional point and change point of the terminal control function, meeting the growing demand for Internet of Vehicles data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a vehicle-mounted terminal data access processing method based on an Actor model, and belongs to the technical field of vehicle network data processing. Background Art

[0002] During vehicle operation, the onboard terminal periodically reports collected vehicle data to the IoV platform. As the IoV develops, the number of terminals connected to the IoV platform will increase, and the amount of data will also increase, requiring the IoV network to access and process this data with sufficient efficiency.

[0003] Currently, multithreading is a common method for improving the efficiency of single-point services. However, conventional multithreading poses a problem: excessive numbers of threads lead to frequent context switching, creating additional overhead. Furthermore, multithreading requires careful attention to thread safety issues related to critical resources. Complex code logic is prone to errors, which can cause unpredictable problems and make it difficult to troubleshoot and locate the issue. Furthermore, threads are a valuable resource, and leaving thread management to program developers can lead to wasted thread resources due to varying developer skill levels. IoV platforms typically use a procedural approach to processing data received from in-vehicle terminals. Data exchange between processes can easily lead to coupling. Furthermore, for certain services that require processing around a single object, procedural processing results in fragmented operations, making maintenance and debugging difficult.

[0004] In addition to periodically reporting data from in-vehicle terminals, IoV platforms often need to provide external control functions for these terminals. This function is directly oriented towards vehicle owners, requiring timely and stable responses. Furthermore, vehicle owners' needs for this function are subject to change, so IoV platforms must be able to meet these changing demands more quickly. To meet these demands, terminal control functions are often designed to be very complex, requiring consideration of compensation measures for command failures, logging of failed commands, and command source retrieval during command responses. This results in cluttered and difficult-to-maintain code, and the heavily coupled nature of various functions hinders business expansion.

[0005] The Actor model is a message-passing mechanism, a model for parallel computing, currently being explored in the Internet of Things (IoT) to handle information processing between multiple smart devices. Integrating it into the data access process of the Internet of Vehicles (IoV) could resolve coupling issues.

[0006] However, in the application scenario of the Internet of Vehicles platform, there are tens of thousands of in-vehicle terminals reporting data simultaneously, and the application of vehicle control commands is directly for individual users. The user experience is very important, and extremely high command response speed and success rate are required. Factors that affect the experience of the entire vehicle control process include: user-side network stability, service stability, vehicle network stability, and the impact of the vehicle's location on the signal (for example, the signal is poor when the car is parked in an underground garage). Therefore, the traceability and tracking of the entire process are extremely important. The difficulty of data processing in the scenario of home smart devices is not comparable to that in the Internet of Vehicles scenario.

[0007] There are still many difficulties to be solved in applying Actor model technology to the Internet of Vehicles to achieve efficient, secure and traceable access and processing of vehicle terminal data. Summary of the Invention

[0008] In order to address the shortcomings of the existing technology, the present invention provides a vehicle-mounted terminal data access and processing method based on the Actor model, which encapsulates the various processes and objects in business processing using the Actor model, effectively decoupling each link, avoiding the explicit thread use and management in traditional vehicle network data access methods, and effectively encapsulating the various functional points and change points of the terminal control functions, meeting the ever-developing vehicle network data processing needs.

[0009] The present invention solves the technical problem by adopting a technical solution: providing a vehicle terminal data access processing method based on the Actor model, comprising the following steps:

[0010] S1. The IOV platform establishes the following Actor model based on the IOV access process:

[0011] Establish data receiving and parsing Actor, which encapsulates network communication module and data parsing module;

[0012] Establish a business logic Actor, which encapsulates the business logic processing module;

[0013] Establish a data delivery actor, which encapsulates the data delivery processing module;

[0014] Establish a resource release Actor, which encapsulates the resource release processing module;

[0015] S2. Each vehicle terminal reports its own vehicle data to the Internet of Vehicles platform at the set frequency, and the data receiving and parsing Actor receives it;

[0016] S3. Each piece of vehicle data is processed in sequence by the data receiving and parsing Actor, the business logic Actor, the data delivery Actor, and the resource release Actor. Each Actor model is isolated and independent from each other during the processing process. After each Actor model is called to process information, it throws a behavior event. The behavior event includes the current state of the Actor model, the operation event, and the behavior name.

[0017] After the Actor model is established in step S1, specific behaviors are added to each Actor model, including the following process: adding private functions inside the Actor model, defining behavioral operations in the functions, and then adding annotations to the functions; in step S3, when each Actor model is instantiated, the annotated functions are collected and stored in a map structure. When the behavior of the Actor model is triggered externally through a unique entry function, the Actor model finds the corresponding behavior in the map through the data type passed in by the entry function.

[0018] In step S3, the processing of data reception and parsing Actor specifically includes the following process: initializing the network communication module and the data parsing module; after the network communication module receives the vehicle data uploaded by the vehicle terminal, the data parsing module converts the binary data of the vehicle data into a processable data structure, and then sends the converted vehicle data to the business logic Actor.

[0019] In step S3, the processing of the business logic Actor includes the following steps: initializing the business logic processing module; after receiving the vehicle data, the business logic processing module identifies the behavior type recorded in the vehicle data and processes the vehicle data according to the behavior type:

[0020] a. If the behavior type is periodic reporting, the business logic processing module will collect the vehicle data in a unified manner, perform data cleaning and filtering, and convert the data format;

[0021] b. If the behavior type is vehicle-triggered event data, the business logic processing module will collect the vehicle data in a unified manner, perform data cleaning and filtering, and convert the data format;

[0022] c. If the action type is a vehicle control command and command response, the business logic processing module sends the command to the terminal or the Internet of Vehicles platform and sends the response to the initiator of the command, completing the entire command process;

[0023] After processing, the business logic processing module sends a message to the data delivery Actor.

[0024] In step S3, the processing of the data delivery Actor includes the following processes: initializing the data delivery processing module; when the data delivery processing module receives the message, it delivers data to the vehicle terminal, writes the corresponding data to the persistent medium, or delivers it to other applications in the Internet of Vehicles platform; after processing is completed, it sends a message to the resource release Actor.

[0025] In step S3, the processing of the resource release Actor includes the following process: initializing the resource release processing module, when the resource release processing module receives the message sent by the data delivery Actor, it triggers the resource release and releases the program memory resources, network IO resources, file IO resources and other custom resources.

[0026] The beneficial effects of the present invention based on its technical solution are:

[0027] (1) The present invention provides an on-vehicle terminal data access processing method based on the Actor model, which encapsulates the various processes and objects in the business processing using the Actor model, effectively decoupling each link, avoiding the explicit thread use and management in the traditional Internet of Vehicles data access method, and effectively encapsulating the various functional points and change points of the terminal control function, thereby meeting the growing demand for Internet of Vehicles data processing.

[0028] (2) The present invention adopts the Actor model to model the objects of the Internet of Vehicles, and the main object is the vehicle terminal. The characteristic of the Actor model is its strong closedness. In order to ensure the absolute thread safety within the main body of the Actor model, the existing Actor model does not provide other public access functions except the entry function for transmitting messages. In order to meet the needs of operation and maintenance, troubleshooting, data consistency, etc., the present invention adopts the DDD (Domain-Driven Design) approach, that is, an event will be generated for each operation on an object. Through this event, the object can be returned to the state at any point in time, realizing event tracing, and facilitating the restoration of the entire command and data processing flow when needed.

[0029] In this invention, an event bus object is built in. When any operation is triggered inside the Actor model, a behavior event will be thrown, including the current state of the Actor, operation time, behavior name, etc., which is used to restore the entire processing flow later. After this event is captured externally, the specific situation inside the Actor model can be clearly seen.

[0030] (3) The vehicle terminal data access processing method based on the Actor model provided by the present invention injects all the behaviors of the Actor into the reflection, that is, after the Actor modeling is completed, specific behaviors are added to the Actor. When expanding, only new functions need to be added and the behaviors are written into the functions. No modification is made to the original code, making the entire method easy to upgrade and maintain.

[0031] (4) The present invention provides a vehicle terminal data access processing method based on the Actor model, which adopts the method of constructing a directed acyclic graph (DAG) for the Actor model, so that the Actor models can cooperate in a one-to-one or one-to-many manner, and multiple Actor models can jointly complete a business. In addition, the Actor models can be added or removed and the processing flow can be modified at any time without invading the code of any Actor model itself. Figure 3 After the entire service is initialized, multiple required actor model objects are constructed according to the configuration and connected to each other. This includes establishing a data reception and parsing actor, a business logic actor, a data delivery actor, and a resource release actor. This is then chained together: data reception and parsing actor -> business logic actor -> data delivery actor -> resource release actor. This creates a blueprint. Each time a data trigger is received, a new execution graph is constructed based on the blueprint. Data is run on the execution graph, and the output of each actor model serves as the input parameter for the next actor model until all data has been run through the entire execution graph. This allows for customizing the connections between actor models without coding, even with fixed actor model objects and behaviors. Data between actor models can be transferred over the network, through middleware, or directly in memory within the same program, meeting the needs of both small standalone production environments and large distributed production environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is a schematic diagram of establishing the Actor model of the present invention.

[0033] Figure 2 This is a schematic diagram of the reflective injection behavior process.

[0034] Figure 3 This is a schematic diagram of the directed acyclic graph construction process.

[0035] Figure 4 This is a flow chart of a vehicle terminal data access processing method based on the Actor model in this embodiment. DETAILED DESCRIPTION

[0036] The present invention will be further described below with reference to the accompanying drawings and examples.

[0037] The present invention provides a vehicle terminal data access processing method based on the Actor model, referring to Figure 1 , including the following steps:

[0038] S1. The IOV platform establishes the following Actor model based on the IOV access process:

[0039] Establish data receiving and parsing Actor, which encapsulates network communication module and data parsing module;

[0040] Establish a business logic Actor, which encapsulates the business logic processing module;

[0041] Establish a data delivery actor, which encapsulates the data delivery processing module;

[0042] Create a resource release Actor, which encapsulates the resource release processing module.

[0043] After creating the Actor model, add specific behaviors to each Actor model, refer to Figure 2 The process involves adding private functions within the Actor model, iterating through the collected functions, and searching for those with specific annotations. These annotated functions are then collected, their access permissions modified, and their behavior defined within them. Finally, the annotations are added to the functions to enable subsequent reflection. Extensions require only adding new functions and implementing the behavior within them, without modifying the existing code, making the entire approach easy to upgrade and maintain.

[0044] Later, when each Actor model is instantiated in step S3, the annotated functions are collected and stored in a map structure, keyed by the function's input parameter type. When an Actor model's behavior is triggered externally through its unique entry point function, the Actor model finds the corresponding behavior in the map based on the data type passed in by the entry point function.

[0045] S2. Each vehicle terminal reports its own vehicle data to the Internet of Vehicles platform at the set frequency, and the data is received and parsed by the data receiving and parsing Actor.

[0046] S3. Each piece of vehicle data is processed in sequence by the data receiving and parsing actor, the business logic actor, the data delivery actor, and the resource release actor. Each actor model is isolated and independent of each other during the processing process. After each actor model is called to process information, it throws a behavior event. The behavior event includes the current state of the actor model, the operation event, and the behavior name.

[0047] The processing procedures of each Actor model are:

[0048] The processing of data reception and parsing Actor specifically includes the following processes: initializing the network communication module and the data parsing module; after the network communication module receives the vehicle data uploaded by the vehicle terminal, the data parsing module converts the binary data of the vehicle data into a processable data structure, and then sends the converted vehicle data to the business logic Actor.

[0049] The processing of business logic actors includes the following steps: initializing the business logic processing module; after receiving the vehicle data, the business logic processing module identifies the behavior type recorded in the vehicle data and processes the vehicle data according to the behavior type:

[0050] a. If the behavior type is periodic reporting, the business logic processing module will collect the vehicle data in a unified manner, perform data cleaning and filtering, and convert the data format;

[0051] b. If the behavior type is vehicle-triggered event data, the business logic processing module will collect the vehicle data in a unified manner, perform data cleaning and filtering, and convert the data format;

[0052] c. If the action type is a vehicle control command and command response, the business logic processing module sends the command to the terminal or the Internet of Vehicles platform and sends the response to the initiator of the command, completing the entire command process;

[0053] After processing, the business logic processing module sends a message to the data delivery Actor.

[0054] The processing of the data delivery actor includes the following steps: initializing the data delivery processing module; when the data delivery processing module receives the message, it delivers data to the vehicle terminal, writes the corresponding data to the persistent medium, or delivers it to other applications in the Internet of Vehicles platform; after processing, it sends a message to the resource release actor.

[0055] The processing of resource release Actor includes the following process: initializing the resource release processing module. When the resource release processing module receives the message sent by the data delivery Actor, it triggers the resource release and releases the program memory resources, network IO resources, file IO resources and other custom resources.

[0056] Reference Figure 4Taking the process of two terminals sending fault data to the Internet of Vehicles platform as an example, the on-board terminals first report the fault data to the Internet of Vehicles platform. The data receiving and parsing Actor established by the Internet of Vehicles platform sends it to the two business logic Actors according to the amount of fault data. After the business logic Actor completes the processing, it continues to execute to the data delivery Actor to complete the data delivery, and finally sends a message to the resource release Actor to release the program memory resources, network IO resources, file IO resources and other custom resources used in the whole process.

[0057] The present invention provides a vehicle-mounted terminal data access and processing method based on the Actor model, which encapsulates the various processes and objects in business processing using the Actor model, effectively decoupling each link, avoiding the explicit thread use and management in traditional vehicle network data access methods, and effectively encapsulating the various functional points and change points of the terminal control function, meeting the growing demand for vehicle network data processing.

Claims

1. A vehicle terminal data access processing method based on the Actor model, characterized in that The following steps are involved: S1. The IOV platform establishes the following Actor model based on the IOV access process: Establish data receiving and parsing Actor, which encapsulates network communication module and data parsing module; Establish a business logic Actor, which encapsulates the business logic processing module; Establish a data delivery actor, which encapsulates the data delivery processing module; Establish a resource release Actor, which encapsulates the resource release processing module; After establishing the Actor model, add specific behaviors to each Actor model, including the following process: add private functions inside the Actor model, define the behavior operations in the function, and then add annotations to the function; When each Actor model is instantiated, the annotated functions are collected and stored in a map structure. When the behavior of the Actor model is triggered externally through a unique entry function, the Actor model finds the corresponding behavior in the map based on the data type passed in by the entry function. S2. Each vehicle terminal reports its own vehicle data to the Internet of Vehicles platform at the set frequency, and the data receiving and parsing Actor receives it; S3. Each piece of vehicle data is processed in turn by the data receiving and parsing Actor, the business logic Actor, the data delivery Actor, and the resource release Actor. Each Actor model is isolated and independent from each other during the processing process. After each Actor model is called to process information, a behavior event is thrown. The behavior event includes the current state of the Actor model, the operation event, and the behavior name. The processing of the business logic Actor The process includes the following: initializing the business logic processing module; After receiving the vehicle data, the business logic processing module identifies the behavior type recorded in the vehicle data and processes the vehicle data according to the behavior type: a. If the behavior type is periodic reporting, the business logic processing module will collect the vehicle data in a unified manner, perform data cleaning and filtering, and convert the data format; b. If the behavior type is vehicle-triggered event data, the business logic processing module will collect the vehicle data in a unified manner, perform data cleaning and filtering, and convert the data format; c. If the action type is a vehicle control command and command response, the business logic processing module sends the command to the terminal or the Internet of Vehicles platform and sends the response to the initiator of the command, completing the entire command process; After processing, the business logic processing module sends a message to the data delivery Actor.

2. The vehicle-mounted terminal data access processing method based on the Actor model according to claim 1 is characterized by: In step S3, the processing of data reception and parsing Actor specifically includes the following process: initializing the network communication module and the data parsing module; after the network communication module receives the vehicle data uploaded by the vehicle terminal, the data parsing module converts the binary data of the vehicle data into a processable data structure, and then sends the converted vehicle data to the business logic Actor.

3. The vehicle-mounted terminal data access processing method based on the Actor model according to claim 1 is characterized by: In step S3, data is delivered to the Actor for processing The process includes the following: initializing the data delivery processing module; When the data delivery processing module receives the message, it delivers the data to the vehicle terminal, writes the corresponding data to the persistent medium, or delivers it to other applications in the Internet of Vehicles platform; after processing, it sends a message to the resource release Actor.

4. The method for in-vehicle terminal data access processing based on the Actor model according to claim 1, characterized in that: In step S3, the resource release Actor processing It includes the following processes: initializing the resource release processing module. When the resource release processing module receives the message sent by the data delivery Actor, it triggers the resource release and releases the program memory resources, network IO resources, file IO resources and other custom resources.

Citation Information

Patent Citations

  • Interface calling method and device, server and storage medium

    CN112181535A

  • Internet of Things platform supporting high concurrency of data

    CN113296983A