Script generation method and device, equipment, storage medium and program product

By acquiring standardized vehicle documentation and generating CAN signals during pre-compilation, the communication method solves the problem of low CAN signal transmission efficiency in existing technologies, achieving efficient and accurate signal transmission and optimization of system resources.

CN122268697APending Publication Date: 2026-06-23SHANGHAI PATEO ELECTRONIC EQUIPMENT MANUFACTURING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI PATEO ELECTRONIC EQUIPMENT MANUFACTURING CO LTD
Filing Date
2024-12-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing technologies, the signal transmission between the application layer and the framework layer of the vehicle controller area network (CAN) signal needs to be processed by middleware, resulting in low efficiency and insufficient accuracy.

Method used

During pre-compilation, standardized vehicle documentation is obtained, and communication methods for each CAN signal are generated based on the standardized documentation. Script files are also generated using automated build tools to transmit CAN signals between the application layer and the framework layer.

Benefits of technology

It improves the efficiency and accuracy of acquiring vehicle CAN signals, reduces manpower input, and enhances the utilization rate of system resources and the efficiency of code maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122268697A_ABST
    Figure CN122268697A_ABST
Patent Text Reader

Abstract

The application provides a script generation method and device, equipment, storage medium and program product, wherein the script generation method is applied to a vehicle, comprising: during pre-compilation, obtaining a standardization document of the vehicle; the standardization document comprises signal data of controller area network (CAN) signals transmitted between an application layer and a framework layer in the vehicle; based on the signal data of each CAN signal in the standardization document, a communication method of each CAN signal is generated; the communication method is used for transmitting the CAN signal between the application layer and the framework layer; according to the communication method of each CAN signal, a script file is generated; the script file is used to be loaded during compilation so that the communication method in the script file is called. Through the above method, the efficiency and accuracy of obtaining the CAN signal of the vehicle are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of computer technology, and in particular to a script generation method, apparatus, device, storage medium, and program product. Background Technology

[0002] In related technologies, the current application layer interfaces with the vehicle controller area network (CAN) signal by middleware sorting the CAN signal and then generating a vehicle signal matrix table. The application layer then calls or retrieves the vehicle signal based on the matrix. However, the call from the matrix to the application layer requires a lot of manpower and effort, which leads to reduced efficiency and accuracy. Summary of the Invention

[0003] One objective of this application is to provide a script generation method with the advantage of obtaining a standardized document for the vehicle during pre-compilation. This standardized document includes signal data of CAN signals transmitted between the application layer and the framework layer of the vehicle. Based on the signal data of each CAN signal in the standardized document, a communication method for each CAN signal is generated. This communication method is used to transmit the CAN signal between the application layer and the framework layer. A script file is generated according to the communication method of each CAN signal. The script file is loaded during compilation to invoke the communication method within it. Thus, by standardizing the obtained CAN signal table to obtain a standardized document, and generating a script file based on the communication method of each CAN signal generated from the signal data of each CAN signal in the standardized document, developers can directly obtain the vehicle's CAN signals based on the communication method of each CAN signal in the script file, saving significant manpower while improving the efficiency and accuracy of obtaining vehicle CAN signals.

[0004] Another objective of this application is to provide a script generation method, the advantage of which lies in that the communication method of CAN signals includes signal transmission codes; the signal data includes the method name, attribute identifier, domain identifier, and legal value range of the CAN signal; based on a preset method template, the method name, attribute identifier, domain identifier, and legal value range of the CAN signal, the signal transmission codes of the CAN signal are generated. In this way, each acquired CAN signal is filled into a preset method template, and the signal transmission codes of each CAN signal are generated based on the preset method template and automated construction tools. Therefore, the vehicle's CAN signal can be called or acquired based on the signal transmission codes of each CAN signal, thereby reducing the need for extensive manual acquisition of the vehicle's CAN signals while improving the accuracy of acquiring the vehicle's CAN signals.

[0005] Another objective of this application is to provide a script generation method, the advantage of which is that the CAN signal communication method further includes at least one of the following: verification code, process switching code, and log generation code; wherein, the verification code is used to verify the CAN signal to be transmitted; the process switching code is used to switch the process executing the signal transmission code; and the log generation code is used to generate a corresponding execution log when the communication method is running. In this way, the verification code can verify the CAN signal to be transmitted, thereby improving the accuracy of CAN signal transmission; the thread switching code switches the running threads of the system when running different communication methods, improving both operational efficiency and system resource utilization; and the log generation code, generated during the execution of the communication method, monitors and tracks the process of running the communication method, allowing for the tracing of problems based on recorded exception information and error codes when issues arise, thus locating the source of the problem and improving the efficiency and accuracy of code maintenance.

[0006] Another objective of this application is to provide a script generation method, the advantage of which lies in that the CAN signal communication method includes an uplink setting method and a downlink callback method; based on the application layer calling the uplink setting method to set the parameters corresponding to the CAN signal through the framework layer, and based on the application layer calling the downlink callback method to obtain the parameters corresponding to the CAN signal through the framework layer. In this way, the application layer sends the required CAN signal and its parameters to the framework layer through the uplink setting method, and the framework layer, based on the obtained CAN signal and its parameters sent by the application layer through the uplink setting method, obtains the CAN signal and its parameters from the CAN bus, thereby reducing the workload of manually obtaining the CAN signal and improving the efficiency and accuracy of CAN signal acquisition.

