CN117478664A - Information display method and device in vehicle control application, electronic equipment and storage medium - Google Patents

Information display method and device in vehicle control application, electronic equipment and storage medium Download PDF

Info

Publication number
CN117478664A
CN117478664A CN202311812817.4A CN202311812817A CN117478664A CN 117478664 A CN117478664 A CN 117478664A CN 202311812817 A CN202311812817 A CN 202311812817A CN 117478664 A CN117478664 A CN 117478664A
Authority
CN
China
Prior art keywords
vehicle control
vehicle
tool
server
polling
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
CN202311812817.4A
Other languages
Chinese (zh)
Other versions
CN117478664B (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.)
Chengdu Seres Technology Co Ltd
Original Assignee
Chengdu Seres Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Seres Technology Co Ltd filed Critical Chengdu Seres Technology Co Ltd
Priority to CN202311812817.4A priority Critical patent/CN117478664B/en
Publication of CN117478664A publication Critical patent/CN117478664A/en
Application granted granted Critical
Publication of CN117478664B publication Critical patent/CN117478664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application relates to the technical field of intelligent automobiles, and provides an information display method, an information display device, electronic equipment and a storage medium in automobile control application. The method comprises the following steps: the terminal creates a vehicle control command sending tool and a polling tool; in response to determining that a user operates a specific vehicle control in a vehicle control application, invoking a main flow function of a vehicle control command transmitting tool; determining the value of a member variable of a means for transmitting a vehicle control command and the value of a member variable of a means for polling; when the values of the member variables of the vehicle control command tool and the member variables of the polling tool are both first values, a main flow function is used for sending a vehicle control request to a server; querying the execution result by using a polling tool; and responding to the execution result that the execution is successful or the polling time length exceeds a preset threshold value, acquiring the latest vehicle control data of the vehicle from the server, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data. The method can improve the information display efficiency in the vehicle control application.

Description

