CN117111590A - Routine control method, device, equipment, medium and vehicle - Google Patents

Routine control method, device, equipment, medium and vehicle Download PDF

Info

Publication number
CN117111590A
CN117111590A CN202311380047.0A CN202311380047A CN117111590A CN 117111590 A CN117111590 A CN 117111590A CN 202311380047 A CN202311380047 A CN 202311380047A CN 117111590 A CN117111590 A CN 117111590A
Authority
CN
China
Prior art keywords
routine
state information
request
vehicle
preset conditions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311380047.0A
Other languages
Chinese (zh)
Other versions
CN117111590B (en
Inventor
辛彩云
程云江
邢国成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shengrui Transmission Co Ltd
Original Assignee
Shengrui Transmission Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shengrui Transmission Co Ltd filed Critical Shengrui Transmission Co Ltd
Priority to CN202311380047.0A priority Critical patent/CN117111590B/en
Publication of CN117111590A publication Critical patent/CN117111590A/en
Application granted granted Critical
Publication of CN117111590B publication Critical patent/CN117111590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Selective Calling Equipment (AREA)

Abstract

The present disclosure relates to a routine control method, apparatus, device, medium, and vehicle. The routine control method comprises the following steps: acquiring a routine request sent by a client; when the routine request is a starting routine, determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine, wherein each preset condition is respectively provided with a corresponding identifier; when the current state information of the vehicle is determined not to meet at least one of a plurality of preset conditions, returning a first result and target identifiers respectively corresponding to the plurality of preset conditions; determining first state information corresponding to the fact that the vehicle does not meet preset conditions based on the target identifier; the control vehicle is adjusted from the first state information to the second state information, and a starting routine is executed, so that corresponding operation can be made when the vehicle state information is determined not to meet the preset conditions according to the identifiers set by each preset condition, and the purpose of routine control is achieved.

Description

Routine control method, device, equipment, medium and vehicle
Technical Field
The disclosure relates to the technical field of vehicles, and in particular relates to a routine control method, a routine control device, routine control equipment, routine control media and a vehicle.
Background
The unified diagnostic service (Unified Diagnostic Services, UDS) is a generic diagnostic protocol for automobiles, located at the application layer in the OSI model, which can be implemented on different automobile buses, is a vehicle-mounted diagnostic protocol standard widely used in the current automotive field, is an information interaction between diagnostic devices and electronic control units (Electronic Control Unit, ECU), and is generally requested by the diagnostic devices, and the ECU responds. In the process of the diagnosis device making a request, the ECU makes a response, involving routine control, the purpose of the routine control service is that the diagnosis device or the client or the host computer uses this service to execute a defined sequence of steps and acquire a related result of a specific sequence, such as checking whether the condition for flushing is satisfied, performing data calibration, acquiring a calibration result, or the like.
The current industry is implemented according to an ISO 14229 protocol or a custom customized flow of a customer enterprise, that is, in the process of executing routine control, the current diagnosis session mode, the length of request data, whether the request data is accessed safely, whether a routine identifier is supported or not, and whether sub-function parameters are supported or not are sequentially judged, wherein the sub-function parameters comprise a starting routine, a stopping routine and a request routine result, the vehicle needs to meet the preconditions of executing the routine when the routine is started, and whether the request sequence is correct or not needs to be judged when the stopping routine and the request routine result are required, that is, whether a starting routine request is successfully responded before the request. In the existing routine control process, when the precondition of the starting routine is not satisfied, a negative response is directly returned, and when the routine result is requested, if the diagnostic equipment or the client or the upper computer does not request the starting routine before or the ECU does not successfully respond to the starting routine, the negative response is returned, namely, the result of the error of the request sequence is returned.
However, in the existing routine control process, for example, when there are a plurality of preconditions corresponding to the starting routine, it is not known which precondition is specifically not satisfied, that is, specific operation cannot be performed for the precondition that is not satisfied, and thus the purpose of routine control cannot be achieved.
Disclosure of Invention
In order to solve the technical problems, the present disclosure provides a routine control method, a device, equipment, a medium and a vehicle.
A first aspect of an embodiment of the present disclosure provides a routine control method, including:
acquiring a routine request sent by a client;
when the routine request is a starting routine, determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine, wherein each preset condition is respectively provided with a corresponding identifier, and the identifiers are used for representing whether the current state information of the vehicle meets the preset conditions;
when the current state information of the vehicle is determined not to meet at least one of a plurality of preset conditions, returning a first result and target identifiers respectively corresponding to the plurality of preset conditions;
determining first state information corresponding to the fact that the vehicle does not meet preset conditions based on the target identifier;
And controlling the vehicle to adjust from the first state information to second state information, and executing a starting routine, wherein the second state information is used for representing the state information corresponding to the condition that the vehicle meets the preset condition.
A second aspect of the embodiments of the present disclosure provides a routine control apparatus, including:
the request acquisition module is used for acquiring a routine request sent by the client;
the first determining module is used for determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine or not when the routine request is the starting routine, and each preset condition is respectively provided with a corresponding identifier which is used for representing whether the current state information of the vehicle meets the preset conditions or not;
the result returning module is used for returning a first result and target identifiers respectively corresponding to the plurality of preset conditions when the current state information of the vehicle is determined to not meet at least one of the plurality of preset conditions;
the second determining module is used for determining first state information corresponding to the fact that the vehicle does not meet the preset condition based on the target identifier;
the routine control module is used for controlling the vehicle to be adjusted from the first state information to the second state information, and executing a starting routine, wherein the second state information is used for representing the state information corresponding to the condition that the vehicle meets the preset condition.
A third aspect of the disclosed embodiments provides an electronic device, comprising:
a processor;
a memory for storing executable instructions;
the processor is configured to read the executable instructions from the memory, and execute the executable instructions to implement the routine control method provided in the first aspect.
A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the routine control method provided in the first aspect described above.
A fifth aspect of an embodiment of the present disclosure provides a vehicle comprising the electronic device provided in the third aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
according to the routine control method, the device, the medium and the vehicle, the routine request sent by the client can be obtained, whether the current state information of the vehicle meets a plurality of preset conditions corresponding to a starting routine or not is determined in response to the routine request being the starting routine, each preset condition is respectively provided with a corresponding identifier used for representing whether the current state information of the vehicle meets the preset conditions or not, when the current state information of the vehicle is determined to not meet at least one of the preset conditions, a first result and target identifiers respectively corresponding to the preset conditions are returned, the first state information corresponding to the preset conditions is determined based on the target identifiers, the vehicle is controlled to be adjusted to the second state information from the first state information, the starting routine is executed, the second state information is used for representing the state information corresponding to the preset conditions of the vehicle, therefore, whether the state information of the vehicle corresponding to the preset conditions is met or not is determined according to the identifiers set by each preset condition, when the current state information of the vehicle is determined to not meet at least one of the preset conditions, the state information corresponding to the preset conditions can be adaptively adjusted according to the identifiers corresponding to the preset conditions, the preset conditions are determined to meet the preset conditions, the state information corresponding to the preset conditions is met, and the routine is controlled, and the routine is executed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a routine control method provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of another routine control method provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a routine control device provided in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
In general, in the existing routine control process, when the precondition of the starting routine is not satisfied, a negative response is directly returned, and when the routine result is requested, if the starting routine is not requested, a negative response, that is, a result of a request sequence error, is returned. However, in the existing routine control process, for example, when there are a plurality of preconditions corresponding to the starting routine, it is not known which precondition is specifically not satisfied, that is, specific operation cannot be performed for the precondition that is not satisfied, and thus the purpose of routine control cannot be achieved. In view of this problem, the embodiments of the present disclosure provide a routine control method, which is described below in connection with specific embodiments.
Fig. 1 is a flowchart of a routine control method provided in an embodiment of the present disclosure, where the method may be performed by a routine control device, and the routine control device may be implemented in software and/or hardware, and the routine control device may be configured in an electronic device, for example, a server or a terminal, where the terminal specifically includes a mobile phone, a computer or a tablet, a vehicle-mounted terminal, and so on.
As shown in fig. 1, the routine control method provided in the present embodiment includes the following steps.
S110, acquiring a routine request sent by the client.
In the embodiment of the disclosure, when the electronic device needs to perform routine control, a routine request sent by a client is obtained.
The routine request may include information such as routine identification information (e.g., a routine identifier or a unique identifier corresponding to the routine), a sub-function parameter corresponding to the routine, and so on.
The sub-function parameters corresponding to the routine may include a parameter (e.g., sub-function parameter 01) for specifying that the electronic control unit should start the routine indicated by the routine identification information, a parameter (e.g., sub-function parameter 02) for specifying that the electronic control unit should stop the routine indicated by the routine identification information, a parameter (e.g., sub-function parameter 03) for specifying that the electronic control unit should return the result of the routine indicated by the routine identification information, and the like.
Specifically, when the user wants to execute a certain routine, a routine request is sent to the electronic control unit through the client or the host computer or the like, and the electronic control unit receives the routine request.
The routine request may be a routine request for an automatic transmission unified diagnostic service (Unified Diagnostic Services, UDS) in the vehicle, or may be a routine request for other services, for example.
S120, when the routine request is a starting routine, determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine, wherein each preset condition is respectively provided with a corresponding identifier, and the identifiers are used for representing whether the current state information of the vehicle meets the preset conditions.
In the embodiment of the disclosure, after receiving a routine request, the electronic device analyzes the routine request, determines a control parameter corresponding to the routine request based on sub-function parameter information in the routine request, determines that the routine request is a start routine when the sub-function parameter is a parameter for specifying that the electronic control unit should start a routine indicated by the routine identification information, and determines whether the current state information of the vehicle satisfies a plurality of preset conditions corresponding to the start routine by comparing the current state information of the vehicle with the plurality of preset conditions when the routine request is the start routine.
In the embodiment of the present disclosure, a plurality of preset conditions corresponding to a start-up routine may be understood as preconditions that are required to operate the vehicle to execute the start-up routine.
For example, when the executed start-up routine is for performing the acceleration sensor calibration function, the execution of the acceleration sensor calibration function needs to have at least the following six preconditions, that is, a plurality of preset conditions corresponding to the start-up routine: (1) the engine speed signal is active; (2) the engine speed is 0, namely the power-on does not strike fire; (3) The output rotating speed signal is effective, and the output rotating speed is 0, namely the vehicle speed is 0; (4) the vehicle is in a horizontal state; (5) the whole vehicle does not shake; (6) acceleration sensor has no trouble.
The number of the preset conditions is different according to different preset conditions corresponding to different starting routines, wherein the preset conditions can be determined in advance according to specific conditions of functions corresponding to the routines so as to ensure the effectiveness and accuracy of starting routine execution.
In some embodiments of the present disclosure, a bit for determining whether the current state information of the vehicle satisfies the preset condition is set for each preset condition, if the current state information of the vehicle satisfies the preset condition corresponding to the bit, the value of the bit is 0, and if the current state information of the vehicle does not satisfy the preset condition corresponding to the bit, the value of the bit is 1.
For example, when the preset conditions are six, a unit8 type may be selected, a bit is set for each preset condition, the bit0 corresponding to the condition 1, the bit1 corresponding to the condition 2, the bit2 corresponding to the condition 3, the bit3 corresponding to the condition 4, the bit4 corresponding to the condition 5, the bit5 corresponding to the condition 6, the bit6 and the bit7 are set as true values, that is, the preset conditions are met, and the bit7 is used for determining that the preset conditions are not met when the bit for representing the condition is available in the bits in the conditions 1 to 6, and then whether the vehicle state information which does not meet the preset conditions is available can be determined through the value of the bit7, so that the user can be clear at a glance. In some examples, bit6 is a condition without a correspondence, and may be set to a true value of 0, that is, a preset condition is satisfied. bit7 is used as a reserved bit, and 0 or 1 can be set currently, and the reserved bit does not represent a specific condition, when at least one condition is not met, the reserved bit is used for subsequent logic to confirm that at least one condition is not met currently, the reserved bit is in bit with 0x80 or the highest bit is processed to be 1 regardless of whether bit7 is currently set to 0 or 1, and the reserved bit of the highest bit such as bit7 under hexadecimal of unit8 is proved to be not met currently, and the value of the reserved bit of the highest bit such as bit7 is 1.
Alternatively, different types such as unit16 type, unit32 type, etc. may be selected according to the number of preset conditions.
In other embodiments of the present disclosure, an identifier other than a bit may be set for each preset condition to identify whether the current state information of the vehicle satisfies the preset condition, which is not limited herein.
And S130, returning a first result and target identifiers respectively corresponding to the plurality of preset conditions when the current state information of the vehicle is determined not to meet at least one of the plurality of preset conditions.
In the embodiment of the disclosure, after comparing the current state information of the vehicle with a plurality of preset conditions, the electronic device returns a first result and a target identifier corresponding to each of the plurality of preset conditions when determining that the current state information of the vehicle does not meet at least one of the plurality of preset conditions.
In the disclosed embodiments, the first result may be a positive response as well as a negative response identification.
The target identifiers corresponding to the preset conditions respectively can be bits used for representing whether the condition is met, if the value of the bit0 corresponding to the condition 1 is 0, the value of the bit1 corresponding to the condition 2 is 1, whether each condition is met or not can be determined through the value of the bit corresponding to each condition, namely, the initial value of the bit corresponding to each condition is set to be true value, if the condition is not met, the value of the bit corresponding to the condition is set to be 1, and therefore whether the condition is met or not can be determined directly according to the bit value of each condition.
And S140, determining that the vehicle does not meet the first state information corresponding to the preset condition based on the target identifier.
In the embodiment of the present disclosure, after the electronic device obtains the target identifiers corresponding to the multiple preset conditions respectively, it may directly determine whether the current state information of the vehicle meets the condition by using the value of the identifier corresponding to each condition, if the value of bit0 corresponding to the condition 1 is 1, it indicates that the condition 1 is not met, and further, it may directly determine which specific condition is not met, if the condition 1 is that the engine rotation speed signal is valid, it is determined that the current state information of the vehicle does not meet the condition that the engine rotation speed signal is valid, i.e., the first state information corresponding to the condition that the preset condition is not met is that the engine rotation speed signal is invalid.
S150, controlling the vehicle to adjust from the first state information to second state information, and executing a starting routine, wherein the second state information is used for representing the state information corresponding to the condition that the vehicle meets the preset condition.
In the embodiment of the disclosure, after determining that the vehicle does not meet the first state information corresponding to the preset condition, the electronic device performs an operation corresponding to the first state information, further controls the vehicle to adjust from the first state information to the second state information, so as to adjust the first state information of the vehicle to the state information corresponding to the preset condition, and then performs a starting routine.
For example, when the first state information is that the vehicle speed of the vehicle is not zero revolutions per second, the vehicle is controlled to reach zero revolutions per second so that the vehicle speed satisfies the condition.
In the embodiment of the present disclosure, the start routine may be executed when all preset conditions corresponding to the routine request are satisfied.
In the embodiment of the disclosure, a routine request sent by a client can be acquired, when the routine request is a starting routine, whether current state information of a vehicle meets a plurality of preset conditions corresponding to the starting routine is determined, each preset condition is respectively provided with a corresponding identifier, the identifiers are used for representing whether the current state information of the vehicle meets the preset conditions, when the current state information of the vehicle is determined not to meet at least one of the preset conditions, a first result and a target identifier respectively corresponding to the preset conditions are returned, the first state information corresponding to the preset conditions is determined based on the target identifier, the vehicle is controlled to be adjusted to second state information from the first state information, the starting routine is executed, the second state information is used for representing the state information corresponding to the preset conditions is used for representing the vehicle, therefore, whether the state information of the vehicle corresponding to the preset conditions is met or not can be determined according to the identifiers set by each preset condition, when the preset conditions are determined not met, the state information of the vehicle corresponding to the preset conditions can be adaptively adjusted according to the identifiers corresponding to the identifiers, so that the state information of the vehicle corresponding to the preset conditions is met, and the preset conditions are met, and the routine is controlled.
On the basis of the above-described embodiment of the present disclosure, before determining whether the current state information of the vehicle satisfies a plurality of preset conditions corresponding to the start-up routine, the routine control method may further include: judging whether the diagnosis session mode supports routine request; when a session mode support routine request is diagnosed, judging whether the routine request is a valid request, so that in the case that the routine request is a valid request, whether current state information of a vehicle meets a plurality of preset conditions corresponding to a starting routine is determined.
Specifically, the types of the diagnostic session modes include a default session (indicated by 0x 01), a programming session (indicated by 0x 02) and an extended diagnostic session (indicated by 0x 03), and routine control can be normally executed only in the extended diagnostic session mode, so that it is required to determine whether the current diagnostic session mode is the extended diagnostic session or not after receiving the routine request, and if not, it is determined that the current diagnostic session mode does not support execution of the routine request, and then a result of the unsupported is returned; if the vehicle is in the diagnosis session mode, the diagnosis session mode is indicated to support the routine request, and whether the routine request is a valid request is further judged, so that in the case that the routine request is a valid request, whether the current state information of the vehicle meets a plurality of preset conditions corresponding to a starting routine is determined.
In the embodiment of the present disclosure, the steps of determining whether the routine request is a valid request are sequentially: whether the request data length is correct, whether the request is already through secure access, whether the request identification information is supported and whether the sub-function parameters corresponding to the request are supported are judged, and only if all the above are met, the routine request can be considered to be a valid request.
In the embodiment of the disclosure, before judging whether the current state information of the vehicle meets a plurality of preset conditions corresponding to a starting routine, the validity of the current diagnosis session mode and the routine request can be firstly judged, so that the routine request can be further judged whether the preset conditions are met or not under the condition that the routine request is a valid request, and the validity and the accuracy of routine request execution are improved.
In an embodiment of the present disclosure, the routine control method may further include: executing a starting routine when the current state information of the vehicle is determined to meet a plurality of preset conditions, and determining whether an executing action corresponding to the starting routine is completed or not; upon determining that the execution action is complete, a positive response is generated and returned.
Specifically, when the current state information of the vehicle is determined to meet all conditions in a plurality of preset conditions, the electronic device indicates that the conditions are provided for executing the starting routine, and then executes the starting routine, in the process of executing the starting routine, whether the executing action corresponding to the starting routine is completed is determined, when the executing action is determined to be completed, a positive response is generated, and the positive response is returned, and when the executing action corresponding to the starting routine is determined to be incomplete, a result that the request is valid but the executing action is not completed is returned, and meanwhile, whether the executing action corresponding to the starting routine is completed is continuously judged.
In an embodiment of the present disclosure, the routine control method may further include: when the routine request is a return routine result, judging whether a starting routine corresponding to the return routine result is successfully requested before the routine request; when it is determined that the start-up routine corresponding to the return routine result is not successfully requested before the routine request, judging whether a flag bit signal of the start-up routine corresponding to the return routine result is in a first state, wherein the first state is used for representing that the start-up routine corresponding to the return routine result is requested before the routine request, but is suspended because the current state information of the vehicle does not meet the preset condition corresponding to the start-up routine; and when the flag bit signal is in the first state, returning a second result, and setting the flag bit signal from the first state to the second state so as to initialize the first state, wherein the flag bit signal is used for judging whether the startup routine is requested or not when the return routine result is executed after the startup routine is executed next time.
Specifically, the electronic device, after receiving the routine request, parses the routine request, determines a control parameter corresponding to the routine request based on the sub-function parameter information in the routine request, determines, when the sub-function parameter is a parameter for specifying a routine result indicated by the routine identification information to be returned by the electronic control unit, that the routine request is a return routine result, further determines whether a start-up routine corresponding to the return routine result has been successfully requested before the return routine result is executed, further determines whether a start-up routine has not been initiated before the routine request is determined, or whether the start-up routine has been initiated before the routine is suspended because the current state information of the vehicle does not satisfy the preset condition corresponding to the start-up routine, and therefore, needs to determine whether a flag signal of the start-up routine corresponding to the return routine result is a first state, that is, if so, determines that the start-up routine has been initiated but is suspended because the current state information of the vehicle does not satisfy the preset condition corresponding to the start-up routine is suspended, returns a second result, and sets the flag signal from the first state to the second state; if it is determined that the start-up routine has not been initiated before, it is determined that the request sequence is incorrect.
The second result comprises a target preset condition and routine identification information corresponding to a return routine result, wherein the target preset condition is a condition which is not met by the vehicle in preset conditions corresponding to a starting routine corresponding to the return routine result.
Illustratively, if the condition 1 is that the vehicle speed of the vehicle is zero and the condition 1 is not satisfied, the condition that is not satisfied, that is, the condition 1 is not satisfied, is returned so that the user can know which specific condition is not satisfied.
In the embodiment of the disclosure, when the response to the routine request is the return routine result, whether the start routine corresponding to the return routine result has been successfully requested before the routine request can be judged; when the starting routine corresponding to the return routine result is not successfully requested before the routine request is determined, judging whether a flag bit signal of the starting routine corresponding to the return routine result is in a first state, returning a second result when the flag bit signal is in the first state, and setting the flag bit signal to be in the second state from the first state, thereby feeding back the condition that the current state information of the vehicle is not specifically satisfied to a user when the starting routine initiated is stopped due to the fact that the condition is not satisfied, and simultaneously setting the flag position which does not satisfy the condition to be in the second state, so that when the return routine result is received again, determining the specific reason of the negative response corresponding to the return routine result, and improving the efficiency of routine control.
In an embodiment of the present disclosure, the routine control method may further include: in response to the routine request being a stop routine, determining whether a start routine corresponding to the stop routine has been successfully requested before the routine request; upon determining that the start routine corresponding to the stop routine was not successfully requested prior to the routine request, a third result (i.e., a negative response code) is returned, the third result being used to characterize that the request sequence is incorrect.
Specifically, after receiving the routine request, the electronic device analyzes the routine request, determines a control parameter corresponding to the routine request based on the sub-function parameter information in the routine request, determines that the routine request is a stop routine when the sub-function parameter is a parameter for prescribing that the electronic control unit should stop the routine indicated by the routine identification information, further determines whether a start routine corresponding to the stop routine has been requested before the routine request and has a positive response, and returns a result for characterizing that the request sequence is incorrect when it is determined that the start routine corresponding to the stop routine has not been successfully requested before the routine request; further determining if a positive response is ready if a start routine corresponding to a stop routine has been requested and a positive response is present before the routine request, if so, returning a positive response if otherwise, returning an instruction that the request is valid but the action is not complete, and continuing to make a determination, if the positive response is not ready, periodically returning a negative corresponding code to indicate that the corresponding code is currently executing until a positive response is returned, and stopping the routine.
In the embodiment of the disclosure, when the response to the routine request is a stop routine, whether the start routine corresponding to the stop routine is successfully requested before the routine request can be judged, and further, the result is fed back according to the judgment result, so that a user can effectively know the result corresponding to the routine request in time, and the user experience is improved.
Fig. 2 is a flowchart of another routine control method provided by the embodiment of the present disclosure, which is illustrated by way of a specific example, as shown in fig. 2, and is as follows:
firstly, the electronic device acquires a routine request sent by a user side, after acquiring the routine request, judges whether a diagnosis session mode is met, returns to NRC7F to be not supported by routine control service in the current session mode if the diagnosis session mode is not met, wherein NRC7F further judges whether the requested data length is correct if the requested data length is met, returns to NRC13 to be incorrect if the requested data length is incorrect, further judges whether the routine request passes through secure access if the requested data length is correct, returns to NRC33 secure access rejection if the requested data length is not correct, wherein NRC33 represents secure access rejection, continues to judge whether request identification information is supported if the requested data identification information is passed, returns to NRC31 to be undefined if the requested data identification information is not defined, neither exists routine service corresponding to the requested data, if the requested data length is supported, indicates that the routine request is within a service routine control range, judges whether a sub-function parameter is not supported, returns to NRC12 if the sub-function parameter is not supported, and further judges that the sub-function parameter is not supported by the routine is not controlled to correspond to the function parameter if the sub-function parameter is further according to the instruction if the routine is not supported.
When the sub-function parameter is 01, namely, when a routine is started, judging whether the current state information of the vehicle meets the preset condition corresponding to the starting routine, if not, determining the unsatisfied condition according to the identifier such as the bit value corresponding to each preset condition, returning to the NRC22 preset condition, not meeting the condition, setting the flag bit signal to the first state, if the preset condition is met, further judging whether the positive response is ready, if yes, generating the positive response, and returning the positive response, if no, returning to the NRC78 to request that the operation is effective but the operation is incomplete, wherein the NRC78 represents that the request is effective but the operation is incomplete, and further judging whether the positive response is ready.
When the sub-function parameter is 02, namely, when the routine is stopped, judging whether the sub-function parameter 01 is successfully requested before, namely, whether the sub-function parameter 01 is requested before and has positive response, if so, further judging whether the positive response is ready, and executing the operation corresponding to the sub-function parameter 01; if not, return NRC24 request sequence is incorrect, where NRC24 represents the request sequence is incorrect.
When the sub-function parameter is 03, namely, when a routine result is returned, judging whether the sub-function parameter 01 is successfully requested before, namely, whether the sub-function parameter 01 is requested before and has positive response, if yes, further judging whether the execution work is completed, if yes, returning the positive response, if not, returning the NRC78 to request to be effective but the execution action is not completed, further judging whether the current state information of the vehicle always meets the preset condition, if yes, judging whether the execution work is completed, if not, returning the condition which is not met, and setting a flag bit signal which does not meet the condition from the first state to the second state; if the sub-function parameter 01 is not successfully requested before, judging whether the flag bit signal which does not meet the condition is set in a first state, if so, returning to the condition which does not meet the condition, and setting the flag bit signal which does not meet the condition from the first state to a second state, and if not, returning to the NRC24 request sequence.
In the embodiment of the disclosure, different routine control methods can be determined according to different sub-function parameters corresponding to a routine request, and identifiers are set for a plurality of preset parameters corresponding to the routine request at the same time, so that it is determined according to the identifiers which specific conditions in the preset conditions are not met by the current state of the vehicle, vehicle state information corresponding to the preset conditions is adaptively adjusted according to the identifiers corresponding to the specific conditions which are not met, so that the vehicle state information meets the preset conditions, and the routine request is executed, thereby achieving the purpose of routine control.
Fig. 3 is a schematic structural diagram of a routine control device provided in an embodiment of the present disclosure.
In the embodiment of the disclosure, the routine control device may be disposed in the electronic device, and is understood to be part of the functional modules in the electronic device. Specifically, the electronic device may be a server or a terminal, where the terminal specifically includes a mobile phone, a computer or a tablet computer, a vehicle-mounted terminal, and the like, which is not limited herein.
As shown in fig. 3, the routine control apparatus 300 may include a request acquisition module 310, a first determination module 320, a result return module 330, a second determination module 340, and a routine control module 350.
The request acquisition module 310 may be used to acquire routine requests sent by clients.
The first determining module 320 may be configured to determine, in response to the routine request being a start routine, whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the start routine, where each preset condition is respectively provided with a corresponding identifier, and the identifier is used to characterize whether the current state information of the vehicle meets the preset conditions.
The result returning module 330 may be configured to return the first result and the target identifier corresponding to the plurality of preset conditions, respectively, when it is determined that the current state information of the vehicle does not satisfy at least one of the plurality of preset conditions.
The second determining module 340 may be configured to determine, based on the target identifier, first state information corresponding to the vehicle not meeting the preset condition.
The routine control module 350 may be configured to control the vehicle to adjust from the first state information to second state information, and execute a startup routine, where the second state information is used to represent state information corresponding to the vehicle meeting the preset condition.
In the embodiment of the disclosure, a routine request sent by a client can be acquired, when the routine request is a starting routine, whether current state information of a vehicle meets a plurality of preset conditions corresponding to the starting routine is determined, each preset condition is respectively provided with a corresponding identifier, the identifiers are used for representing whether the current state information of the vehicle meets the preset conditions, when the current state information of the vehicle is determined not to meet at least one of the preset conditions, a first result and a target identifier respectively corresponding to the preset conditions are returned, the first state information corresponding to the preset conditions is determined based on the target identifier, the vehicle is controlled to be adjusted to second state information from the first state information, the starting routine is executed, the second state information is used for representing the state information corresponding to the preset conditions is used for representing the vehicle, therefore, whether the state information of the vehicle corresponding to the preset conditions is met or not can be determined according to the identifiers set by each preset condition, when the preset conditions are determined not met, the state information of the vehicle corresponding to the preset conditions can be adaptively adjusted according to the identifiers corresponding to the identifiers, so that the state information of the vehicle corresponding to the preset conditions is met, and the preset conditions are met, and the routine is controlled.
In some embodiments of the present disclosure, the routine control apparatus 300 may further include a determination module.
The judging module may be configured to judge whether the diagnostic session mode supports the routine request before determining whether the current state information of the vehicle satisfies a plurality of preset conditions corresponding to the start-up routine; when a session mode support routine request is diagnosed, judging whether the routine request is a valid request, so that in the case that the routine request is a valid request, whether current state information of a vehicle meets a plurality of preset conditions corresponding to a starting routine is determined.
In some embodiments of the present disclosure, the routine control device 300 may further include a third determination module.
The third determining module may be configured to execute the start-up routine and determine whether an execution action corresponding to the start-up routine is completed when it is determined that the current state information of the vehicle satisfies a plurality of preset conditions; upon determining that the execution action is complete, a positive response is generated and returned.
In some embodiments of the present disclosure, the routine control device 300 may further include a first control module.
The first control module may be configured to determine, in response to the routine request being a return routine result, whether a startup routine corresponding to the return routine result has been successfully requested before the routine request; when it is determined that the start-up routine corresponding to the return routine result is not successfully requested before the routine request, judging whether a flag bit signal of the start-up routine corresponding to the return routine result is in a first state, wherein the first state is used for representing that the start-up routine corresponding to the return routine result is requested before the routine request, but is suspended because the current state information of the vehicle does not meet the preset condition corresponding to the start-up routine; and when the flag bit signal is in the first state, returning a second result, and setting the flag bit signal from the first state to the second state so as to initialize the first state.
In some embodiments of the present disclosure, the second result includes a target preset condition and routine identification information corresponding to a return routine result, where the target preset condition is a condition that the vehicle does not meet in preset conditions corresponding to a start routine corresponding to the return routine result.
In some embodiments of the present disclosure, the routine control device 300 may further include a second control module.
The second control module may be configured to determine, in response to the routine request being a stop routine, whether a start routine corresponding to the stop routine has been successfully requested before the routine request; upon determining that the start routine corresponding to the stop routine was not successfully requested prior to the routine request, a third result is returned, the third result being used to characterize that the request sequence is incorrect.
It should be noted that, the routine control device 300 shown in fig. 3 may perform each step in the above method embodiment, and implement each process and effect in the above method embodiment, which are not described herein.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
In the embodiment of the present disclosure, the electronic device shown in fig. 4 may be a server or a terminal, where the terminal specifically includes a mobile phone, a computer or a tablet computer, a vehicle-mounted terminal, and the like, which is not limited herein.
As shown in fig. 4, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.
In particular, the processor 410 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present disclosure.
Memory 420 may include mass storage for information or instructions. By way of example, and not limitation, memory 420 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of these. Memory 420 may include removable or non-removable (or fixed) media, where appropriate. Memory 420 may be internal or external to the integrated gateway device, where appropriate. In a particular embodiment, the memory 420 is a non-volatile solid state memory. In a particular embodiment, the Memory 420 includes Read-Only Memory (ROM). The ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (Electrical Programmable ROM, EPROM), electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), electrically rewritable ROM (Electrically Alterable ROM, EAROM), or flash memory, or a combination of two or more of these, where appropriate.
The processor 410 reads and executes the computer program instructions stored in the memory 420 to perform the steps of the routine control method provided by the embodiments of the present disclosure.
In one example, the electronic device may also include a transceiver 430 and a bus 440. As shown in fig. 4, the processor 410, the memory 420 and the transceiver 430 are connected to each other through a bus 440 and perform communication with each other.
Bus 440 includes hardware, software, or both. By way of example, and not limitation, the buses may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics BUS, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) BUS, a Front Side BUS (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industrial Standard Architecture, ISA) BUS, an InfiniBand interconnect, a Low Pin Count (LPC) BUS, a memory BUS, a micro channel architecture (Micro Channel Architecture, MCa) BUS, a peripheral control interconnect (Peripheral Component Interconnect, PCI) BUS, a PCI-Express (PCI-X) BUS, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) BUS, a video electronics standards association local (Video Electronics Standards Association Local Bus, VLB) BUS, or other suitable BUS, or a combination of two or more of these. Bus 440 may include one or more buses, where appropriate.
The present disclosure also provides a computer-readable storage medium, which may store a computer program that, when executed by a processor, causes the processor to implement the routine control method provided by the embodiments of the present disclosure.
The storage medium may, for example, include a memory 420 of computer program instructions executable by the processor 410 of the electronic device to perform the routine control methods provided by the embodiments of the present disclosure. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, a random access memory (Random Access Memory, RAM), a Compact Disc ROM (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiment of the disclosure further provides a vehicle, which includes the electronic device and can implement the processes and effects of the foregoing embodiments of the disclosure, which are not described herein.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A routine control method, characterized by comprising:
acquiring a routine request sent by a client;
when the routine request is a starting routine, determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine, wherein each preset condition is respectively provided with a corresponding identifier, and the identifiers are used for representing whether the current state information of the vehicle meets the preset conditions;
when the current state information of the vehicle is determined not to meet at least one of the preset conditions, returning a first result and target identifiers respectively corresponding to the preset conditions;
determining first state information corresponding to the fact that the vehicle does not meet preset conditions based on the target identifier;
and controlling the vehicle to adjust from the first state information to second state information, and executing the starting routine, wherein the second state information is used for representing the state information corresponding to the condition that the vehicle meets the preset condition.
2. The method according to claim 1, characterized in that before said determining whether the current state information of the vehicle satisfies a plurality of preset conditions corresponding to the start-up routine, the method comprises:
Judging whether the routine request is supported by the diagnosis session mode;
and when the routine request is supported by the diagnosis session mode, judging whether the routine request is a valid request, so that if the routine request is a valid request, determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine.
3. The method according to claim 1, wherein the method further comprises:
executing the starting routine when determining that the current state information of the vehicle meets the plurality of preset conditions, and determining whether an executing action corresponding to the starting routine is completed or not;
upon determining that the execution action is complete, a positive response is generated and returned.
4. The method according to claim 1, wherein the method further comprises:
when the routine request is a return routine result, judging whether a starting routine corresponding to the return routine result is successfully requested before the routine request;
when it is determined that the start-up routine corresponding to the return routine result is not successfully requested before the routine request, judging whether a flag bit signal of the start-up routine corresponding to the return routine result is in a first state, wherein the first state is used for representing that the start-up routine corresponding to the return routine result is requested before the routine request but is suspended because the current state information of the vehicle does not meet the preset condition corresponding to the start-up routine;
And when the zone bit signal is in the first state, returning a second result, and setting the zone bit signal from the first state to the second state so as to initialize the first state.
5. The method of claim 4, wherein the second result includes a target preset condition and routine identification information corresponding to a return routine result, the target preset condition being a condition that the vehicle does not satisfy in preset conditions corresponding to a start routine corresponding to the return routine result.
6. The method according to claim 1, wherein the method further comprises:
in response to the routine request being a stop routine, judging whether a start routine corresponding to the stop routine has been successfully requested before the routine request;
upon determining that a start routine corresponding to the stop routine was not successfully requested prior to the routine request, a third result is returned, the third result being used to characterize that the request sequence is incorrect.
7. A routine control apparatus, characterized by comprising:
the request acquisition module is used for acquiring a routine request sent by the client;
the first determining module is used for determining whether the current state information of the vehicle meets a plurality of preset conditions corresponding to the starting routine or not when the routine request is the starting routine, wherein each preset condition is respectively provided with a corresponding identifier, and the identifiers are used for representing whether the current state information of the vehicle meets the preset conditions or not;
The result returning module is used for returning a first result and target identifiers respectively corresponding to the preset conditions when the current state information of the vehicle is determined not to meet at least one of the preset conditions;
the second determining module is used for determining first state information corresponding to the fact that the vehicle does not meet the preset condition based on the target identifier;
the routine control module is used for controlling the vehicle to be adjusted to second state information from the first state information, and executing the starting routine, wherein the second state information is used for representing the state information corresponding to the condition that the vehicle meets the preset condition.
8. An electronic device, comprising:
a processor;
a memory for storing executable instructions;
wherein the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the routine control method of any of the preceding claims 1-6.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program, which when executed by a processor, causes the processor to implement the routine control method of any one of the preceding claims 1-6.
10. A vehicle comprising the electronic device of claim 8.
CN202311380047.0A 2023-10-24 2023-10-24 Routine control method, device, equipment, medium and vehicle Active CN117111590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311380047.0A CN117111590B (en) 2023-10-24 2023-10-24 Routine control method, device, equipment, medium and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311380047.0A CN117111590B (en) 2023-10-24 2023-10-24 Routine control method, device, equipment, medium and vehicle

Publications (2)

Publication Number Publication Date
CN117111590A true CN117111590A (en) 2023-11-24
CN117111590B CN117111590B (en) 2024-01-02

Family

ID=88795128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311380047.0A Active CN117111590B (en) 2023-10-24 2023-10-24 Routine control method, device, equipment, medium and vehicle

Country Status (1)

Country Link
CN (1) CN117111590B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005088760A (en) * 2003-09-17 2005-04-07 Aisin Seiki Co Ltd Vehicle running permission control system
CN112578764A (en) * 2019-09-30 2021-03-30 北京车和家信息技术有限公司 Vehicle fault diagnosis method and system and vehicle
WO2021259001A1 (en) * 2020-06-22 2021-12-30 中国第一汽车股份有限公司 Automobile diagnosis system, method and apparatus for updating automobile diagnosis system, and device and storage medium
CN114137932A (en) * 2021-11-11 2022-03-04 上汽通用五菱汽车股份有限公司 Vehicle diagnosis method, vehicle control unit, vehicle and readable storage medium
CN115328092A (en) * 2022-08-23 2022-11-11 重庆长安汽车股份有限公司 Vehicle remote diagnosis method, system, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005088760A (en) * 2003-09-17 2005-04-07 Aisin Seiki Co Ltd Vehicle running permission control system
CN112578764A (en) * 2019-09-30 2021-03-30 北京车和家信息技术有限公司 Vehicle fault diagnosis method and system and vehicle
WO2021259001A1 (en) * 2020-06-22 2021-12-30 中国第一汽车股份有限公司 Automobile diagnosis system, method and apparatus for updating automobile diagnosis system, and device and storage medium
CN114137932A (en) * 2021-11-11 2022-03-04 上汽通用五菱汽车股份有限公司 Vehicle diagnosis method, vehicle control unit, vehicle and readable storage medium
CN115328092A (en) * 2022-08-23 2022-11-11 重庆长安汽车股份有限公司 Vehicle remote diagnosis method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117111590B (en) 2024-01-02

Similar Documents

Publication Publication Date Title
CN109033829B (en) Vehicle network intrusion detection auxiliary method, device and system
CN105981336B (en) Abnormality detection electronic control unit, vehicle-mounted network system, and abnormality detection method
CN108268024B (en) Vehicle diagnosis method, device, terminal and computer-readable storage medium
US10723361B2 (en) Monitoring apparatus, communication system, vehicle, monitoring method, and non-transitory storage medium
US20200361253A1 (en) Identification configuration method and apparatus, and terminal
AU2021204479B2 (en) Battery failure or inadequate charge condition prediction method and system
CN110989564B (en) Automobile data diagnosis method and device
CN111176695A (en) Vehicle ECU configuration method, server and terminal
CN110825073A (en) Engine remote calibration system and method
US11841942B2 (en) Anomaly detection device and anomaly detection method
JP2017118487A (en) Information aggregation method to be executed in communication system
CN110608106A (en) Temperature processing method and device
JP7006335B2 (en) In-vehicle communication system, in-vehicle communication method, and program
CN112513850A (en) Electronic control unit and data access method and device thereof
CN117111590B (en) Routine control method, device, equipment, medium and vehicle
JP2010202127A (en) Vehicular electronic control device
CN116340092A (en) Security monitoring method, device, equipment and medium for software development kit
CN111417908A (en) ECU (electronic control Unit) recognizer, and recognition method, system, equipment and medium thereof
CN113806131A (en) Access control method and device for fault code library, electronic equipment and storage medium
JP2009161076A (en) In-vehicle system
JP2005145262A (en) Car-mounted lan system
CN115202679A (en) ECU (electronic control Unit) upgrading method and device based on vehicle-mounted Ethernet
EP4344934A1 (en) Vehicle charging port cover control method and vehicle charging port cover control device
JP6733587B2 (en) In-vehicle device
US20240126890A1 (en) Apparatus for verifying software integrity of vehicle controller and method thereof

Legal Events

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