[0007] Another objective of this application is to provide a script generation method, the advantage of which is that the signal data includes the valid value range of the CAN signal; the communication method of the CAN signal further includes a verification code; the verification code is generated based on the valid value range of the CAN signal; wherein, when the communication method is an uplink setting method, the verification code is set before the signal transmission code; when the communication method is a downlink callback method, the verification code is set after the signal transmission code. Thus, by generating the verification code using the valid value range of the CAN signal, and by placing the verification code before the signal transmission code when the communication method is an uplink setting method, and after the signal transmission code when the communication method is a downlink callback method, the accuracy of CAN signal transmission is improved.

[0008] Another objective of this application is to provide a script generation method, the advantage of which is that the CAN signal communication method further includes process switching code; when the communication method is an uplink setting method, a first process switching code is generated, which is used to switch from a child process to a main process; when the communication method is a downlink callback method, a second process switching code is generated, which is used to switch from the main process to a child process. Thus, by generating the first process switching code when the communication method is an uplink setting method, and generating the second process switching code when the communication method is a downlink callback method, the efficiency and accuracy of data processing are improved, while the utilization rate of system resources is also increased.

[0009] Another objective of this application is to provide a script generation method, the advantage of which is that the range of valid values ​​includes at least one valid value; during compilation, in response to the method name of the communication method input for the CAN signal, at least one valid value of the CAN signal is displayed. Thus, based on the method name of the CAN signal method input by the user, at least one valid value of the CAN signal is displayed, thereby improving the efficiency and accuracy of CAN signal acquisition.

[0010] Another objective of this application is to provide a script generation apparatus, the advantage of which is that, through an acquisition module, a standardized document of the vehicle is acquired during pre-compilation; the standardized document includes signal data of CAN signals transmitted between the application layer and the framework layer of the vehicle; a first generation module is used to generate a communication method for each CAN signal based on the signal data of each CAN signal in the standardized document; the communication method is used for the CAN signals transmitted between the application layer and the framework layer; a second generation module is used to generate a script file according to the communication method of each CAN signal; the script file is used to be loaded during compilation so that the communication method in the script file is invoked. In this way, by standardizing the acquired CAN signal table to obtain a standardized document, and generating a script file for the communication method of each CAN signal based on the signal data of each CAN signal in the standardized document, developers can directly acquire the vehicle's CAN signals based on the communication method of each CAN signal in the script file, saving a significant amount of manpower while improving the efficiency and accuracy of acquiring vehicle CAN signals.

[0011] Another object of this application is to provide a computer device including a memory and a processor, the memory storing a computer program executable on the processor, the processor executing the program to implement some or all of the steps in the above-described method.

[0012] Another object of this application is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the above-described method.

[0013] Another object of this application is to provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement some or all of the steps in the above-described method.

[0014] To achieve the aforementioned objective, the technical solution of this application embodiment is implemented as follows:

[0015] On one hand, this application provides a script generation method applied to a vehicle, comprising: during pre-compilation, obtaining a standardized document of the vehicle; the standardized document including signal data of Controller Area Network (CAN) signals transmitted between the application layer and the framework layer in the vehicle; generating a communication method for each CAN signal based on the signal data of each CAN signal in the standardized document; the communication method being used to transmit the CAN signal between the application layer and the framework layer; generating a script file according to the communication method of each CAN signal; the script file being loaded during compilation to invoke the communication method in the script file.

[0016] On the other hand, embodiments of this application provide a script generation apparatus applied to a vehicle, comprising: an acquisition module, configured to acquire a standardized document of the vehicle during pre-compilation; the standardized document includes signal data of Controller Area Network (CAN) signals transmitted between the application layer and the framework layer of the vehicle; a first generation module, configured to generate a communication method for each CAN signal based on the signal data of each CAN signal in the standardized document; the communication method is used for the CAN signals transmitted between the application layer and the framework layer; and a second generation module, configured to generate a script file according to the communication method of each CAN signal; the script file is used to be loaded during compilation so that the communication method in the script file is invoked.

[0017] On the other hand, embodiments of this application provide a computer device including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the program to implement the steps in the above-described method.

[0018] On the other hand, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method.

[0019] On the other hand, embodiments of this application provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement some or all of the steps in the above-described method.

[0020] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this application. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0022] Figure 1 A schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application;

[0023] Figure 2 A schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application;

[0024] Figure 3 A schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application;

[0025] Figure 4 A schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application;

[0026] Figure 5 This is a schematic diagram of the composition structure of a script generation device provided in an embodiment of this application;

[0027] Figure 6 This is a schematic diagram of the hardware entity of a computer device provided in an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application are further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "first / second / third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to limit the scope of this application.

[0031] In related technologies, the current application layer interfaces with the vehicle controller area network (CAN) signal by middleware sorting the CAN signal and then generating a vehicle signal matrix table. The application layer then calls or retrieves the vehicle signal based on the matrix. However, the call from the matrix to the application layer requires a lot of manpower and effort, which leads to reduced efficiency and accuracy.