Information display method and device in vehicle control application, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of intelligent automobiles, and in particular, to an information display method, an information display device, an electronic device, and a storage medium in a vehicle control application.
Background
In the development of automotive applications, there is a need for remote control of the vehicle. For each vehicle control function, the application needs to be provided with a corresponding operation control for the user to operate. The style of the control is customized according to the business requirements, and the layout of each place is different.
Existing solutions mostly use Socket long connection or message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) protocols to implement control operations, which suffer from the following drawbacks:
1) A certain learning and reconstruction cost is required. Currently, some enterprises, such as some of the vehicle enterprises, typically use the hypertext transfer protocol (Hypertext Transfer Protocol, HTTP) protocol to implement vehicle control operations. For these enterprises, if the Socket or MQTT needs to be changed, not only the learning cost of all personnel, but also the cost of reconstructing the server side and the client side are involved, but the advantages brought by the reconstruction are not enough to offset the cost, and the reconstruction time is uncontrollable. As is well known, the time to market for a train is required, and the time to market is obsolete and obsolete, so on-board software must meet this time period, which is not suitable for the requirement of cost control and rapid online in a short time.
2) Whether socket or MQTT protocol, it is still essentially a transmission control protocol (Transmission Control Protocol, TCP) or user datagram protocol (User Datagram Protocol, UDP) connection that requires long time to send heartbeat packets to maintain its viability. The long-time activity maintenance consumes the user flow and the terminal battery power, and resource waste is caused.
3) Disconnection reconnection of Socket and MQTT is relatively complex. Because the user is mobile, the user can often switch in a network-available, non-network or weak-network environment, and complicated disconnection reconnection operation is required after each switch, so that the information display efficiency of the vehicle control can be affected.
Disclosure of Invention
In view of this, the embodiments of the present application provide an information display method, apparatus, electronic device, and storage medium in a vehicle control application, so as to solve the problems of low information display efficiency and poor flexibility in the vehicle control application in the prior art.
In a first aspect of an embodiment of the present application, there is provided an information display method in a vehicle control application, including:
the terminal creates a vehicle control command sending tool and a polling tool;
in response to determining that a user operates a specific vehicle control in a vehicle control application, invoking a main flow function of a vehicle control command transmitting tool;
Determining the value of a member variable of a tool for transmitting the vehicle control command;
when the value of the member variable of the transmitting vehicle control command tool is a first value, determining the value of the member variable of the polling tool;
when the value of the member variable of the polling tool is a first value, a main flow function of the tool for sending the vehicle control command is used for sending a vehicle control request to a server;
periodically inquiring the execution result from the server by using a polling tool;
and responding to the polling to determine that the execution result of the server is successful or the polling time length exceeds a preset threshold, acquiring the latest vehicle control data of the vehicle from the server by the terminal, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In a second aspect of the embodiments of the present application, there is provided an information display apparatus in a vehicle control application, including:
the system comprises a creation module, a transmission module and a polling module, wherein the creation module is configured to create and send a vehicle control command tool and a polling tool by a terminal;
the processing module is configured to call a main flow function for sending the vehicle control command tool in response to determining that a user operates a specific vehicle control in the vehicle control application;
a determination module configured to determine a value of a member variable of the send vehicle control command tool;
the determining module is further configured to determine a value of a member variable of the polling tool when the value of the member variable of the sending vehicle control command tool is the first value;
The communication module is configured to send a vehicle control request to the server by using a main flow function of the vehicle control command sending tool when the value of the member variable of the polling tool is a first value;
the communication module is further configured to periodically query the server for execution results using the polling tool;
the display module is configured to respond to the polling to determine that the execution result of the server is successful or the polling time length exceeds a preset threshold value, and the terminal acquires the latest vehicle control data of the vehicle from the server and updates the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In a third aspect of the embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present application, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above method.
Compared with the prior art, the embodiment of the application has the beneficial effects that: according to the vehicle control command sending tool and the vehicle control polling tool, which are realized in the form of single-case objects, are created in the terminal, after a user operates a specific vehicle control in the vehicle control application, a vehicle control request is sent to the server based on the vehicle control command sending tool and the vehicle control polling tool by using an HTTP protocol, and the execution result of the vehicle control request is polled from the server, so that the operation result can be timely obtained after the user operates the vehicle control, the display information is updated, the information display efficiency in the vehicle control application is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present application.
Fig. 2 is a flow chart of an information display method in a vehicle control application according to an embodiment of the present application.
Fig. 3 is a flowchart of another information display method in a vehicle control application according to an embodiment of the present application.
Fig. 4 is a relationship diagram between a list of all vehicles under a user name and user default vehicle data provided by an embodiment of the present application.
Fig. 5 is a flowchart of a method for synchronizing bluetooth digital keys of a currently used vehicle according to an embodiment of the present application.
Fig. 6 is a flowchart of a method for determining an expiration time of an authorization provided in an embodiment of the present application.
Fig. 7 is a flowchart of an information display method in another vehicle control application according to an embodiment of the present application.
Fig. 8 is a flowchart of an information display method in still another vehicle control application according to an embodiment of the present application.
Fig. 9 is a flowchart of an information display method in still another vehicle control application according to an embodiment of the present application.
Fig. 10 is a flowchart of a method for periodically querying a server for an execution result using a polling tool according to an embodiment of the present application.
Fig. 11 is a flowchart of another information display method in a vehicle control application according to an embodiment of the present application.
Fig. 12 is a flowchart of an information display method in still another vehicle control application according to an embodiment of the present application.
Fig. 13 is a schematic diagram of an information display device in a vehicle control application according to an embodiment of the present application.
Fig. 14 is a schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
An information display method and apparatus in a vehicle control application according to embodiments of the present application will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present application. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.
The terminal devices 1, 2 and 3 may be hardware or software. When the terminal devices 1, 2 and 3 are hardware, they may be various electronic devices having a display screen and supporting communication with the server 4, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like; when the terminal apparatuses 1, 2, and 3 are software, they can be installed in the electronic apparatus as described above. The terminal devices 1, 2 and 3 may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not limited in this embodiment of the present application. Further, various applications, such as a data processing application, an instant messaging tool, social platform software, a search class application, a shopping class application, and the like, may be installed on the terminal devices 1, 2, and 3.
The server 4 may be a server that provides various services, for example, a background server that receives a request transmitted from a terminal device with which communication connection is established, and the background server may perform processing such as receiving and analyzing the request transmitted from the terminal device and generate a processing result. The server 4 may be a server, a server cluster formed by a plurality of servers, or a cloud computing service center, which is not limited in this embodiment of the present application.
The server 4 may be hardware or software. When the server 4 is hardware, it may be various electronic devices that provide various services to the terminal devices 1, 2, and 3. When the server 4 is software, it may be a plurality of software or software modules providing various services to the terminal devices 1, 2, and 3, or may be a single software or software module providing various services to the terminal devices 1, 2, and 3, which is not limited in the embodiment of the present application.
The network 5 may be a wired network using coaxial cable, twisted pair and optical fiber connection, or may be a wireless network capable of realizing interconnection of various communication devices without wiring, for example, bluetooth (Bluetooth), near field communication (Near Field Communication, NFC), infrared (Infrared), etc., which is not limited in the embodiment of the present application.
The user can establish a communication connection with the server 4 via the network 5 by the client devices 1, 2 and 3 to receive or transmit information or the like. Specifically, the client devices 1, 2, and 3 may send vehicle control requests to the server 4. The server 4 may transmit a response message to the client devices 1, 2, and 3 after receiving the vehicle control request, and transmit an execution success or execution failure message to the client devices 1, 2, and 3 after executing the vehicle control request. Further, the client devices 1, 2 and 3 may also obtain the vehicle control data stored in the server from the server 4.
It should be noted that the specific types, numbers and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 may be adjusted according to the actual requirements of the application scenario, which is not limited in the embodiment of the present application.
As mentioned above, in the development of automotive applications, it is necessary to remotely control the vehicle, the types of remote control including, but not limited to, operations: locks, trunk, front hatch, windows, vehicle finding, charging port, window ventilation, sunroof ventilation, sun shade, air conditioner, battery. For each car control function, a corresponding operation control is required to be provided for the application for the user to operate, the style of the control is customized according to the service requirement, and the layout of each place is different.
In a vehicle control application, the vehicle controls may have different layouts. In some vehicle control applications, the vehicle control may consist of only one picture; in other vehicle control applications, the vehicle control controls may be composed of a picture with text and a border with a background. In still other vehicle control applications, the vehicle control controls may be composed of a picture with text bordering.
In addition to the non-uniform layout, the control controls in the control applications have some of the following features:
1) The data has consistency. The physical structure and state change of the back data of the vehicle control are different from each other no matter how the layout of the vehicle control changes. Because remote control requires a time course, a vehicle control has at least four states: closed, opened, neutralization is not available. Some controls may be more complex in state changes.
The reason that the vehicle control has at least 4 states is that a user clicks a trunk button on the vehicle control application to open the trunk, but from the point in time when the user clicks the trunk to the point in time when the trunk is actually opened, a certain time difference exists in the middle: because the command is sent from the client to the server through the port, the server communicates with the vehicle-mounted terminal such as the vehicle information and the positioning transmission system (T-BOX) of the vehicle, and the vehicle-mounted terminal operates the vehicle to complete the actual command. Thus, in addition to the closed, open, and unavailable states, an in-progress state is included.
2) Logic has a variance. For example: according to the service requirement, when clicking events of some vehicle control controls occur, the server needs to be reported, and some vehicle control controls do not need. For another example, the air conditioner and the unlocking are two different types of vehicle control controls, and prompt languages and display diagrams of the two different types of vehicle control controls are different.
3) The display has consistency. In the same vehicle control application, vehicle control controls corresponding to one type of vehicle control data may appear in different pages of the vehicle control application and have different layouts, but their states must be kept consistent.
Most of the existing schemes use Socket long connection or MQTT protocol to realize control operation, and the methods have the following defects:
1) A certain learning and reconstruction cost is required. Currently, some enterprises, such as some of the vehicle enterprises, typically use the HTTP protocol to implement vehicle control operations. For these enterprises, if the Socket or MQTT needs to be changed, not only the learning cost of all personnel, but also the cost of reconstructing the server side and the client side are involved, but the advantages brought by the reconstruction are not enough to offset the cost, and the reconstruction time is uncontrollable. As is well known, the time to market for a train is required, and the time to market is obsolete and obsolete, so on-board software must meet this time period, which is not suitable for the requirement of cost control and rapid online in a short time.
2) Regardless of socket or MQTT protocol, it is still essentially a TCP/UDP connection that requires long time to send heartbeat packets to maintain its viability. The long-time activity maintenance consumes the user flow and the terminal battery power, and resource waste is caused.
3) Disconnection reconnection of Socket and MQTT is relatively complex. Because the user is mobile, the user can often switch in a network-available, non-network or weak-network environment, and complicated disconnection reconnection operation is required after each switch, so that the information display efficiency of the vehicle control can be affected.
In view of this, the embodiment of the application provides an information display method in a vehicle control application, by creating a vehicle control command sending tool and a vehicle control polling tool implemented in a single object form in a terminal, after a user operates a specific vehicle control in the vehicle control application, based on the vehicle control command sending tool and the vehicle control polling tool, a vehicle control request is sent to a server by using an HTTP protocol, and an execution result of the vehicle control request is polled from the server, so that an operation result can be timely obtained after the user operates the vehicle control, display information is updated, thereby improving efficiency of information display in the vehicle control application and improving user experience.
Fig. 2 is a flow chart of an information display method in a vehicle control application according to an embodiment of the present application. The information display method in the vehicle control application of fig. 2 may be performed by the terminal device of fig. 1. As shown in fig. 2, the information display method in the vehicle control application includes the following steps:
In step S201, the terminal creates a send vehicle control command tool and a polling tool.
In step S202, in response to determining that the user is operating a particular control in the control application, a main flow function of the send control command tool is invoked.
In step S203, the value of the member variable of the send vehicle control command tool is determined.
In step S204, when the value of the member variable of the sending vehicle control command tool is the first value, determining the value of the member variable of the polling tool;
in step S205, when the value of the member variable of the polling tool is the first value, a master flow function of the tool for sending a vehicle control command is used to send a vehicle control request to the server;
in step S206, the server is periodically queried for execution results using a polling tool;
in step S207, in response to the polling determining that the execution result of the server is successful, or the polling duration exceeds the preset threshold, the terminal obtains the latest vehicle control data of the vehicle from the server, and updates the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In the embodiment of the application, the information display method in the vehicle control application can be executed by the terminal. The terminal may be, for example, a user mobile phone, in which a vehicle control application is installed. The operating system of the terminal may be an apple operating system (iPhone Operating System, iOS), an android operating system, a hong mo operating system, or the like, which is not limited herein. For convenience of description and explanation, the following description will take an operating system of a terminal as iOS as an example.
In the embodiment of the application, the terminal may first create a vehicle control command sending tool and a polling tool. The vehicle control command sending tool and the polling tool can be single-instance objects. The terminal and the server can communicate through the HTTP protocol, call the vehicle control command sending tool to send the vehicle control request to the server, and call the polling tool to inquire the execution result of the vehicle control request from the server.
The send vehicle control command tool includes a member variable and a member function, wherein the member variable may be a boolean value for identifying whether the send vehicle control command tool is currently busy. When the member variable of the vehicle control command transmitting tool is true, the vehicle control command transmitting tool is in a busy state, namely 'request in progress'; when it is false, it indicates that the send vehicle control command tool is in an idle state, i.e. "no request". Further, the "request in progress" state refers to a state in which a vehicle control request is initiated from a terminal, including a state in which the terminal polls a server for a vehicle control execution result until the polling ends in a process that the terminal pulls up the latest vehicle data from the server. The "no request" state refers to a state after the completion of the whole flow of one vehicle control request or a state without a vehicle control request.
The send vehicle control command tool member variable has a member attribute, which may be a function of the type in which an entry "callback function" of the main flow function of the send vehicle control command tool may be saved.
The member functions of the send vehicle control command tool include a main flow function, which is an external API. When any page and any control are clicked in the vehicle-mounted application of the terminal, the main flow function can be called to send the control command.
The primary flow function includes the vehicle control type, additional parameters, intent, and callback functions. The vehicle control type can be character string enumeration or digital enumeration. In an example, in an iOS system, the type of vehicle control implemented with character string enumeration may be:
enum RMTControlShowDataType: Int, CaseIterable {
lock for motor vehicle
case lock
Vehicle finding device
case findcar
A/v/flash lamp
case flash
Dielectric/flashing whistle
case flashWhistle
Dielectric horn
case whistle
Etc
}
For the vehicle control of most vehicles, no additional parameters are included in the main flow function. However, if the vehicle control type is an air conditioner, the temperature and the started duration parameters of the air conditioner are required to be added; if the vehicle control type is seat heating, the grade parameter of the seat heating is required to be added; if the vehicle control type is charging, additional charging percentage parameters and the like are required.
The intention in the main flow function means whether the present vehicle control operation is an on operation or an off operation. The callback function is used for displaying the operation execution result. In the process of sending and executing the vehicle control request, each step may have errors, which needs to inform an external caller to make them react according to the service requirement, such as popping up a failure prompt box; on the other hand, if the last execution succeeds, the external caller needs to be notified, so that they can make their own response according to the service requirement, such as popping up a success prompt box. Execution of the notification may be accomplished using a callback function.
In the embodiment of the application, the polling tool also includes a member variable and a member function, where the member variable may also be a boolean value to identify whether the polling tool is currently in a busy state. When the member variable of the polling tool is true, it indicates that the polling tool is in a busy state, i.e. "request in progress"; when it is false, it indicates that the polling tool is in an idle state, i.e. "no polling". Further, the "request in progress" state refers to a state in which polling is started from the beginning of polling including polling in progress until the polling end terminal pulls up the latest vehicle data from the server. The "no polling" state refers to a state after the entire flow of a polling request of one vehicle control request is ended, or a state without any polling request.
The polling tool member variable needs to record the task starting time of polling and the polling time of this time when polling each time so as to judge whether the polling is overtime. Taking the implementation in iOS systems as an example, the task start time and the current polling time may be recorded with Date type.
The member functions of the polling tool include a start polling function that is referenced as a task identifier for indicating the polling object, i.e., for which vehicle control the present vehicle control operation was performed.
In the embodiment of the application, when determining that a user operates a specific vehicle control in a vehicle control application, the terminal invokes a main flow function of a vehicle control command transmitting tool, assembles a vehicle control request to transmit to a server so that the server transmits a vehicle control command to a vehicle-mounted terminal, and the vehicle-mounted terminal performs a vehicle control operation based on the received vehicle control command, updates vehicle data and transmits the updated vehicle data to the server. The terminal periodically inquires the execution result from the server, and re-acquires updated vehicle data from the server after the execution success is determined, and converts the vehicle data into client data and updates display information.
In this embodiment of the present application, the terminal may only send a vehicle control request to the server at a time, where the vehicle control request may be a complex instruction set or a simple vehicle control instruction. Since the vehicle control request has exclusivity, it is necessary to set the transmission vehicle control command tool and the polling tool as single-instance objects. Further, after the terminal invokes the main flow function, the value of the member variable of the tool for sending the vehicle control command needs to be determined, and when the value of the member variable of the tool for sending the vehicle control command is the first value, that is, the member variable of the tool for sending the vehicle control command is in an idle state, the value of the member variable of the polling tool is further determined. When the value of the member variable of the polling tool is also the first value, that is, the member variable of the polling tool is also in an idle state, it indicates that there is no currently executing vehicle control request, so that the main flow function of the tool for sending vehicle control commands can be used to send the vehicle control request to the server.
The vehicle control request may include vehicle control data, among other data. The vehicle control data is data for indicating vehicle control operation, and other data include, for example, air conditioner temperature, air conditioner on duration and the like in an interface corresponding to an air conditioner vehicle control.
In this embodiment of the present application, after sending a vehicle control request to a server, a terminal may use a polling tool to periodically query the server for an execution result. When the execution result of the server is that the execution is successful or the polling time length exceeds a preset threshold, the terminal can acquire the latest vehicle control data of the vehicle from the server and update the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
According to the technical scheme provided by the embodiment of the application, the vehicle control command sending tool and the vehicle control polling tool which are realized in the form of single objects are created in the terminal, after a user operates a specific vehicle control in the vehicle control application, a vehicle control request is sent to the server by using an HTTP protocol based on the vehicle control command sending tool and the vehicle control polling tool, and the execution result of the vehicle control request is polled from the server, so that the operation result can be timely obtained after the user operates the vehicle control, the display information is updated, the information display efficiency in the vehicle control application is improved, and the user experience is improved.
Fig. 3 is a flowchart of another information display method in a vehicle control application according to an embodiment of the present application. Step S301 in the embodiment shown in fig. 3 is substantially the same as step S201 in the embodiment shown in fig. 2, and steps S303 to S308 in the embodiment shown in fig. 3 are substantially the same as steps S202 to S207 in the embodiment shown in fig. 2, and are not described herein. As shown in fig. 3, the method further comprises the steps of:
in step S302, the terminal creates a data pool tool.
The data pool tool is used for storing vehicle data required by the vehicle control application, and the vehicle data at least comprises vehicle control data of each vehicle control in the vehicle control application.
In the embodiment of the application, a data pool tool can be also created in the terminal, and the data pool tool can be a single object, so that the data pool tool has a life cycle with the same length as that of the terminal, and data is stored for only one part. The data pool tool can store a list of all vehicles under the user name, as well as user default vehicle data. The list of all vehicles under the user name is an array, the elements of each array are the data of one vehicle, and the data of each vehicle comprises role related data, authority related data and vehicle data. The user default vehicle data is the data of the vehicle currently selected by the user in the vehicle control application.
It should be noted that, although in the embodiment shown in fig. 3, the step of creating the data pool tool by the terminal is performed after the step of creating and transmitting the vehicle control command tool and the polling tool by the terminal, in practical application, the step of creating the data pool tool by the terminal may be performed as a single operation at any suitable time, which is not limited herein.
Fig. 4 is a relationship diagram between a list of all vehicles under a user name and user default vehicle data provided by an embodiment of the present application. As shown in fig. 4, in the data pool tool, each user may correspond to a list of all vehicles under a user name, where the list of all vehicles under the user name includes a plurality of detail data of each vehicle, and the detail data of each vehicle may include role related data, authority related data, and vehicle data.
In practical use, since a vehicle control application of a user may include a plurality of vehicles, the vehicles include vehicles purchased by the user, that is, vehicles of which the user is a vehicle owner, and vehicles of which the user is authorized to use, it is necessary to display the information in the vehicle control application by using a list of all vehicles under the user name. Further, in the list of all vehicles under the user name, the vehicle with bound vehicle owner, the vehicle with unbound vehicle owner and the vehicle not taken by the user can be distinguished. Wherein, the fact that the user does not pick up the vehicle means that the vehicle owner has shared the authorization to the user, but the user has not picked up the authorized vehicle.
The role related data may include a user role, an authorization valid period, an authorization expiration time stamp, and a binding state among the detail data of each vehicle. The user roles may be of an enumeration type, and are classified into owners and authorized persons. The owner of the vehicle has the full set of functions of all the rights of the vehicle, including near control rights and far control rights, and other rights, such as geographical position rights and the like. The authorized person may further divide detailed character types such as friends, family, service personnel, etc. The rights of the vehicle owned by the authorized person may be specified by the vehicle owner or otherwise determined, which is typically a subset of the total rights of the vehicle. The authorization-to-expiration date may also be specified by the vehicle owner or otherwise determined. The grant expiration time stamp may be configured as an absolute time stamp. The binding state includes a vehicle owner bound vehicle state, a vehicle owner unbound vehicle state, and a user unbound vehicle state. The vehicle-bound state of the vehicle owner refers to a state after the vehicle owner binds the vehicle in a vehicle control application operation vehicle binding interface; the vehicle owner unbound vehicle state refers to a state that a user has purchased a vehicle, but has not bound the vehicle in a vehicle control application operation vehicle binding interface; the state that the user does not get the vehicle refers to a state that the vehicle owner has authorized the vehicle to the user, but the user has not operated the get at the vehicle control application interface.
In the detail data of each vehicle, the authority-related data may include whether there is a near control authority and whether there is a far control authority. The near control authority can be Bluetooth authority, the remote control authority can be HTTP authority, and whether the near control authority is provided or not and whether the remote control authority is provided or not can be Boolean type data.
In the detail data of each vehicle, the vehicle data may include whether it is a default vehicle, a license plate number, a vehicle nickname, vehicle brand information, a frame number, and a vehicle unique identification. Whether the default vehicle is the Boolean type data or not can be determined, and the license plate number, the vehicle nickname, the vehicle brand information, the frame number and the vehicle unique identifier can be determined as the character string type data. The vehicle unique identifier is a unique identifier assigned to the vehicle by the server.
The user default vehicle data is different from the detail data of each vehicle, which includes the full volume vehicle control data of the vehicle that the user currently selects to operate the vehicle control. In one example, the user default vehicle data may include connection status data of the default vehicle, vehicle data, various vehicle control function data, scene layout data, statistics, OTA upgrade data, and the like. Wherein, various vehicle controls include, but are not limited to, locks, vehicle seeking, flashing lights, whistling, car windows, car window ventilation, sunroof ventilation, trunk, battery heating, air conditioning, rapid air conditioning temperature rise, air conditioning defrosting, air conditioning ventilation, air conditioning internal circulation, air conditioning external circulation, charging switch, seat heating primary driving, seat heating secondary driving, seat heating left rear, seat heating right rear, seat primary driving ventilation, the auxiliary driving ventilation of the seat, the left rear ventilation of the seat, the right rear ventilation of the seat, the privacy switch, the reserved air conditioner, the reserved seat heating, the reserved battery heating, the reserved charging, the air circulation, the reserved vehicle preparation, the front hatch cover, the sunshade curtain, the vehicle washing mode, the whistle mode, the temporary stop mode, the one-key heating, the one-key cooling, the folding of the rearview mirror, the high beam, the dipped headlight, the charging flap, the air purification, the steering wheel heating and the care mode. The data is configurable by the server, and the server can increase and decrease the vehicle control type according to the new vehicle type on the market at any time.
Further, the user default vehicle data further includes air conditioning data and charging function data. Because the air conditioner is complex in logic and numerous in control projects, the field is designed by a simple vehicle control, and the air conditioner comprises the following components: an air conditioning temperature field, an air conditioning duration field, an air quality class field, a pm2.5 field, and an in-vehicle temperature field. The air conditioning temperature field, the air conditioning duration field, the pm2.5 field and the in-vehicle temperature field may be implemented in a digital type, and the air quality level field may be implemented in an enumerated type. The charging function data includes a state of charge auto, which may be implemented in a boolean type.
Still further, the user default vehicle data also includes pattern portion data, vehicle data, and other rights. The mode part data includes, for example, a shortcut instruction list, which may be implemented by a list type, including but not limited to a sentinel mode, a one-key cooling mode, a temporary stop mode, a car washing mode, a one-key heating mode, and a one-key cooling mode. The vehicle data includes, for example, a current fuel amount, a current power amount, a total mileage, whether it is an electric car or an oil car, a vehicle position, a state abnormality prompt, a vehicle picture address, a vehicle running state. Other rights include, for example, geographic location rights and vehicle presence. The geographic position authority and the on-line condition of the vehicle can be realized by using a Boolean type. When the on-line condition of the vehicle is true, the representative vehicle is connected with the server, and a remote control instruction can be issued; when the on-line condition of the vehicle is false, the representative vehicle is disconnected with the server, and a remote control instruction cannot be issued at the moment.
In the embodiment of the application, some convenience functions can be configured in the data pool tool. In particular, some situations may require that some data be inferred from a list of all vehicles under the user's name of the data pool tool and user default vehicle data, which is time consuming and labor intensive if inferred each time, thus providing some convenience functions that may be implemented in the form of functions or attributes.
Specifically, the frame number of the default vehicle may be provided as a membership function. Because the frame number of the automobile and the Bluetooth key are closely connected, the Bluetooth digital key of the currently used automobile must be synchronized when the frame number is switched. Therefore, logic for synchronizing the bluetooth digital key of the currently used vehicle can be written in the method of setting the variable of the membership function. Fig. 5 is a flowchart of a method for synchronizing a bluetooth digital key of a currently used vehicle according to an embodiment of the present application, as shown in fig. 5, when synchronizing a bluetooth digital key of a currently used vehicle, it may be first determined whether a new value is equal to an old value, that is, whether a currently set value is a previous value, and if so, no operation is performed; if the currently set value is not equal to the previous value, starting to synchronize the Bluetooth digital key; judging whether the Bluetooth digital key is initialized, if so, refreshing the Bluetooth digital key by using the latest frame number; if the refreshing is successful, a Bluetooth digital key is detected to be locally available, and Bluetooth connection is started; if not, performing no operation; if the Bluetooth digital key is not initialized, the Bluetooth digital key is initialized first.
Furthermore, whether the user is a vehicle owner or not can be judged in a member function mode, and the vehicle binding is completed. Specifically, in the method for setting the variable of the member function, logic for judging whether the user is the owner of the vehicle and completing the binding of the vehicle can be written. The logic for determining whether the user is the owner of the vehicle may be: retrieving the detail data for each vehicle from the data pool tool; accessing the role of the detail data, and judging whether the detail data is a vehicle owner or not; if the vehicle owner is the vehicle owner, returning to true; otherwise, returning false.
Taking the implementation in the iOS system as an example, a filter function can be called for list data, parameters of the filter function are transferred into a callback function, and the callback function has logic as follows: and judging whether the role enumeration of the vehicle data is a vehicle owner or not. If at least one bound vehicle can be filtered, judging that the user finishes binding the vehicle; if no results are filtered out, it is determined that the user has not bound the car.
Furthermore, it is also possible to determine whether the current vehicle is connected or not and determine the authorized expiration time by means of a membership function. Specifically, in the method for setting the variable of the membership function, logic for determining whether the current vehicle is connected may be written as follows: retrieving the detail data for each vehicle from the data pool tool; judging whether the Bluetooth digital key is connected or not, and if so, directly returning to true; if the remote connection is not connected, judging whether the remote connection is connected or not, and returning the result of the remote connection. Logic for determining the expiration time of the grant may also be written in the method for setting the variable of the member function.
FIG. 6 is a flow chart of a method for determining an authorized expiration time according to an embodiment of the present application, as shown in FIG. 6, including obtaining an authorized expiration time stamp from vehicle detail data; subtracting the authorized expiration time stamp from the current time stamp to obtain a time difference value; if the time difference value is less than 0, indicating that the authority of the vehicle of the user has not expired, and not executing any operation; if the time difference > =0, indicating that the user's rights to this vehicle have expired, closing the grant timer; the data of the page with the car controls is refreshed immediately so that the server will return the latest list of vehicles under the user name, and the vehicles whose authorization has expired will not appear on the client.
In embodiments of the present application, data in the data pool tool may be updated. After the terminal obtains the vehicle list data from the server, the data stored in the data pool tool needs to be updated, and operations of saving the vehicle list data, determining a default vehicle, synchronizing the Bluetooth digital key and judging the authorized expiration time are executed.
The step of storing the vehicle list data is to update the list of all vehicles under the user name in the data pool tool based on the updated vehicle list data after the terminal acquires the vehicle list data from the server.
Determining a default vehicle refers to filtering the list of vehicles to find the default vehicle. Taking the implementation in iOS systems as an example, a filter () function may be called, writing in the incoming callback function, i.e. the predicate condition: and accessing whether the vehicle data is a default vehicle field, and returning a judging result. The Filter () function filters out vehicles for which the determination is true.
The synchronous bluetooth digital key may update the determined frame number of the default vehicle using the frame number membership function of the default vehicle in the above-described traversal function, which corresponds to a bluetooth digital key change.
Determining the authorized expiration time operation may be accomplished by accessing an authorized validity period field of default vehicle data, which represents a permanent validity period when empty, and no operation is required. When the field is not empty, an authorization timer can be started, and the member function is judged by using the authorization expiration time in the traversing function, so that the authorization expiration judgment is periodically carried out. The judging period may be set as required, and is not limited herein.
In the embodiment of the application, the data pool tool can be cleaned. Specifically, when a vehicle control application registers a user login, the vehicle-mounted application needs to pull the vehicle list data at a proper position and update the data pool tool data. And when the vehicle control application registered user logs out, the data pool tool needs to clean all data stored by the vehicle control application registered user.
Fig. 7 is a flowchart of an information display method in another vehicle control application according to an embodiment of the present application. Step S701 to step S703 in the embodiment shown in fig. 7 are substantially the same as step S301 to step S303 in the embodiment shown in fig. 3, and step S706 to step S710 in the embodiment shown in fig. 7 are substantially the same as step S304 to step S308 in the embodiment shown in fig. 3, and are not repeated here. As shown in fig. 7, the method further comprises the steps of:
in step S704, it is determined whether the specific vehicle control includes a buried point event in the vehicle control data of the specific vehicle control stored in the data pool tool.
In step S705, in response to the particular vehicle control including a buried point event, the buried point event is assembled into a master flow function of the send vehicle control command tool.
In this embodiment of the present application, after a main flow function of a vehicle control command sending tool is invoked, a terminal may determine whether a specific vehicle control element includes a buried point event in vehicle control data of the specific vehicle control element stored in a data pool tool. When the particular vehicle control includes a buried point event, the buried point event is assembled into a master flow function that sends a vehicle control command tool.
That is, after the terminal invokes the main flow function of the vehicle control command sending tool, the terminal first needs to report the embedded point according to the service requirement. Wherein, the service requirement is: some vehicle controls need to be reported to a server, and some do not need; each vehicle control has corresponding event description; some controls include additional parameters in addition to the event description. The additional parameter may be a parameter common to a plurality of vehicle controls, for example, an attribute english name of an event, or may be a parameter specific to a certain vehicle control, for example, a seat position parameter and a heating level parameter of a seat heating vehicle control.
The embedded point member internal function and member variable corresponding to the embedded point member internal function and member variable can be configured in the embedded point vehicle control type of the main flow function, if the embedded point event name is not configured for the vehicle control type, the vehicle control is not required to report the embedded point, and the server is not required. By adopting the method, the report of the buried point event can be flexibly realized, the execution efficiency of the vehicle control command is improved, the information updating and displaying efficiency in the vehicle control application is further improved, and the user experience is improved.
Fig. 8 is a flowchart of an information display method in still another vehicle control application according to an embodiment of the present application. Step S801 to step S803 in the embodiment shown in fig. 8 are substantially the same as step S301 to step S303 in the embodiment shown in fig. 3, and step S809 to step S813 in the embodiment shown in fig. 8 are substantially the same as step S304 to step S308 in the embodiment shown in fig. 3, and are not repeated here. As shown in fig. 8, the method further comprises the steps of:
in step S804, a vehicle control type of the specific vehicle control is determined.
The vehicle control type comprises an unauthorized limit type and an authorized limit type.
In step S805, responsive to the vehicle control type of the particular vehicle control being the authority limit type, user default vehicle data in the data pool tool is accessed, and a user role is determined.
The default vehicle of the user is the vehicle currently selected by the user in the vehicle control application.
In step S806, based on the user role, the user rights of the user to the specific vehicle control are determined.
In step S807, the type of control over a particular vehicle control is determined based on the user rights.
Wherein the type of control includes near control or far control.
In step S808, the type of control performed on the specific vehicle control is assembled into a master flow function of the send vehicle control command tool.
In this embodiment of the present application, after the main flow function of the vehicle control command sending tool is called, the terminal may further determine the vehicle control type of the specific vehicle control. And when the vehicle control type of the specific vehicle control is determined to be the authority limit type, accessing user default vehicle data in the data pool tool, and determining the user role. Further, the terminal determines user rights of the user to the specific vehicle control based on the user roles, and determines the type of control to the specific vehicle control based on the user rights. Finally, the type of controlling the specific vehicle control is assembled into the main flow function of the vehicle control command sending tool, so that the server can send the vehicle control command to the vehicle-mounted terminal based on the control type, and the vehicle-mounted terminal selects a proper mode according to the control type in the vehicle control command, such as a Bluetooth-based near control mode or an HTTP-based remote control mode to execute the vehicle control operation.
In this embodiment, determining, based on a user role, a user permission of a user to a specific vehicle control includes: responding to the fact that the user is a vehicle owner, and determining that the user has near control and far control authorities for a specific vehicle control; and responding to the authorized user of the vehicle, acquiring a vehicle control configuration list in default vehicle data of the user, and determining the user permission of the user on the specific vehicle control based on the configuration information of the specific vehicle control in the vehicle control configuration list.
Further, determining a type of control for the particular vehicle control based on the user permissions includes: and judging whether the Bluetooth key of the vehicle is connected or not according to the user permission including the near control permission. And in response to the Bluetooth key of the vehicle being connected, determining that the type of the control of the specific vehicle control by the user is a near control type. And in response to the Bluetooth key of the vehicle being unconnected or the user permission only comprising remote control permission, determining that the type of the control of the specific vehicle control is a remote control type. And calling an entry callback function of the main flow function in response to the Bluetooth key of the vehicle being unconnected and the user permission not including the remote control permission, introducing an error reason into the entry callback function and returning, and ending the execution of the main flow function of the vehicle control command tool.
Fig. 9 is a flowchart of an information display method in still another vehicle control application according to an embodiment of the present application. Step S901 to step S908 in the embodiment shown in fig. 9 are substantially the same as step S801 to step S808 in the embodiment shown in fig. 8, and step S915 to step S919 in the embodiment shown in fig. 9 are substantially the same as step S809 to step S813 in the embodiment shown in fig. 8, and are not repeated here. As shown in fig. 9, the method further comprises the steps of:
in step S909, in response to determining that the type of the control of the specific vehicle control by the user is a near control type, the software development package calling the bluetooth key of the vehicle sends a first instruction for controlling the specific vehicle control, and receives an execution result of the first instruction.
In step S910, the call-in callback function of the main flow function is called when the execution result of the first instruction is received, the execution result of the first instruction is transmitted into the call-in callback function and returned, and the main flow function of the execution control command tool is finished.
In step S911, in response to determining that the type of control of the particular vehicle control by the user is a remote control type, it is determined whether the current vehicle is connected based on the user default vehicle data.
In step S912, if the current vehicle is connected, the hypertext transfer protocol HTTP is invoked to send a second instruction for controlling the specific vehicle control, and a result of executing the second instruction is received.
In step S913, the call-in callback function of the main flow function is invoked when the second instruction execution result is received, the second instruction execution result is entered therein and returned, and the main flow function of the execution control command tool is ended.
In step S914, if the current vehicle is not connected, the call-in callback function of the vehicle control command tool is called, an error reason is input therein and returned, and the execution of the main flow function of the vehicle control command tool is ended.
In the embodiment of the application, when the type of the specific vehicle control is determined to be the near control type, the terminal can call the software development package of the vehicle Bluetooth key to send a first instruction for controlling the specific vehicle control, and receive an execution result of the first instruction. Further, when receiving the execution result of the first instruction, the method calls the call-in callback function of the main flow function, and the execution result of the first instruction is transmitted into the call-in callback function and returned, so that the main flow function of the control command tool is finished.
On the other hand, when it is determined that the type of control of the specific vehicle control by the user is the remote control type, the terminal may determine whether the current vehicle is connected based on the user default vehicle data. And if the current vehicle is connected, invoking a hypertext transfer protocol (HTTP) to send a second instruction for controlling the specific vehicle control, and receiving an execution result of the second instruction. And then, when receiving the execution result of the second instruction, calling the call-in callback function of the main flow function, inputting the execution result of the second instruction into the call-in callback function, returning the call-in callback function, and ending the main flow function of the execution control command tool. And if the current vehicle is not connected, calling an entry callback function for transmitting the vehicle control command tool, entering an error reason in the entry callback function, returning, and ending the execution of the main flow function of the vehicle control command tool. That is, after calling the main flow function of the tool for transmitting the car control command, the terminal may also perform permission judgment. For some types of controls that are designed directly on the interface, permission judgment can be eliminated. For a vehicle control software, there are some vehicle controls that can be used by both the vehicle owner and the authorized person, for example: air conditioning, seat heating, all modes (such as a sentinel mode, a temporary stop mode and the like), and the vehicle control excludes permission judgment, directly enters a priority use near control, and the near control does not try remote control any more. For other vehicle control types, permission judgment is needed. When judging, firstly, the user default vehicle data in the data pool tool is accessed to judge whether the user is the vehicle owner function or not, and whether the user is the vehicle owner is determined. If the user is the owner of the vehicle, the user has the remote control authority and the near control authority. At this time, whether the Bluetooth digital key is connected or not needs to be further judged, and if the Bluetooth digital key is connected, the close control is preferentially used; if the Bluetooth key is not connected, then remote control is used. If the user is not the owner of the vehicle and is an authorized person, further permission judgment is needed. At this time, the terminal may continue to access all the vehicle control type lists of the user default vehicle data in the data pool tool, each list item being configured with near control rights and far control rights. Similarly, when the vehicle control includes both the near control authority and the far control authority, the near control authority is preferentially used, and the far control authority is used again.
Taking the implementation in the iOS system as an example, the entering vehicle control type can be read first, all vehicle control type lists can be traversed, and list data items with the same attribute vehicle control type can be found. For the Bluetooth permission, whether the Bluetooth digital key is connected or not is further judged, and if the Bluetooth digital key is connected, the close control is preferentially used. If the Bluetooth key is not connected, judging whether remote control authority exists, if so, performing remote control, otherwise, calling a call-in callback function, and transmitting the parameters into an error reason: "no rights" and returns directly, i.e. ending the function execution.
It should be noted that, although in the embodiment shown in fig. 9, steps S909 to S914 are performed before the step of determining the value of the member variable of the tool for transmitting the vehicle control command, in practical use, they may be performed at any time after the main flow function is invoked, that is, the above steps and the polling step may be different branches that are executed in parallel, the vehicle control application may execute the vehicle control command while polling, and invoke the call-back function of the main flow function when the command execution result is obtained, and terminate the present polling while returning the execution result.
In this embodiment of the present application, when the value of the member variable of the sending vehicle control command tool is the second value, the call-in callback function of the sending vehicle control command tool is called, and the error reason is entered therein and returned, so as to end the execution of the main flow function of the vehicle control command tool. And on the other hand, when the value of the member variable of the polling tool is the second value, calling an entry callback function of the vehicle control command tool, introducing an error reason into the entry callback function, returning the entry callback function, and ending the execution of the main flow function of the vehicle control command tool. The first value indicates that the member variable is in an idle state, and the second value indicates that the member variable is in a busy state. Further, after finishing executing the main flow function of the vehicle control command tool, the display information of each vehicle control in the vehicle control application is kept unchanged.
That is, after the terminal invokes the main flow function of the vehicle control command transmitting tool, the terminal can access the member variable "busy state" of the vehicle control command transmitting tool, determine its value, and if the value is "request in progress", invoke the call-in callback function, and the parameter thereof is transmitted into the error cause: the tool is busy, and the function execution is finished directly, so that one vehicle control command is executed at a time, and when one vehicle control command is in progress, a user clicks other vehicle control controls and pops up a prompt: a vehicle control is already executing and therefore cannot be executed.
Further, when the member variable of the tool for sending the vehicle control command is determined to be in a state of 'no request', the member variable of the polling tool is further accessed to judge the value of the member variable, if the value is 'request in progress', a parameter entering callback function is called, and the parameter entering error causes are: the tool is busy, and the function execution is finished directly, so that one vehicle control command is executed at a time, and when one vehicle control command is in progress, a user clicks other vehicle control controls and pops up a prompt: a vehicle control is already executing and therefore cannot be executed.
Furthermore, the main flow function of the vehicle control command transmitting tool can also assemble an HTTP request to enter into the parameters so as to request the server interface. If the server response is successful, the task id returned by the server is obtained, and the next step is performed. At this time, the successful response of the server does not represent the actual success of the vehicle control, but is just equivalent to one response of the server, and the terminal is informed of the fact that 'i receive the vehicle control request, i can execute the instruction'. If the server response fails, the call-in callback function is called, the parameter is transmitted into the failure reason of the failure, namely the server returns a result error, and the function execution is finished.
In this embodiment of the present application, after the main flow function is invoked, the value of the member variable of the tool that sends the vehicle control command may be set to the second value, that is, the member variable of the polling tool is set to be in a busy state. And after finishing executing the main flow function of the vehicle control command tool, setting the value of the member variable of the vehicle control command tool to be a first value, namely setting the member variable of the polling tool to be in an idle state.
Fig. 10 is a flowchart of a method for periodically querying a server for an execution result using a polling tool according to an embodiment of the present application. As shown in fig. 10, the method includes the steps of:
In step S1001, in response to the polling tool being invoked, the value of the member variable of the polling tool is set to a first value.
In step S1002, the task start time and the current polling time of the polling tool are recorded.
In step S1003, in response to the difference between the current polling time and the task start time being less than or equal to the preset threshold, the polling tool requests the polling interface of the server, sends an HTTP request to the server, and obtains the execution result returned by the server.
In step S1004, in response to the difference between the current polling time and the task start time being greater than the preset threshold, the value of the member variable of the polling tool is set to a second value, the polling task is terminated, and execution failure information is returned.
In this embodiment, when the polling tool is called, the value of the member variable of the polling tool is first set to the second value, that is, the member variable of the polling tool is set to be in a busy state. And then recording the task starting time and the current polling time of the polling tool. When the difference between the current polling time and the task starting time is smaller than or equal to a preset threshold value, the polling tool requests a polling interface of the server, sends an HTTP request to the server and acquires an execution result returned by the server. When the difference between the polling time and the task starting time is larger than a preset threshold value, the value of the member variable of the polling tool is set to be a second value, the polling task is terminated, and the execution failure information is returned.
In this embodiment of the present application, the execution result returned by the server includes information that the server is in an executing state, information that the server is executing successfully, and information that the server fails executing. When the server returns the state information that the server is in execution, the polling tool is called again to inquire the execution result from the server after a preset time interval. When the server returns the successful execution information of the server, the value of the member variable of the polling tool is set to be a first value, the polling task is terminated, and the successful execution information is returned. When the server returns the execution failure information of the server, the value of the member variable of the polling tool is set to be a first value, the polling task is terminated, and the execution failure information is returned.
That is, the polling tool may also assemble HTTP request entries, requesting a server interface, where the entries may be task identifications. The polling tool sends an HTTP request to the server and acquires the data returned by the server. And if the server response is successful, acquiring a result returned by the server, wherein the result comprises the information that the server is in execution, the information of successful execution of the server and the information of failure execution of the server. When the server returns the state information of the server in execution, the function is recursively called again after a preset time interval, and the next polling is performed.
Taking the implementation in the iOS system as an example, the function is recursively called again after a preset time interval, and the next polling can be performed as follows: and calling a dispeatchTime class provided by the system, calling a non () method of the dispeatchTime class to obtain the current time, and adding a preset time interval to obtain a future time. The dispatch queue class provided by the system is called, the main attribute is called to obtain the main thread, and then the asyncAfter () method is called, wherein the method needs two parameters, the first parameter is transmitted to the future time obtained in the last step, and the second parameter is a callback function which is specific logic to be executed when the future time is reached. It should be noted that before the next polling is performed, it is also necessary to determine whether the polling has timed out. If the result is equal to the execution success, the server is informed that the vehicle-mounted terminal feedback is received, and the vehicle control execution is successful. Then the termination execution and cleaning process is performed: setting the member variable "busy status" to false, and sending a notification: the polling ends (with the result of success in the notification), returning to the function. If the server replies: if the failure occurs, terminating execution and cleaning processing is performed: setting the member variable "busy status" to false, and sending a notification: the polling ends (with the result of failure in the notification), returning to the function.
Fig. 11 is a flowchart of another information display method in a vehicle control application according to an embodiment of the present application. Step S1101 to step S1107 in the embodiment shown in fig. 11 are substantially the same as step S201 to step S207 in the embodiment shown in fig. 2, and are not described herein. As shown in fig. 11, the method further includes the steps of:
in step S1108, in response to the vehicle-mounted terminal completing the disconnection reconnection with the server, and the terminal receiving the data update notification sent by the server, the status of the polling tool is determined.
The states of the polling tool include a polling in-progress state and a polling end state.
In step S1109, in response to the status of the polling tool being the in-polling status, the terminal ends the polling, acquires the latest vehicle control data of the vehicle from the server, and updates the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In step S1110, in response to the state of the polling tool being the polling end state, the terminal acquires latest vehicle control data of the vehicle from the server, and updates display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In the embodiment of the application, the network connection between the vehicle-mounted terminal and the server may be interrupted due to the network quality and the environment. The vehicle-mounted terminal and the server are connected again in a disconnection mode, and when the terminal receives a data update notification sent by the server, the terminal can determine the state of the polling tool. If the state of the polling tool is the polling state, the terminal can end the polling, acquire the latest vehicle control data of the vehicle from the server, and update the display information of each vehicle control in the vehicle control application based on the latest vehicle control data. And if the state of the polling tool is the polling ending state, the terminal acquires the latest vehicle control data of the vehicle from the server, and updates the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In practical use, the vehicle-mounted terminal and the server cannot be always connected, for example, the vehicle is opened to a place without a signal or with a weak signal, and the connection is not available, which is an objective scene unavoidable by any design. At this time, even if the vehicle-mounted terminal completes the vehicle control instruction, it cannot report the execution result to the server, so that the terminal is never informed. At this time, there are three cases of the terminal:
1) The vehicle-mounted terminal completes the vehicle control instruction but fails to notify the server side, so the terminal is still polling until the preset maximum polling time is exceeded.
2) The vehicle-mounted terminal completes the vehicle control instruction, but fails to inform the server, but the terminal reaches the preset maximum polling time, so that the server vehicle data is pulled again, and error data and interface display are obtained.
3) The vehicle-mounted terminal does not complete the vehicle control instruction yet, but the terminal reaches the preset maximum polling time, so that the server vehicle data is pulled again to obtain wrong data and interface display.
In order to make up for vehicle data errors in vehicle control application caused by the three conditions, in the embodiment of the application, the terminal can be prevented from acquiring error data by actively sending a remote notification form to the terminal through the server. After the vehicle-mounted terminal is disconnected and reconnected to the server, and the latest vehicle data and the vehicle control execution result are synchronized to the server, the server can actively inform the terminal to refresh the latest vehicle control data so as to refresh the interface. Taking the implementation in the iOS system as an example, the server can use the APNS notification to actively notify the terminal to refresh the latest vehicle control data and further refresh the interface.
Specifically, after the vehicle-mounted terminal is disconnected and reconnected with the server, the server can send a remote notification to the terminal; the state of the terminal when it receives the notification may be in the polling or the polling may be ended. If the vehicle control data is in the polling process, the polling process is immediately finished, and the latest vehicle control data of the server is pulled and the interface is refreshed. And if the polling is finished, pulling the latest vehicle control data of the server and refreshing the interface.
The above description is of the information display method in the vehicle control application when a specific vehicle control in the vehicle control application is clicked. On the other hand, when the user first enters the vehicle control application, how the information in the vehicle control application should be displayed, also requires agreements.
Fig. 12 is a flowchart of an information display method in still another vehicle control application according to an embodiment of the present application. Step S1201 to step S1208 in the embodiment shown in fig. 12 are substantially the same as step S301 to step S308 in the embodiment shown in fig. 3, and are not described here again. As shown in fig. 12, the method further includes the steps of:
in step S1209, in response to receiving the request for entering the vehicle list data page of the vehicle control application sent by the user, the user identifier is acquired, and the user identifier is sent to the server through HTTP.
In step S1210, the list of vehicles transmitted by the server is received based on the HTTP, and the list of vehicles is stored in the data pool tool.
Wherein the vehicle list is a list of all vehicles under the user name.
In step S1211, a default vehicle is determined in the vehicle list, first server vehicle control data for the default vehicle is obtained from the server based on HTTP, and the first server vehicle control data is saved in the data pool tool.
The first server vehicle control data comprises role related data, authority related data and vehicle data.
In step S1212, the first server vehicle control data is converted into first client vehicle control data based on the authority-related data and the vehicle data in response to determining that the user satisfies the authorization condition of the default vehicle based on the role-related data.
The first client vehicle control data at least comprises configuration information of each vehicle control in a default vehicle.
In step S1213, control information of a default vehicle is displayed in the control application based on the configuration information of each control.
In the embodiment of the application, the terminal may acquire the user identifier when receiving the vehicle list data page request sent by the user and entering the vehicle control application, and send the user identifier to the server through HTTP. Then, the terminal receives the vehicle list transmitted from the server based on the HTTP, and saves the vehicle list in the data pool tool. The terminal may determine a default vehicle in the vehicle list, obtain first server vehicle control data for the default vehicle from the server based on HTTP, and save the first server vehicle control data to the data pool tool. And when the user meets the authorization condition of the default vehicle based on the role related data, the first server vehicle control data is converted into first client vehicle control data based on the authority related data and the vehicle data, and the first client vehicle control data at least comprises configuration information of each vehicle control in the default vehicle. And finally, displaying the control information of the default vehicle in the control application based on the configuration information of each control.
That is, when a user initially opens a vehicle control application, or enters vehicle list data, it is necessary to acquire all vehicles under his own name. An incoming vehicle list data request may be sent to a server to obtain the vehicle list data. The vehicle list data request can be sent through an HTTP protocol, the participation of the vehicle list data request can be a user identifier, and the server can inquire a vehicle list under the user name according to the user identifier and return the vehicle list to the terminal. The out-of-reference of the vehicle list data request, i.e. the list of all vehicles under the user name at the time of the data returned by the server.
After receiving the list of all vehicles under the user name, the terminal firstly updates the data pool data, then selects the default vehicle, and jumps the interface of the vehicle control application to the detail data page corresponding to the default vehicle. If the number of data in the list of all vehicles under the user name is 0, the user may enter other preset pages.
The terminal then obtains the detail data of the default vehicle from the server, converts the data into data in the form of a client, and displays the data in the vehicle control application. Specifically, the vehicle identification of the default vehicle may be taken as an entry, the vehicle detail data request may be assembled, and the vehicle detail data request may be sent to the server through the HTTP protocol. The server returns default vehicle data including role related data, rights related data, and vehicle data. The terminal converts the default vehicle data into default vehicle data in the form of a client. Further, the terminal may first determine the current vehicle on-line condition. In an example, the terminal may determine through a vehicle presence field in the default vehicle detail data, and when determining that the vehicle is in a presence state, the terminal converts the default vehicle data into default vehicle data in a client form, and displays control information of the default vehicle based on the converted data. On the other hand, when it is determined that the vehicle is not in an on-line state, it is indicated that there is no network connection between the vehicle-mounted terminal and the server, and at this time, the user may be reminded to manually connect the vehicle-mounted terminal and the server.
In some embodiments, the terminal may also provide an optimization function: the terminal starts a reconnection timer, and a reconnection port of the server is called at regular intervals, wherein the preset intervals are designated by service demands. After the server receives the request for the first time, the server can reconnect with the disconnection of the vehicle-mounted terminal in the form of directly sending a short message to the sim card bound on the vehicle-mounted terminal, and the specific design flow of the vehicle-mounted terminal product is related, so that the method is not limited. After the server is connected with the vehicle-mounted terminal, the vehicle is switched to an on-line state, and the server can return a successful result to the terminal. Since reconnection of a broken wire is a time consuming process, the terminal will poll this interface until a successful result is received and will not stop the timer. Because disconnection reconnection is a time-consuming process, after the server initiates a disconnection reconnection request for the first time, the number of times of requesting the vehicle-mounted terminal can be controlled according to the need before the server is actually connected, and the number of times of requesting the vehicle-mounted terminal cannot be kept consistent with the number of times of requesting the terminal.
By adopting the technical scheme of the embodiment of the application, when the functional logic of any vehicle control application changes, the updating of the vehicle control application can be completed only by modifying the content of the configuration data part, so that the display information of the vehicle control application can be conveniently, accurately and rapidly displayed, the maintenance cost is saved, and the universality of the scheme is improved.
By adopting the technical scheme of the embodiment of the application, single vehicle control configuration data is used in the data layer, the configuration data of vehicle control is formed by using an ingenious combination mode of enumeration and dictionary, and different points (types, pictures, switch prompt and buried points) of each data are separated. And storing the vehicle control list data and the detail data by using a single tool to realize the consistency and the exclusivity of the data. In a logic layer, abstracting general logic of a vehicle control request to be independent into a single-instance tool; the whole request flow of the vehicle control is formed into a closed loop by using polling and remote notification. At the presentation layer, separating the control presentation (difference of the presentation layer) and the data (data structure and state flow); and using an observer mechanism (or a notification mode) to enable each page in the vehicle control application to be consistent with the state of the vehicle control of the data.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Fig. 13 is a schematic diagram of an information display device in a vehicle control application according to an embodiment of the present application. As shown in fig. 13, the information display device in the vehicle control application includes:
a creation module 1301 configured to create a send vehicle control command tool and a poll tool.
The processing module 1302 is configured to invoke a main flow function of a send vehicle control command tool in response to determining that a user is operating a particular vehicle control in a vehicle control application.
A determining module 1303 configured to determine a value of a member variable of the tool that transmits the vehicle control command.
The determining module is further configured to determine a value of a member variable of the polling tool when the value of the member variable of the sending vehicle control command tool is the first value;
a communication module 1304 configured to send a vehicle control request to the server using a master flow function that sends a vehicle control command tool when the value of the member variable of the polling tool is a first value;
the communication module is further configured to periodically query the server for execution results using the polling tool;
the display module 1305 is configured to respond to the polling to determine that the execution result of the server is successful, or the polling time length exceeds a preset threshold, and the terminal obtains the latest vehicle control data of the vehicle from the server and updates the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
According to the technical scheme provided by the embodiment of the application, the vehicle control command sending tool and the vehicle control polling tool which are realized in the form of single objects are created in the terminal, after a user operates a specific vehicle control in the vehicle control application, a vehicle control request is sent to the server by using an HTTP protocol based on the vehicle control command sending tool and the vehicle control polling tool, and the execution result of the vehicle control request is polled from the server, so that the operation result can be timely obtained after the user operates the vehicle control, the display information is updated, the information display efficiency in the vehicle control application is improved, and the user experience is improved.
In this embodiment of the present application, further includes: the terminal creates a data pool tool, wherein the data pool tool is used for storing vehicle data required by the vehicle control application, and the vehicle data at least comprises vehicle control data of each vehicle control in the vehicle control application; after the main flow function of the vehicle control command transmitting tool is called, the method further comprises the following steps: determining whether the specific vehicle control part comprises a buried point event or not in vehicle control data of the specific vehicle control part stored in the data pool tool; in response to a particular vehicle control including a buried point event, the buried point event is assembled into a master flow function that sends a vehicle control command tool.
In this embodiment of the present application, after calling a main flow function for sending a vehicle control command tool, the method further includes: judging the vehicle control type of a specific vehicle control, wherein the vehicle control type comprises an unauthorized limit type and an authorized limit type; responding to the control type of the specific control is the authority limit type, accessing user default vehicle data in the data pool tool, and determining a user role, wherein the user default vehicle is the vehicle currently selected by the user in the control application; determining the user permission of a user to a specific vehicle control based on the user role; determining the type of controlling the specific vehicle control based on the user permission, wherein the type of controlling comprises near control or far control; the type of control over a particular vehicle control is assembled into a master flow function that sends a vehicle control command tool.
In this embodiment, determining, based on a user role, a user permission of a user to a specific vehicle control includes: responding to the fact that the user is a vehicle owner, and determining that the user has near control and far control authorities for a specific vehicle control; and responding to the authorized user of the vehicle, acquiring a vehicle control configuration list in default vehicle data of the user, and determining the user permission of the user on the specific vehicle control based on the configuration information of the specific vehicle control in the vehicle control configuration list.
In the embodiment of the application, determining the type of controlling the specific vehicle control based on the user permission comprises the following steps: judging whether a Bluetooth key of the vehicle is connected or not according to the user permission including the near control permission; responding to the connection of a Bluetooth key of a vehicle, and determining the type of controlling a specific vehicle control part by a user as a near control type; responding to the fact that the Bluetooth key of the vehicle is not connected, or the user permission only comprises remote control permission, and determining that the type of controlling the specific vehicle control by the user is a remote control type; and calling an entry callback function of the main flow function in response to the Bluetooth key of the vehicle being unconnected and the user permission not including the remote control permission, introducing an error reason into the entry callback function and returning, and ending the execution of the main flow function of the vehicle control command tool.
In this embodiment of the present application, further includes: responding to the fact that the type of the control of the specific vehicle control by the user is a near control type, calling a software development package of a Bluetooth key of the vehicle to send a first instruction for controlling the specific vehicle control, and receiving an execution result of the first instruction; when receiving the execution result of the first instruction, calling an call-in callback function of the main flow function, inputting the execution result of the first instruction into the call-in callback function, returning the call-in callback function, and ending the main flow function of the execution control command tool; responsive to determining that the type of control of the particular vehicle control by the user is a remote control type, determining whether the current vehicle is connected based on user default vehicle data; if the current vehicle is connected, invoking a hypertext transfer protocol (HTTP) to send a second instruction for controlling the specific vehicle control, and receiving an execution result of the second instruction; when receiving the second instruction execution result, calling an call-in callback function of the main flow function, inputting the second instruction execution result into the call-in callback function, returning the call-in callback function, and ending the main flow function of the execution control command tool; and if the current vehicle is not connected, calling an entry callback function for transmitting the vehicle control command tool, entering an error reason in the entry callback function, returning, and ending the execution of the main flow function of the vehicle control command tool.
In this embodiment of the present application, further includes: when the value of the member variable of the sending vehicle control command tool is the second value, calling an entry callback function of the sending vehicle control command tool, introducing an error reason into the entry callback function, returning, and ending the execution of the main flow function of the vehicle control command tool; and when the value of the member variable of the polling tool is the second value, calling an entry callback function of the vehicle control command tool, introducing an error reason into the entry callback function, returning, and ending the execution of the main flow function of the vehicle control command tool; the first value indicates that the member variable is in an idle state, and the second value indicates that the member variable is in a busy state, and after finishing executing the main flow function of the control command tool, the display information of each control in the vehicle control application is kept unchanged.
In this embodiment of the present application, further includes: after the main flow function is called, setting the value of the member variable of the vehicle control command sending tool as a second value; and after finishing executing the main flow function of the vehicle control command tool, setting the value of the member variable of the vehicle control command tool to be a first value.
In the embodiment of the application, the polling tool is used for periodically inquiring the execution result from the server, and the method comprises the following steps: in response to the polling tool being invoked, setting a value of a member variable of the polling tool to a second value; recording the task starting time and the current polling time of the polling tool; responding to the difference between the current polling time and the task starting time being smaller than or equal to a preset threshold value, the polling tool requests a polling interface of the server, sends an HTTP request to the server and acquires an execution result returned by the server; and setting the value of the member variable of the polling tool to be a first value in response to the difference between the current polling time and the task starting time being greater than a preset threshold value, terminating the polling task and returning the execution failure information.
In the embodiment of the application, the execution result returned by the server includes the information that the server is in the executing state, the information that the server is successful in executing and the information that the server is failed in executing; responding to the state information that the server returns that the server is in execution, and calling a polling tool again to inquire an execution result from the server after a preset time interval; responding to the response of the server to return the successful execution information of the server, setting the value of the member variable of the polling tool to be a first value, terminating the polling task and returning the successful execution information; and in response to the server returning the server execution failure information, setting the value of the member variable of the polling tool to a first value, terminating the polling task and returning the execution failure information.
In this embodiment of the present application, further includes: responding to the completion of disconnection reconnection between the vehicle-mounted terminal and the server, and determining the state of a polling tool by the terminal after receiving a data update notification sent by the server, wherein the state of the polling tool comprises a polling in-process state and a polling ending state; responding to the state of the polling tool as a polling state, ending the polling by the terminal, acquiring the latest vehicle control data of the vehicle from the server, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data; and responding to the state of the polling tool as a polling ending state, acquiring the latest vehicle control data of the vehicle from the server by the terminal, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
In this embodiment of the present application, further includes: responding to a received vehicle list data page request which is sent by a user and enters a vehicle control application, acquiring a user identifier, and sending the user identifier to a server through HTTP; receiving a vehicle list sent by a server based on HTTP, and storing the vehicle list in a data pool tool, wherein the vehicle list is all vehicle lists under a user name; determining a default vehicle in a vehicle list, acquiring first server vehicle control data of the default vehicle from a server based on HTTP, and storing the first server vehicle control data in a data pool tool, wherein the first server vehicle control data comprises role related data, authority related data and vehicle data; responsive to determining, based on the role-related data, that the user satisfies an authorization condition of a default vehicle, converting, based on the rights-related data and the vehicle data, the first server vehicle control data into first client vehicle control data, the first client vehicle control data including at least configuration information for each vehicle control in the default vehicle; and displaying the control information of the default vehicle in the control application based on the configuration information of each control.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Fig. 14 is a schematic diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 14, the electronic device 14 of this embodiment includes: a processor 1401, a memory 1402, and a computer program 1403 stored in the memory 1402 and executable on the processor 1401. The processor 1401, when executing the computer program 1403, implements the steps in the various method embodiments described above. Alternatively, the processor 1401, when executing the computer program 1403, performs the functions of the modules/units in the above-described apparatus embodiments.
The electronic device 14 may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The electronic device 14 may include, but is not limited to, a processor 1401 and a memory 1402. It will be appreciated by those skilled in the art that fig. 14 is merely an example of the electronic device 14 and is not limiting of the electronic device 14 and may include more or fewer components than shown, or different components.
The processor 1401 may be a central processing unit (Central Processing Unit, CPU) or other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
Memory 1402 may be an internal storage unit of electronic device 14, such as a hard disk or memory of electronic device 14. The memory 1402 may also be an external storage device of the electronic device 14, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 14. Memory 1402 may also include both internal storage units and external storage devices of electronic device 14. Memory 1402 is used to store computer programs and other programs and data required by the electronic device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow in the methods of the above embodiments, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program may implement the steps of the respective method embodiments described above when executed by a processor. The computer program may comprise computer program code, which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (16)

