Disclosure of Invention
The present invention has been made in view of the above shortcomings of the prior art to overcome or alleviate one or more of the difficulties presented in the prior art, at least to provide a useful alternative.
According to one aspect of the invention, a remote vehicle control method is provided, which comprises the following steps: receiving a remote control instruction, wherein the remote control instruction comprises an instruction number or an instruction name and a vehicle control parameter; determining a vehicle control rule corresponding to the instruction number or the instruction name from a pre-established rule base according to the instruction number or the instruction name, wherein the vehicle control rule comprises conditions and actions; judging whether the vehicle control parameters meet the conditions of the vehicle control rules; and executing corresponding actions when the vehicle control parameters meet the conditions corresponding to the vehicle control rules.
According to one embodiment, before receiving a remote control instruction, one vehicle control rule corresponding to an instruction number or an instruction name is created in a rule base, the created vehicle control rule comprises a creation condition and a creation action, the creation condition comprises a creation static condition and/or a creation dynamic condition, the static condition is used for determining whether a first judgment object of a vehicle is within a preset range, and the dynamic condition is used for judging the real-time condition of a second judgment object of the vehicle; the creating action comprises acquiring a conversion protocol corresponding to an instruction number or an instruction name, wherein the conversion protocol is used for carrying out protocol conversion on the remote control instruction; and configuring the created conditions and the created actions into command numbers or command names corresponding to the vehicle control rules and storing the command numbers or command names into a rule base.
According to one embodiment, the creating the static condition includes selecting a first judgment object, a first judgment logic and a preset range from a condition library, the creating the dynamic condition includes selecting a second judgment object, a second judgment logic and a dependent service from the condition library, the first judgment logic is a logic judgment rule for judging a logic relationship between the first judgment object and the preset range, the second judgment logic is a logic judgment rule for judging a logic relationship between the second judgment object and an execution result of the dependent service, and the configuring the created condition and the created action as a vehicle control rule corresponding to an instruction number or an instruction name includes: acquiring a first judgment object, a first judgment logic and codes corresponding to a preset range from a condition code library to form static condition judgment codes; and/or acquiring a second judgment object and a code corresponding to a second judgment logic from a condition code library, and combining the identifier of the dependent service to form a dynamic condition judgment code; acquiring an action execution code corresponding to the action from an action code library; and configuring the static condition judgment codes and/or the dynamic condition judgment codes and the action execution codes into vehicle control rules and storing the vehicle control rules into a rule base.
According to one embodiment, determining whether the vehicle control parameter meets the condition of the vehicle control rule includes determining whether the vehicle control parameter meets a static condition of the vehicle control rule, wherein determining whether the vehicle control parameter meets the static condition of the vehicle control rule includes: and acquiring a first parameter related to a first judgment object of the static condition from the vehicle control parameters, and matching the first parameter with a preset range determined by a first judgment logic of the static condition.
According to one embodiment, determining whether the vehicle control parameter meets the condition of the vehicle control rule includes determining whether the vehicle control parameter meets a dynamic condition of the vehicle control rule, wherein determining whether the vehicle control parameter meets the dynamic condition of the vehicle control rule includes: acquiring a second parameter related to a second judgment object of the dynamic condition from the vehicle control parameter; determining a dependency service and a dependency method required for obtaining a second judgment object of the dynamic condition; and acquiring the real-time condition of a second judgment object corresponding to the second parameter by using the dependent service and the dependent method, and judging whether the real-time condition of the second judgment object accords with a second judgment logic.
According to one embodiment, when the vehicle control parameter meets the condition corresponding to the vehicle control rule, the corresponding action is executed, which includes: and acquiring a protocol conversion code corresponding to the conversion protocol corresponding to the action from the action library to package the vehicle control instruction.
According to one embodiment, the method further comprises a rule creating step of displaying a visualization page so that conditions and actions can be created on the visualization page, and the conditions and actions are configured to be car control rules corresponding to instruction numbers or instruction names.
According to one embodiment, the determining whether the vehicle control parameter meets the vehicle control rule includes: judging whether the vehicle control parameters meet the static conditions of the vehicle control rules or not, wherein the judging step comprises the following steps: acquiring a first parameter related to a first judgment object of a static condition from vehicle control parameters, and matching the first parameter with a preset range determined by first judgment logic of the static condition; and/or, judging whether the vehicle control parameters meet the dynamic conditions of the vehicle control rules, wherein the dynamic conditions comprise: acquiring a second parameter related to a second judgment object of the dynamic condition from the vehicle control parameter; determining a dependency service and a dependency method required for obtaining a second judgment object of the dynamic condition; and acquiring the real-time condition of a second judgment object corresponding to the second parameter by using the dependent service and the dependent method, and judging whether the real-time condition of the second judgment object accords with a second judgment logic.
According to another aspect of the present invention, there is provided a remote vehicle control apparatus, including: the command receiving unit is used for receiving a remote control command, and the remote control command comprises a command number or a command name and a vehicle control parameter; the vehicle control rule determining unit is used for determining at least one vehicle control rule corresponding to the instruction number or the instruction name from a pre-established rule base according to the instruction number or the instruction name, wherein the vehicle control rule comprises conditions and actions; and the action executing unit executes corresponding actions when the vehicle control parameters accord with the conditions corresponding to the vehicle control rules.
According to an aspect of the present invention, there is also provided an electronic device, including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium on which a device control program is stored, which when executed by a processor, implements the method disclosed herein.
According to the implementation mode of the invention, the rule needing to be checked is determined according to the remote control instruction, the condition needing to be judged and the executed action of the rule can be determined according to the check rule, each condition needing to be judged and the executed action have corresponding codes, and the final purpose of the whole vehicle control instruction can be finished only by calling. Therefore, according to the embodiment of the invention, the rapid development and upgrade can be realized.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. These embodiments are exemplary and not intended to limit the scope of the present invention.
Fig. 1 is a schematic diagram of a remote control method according to an embodiment of the present invention. Firstly, in step S100, receiving a remote control instruction, wherein the instruction comprises an instruction number or an instruction name and a vehicle control parameter; then, in step S200, according to the instruction number or the instruction name, determining a vehicle control rule corresponding to the instruction number or the instruction name from a pre-created rule base, where the vehicle control rule includes a condition and an action; next, in step S300, it is determined whether the vehicle control parameter meets the condition of the vehicle control rule, and finally, in step S400, when the vehicle control parameter meets the condition corresponding to the vehicle control rule, a corresponding action is executed.
Fig. 2 is a flow chart illustrating a specific example of a method according to an embodiment of the present invention.
As shown in fig. 2, taking a remote unlocking and door opening instruction as an example, a user determines a remote unlocking door operation from an Application (APP) end, and the application end generates a remote unlocking control instruction according to the user operation, where parameters of the control instruction include description of instruction attributes, instruction name, instruction-related parameters, vehicle Identification (ID), or uniquely-identified identification.
Specific examples of the instruction for opening the left and right front doors with the frame number LB37852Z7MS000514 and the user number 11160130 are as follows:
instruction name: door opening
The creator: tc of the number of the first and second groups,
service ID: the key words of RDL _2,// instruction represent that the remote unlocking door is unlocked
Service parameters [ ]// operation-related parameter settings,
and (6) Door: "left front Door, right front Door"// Door represents a Door.
The operation time is as follows: 162216965
User ID: 11160130
The number of the frame: LB37852Z7MS000514
The operation returns successfully: 1
If the operation is unsuccessful, the operation is performed once again, the operation is still unsuccessful, and False is returned.
In this instruction, the instruction name (or instruction number) is an instruction ID. Left-front door (left-front), right-front door (right-front), operator, frame number, these are parameters. The frame number may serve as a vehicle ID or an identification that uniquely identifies the vehicle.
The above parameters describe the partial door unlock command information of the vehicle with the frame number LB37852Z7MS 000514.
The instruction is sent to a remote control server (remote control device), that is, the door unlocking execution in fig. 2 is sent. Calls involving interfaces are sometimes required when issuing.
In the remote control server, a vehicle control rule corresponding to the vehicle control instruction is found according to parameters such as an instruction name or an instruction number (service ID) or a vehicle frame number of the vehicle control instruction (the remote control server is provided with a plurality of rule bases created in advance by an operator, and each vehicle control rule in each rule base has a corresponding vehicle control instruction), and then a corresponding condition set is obtained. The condition set comprises at least one condition needing to be verified when the vehicle control command is executed, and the at least one condition comprises a dynamic condition and/or a static condition. And then judging whether the command parameters of the vehicle control command are matched with the conditions corresponding to the vehicle control rule or not by using the parameters in the vehicle control command, namely executing the conditions. For example: for the pre-check, the vehicle-related state with the current frame number LB37852Z7MS000514 is judged, for example: whether the vehicle is operated by a person, whether the vehicle has an internet function, whether the vehicle has the right to operate, whether the current instruction is submitted and the last instruction is not executed, other abnormal scene exclusion and the like. And if the conditions are matched (namely the execution is passed), executing the action corresponding to the vehicle control rule corresponding to the vehicle control instruction. The executed action includes, for example, converting the format of the message to the control command by using a conversion rule corresponding to the car control command, and after the execution, pushing the message to a car machine (a car internet terminal, TEM), or a customized action, such as sending a short message to a car owner.
According to one embodiment, the conversion rule for converting the message format may be used to parse the control command and convert the control command into a message for MQTT protocol (message queue telemetry transmission) transmission, for example, converting the control command into an MQTT message by performing protocol conversion after the pre-check passes. The MQTT message forwarded by the car remote service provider (TSP) to the on-board internet Terminal (TEM) may include, for example, the instruction ID, the target (e.g., left front door, right front door), the duration, the start time, and other parameter information in the command for the origin vehicle.
According to one embodiment, the conditions corresponding to the vehicle control rules in the rule base include two types, namely a dynamic condition and a static condition, the static condition refers to whether a judged object (a first judged object) is within a certain predetermined range, a judgment set of the predetermined range of the static condition is determined, and the judgment set includes a range that the judged object may relate to, for example, an operator role judges that only an owner or a sharee can be selected. The dynamic condition is used to determine the real-time status of a determination target (second determination target), and is generally a condition for determining the capability of the vehicle, and needs to be determined according to the actual status of the vehicle, such as the authority of the operator and whether the vehicle has an internet function. Static conditions require input of a description including the condition name and interpretation of the condition, for example, the operator role determines whether it is equal to the owner or the sharee, i.e., the backend code can only determine whether it is the owner and the sharee. The dynamic condition needs to input a service including the condition name and condition dependency, and the dependent service refers to the work of depending on or calling an external service to complete. The back-end code realizes the logic judgment of the dynamic condition from finding the corresponding dependent method in the dependent service, and can also obtain the relevant parameters from finding the corresponding dependent method in the dynamic dependent service so as to judge whether the parameters accord with the logic of the dynamic condition. For example, obtaining whether the current operator belongs to the condition check is performed, and firstly, the dependent service is determined. The dependent service, for example, subscribes to a defined universal interface SPI that has already been registered, for example, on the service platform; the dependent method corresponding to the dependent service is then implemented, for example, the generic interface SPI is called. The SPI calls a service on the service platform, e.g. returns a list of belongings, or in case the SPI obtains and transmits the information of the current operator, the service platform may directly return a decision of belonging (True) or not (False). Based on the SPI implementation mode, the judgment logic can be delivered to business personnel or business departments or business service organizations (or remote business servers) for implementation, and the platform only needs to perform flow arrangement and calling, so that the effect of platform implementation is achieved.
When determining whether the vehicle control parameter meets the condition of the vehicle control rule, the method may include obtaining a first parameter related to a determination object of the static condition from the vehicle control parameter, and matching the first parameter related to the determination object of the static condition with a predetermined range of the determination object (e.g., determining whether the vehicle body length is less than 4 meters) or a corresponding determination object within the predetermined range (e.g., determining whether an operator is a certain position in an operator set). The method may include acquiring a second parameter related to a determination object of the dynamic condition through a dependency method corresponding to a dependency service related to the dynamic condition, and determining whether the second parameter meets the dynamic condition, so as to determine whether the vehicle control parameter meets a condition corresponding to the vehicle control rule. For example, the determination target of the dynamic condition (second determination target) may be an internet function, the second parameter may be a frame number, the current internet function status of the vehicle corresponding to the frame number is obtained by a service-dependent method, and the logical determination result is returned according to the determination logic (for example, the determination logic of the dynamic condition of the rule is to determine whether the obtained internet function is 'present' or 'true' if the internet function status returned by the service-dependent method is 'present' with an internet function).
When the vehicle control parameters meet the conditions corresponding to the vehicle control rules and corresponding actions are executed, the actions can be protocol conversion for the purpose that control objects of the vehicle control instructions can identify the control instructions, and conversion rules corresponding to the actions of the vehicle control rules are called to package the vehicle control instructions.
According to one embodiment, the purpose of the action is to determine the action to be performed by the user to perform the car control command, such as message conversion and push, message only conversion, service subscription processing, and the like.
According to one embodiment, the conversion rule is used for converting the vehicle control command of the user into a format finally required by executing the command and sending the command, the finally required format can be identified by a control object of the vehicle control command, and therefore the conversion rule is defined to define a plurality of protocol conversion logics which are possibly required.
According to one embodiment, the method further comprises the step of creating a car control rule corresponding to the instruction number or the instruction name in the rule base before receiving the remote control instruction, wherein the created car control rule comprises a creation condition and a creation action.
According to one embodiment, creating conditions includes creating static conditions and/or creating dynamic conditions as described above. According to one embodiment, the static condition is used to determine whether a first determination object (e.g., a vehicle body or an operator) of the vehicle is within a predetermined range. The dynamic condition is used to determine a real-time status of a second determination target (e.g., an internet function) of the vehicle.
According to one embodiment, the creating act includes obtaining a conversion protocol corresponding to the instruction number or the instruction name, where the conversion protocol is used to perform protocol conversion on the remote control instruction.
And then, the created conditions and the created actions are configured into control rules corresponding to the command numbers or command names and stored into a rule base.
According to one embodiment, the creating of the static condition includes selecting a first judgment object, a first judgment logic, and a preset range from a condition library. The creating of the dynamic condition comprises selecting a second judgment object, a second judgment logic and a dependent service from a condition library. The first judgment logic is a logic judgment rule for judging a logic relationship between the first judgment object and the preset range. The second judgment logic is a logic judgment rule for judging a logical relationship between the second judgment object and the execution result of the dependent service. Configuring the created conditions and the created actions into a vehicle control rule corresponding to the instruction number or the instruction name, wherein the vehicle control rule comprises the following steps: acquiring a first judgment object, a first judgment logic and codes corresponding to a preset range from a condition code library to form static condition judgment codes; and/or acquiring a second judgment object and a code corresponding to a second judgment logic from a condition code library, and combining the identifier of the dependent service to form a dynamic condition judgment code; acquiring an action execution code corresponding to the action from an action code library; and configuring the static condition judgment codes and/or the dynamic condition judgment codes and the action execution codes into vehicle control rules and storing the vehicle control rules into a rule base.
FIG. 3 is an overall schematic flow chart of a remote vehicle control system according to an embodiment of the present invention. As shown in fig. 3, a user performs a remote car control operation through a mobile phone application (e.g., APP), the application back end invokes a remote car control interface provided by a remote car control service device (remote car control service), and transmits instruction parameters to the remote car control service device (corresponding to instruction issue in the figure, when the instruction issue, the interface call may be used). The remote control service device performs pre-verification and protocol conversion (e.g., into MQTT messages) and then sends instructions in MQTT messages to the TEM. The TEM further sends the command to the vehicle, the vehicle receives the command of remote control, the command is executed, and the execution Result (RESPONSE) is fed back to the TEM after the execution is finished. In this process, the vehicle may first acknowledge (e.g., send an ACK) upon receiving the instruction. The TEM then sends the execution result to the mobile Application (APP) through the remote control service. The remote vehicle control service device executes the method shown in fig. 1 and fig. 2 in the specification. The description of fig. 1 and 2 can be used to understand the solution of fig. 3.
Fig. 4 is a schematic view of a remote vehicle control device according to an embodiment of the invention. As shown in fig. 4, a remote vehicle control apparatus 10 according to an embodiment of the present invention includes: the system comprises an instruction receiving unit 100, a vehicle control unit and a vehicle control unit, wherein the instruction receiving unit is used for receiving a remote control instruction, and the remote control instruction comprises an instruction number or an instruction name and vehicle control parameters; a vehicle control rule determining unit 200, configured to find a vehicle control rule corresponding to the remote control instruction according to the instruction number or the instruction name, where the vehicle control rule includes a condition and an action; a condition determining unit 300, configured to determine whether the vehicle control parameter meets a condition of the vehicle control rule; and an action execution unit 400, which executes a corresponding action when the vehicle control parameter meets the condition corresponding to the vehicle control rule.
According to an embodiment, the remote vehicle control device may further include a rule creation unit 500. The rule creation unit 500 displays a visualization page on the remote vehicle control device 10, enables an operator of the remote vehicle control device to configure a rule on the visualization page, and creates the configured rule.
According to one embodiment, the configuration and creation rules include configuration and creation conditions, configuration and creation actions, defining transformation rules. Wherein the conditions include dynamic conditions and static conditions. According to one embodiment, the purpose of the action is to determine the action to be performed by the user's instruction, such as message conversion and push, message only conversion, service subscription processing, etc.
And when the vehicle control parameters meet the conditions corresponding to the vehicle control rules and corresponding actions are executed, the actions are protocol conversion, and conversion rules corresponding to the actions of the vehicle control rules are called to package the vehicle control instructions.
The conversion rule is to convert the user's instruction into the final required format for transmission, so the definition of the conversion rule defines many protocol conversion logics which may be required.
The rule creating unit 500 performs rule configuration and creation including configuring created conditions and created actions into control rules corresponding to command numbers or command names and storing the control rules into a rule base.
As previously described, according to one embodiment, the creating of the static condition includes selecting a first judgment object, a first judgment logic, and a preset range from a condition library. The creating of the dynamic condition comprises selecting a second judgment object, a second judgment logic and a dependent service from a condition library. The first judgment logic is a logic judgment rule for judging a logic relationship between the first judgment object and the preset range. The second judgment logic is a logic judgment rule for judging a logical relationship between the second judgment object and the execution result of the dependent service. Configuring the created conditions and the created actions into a vehicle control rule corresponding to the instruction number or the instruction name, wherein the vehicle control rule comprises the following steps: acquiring a first judgment object, a first judgment logic and codes corresponding to a preset range from a condition code library to form static condition judgment codes; and/or acquiring a second judgment object and a code corresponding to a second judgment logic from a condition code library, and combining the identifier of the dependent service to form a dynamic condition judgment code; acquiring an action execution code corresponding to the action from an action code library; and configuring the static condition judgment codes and/or the dynamic condition judgment codes and the action execution codes into vehicle control rules and storing the vehicle control rules into a rule base.
Depending on the context, the behavior of a configuration may be considered part of the behavior of a creation, which may also be considered part of the configuration. Fig. 5 to 8 show examples of pages for configuring static conditions, dynamic conditions, actions, and conversion rules, respectively.
In the examples of fig. 5 to 8, when creating a rule, an operator determines the name of the rule, the condition and the action that the rule needs to judge, and a conversion rule, for example, message conversion and pushing this action needs to convert the original parameter format into MQTT format through RDL2 (RDL 2 is the identifier of a door unlock instruction), and the conversion rule realizes entry through codes. In the example, the instruction is limited based on the instruction name (instruction key), the rule is executed only by the RDL _2 request, and the action message is converted into MQTT after the condition check is passed and the issuing instruction is pushed.
Additionally, in examples, the transformation rules are entered through code implementations, which may increase the flexibility of the rules. But in other embodiments may be configured by other methods, such as receiving programmed files, including source files, compiled files, etc.
Those skilled in the art will readily appreciate that the method of the present invention may also include other steps corresponding to the functions performed by the apparatus of the present invention. The above steps may also be simplified.
The numbering of the elements and steps of the present invention is for convenience of description only and does not indicate the order of execution unless otherwise indicated in the context.
Those skilled in the art will appreciate that the above units can be implemented by software or special hardware, such as a field programmable gate array, a single chip, or a microchip, or by a combination of software and hardware.
The present invention also provides an electronic device, comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of the present invention.
The invention also relates to a computer software which, when executed by a computing device (such as a single-chip microcomputer, a computer, a CPU, etc.), can implement the method of the invention.
The present invention also relates to a computer software storage device, such as a hard disk, a floppy disk, a flash memory, etc., which stores the above computer software.
The description of the method or steps of the invention may be used for understanding the description of the unit or device, and the description of the unit or device may be used for understanding the method or steps of the invention.
The above description is intended to be illustrative, and not restrictive, and any changes and substitutions that come within the spirit of the invention are desired to be protected.