[0032] This application provides a script generation method, which can be executed by the processor of a computer device. The computer device refers to a server, laptop, tablet, desktop computer, smart TV, set-top box, mobile device (e.g., mobile phone, portable video player, personal digital assistant, dedicated messaging device, portable gaming device), vehicle, or other device with data processing capabilities.

[0033] Figure 1 This is a schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application. This method can be executed by the processor of a computer device. Figure 1 As shown, the method includes the following steps S101 to S103, combining... Figure 1 The steps shown are explained.

[0034] Step S101: During pre-compilation, obtain the standardized documentation for the vehicle.

[0035] The standardized documentation includes signal data of the Controller Area Network (CAN) signals transmitted between the application layer and the framework layer in the vehicle.

[0036] In some embodiments, pre-compilation period represents a preprocessing stage before program compilation, during which certain elements in the program or data are defined, processed, or converted in format.

[0037] In some embodiments, the Controller Area Network (CAN) signal is used to enable real-time data exchange between numerous control units in a vehicle. In the automotive field, the CAN bus connects various control units (such as the engine control unit, braking system, instrument panel, gear position control unit, etc.), so the vehicle's CAN signal can be a signal from different control units, such as the vehicle speed signal corresponding to the engine control unit, or the gear position information corresponding to the gear position control unit. The signal data of the CAN signal can include attributes, domain identifiers, and value ranges of the vehicle speed signal.

[0038] In some embodiments, the vehicle's application layer may include user-operated processes such as cameras, multimedia, and message centers; the framework layer may include system capability processes that the application layer depends on, such as system settings, vehicle signals, and decoders.

[0039] In some embodiments, the original CAN signal data of the vehicle is first acquired. Based on the form document specification jointly defined by the application layer and framework layer developers and the vehicle's CAN signal data, a standardized document for the vehicle is generated. The form document specification includes: removing invalid and redundant information from the document and clearly defining the functions, uplink, and downlink inputs, so that the vehicle's CAN signal data is filled in according to the functions, uplink, and downlink requirements specified in the form document specification to obtain the standardized document.

[0040] For example, if the CAN signal data of a vehicle includes the vehicle speed signal's identification, attribute identification, data type, value range, and domain identification, then the vehicle speed signal's attributes, value range, and domain identification are filled into the function column, up column, and down column of the table to obtain a standardized document containing the vehicle's speed signal data.

[0041] Step S102: Based on the signal data of each CAN signal in the standardized document, generate a communication method for each CAN signal.

[0042] The communication method is used to transmit the CAN signal between the application layer and the framework layer.

[0043] In some embodiments, the communication method for each CAN signal includes at least a method for transmitting information from the application layer to the framework layer and a method for transmitting information from the framework layer to the application layer.

[0044] For example, the communication method for each CAN signal includes a method for the application layer to send information about the target data to be acquired to the framework layer, and a method for the framework layer to send information about the target data to the application layer; for example, the method for the application layer to transmit information to the framework layer is used to acquire signal data of the vehicle speed signal; the method for the framework layer to transmit information to the application layer is used to acquire the signal data of the vehicle speed signal from the CAN bus and then send the signal data of the vehicle speed signal to the application layer.

[0045] In some embodiments, a communication method for each CAN signal is generated based on the signal data of each CAN signal in the standardized document; it can be understood that this includes a method for generating information transmission from the application layer to the framework layer based on the signal data of each CAN signal and a method for generating information transmission from the framework layer to the application layer based on the signal data of each CAN signal.

[0046] For example, if the vehicle's CAN signal is a vehicle speed signal, then the signal data of the vehicle speed signal includes the vehicle speed signal's identity identifier, attribute identifier, data type, value range, domain identifier, etc.; based on the vehicle speed signal's identity identifier, attribute identifier, data type, value range, domain identifier, etc., a communication method for transmitting information from the application layer to the framework layer and a communication method for transmitting information from the framework layer to the application layer are generated.

[0047] Step S103: Generate a script file according to the communication method of each CAN signal.

[0048] The script file is used to be loaded during compilation so that the communication methods in the script file can be invoked.

[0049] In some embodiments, the communication methods for transmitting information from the application layer to the framework layer and from the framework layer to the application layer for each CAN signal are read and parsed to construct a code file for each communication method. These code files are then integrated to obtain a script file. Specifically, the basic execution unit of the automated construction tool parses and reads the communication methods for transmitting information from the application layer to the framework layer and from the framework layer to the application layer for each CAN signal, constructs a code file for each communication method, and integrates the communication methods of each CAN signal using byte plugins to obtain the script file.

[0050] For example, the CAN signal communication method includes a communication method for transmitting vehicle speed signals from the application layer to the frame layer and a communication method for transmitting information from the frame layer to the application layer, a communication method for transmitting gear signals from the application layer to the frame layer and a communication method for transmitting information from the frame layer to the application layer; reading the communication methods for transmitting vehicle speed signals and gear signals from the application layer to the frame layer and the communication methods for transmitting information from the frame layer to the application layer, and constructing code files for the communication methods of vehicle speed signals and gear signals using an automated construction tool; integrating the code files for the communication methods of vehicle speed signals and gear signals using byte plugins through the basic execution unit of the script in the automated construction tool to obtain a script file.