1. An information display method in a vehicle control application, wherein the method is executed by a terminal and comprises the steps of:
the terminal creates a vehicle control command sending tool and a polling tool;
responsive to determining that a user is operating a particular vehicle control in the vehicle control application, invoking a main flow function of the vehicle control command transmitting tool;
determining the value of a member variable of the tool for transmitting the vehicle control command;
when the value of the member variable of the vehicle control command sending tool is a first value, determining the value of the member variable of the polling tool;
when the value of the member variable of the polling tool is a first value, a master flow function of the vehicle control command sending tool is used for sending a vehicle control request to a server;
periodically querying the server for execution results using the polling tool;
and responding to the polling to determine that the execution result of the server is successful or the polling time length exceeds a preset threshold, acquiring the latest vehicle control data of the vehicle from the server by the terminal, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
2. The method according to claim 1, wherein the method further comprises:
The terminal creates a data pool tool, wherein the data pool tool is used for storing vehicle data required by the vehicle control application, and the vehicle data at least comprises vehicle control data of each vehicle control in the vehicle control application.
3. The method of claim 2, further comprising, after invoking the master flow function of the send vehicle control command tool:
determining whether the specific vehicle control comprises a buried point event or not in the vehicle control data of the specific vehicle control stored in the data pool tool;
and in response to the specific vehicle control comprises a buried point event, assembling the buried point event into a main flow function of the vehicle control command transmitting tool.
4. The method of claim 2, further comprising, after invoking the master flow function of the send vehicle control command tool:
judging the vehicle control type of the specific vehicle control, wherein the vehicle control type comprises an unauthorized limit type and an authorized limit type;
responding to the control type of the specific control is a permission limit type, accessing user default vehicle data in the data pool tool, and determining a user role, wherein the user default vehicle is a vehicle currently selected by a user in a control application;
Determining the user permission of the user to the specific vehicle control based on the user role;
determining a type of control of the specific vehicle control based on the user permission, wherein the type of control comprises near control or far control;
and assembling the type for controlling the specific vehicle control into a main flow function of the vehicle control command transmitting tool.
5. The method of claim 4, wherein the determining, based on the user role, the user's user rights to the particular vehicle control comprises:
responding to the user as a vehicle owner, and determining that the user has near control and far control authorities for the specific vehicle control; and
and responding to the authorized user of the vehicle, acquiring a vehicle control configuration list in the default vehicle data of the user, and determining the user permission of the user on the specific vehicle control based on the configuration information of the specific vehicle control in the vehicle control configuration list.
6. The method of claim 4, wherein the determining a type of control of the particular vehicle control based on the user permissions comprises:
judging whether a Bluetooth key of a vehicle is connected or not according to the user permission including the near control permission;
Responding to the connection of a Bluetooth key of a vehicle, and determining that the type of controlling the specific vehicle control by a user is a near control type;
responding to the fact that a Bluetooth key of a vehicle is not connected, or the user permission only comprises remote control permission, and determining that the type of controlling the specific vehicle control by a user is a remote control type;
and calling the call-in callback function of the main flow function in response to the fact that the Bluetooth key of the vehicle is not connected and the user permission does not comprise remote control permission, introducing error reasons into the call-in callback function and returning the error reasons, and ending the main flow function of the execution of the control command tool.
7. The method of claim 6, wherein the method further comprises:
responding to the fact that the type of the specific vehicle control is determined to be a near control type, calling a software development package of a vehicle Bluetooth key to send a first instruction for controlling the specific vehicle control, and receiving an execution result of the first instruction;
when receiving a first instruction execution result, calling an call-in callback function of the main flow function, inputting the first instruction execution result into the call-in callback function, returning the call-in callback function, and ending the main flow function of the execution control command tool;
responsive to determining that the type of control of the specific vehicle control by the user is a remote control type, determining whether a current vehicle is connected based on the user default vehicle data;
If the current vehicle is connected, invoking a hypertext transfer protocol (HTTP) to send a second instruction for controlling the specific vehicle control, and receiving an execution result of the second instruction;
when receiving a second instruction execution result, calling an call-in callback function of the main flow function, inputting the second instruction execution result into the call-in callback function, returning the call-in callback function, and ending the main flow function of the execution control command tool;
and if the current vehicle is not connected, calling the call-in callback function of the vehicle control command sending tool, introducing an error reason into the call-in callback function, returning, and ending the execution of the main flow function of the vehicle control command sending tool.
8. The method according to any one of claims 1 to 7, further comprising:
when the value of the member variable of the vehicle control command sending tool is a second value, calling a parameter entering callback function of the vehicle control command sending tool, introducing an error reason into the parameter entering callback function and returning the parameter entering callback function, and ending the execution of the main flow function of the vehicle control command sending tool; and
when the value of the member variable of the polling tool is a second value, calling the call-in callback function of the vehicle control command sending tool, introducing an error reason into the call-in callback function and returning the call-in callback function, and ending the execution of the main flow function of the vehicle control command sending tool;
The first value indicates that the member variable is in an idle state, and the second value indicates that the member variable is in a busy state, and after finishing executing the main flow function of the control command tool, the display information of each control in the control application is kept unchanged.
9. The method of claim 8, wherein the method further comprises:
after the main flow function is called, setting the value of the member variable of the vehicle control command sending tool as a second value; and
and after finishing executing the main flow function of the vehicle control command tool, setting the value of the member variable of the vehicle control command tool to be a first value.
10. The method of claim 1, wherein the periodically querying the server for execution results using the polling tool comprises:
in response to the polling tool being invoked, setting a value of a member variable of the polling tool to a second value;
recording the task starting time and the current polling time of the polling tool;
responding to the difference between the current polling time and the task starting time is smaller than or equal to the preset threshold value, the polling tool requests a polling interface of a server, sends an HTTP request to the server and acquires an execution result returned by the server;
And setting the value of the member variable of the polling tool to be a first value in response to the difference between the current polling time and the task starting time being greater than the preset threshold value, terminating the polling task and returning the execution failure information.
11. The method of claim 10, wherein the execution results returned by the server include server in-execution status information, server execution success information, and server execution failure information;
responding to the server to return the state information that the server is in execution, and calling the polling tool again to inquire the execution result from the server after a preset time interval;
responding to the server to return the successful execution information of the server, setting the value of the member variable of the polling tool to be a first value, terminating the polling task and returning the successful execution information;
and responding to the return of the server to the server execution failure information, setting the value of the member variable of the polling tool to be a first value, terminating the polling task and returning the execution failure information.
12. The method according to claim 1, wherein the method further comprises:
responding to the fact that the vehicle-mounted terminal and the server are disconnected and reconnected, and the terminal receives a data update notification sent by the server, determining the state of the polling tool, wherein the state of the polling tool comprises a polling in-process state and a polling ending state;
Responding to the state of the polling tool as a polling state, ending the polling by the terminal, acquiring the latest vehicle control data of the vehicle from the server, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data;
and responding to the state of the polling tool as a polling ending state, acquiring the latest vehicle control data of the vehicle from a server by the terminal, and updating the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
13. The method according to claim 2, wherein the method further comprises:
responding to a received vehicle list data page request which is sent by a user and enters the vehicle control application, acquiring a user identifier, and sending the user identifier to a server through HTTP;
receiving a vehicle list sent by a server based on the HTTP, and storing the vehicle list in the data pool tool, wherein the vehicle list is all vehicle lists under the user name;
determining a default vehicle in the vehicle list, acquiring first server vehicle control data of the default vehicle from a server based on the HTTP, and storing the first server vehicle control data in the data pool tool, wherein the first server vehicle control data comprises role related data, authority related data and vehicle data;
Responsive to determining that the user meets an authorization condition of the default vehicle based on the role related data, converting the first server vehicle control data into first client vehicle control data based on the authority related data and vehicle data, the first client vehicle control data including at least configuration information of each vehicle control in the default vehicle;
and displaying the control information of the default vehicle in the control application based on the configuration information of each control.
14. An information display device in a vehicle control application, comprising:
a creation module configured to create a send vehicle control command tool and a poll tool;
a processing module configured to invoke a main flow function of the send vehicle control command tool in response to determining that a user is operating a particular vehicle control in the vehicle control application;
a determination module configured to determine a value of a member variable of the send vehicle control command tool;
the determining module is further configured to determine a value of a member variable of the polling tool when the value of the member variable of the means for transmitting the vehicle control command is a first value;
the communication module is configured to send a vehicle control request to the server by using the main flow function of the vehicle control command sending tool when the value of the member variable of the polling tool is a first value;
The communication module is further configured to periodically query the server for execution results using the polling tool;
the display module is configured to respond to the polling to determine that the execution result of the server is successful or the polling time length exceeds a preset threshold value, and the terminal acquires the latest vehicle control data of the vehicle from the server and updates the display information of each vehicle control in the vehicle control application based on the latest vehicle control data.
15. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 13 when the computer program is executed.
16. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 13.
CN202311812817.4A 2023-12-27 2023-12-27 Information display method and device in vehicle control application, electronic equipment and storage medium Active CN117478664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311812817.4A CN117478664B (en) 2023-12-27 2023-12-27 Information display method and device in vehicle control application, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311812817.4A CN117478664B (en) 2023-12-27 2023-12-27 Information display method and device in vehicle control application, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117478664A true CN117478664A (en) 2024-01-30
CN117478664B CN117478664B (en) 2024-03-15