[0051] In some embodiments, during compilation, developers directly load script files to call the communication methods of the corresponding CAN signals, and directly call or obtain the real-time CAN signals of the vehicle based on the communication methods of the CAN signals; for example, during compilation, developers load script files to call the communication methods of vehicle speed signals and gear signals, obtain the real-time vehicle speed based on the communication method of the vehicle speed signal, and obtain the real-time gear status of the vehicle based on the communication method of the gear signal.

[0052] In this embodiment, the acquired CAN signal table is standardized to obtain a standardized document. Based on the signal data of each CAN signal in the standardized document, a script file is generated for the communication method of each CAN signal. Developers can directly acquire the vehicle's CAN signal based on the communication method of each CAN signal in the script file, saving a lot of manpower while improving the efficiency and accuracy of acquiring the vehicle's CAN signal.

[0053] Figure 2 This is a schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application. This method can be executed by the processor of a computer device. Based on... Figure 1 The communication method of the CAN signal includes signal transmission code; the signal data includes the method name, attribute identifier, field identifier, and legal value range of the CAN signal. Figure 1 Step S102 can be updated to step S201, combining Figure 2 The steps shown are explained.

[0054] Step S201: Based on the preset method template, the method name, attribute identifier, domain identifier, and legal value range of the CAN signal, generate the signal transmission code of the CAN signal.

[0055] In some embodiments, the preset method template is a table specification template jointly defined by the vehicle's application layer developers and framework layer developers. The table specification template developers define the functions, uplink, and downlink. The functions include the vehicle signal type name corresponding to the CAN signal, and the uplink includes the method name, attribute identifier, domain identifier, and legal value range corresponding to the CAN signal.

[0056] In this context, the method name of the uplink CAN signal represents the name of the communication method generated based on the signal data of the uplink CAN signal, and the method name of the downlink CAN signal represents the name of the communication method generated based on the signal data of the downlink CAN signal. For example, the method name of the uplink CAN signal can be a request-to-acquire method for the CAN signal, and the method name of the downlink CAN signal can be a listen-to-callback method for the CAN signal; it is understood that the method name of the uplink CAN signal can also be a listen-to-callback method, and the method name of the downlink CAN signal can also be a request-to-acquire method.

[0057] Among them, the attribute identifiers in the uplink and downlink represent the identity of the CAN signal, the data length of the CAN signal, etc.

[0058] In this context, the field identifiers in the uplink and downlink represent identifiers of specific regions or modules in CAN communication. They can also be identifiers representing different parts of the vehicle, such as the control system or power system, to indicate the source of the CAN signal.

[0059] The range of legal values ​​in the uplink and downlink represents the range of values ​​allowed for the CAN signal in each field or attribute of the CAN message. For example, if a data field is used to identify vehicle speed, the range of legal values ​​for that data field is from 0 to the maximum vehicle speed; if a data field is used to identify gear, the range of legal values ​​for that data field is all gears on the vehicle (e.g., P, D, N, etc.).

[0060] In some embodiments, uplink signal transmission codes are generated based on the method name, attribute identifier, domain identifier, and legal value range of the CAN signals in the uplink of the standardized document; downlink signal transmission codes are generated based on the method name, attribute identifier, domain identifier, and legal value range of the CAN signals in the downlink of the standardized document.

[0061] In some embodiments, uplink signal transmission code is generated based on the basic execution unit of the build script in the automated build tool, and the method name, attribute identifier, domain identifier, and legal value range of the CAN signal in the uplink of the standardized document; uplink signal transmission code is also generated based on the basic execution unit of the build script in the automated build tool, and the method name, attribute identifier, domain identifier, and legal value range of the CAN signal in the downlink; wherein, the automated build tool is a tool that provides developers with an automated way to compile, test, and build code files or software projects; automated build tools may include Maven, Gradle, Ant, etc.

[0062] For example, based on the task in the Gradle build script and the method name, attribute identifier, domain identifier, and legal value range of the vehicle speed signal in the uplink of the standardized document, a signal transmission method for requesting to obtain the vehicle speed signal is generated for the uplink; based on the task in the Gradle build script and the method name, attribute identifier, domain identifier, and legal value range of the vehicle speed signal in the uplink of the standardized document, a signal transmission method for monitoring callback vehicle speed signal is generated for the downlink.

[0063] In this embodiment, each acquired CAN signal is filled into a preset method template, and a signal transmission code for each CAN signal is generated based on the preset method template and an automated construction tool. The vehicle's CAN signal is then called or acquired based on the signal transmission code of each CAN signal, thereby reducing the need for a large amount of manpower to acquire the vehicle's CAN signal and improving the accuracy of acquiring the vehicle's CAN signal.

[0064] In some embodiments, the communication method of the above-mentioned CAN signal further includes at least one of the following: verification code, process switching code, and log generation code.

[0065] The verification code is used to verify the CAN signal to be transmitted; the process switching code is used to switch the process executing the signal transmission code; and the log generation code is used to generate the corresponding execution log when the communication method is running.

[0066] In some embodiments, the verification code verifies the data type, data size, data integrity, etc. of the CAN signal to be transmitted, thereby improving the accuracy of CAN signal transmission.

[0067] The verification code can be a Cyclic Redundancy Check (CRC) code, which is used to generate a check code through polynomial calculation and add it to the end of the data of the CAN signal to be transmitted. At the receiving end, the same polynomial calculation is used to compare the check code, thereby ensuring that no errors occur during data transmission.

[0068] The check code can be a parity check (PC) code, which adds a check bit to the end of the CAN signal data to be transmitted, so that the number of 1s in the binary representation of the CAN signal data packet meets the requirement of being odd (odd parity) or even (even parity). The receiving end calculates the number of 1s in the received data and checks whether it meets the agreed parity, thereby ensuring that no errors occur in the data transmission process.

[0069] In some embodiments, the process switching code is used to switch a child process to the main process or the main process to a child process. It is understood that, when the communication method is from the application layer to the framework layer, the child process is switched to the main process; when the communication method is from the framework layer to the application layer, the main process is switched to a child process; or, when the communication method is from the application layer to the framework layer, the main process is switched to a child process; when the communication method is from the framework layer to the application layer, the child process is switched to the main process.

[0070] In an operating system, the main process is the process that creates child processes. It's typically the initial process that starts an application or executes a task. The main process is responsible for allocating resources to child processes and monitoring their status, such as whether they have finished running. The main process and child processes can communicate through various mechanisms, such as pipes, signals, and shared memory. Child processes are created by the main process and can perform the same or different tasks as the main process.

[0071] In some embodiments, the execution log is used to monitor and track the running status of the communication method during runtime, so as to obtain the stage of the communication method's operation and the execution result of each stage; and when problems occur during the operation of the communication method, the source of the problem can be quickly located by analyzing the exception information, error code and stack trace in the log, thereby helping developers to maintain or update.

[0072] In this embodiment, the verification code can verify the CAN signal to be transmitted, thereby improving the accuracy of CAN signal transmission; the thread switching code switches the running threads of the system when running different communication methods, improving both running efficiency and system resource utilization; the log generation code generates execution code during the execution of the communication method, monitoring and tracing the process of running the communication method, so that when problems occur, the recorded abnormal information, error codes, etc. can be used to trace the problem and locate the source of the problem, thereby improving the efficiency and accuracy of code maintenance.

[0073] Figure 3 This is a schematic diagram illustrating the implementation flow of a script generation method provided in an embodiment of this application. This method can be executed by the processor of a computer device. Based on... Figure 1 The communication method of the CAN signal includes an uplink setting method and a downlink callback method; Figure 1 Step S102 can be updated to step S301, combining Figure 3 The steps shown are explained.

[0074] Step S301: Based on the application layer, the uplink setting method is called to set the parameters corresponding to the CAN signal through the framework layer, and based on the application layer, the downlink callback method is called to obtain the parameters corresponding to the CAN signal through the framework layer.

[0075] In some embodiments, the parameters of a CAN signal may include the CAN signal value, identifier, data length, priority, etc.

[0076] In some embodiments, the uplink setting method is used to generate information from the application layer to the framework layer. This can be understood as sending the vehicle CAN signal to be acquired and the corresponding CAN signal parameters to the framework layer; for example, sending the vehicle speed signal to be acquired and the value, data length, priority, etc. of the vehicle speed signal to the framework layer.

[0077] In some embodiments, the downlink callback method is used to obtain the CAN signal and CAN signal parameters in the uplink setting method from the CAN bus when the framework layer receives the uplink setting method from the application layer, and send the CAN signal and CAN signal parameters to the application layer; for example, the framework layer needs to obtain the vehicle gear position signal, the corresponding value, identifier, data length, priority, etc. when it receives the uplink setting method packet sent by the application layer, and send the vehicle gear position signal, the corresponding value, identifier, data length, priority, etc. to the application layer.

[0078] In this embodiment, the application layer sends the CAN signal and its parameters to be acquired to the framework layer via an uplink setting method. Based on the CAN signal and its parameters sent by the application layer via the uplink setting method, the framework layer obtains the CAN signal and its parameters from the CAN bus, thereby reducing the workload of manually acquiring the CAN signal and improving the efficiency and accuracy of acquiring the CAN signal.

[0079] In some embodiments, the signal data includes the legal value range of the CAN signal; the communication method of the CAN signal further includes a verification code; the above-described communication method for generating each CAN signal based on the signal data of each CAN signal in the standardized document can also be implemented through the following embodiments.

[0080] The verification code is generated based on the valid value range of the CAN signal.

[0081] Wherein, when the communication method is an uplink setting method, the verification code is set before the signal transmission code; when the communication method is a downlink callback method, the verification code is set after the signal transmission code.

[0082] In some embodiments, the minimum and maximum valid values ​​of the CAN signal, as well as the check value, are first set, and a check code is generated based on the minimum and maximum valid values ​​of the CAN signal and the check value.

[0083] In the case where the communication method is the uplink setting method, setting the verification code before the signal transmission code means that after executing the signal transmission code, the verification value in the verification code is first sent to the frame layer, and then the target data to be sent to the frame layer is sent to the frame layer; the target database can be the CAN signal to be acquired and the parameters of the CAN signal.

[0084] In the case where the communication method is a monitoring callback method, the verification code is set after the signal transmission code. This means that the application layer first receives the CAN signal and its parameters to be acquired, and then receives the verification code for verification. If the verification passes, the framework layer acquires the CAN signal and its parameters from the CAN bus and verifies whether the acquired CAN signal and its parameters are within the legal value range. If not, a prompt message is generated; if so, it is sent to the application layer.