Family

ID=89625990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311812817.4A Active CN117478664B (en) 2023-12-27 2023-12-27 Information display method and device in vehicle control application, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117478664B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014108030A1 (en) * 2013-01-09 2014-07-17 北京奇虎科技有限公司 Web polling method, device and system
CN104149717A (en) * 2014-07-31 2014-11-19 北京中瑞蓝科电动汽车技术有限公司 Remote non-interference updating system and remote non-interference updating method for vehicle control
CN106681321A (en) * 2016-12-16 2017-05-17 盐城工学院 RFID-based online scheduling control system of automatic guided vehicle
CN107942746A (en) * 2017-11-22 2018-04-20 吉利汽车研究院(宁波)有限公司 Vehicle remote control apparatus and method
CN109474647A (en) * 2017-09-07 2019-03-15 比亚迪股份有限公司 The long-range control method and device of vehicle
US20210209873A1 (en) * 2020-01-06 2021-07-08 Denso International America, Inc. Vehicle Controlled Polling Reduction At Mobile Device Based On Motion Status Reported By Mobile Device
CN113759914A (en) * 2021-09-08 2021-12-07 北京百度网讯科技有限公司 Remote control request processing method, related device and cloud server
CN115079680A (en) * 2022-06-27 2022-09-20 Oppo广东移动通信有限公司 Vehicle control state processing method and device, storage medium and electronic equipment
WO2023082571A1 (en) * 2021-11-12 2023-05-19 上汽通用五菱汽车股份有限公司 Vehicle remote control method, system and apparatus, and computer readable storage medium
WO2023092747A1 (en) * 2021-11-29 2023-06-01 博泰车联网科技(上海)股份有限公司 Vehicle control method, device, and storage medium
CN116243689A (en) * 2023-02-22 2023-06-09 武汉路特斯科技有限公司 Remote driving management method and device, electronic equipment and storage medium
CN116321064A (en) * 2022-12-21 2023-06-23 合众新能源汽车股份有限公司 Vehicle remote control method, device, system and server
CN116512989A (en) * 2023-03-27 2023-08-01 重庆长安汽车股份有限公司 Vehicle battery temperature control method, device, equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014108030A1 (en) * 2013-01-09 2014-07-17 北京奇虎科技有限公司 Web polling method, device and system
CN104149717A (en) * 2014-07-31 2014-11-19 北京中瑞蓝科电动汽车技术有限公司 Remote non-interference updating system and remote non-interference updating method for vehicle control
CN106681321A (en) * 2016-12-16 2017-05-17 盐城工学院 RFID-based online scheduling control system of automatic guided vehicle
CN109474647A (en) * 2017-09-07 2019-03-15 比亚迪股份有限公司 The long-range control method and device of vehicle
CN107942746A (en) * 2017-11-22 2018-04-20 吉利汽车研究院(宁波)有限公司 Vehicle remote control apparatus and method
US20210209873A1 (en) * 2020-01-06 2021-07-08 Denso International America, Inc. Vehicle Controlled Polling Reduction At Mobile Device Based On Motion Status Reported By Mobile Device
CN113759914A (en) * 2021-09-08 2021-12-07 北京百度网讯科技有限公司 Remote control request processing method, related device and cloud server
WO2023082571A1 (en) * 2021-11-12 2023-05-19 上汽通用五菱汽车股份有限公司 Vehicle remote control method, system and apparatus, and computer readable storage medium
WO2023092747A1 (en) * 2021-11-29 2023-06-01 博泰车联网科技(上海)股份有限公司 Vehicle control method, device, and storage medium
CN115079680A (en) * 2022-06-27 2022-09-20 Oppo广东移动通信有限公司 Vehicle control state processing method and device, storage medium and electronic equipment
CN116321064A (en) * 2022-12-21 2023-06-23 合众新能源汽车股份有限公司 Vehicle remote control method, device, system and server
CN116243689A (en) * 2023-02-22 2023-06-09 武汉路特斯科技有限公司 Remote driving management method and device, electronic equipment and storage medium
CN116512989A (en) * 2023-03-27 2023-08-01 重庆长安汽车股份有限公司 Vehicle battery temperature control method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王诗舰;唐厚君;熊天毅;: "基于GSM网络和CAN总线的汽车远程控制系统", 电气自动化, no. 03, 30 May 2013 (2013-05-30) *