[0085] In this embodiment, a verification code is generated based on the valid value range of the CAN signal. When the communication method is an uplink setting method, the verification code is set before the signal transmission code, and when the communication method is a downlink callback method, the verification code is set after the signal transmission code, thereby improving the accuracy of CAN signal transmission.

[0086] In some embodiments, the communication method of the CAN signal further includes process switching code; the above-described method for generating the communication method of each CAN signal based on the signal data of each CAN signal in the standardized document can also be implemented through the following embodiments.

[0087] When the communication method is an uplink setting method, a first process switching code is generated, which is used to switch from a child process to a main process.

[0088] In some embodiments, the main process is the process that creates child processes. In an operating system, the main process is typically the initial process that starts an application or executes a task. The main process is responsible for allocating the necessary resources to the child processes and can monitor their status, such as whether they have finished running. The main process and child processes can communicate through various mechanisms, such as pipes, signals, and shared memory. A child process is a process created by the main process, and it can perform the same or different tasks as the main process.

[0089] The main process is responsible for starting child processes and receiving and processing the data returned by the child processes. The child processes are started by the main process, execute tasks, and return the results to the main process.

[0090] In some embodiments, when the communication method is an uplink setting method, the currently executed task data is sent to the main process through a communication mechanism in the child process, and the main process is requested to receive the task data; in the main thread, the task data of the child thread is received through a communication mechanism, thereby completing the switch from the child thread to the main thread.

[0091] When the communication method is a downlink callback method, a second process switching code is generated, which is used to switch from the main process to the child process.

[0092] In some embodiments, the main process load-starts a child process or a new child process and sends the currently executing task data to the child thread through a communication mechanism. The child thread is created or started by the main thread, and receives and executes the task data sent by the main thread.

[0093] In some embodiments, when the communication method is a downlink callback method, in the main thread, the main thread starts an idle sub-thread or creates a new sub-thread to send the currently executing task data to the idle sub-thread or the newly created sub-thread through the communication mechanism. In the sub-thread, the sub-thread receives and executes the task data sent by the main thread through the communication mechanism, thereby completing the switch from the main thread to the sub-thread.

[0094] In this embodiment of the application, when the communication method is an uplink setting method, a first process switching code is generated, which is used to switch from a child process to a main process; when the communication method is a downlink callback method, a second process switching code is generated, which is used to switch from a main process to a child process, thereby improving the efficiency and accuracy of data processing while improving the utilization rate of system resources.

[0095] In some embodiments, the range of valid values ​​includes at least one valid value; the method further includes:

[0096] During compilation, in response to the method name of the communication method inputting the CAN signal, at least one valid value of the CAN signal is displayed.

[0097] In some embodiments, the method name of the CAN signal is the name of the communication method generated based on the signal data of the CAN signal. It can be understood that this refers to the communication method name of the uplink CAN signal generated based on the signal data of the uplink CAN signal in the standardized table, and the communication method name of the downlink CAN signal generated based on the signal data of the downlink CAN signal in the standardized table.

[0098] For example, an upward setting method for generating vehicle gears based on signal data of vehicle gears in the upward row of a standardized table; and a downward callback method for generating vehicle gears based on signal data of vehicle gears in the downward row of a standardized table.

[0099] In some embodiments, it may be the method name of the communication method of the CAN signal, which is input by the user or automatically, thereby displaying the corresponding valid value of at least one CAN signal.

[0100] For example, in response to an uplink request method for a vehicle gear position signal input by a user via keyboard, mouse, voice, or other input methods, the corresponding forward gear signal, reverse gear signal, parking gear signal, cruise control gear signal, etc., are displayed. In response to a downlink callback method for a vehicle gear position signal input by a user via keyboard, mouse, voice, or other input methods, the real-time signals corresponding to the forward gear signal, reverse gear signal, parking gear signal, cruise control gear signal, etc., are displayed.

[0101] In this embodiment of the application, based on the method name of the CAN signal method input by the user, at least one valid value of the CAN signal is displayed, thereby improving the efficiency and accuracy of acquiring the CAN signal.

[0102] The following describes an exemplary application of the script generation method provided in this application in a real-world scenario.

[0103] In related technologies, solutions for application-layer interfaces with vehicle CAN signals involve middleware processing the CAN signals and generating a vehicle signal matrix table. The application layer then uses the vehicle property manager (CarPropertyManager) to call or retrieve vehicle signals based on the matrix. However, the process of deriving the vehicle signal matrix from the application layer requires significant manpower and effort. Consequently, existing technologies suffer from the following problems: 1. Developers need to spend a lot of time processing and validating the vehicle signal matrix table; 2. Developers need to write a large amount of repetitive code to retrieve or retrieve vehicle signals; 3. Errors can occur during the coding process.

[0104] Please refer to Tables 1 and 2. Tables 1 and 2 are vehicle signal matrix tables automatically generated by middleware after sorting CAN signals in the prior art. There is still too much redundant information in them, which requires a lot of manpower and effort to call or obtain vehicle signals from the vehicle signal matrix table.

[0105] Table 1

[0106]

[0107]

[0108] Table 2

[0109]

[0110] In some embodiments, the present application is applied to scenarios where the vehicle infotainment system needs to read vehicle signals (such as vehicle gear position signals) or where the vehicle infotainment system needs to control the vehicle's electronic control unit (ECU).

[0111] For information on the problems and application scenarios of the aforementioned technologies, please refer to [link / reference needed]. Figure 4 , Figure 4 This application provides a schematic diagram of the implementation flow of a script generation method, which can be executed by the processor of a computer device. The flow includes steps S401 to S404, combining... Figure 4 The steps shown are explained.

[0112] Step S401: Obtain the standardized vehicle signal matrix table.

[0113] In some embodiments, it is first necessary to obtain the vehicle's CAN signal. Based on the table document filling format jointly defined by the application layer and framework layer developers, the vehicle's CAN signal is filled into the table to obtain a standardized vehicle signal matrix table (corresponding to the standardized document in the above embodiments). This includes: removing invalid and redundant information in the table and clarifying the function, uplink (method name, attribute identifier, domain identifier, and legal value), and downlink (method name, attribute identifier, domain identifier, and legal value).

[0114] Please refer to Table 3, which is a standardized vehicle signal matrix table provided in the embodiments of this application.

[0115] Table 3

[0116]

[0117] Step S402: Read the top column of the vehicle signal matrix table to generate an active request method.

[0118] In some embodiments, the upper column of the vehicle signal matrix table is parsed by the basic execution unit in the automated construction tool to generate an active request method (corresponding to the upper setting method in the above embodiments).

[0119] For example, during pre-compilation, the basic execution unit of the build script in the automated build tool is run to parse the gear information in the upper column of the vehicle signal matrix table, read the method name, attribute identifier, domain identifier, and valid value in the upper column, and thus generate an active request method. The active request method includes: first, reading an integer gear value to set the vehicle's gear status; then, calling the vehicle attribute manager's set integer attribute method to set the attribute identifier related to the vehicle's gear status and setting the valid range identifier of the gear value.

[0120] Step S403: Read the lower column of the vehicle signal matrix table to generate a listening callback method.

[0121] In some embodiments, the lower column of the vehicle signal matrix table is parsed by the basic execution unit in the automated construction tool to generate a listening callback method (corresponding to the lower column callback method in the above embodiments).

[0122] For example, during pre-compilation, the basic execution unit of the build script in the automated build tool is run to parse the gear information in the down column of the vehicle signal matrix table, read the method name, attribute identifier, field identifier, and valid value in the down column, and thus generate a listener callback method. The listener callback method includes: first observing or listening to the vehicle's gear status, and then returning the gear value of the vehicle's current gear status and the gear value after the gear status changes.

[0123] Step S404: Generate a script file based on the active request method and the listener callback method.

[0124] In some embodiments, the code corresponding to the active request method and the listener callback method is integrated to generate the final script file, and the script file is saved.

[0125] In this embodiment, during compilation, developers directly call the active request method and monitoring callback method in the script file to directly obtain vehicle signals. This saves a significant amount of manpower and improves the efficiency and accuracy of obtaining vehicle signals.

[0126] Based on the foregoing embodiments, this application provides a script generation device, which includes the included units and the modules included in each unit, which can be implemented by a processor in a computer device; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0127] Figure 5 This is a schematic diagram of the composition structure of a script generation device provided in an embodiment of this application, such as... Figure 5As shown, the script generation device 500 includes: an acquisition module 501, a first generation module 502, and a second generation module 503, wherein: the acquisition module 501 is used to acquire a standardized document of the vehicle during pre-compilation; the standardized document includes signal data of Controller Area Network (CAN) signals transmitted between the application layer and the framework layer in the vehicle; the first generation module 502 is used to generate a communication method for each CAN signal based on the signal data of each CAN signal in the standardized document; the communication method is used for the CAN signal transmitted between the application layer and the framework layer; the second generation module 503 is used to generate a script file according to the communication method of each CAN signal; the script file is used to be loaded during compilation so that the communication method in the script file is invoked.

[0128] In some embodiments, the communication method of the CAN signal includes a signal transmission code; the signal data includes the method name, attribute identifier, domain identifier, and legal value range of the CAN signal; the first generation module 502 is further configured to generate the signal transmission code of the CAN signal based on a preset method template, the method name, attribute identifier, domain identifier, and legal value range of the CAN signal.

[0129] In some embodiments, the CAN signal communication method further includes at least one of the following: verification code, process switching code, and log generation code; wherein, the verification code is used to verify the CAN signal to be transmitted; the process switching code is used to switch the process executing the signal transmission code; and the log generation code is used to generate a corresponding execution log when the communication method is running.

[0130] In some embodiments, the communication method of the CAN signal includes an uplink setting method and a downlink callback method; the first generation module 502 is further configured to set the parameters corresponding to the CAN signal through the framework layer by calling the uplink setting method based on the application layer, and to obtain the parameters corresponding to the CAN signal through the framework layer by calling the downlink callback method based on the application layer.

[0131] In some embodiments, the signal data includes the valid value range of the CAN signal; the communication method of the CAN signal further includes a verification code; the first generation module 502 is further configured to generate the verification code based on the valid value range of the CAN signal; wherein, when the communication method is an uplink setting method, the verification code is set before the signal transmission code; when the communication method is a downlink callback method, the verification code is set after the signal transmission code.