Also Published As

Publication number Publication date
CN117478664B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN109474912B (en) Vehicle-mounted gateway system and monitoring method and device of vehicle-mounted subsystem
US9649999B1 (en) Vehicle remote operations control
WO2018082105A1 (en) Method and device for switching on-vehicle service using external sim card
CN109102593B (en) Method and apparatus for managing vehicle control authority
CN105721482A (en) Mobile terminal handheld vehicle management method based on Internet of Vehicles
CN104954424A (en) Remote vehicle connection status
CN112543431A (en) Account synchronization method, medium and server
WO2022111300A1 (en) Vehicle application software management system and method
CN114554444A (en) Virtual SIM for vehicle
CN117478664B (en) Information display method and device in vehicle control application, electronic equipment and storage medium
CN113868612A (en) Automatic driving training management method and system based on identity identification and man-machine interaction
CN108988985A (en) The method of data transmission, vehicle communication network, member in vehicle communication network
CN114221829B (en) Edge side intelligent home management method and system
CN115904447A (en) Version updating system, method, electronic equipment and storage medium
CN111435944A (en) Vehicle control method, vehicle, mobile terminal, and computer-readable storage medium
CN115604322A (en) Intelligent cabin domain controller, control method thereof and vehicle
CN111740972B (en) Method, device, equipment and storage medium for updating communication protocol stack information
EP3144903A1 (en) System comprising vehicle keys and a docking station, respective vehicle key, docking station, method and computer program
Wagner et al. Introducing a harmonized and generic cross-platform interface between a Vehicle and the Cloud
CN111049800A (en) Vehicle service management method and device, block chain link point equipment and storage medium thereof
CN117041301B (en) Vehicle-mounted edge computing system
CN117901887B (en) Vehicle control display method and device, electronic equipment and storage medium
US11988182B2 (en) Integrated vehicular remote starting interrupter
EP4184874A2 (en) Method and system for interaction between vehicle and smart device
US20240176612A1 (en) Vehicle, software update method, and non-transitory storage medium

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