[0132] In some embodiments, the CAN signal communication method further includes process switching code; the first generation module 502 is further configured to generate first process switching code when the communication method is an uplink setting method, the first process switching code being used to switch from a child process to a main process; and to generate second process switching code when the communication method is a downlink callback method, the second process switching code being used to switch from a main process to a child process.

[0133] In some embodiments, the range of valid values ​​includes at least one valid value; the script generation module 500 further includes a display module (not shown in the figure), which is used to display at least one valid value of the CAN signal during compilation in response to the method name of the communication method input to the CAN signal.

[0134] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this application can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0135] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.

[0136] This application provides a computer device including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above-described method.

[0137] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium can be transient or non-transient.

[0138] This application provides a computer program including computer-readable code, wherein when the computer-readable code is executed in a computer device, a processor in the computer device performs some or all of the steps in the above-described method.

[0139] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0140] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0141] Figure 6 This application provides a hardware entity diagram of a computer device as an embodiment of the present application, such as... Figure 6 As shown, the hardware entity of the computer device 600 includes a processor 601 and a memory 602, wherein the memory 602 stores a computer program that can run on the processor 601, and the processor 601 executes the program to implement the steps in the method of any of the above embodiments.

[0142] The memory 602 stores computer programs that can run on the processor. The memory 602 is configured to store instructions and applications that can be executed by the processor 601. It can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data and video communication data) in the processor 601 and various modules in the computer device 600. It can be implemented by flash memory or random access memory (RAM).

[0143] The processor 601 executes the steps of any of the methods described above when executing a program. The processor 601 typically controls the overall operation of the computer device 600.

[0144] This application provides a computer storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the methods described in any of the above embodiments.

[0145] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0146] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.

[0147] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0148] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0149] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0150] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0151] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0152] Furthermore, in the various embodiments of this application, all functional units can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0153] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, magnetic disks, or optical disks.

[0154] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A script generation method, wherein, Applied to vehicles, the method includes: During pre-compilation, standardized documentation for the vehicle is acquired; the standardized documentation includes signal data of the Controller Area Network (CAN) signals transmitted between the application layer and the framework layer in the vehicle. Based on the signal data of each CAN signal in the standardized document, a communication method for each CAN signal is generated; the communication method is used to transmit the CAN signal between the application layer and the framework layer. A script file is generated according to the communication method of each CAN signal; the script file is used to be loaded during compilation so that the communication method in the script file is invoked.

2. The method according to claim 1, wherein, The communication method of the CAN signal includes signal transmission codes; the signal data includes the method name, attribute identifier, domain identifier, and legal value range of the CAN signal; the generation of the communication method for each CAN signal based on the signal data of each CAN signal in the standardized document includes: Based on the preset method template, the method name, attribute identifier, domain identifier, and legal value range of the CAN signal, the signal transmission code of the CAN signal is generated.

3. The method according to claim 2, wherein, The communication method of the CAN signal further includes at least one of the following: verification code, process switching code, and log generation code; The verification code is used to verify the CAN signal to be transmitted; the process switching code is used to switch the process executing the signal transmission code; and the log generation code is used to generate the corresponding execution log when the communication method is running.

4. The method according to claim 1, wherein, The CAN signal communication method includes an uplink setting method and a downlink callback method; the method further includes: The application layer calls the uplink setting method to set the parameters corresponding to the CAN signal through the framework layer, and the application layer calls the downlink callback method to obtain the parameters corresponding to the CAN signal through the framework layer.

5. The method according to claim 4, wherein, The signal data includes the legal value range of the CAN signal; the communication method of the CAN signal further includes a verification code; the method for generating the communication method of each CAN signal based on the signal data of each CAN signal in the standardized document includes: The verification code is generated based on the valid value range of the CAN signal; Wherein, when the communication method is an uplink setting method, the verification code is set before the signal transmission code; when the communication method is a downlink callback method, the verification code is set after the signal transmission code.

6. The method according to claim 4, wherein, The communication method for the CAN signal further includes process switching code; the method for generating the communication of each CAN signal based on the signal data of each CAN signal in the standardized document includes: When the communication method is an uplink setting method, a first process switching code is generated, which is used to switch from a child process to a main process. When the communication method is a downlink callback method, a second process switching code is generated, which is used to switch from the main process to the child process.

7. The method according to claim 2, wherein, The range of valid values ​​includes at least one valid value; the method further includes: During compilation, in response to the method name of the communication method inputting the CAN signal, at least one valid value of the CAN signal is displayed.

8. A script generation apparatus, wherein, Applied to vehicles, the device includes: The acquisition module is used to acquire the standardized documentation of the vehicle during pre-compilation; the standardized documentation includes signal data of the Controller Area Network (CAN) signals transmitted between the application layer and the framework layer in the vehicle. The first generation module is used to generate a communication method for each CAN signal based on the signal data of each CAN signal in the standardized document; the communication method is used to transmit the CAN signal between the application layer and the framework layer. The second generation module is used to generate a script file according to the communication method of each CAN signal; the script file is used to be loaded during compilation so that the communication method in the script file is invoked.

9. A computer device, wherein, The method includes a memory and a processor, the memory storing a computer program executable on the processor, characterized in that the processor, when executing the program, implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.