Interface generation method, device, equipment and medium in automobile scene arrangement

CN117311876BActive Publication Date: 2025-01-28CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311255152.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-01-28
Estimated Expiration
2043-09-26

AI Technical Summary

Technical Problem

Existing automotive scenario orchestration technology cannot automatically generate interfaces containing nested capabilities, resulting in inconvenient interface generation in some cases.

Method used

By creating a Cell class used to generate the car field editing interface that contains nested capacity, call the interface generating method to screen the data in the interface object that generates the interface. Views and action capabilities display views, and then combine it to generate interface.

Benefits of technology

The interface that automatically generates nested capabilities in the car venue scenic row is realized, which improves the interface generation efficiency and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117311876B_ABST
    Figure CN117311876B_ABST
Patent Text Reader

Abstract

The present application relates to the field of intelligent automobile technology, and provides an interface generation method, device, equipment and medium in automobile scene arrangement. The method creates a cell class for generating an automobile scene arrangement interface containing nested capabilities, calls an interface generation method to filter, classify and save the data in the interface object of the generated interface, and calls a data refresh method to obtain a conditional capability display view and an action capability display view in the nested capability, and then combines the conditional capability display view and the action capability display view to obtain a generated interface containing nested capabilities, providing a method for automatically generating an interface containing nested capabilities in automobile scene arrangement, improving the interface generation efficiency of automobile scene arrangement, and enhancing user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent automobile technology, and in particular to an interface generation method, device, equipment and medium in automobile scene arrangement. Background Art

[0002] In existing car scene choreography, interfaces of various capabilities are generated separately. However, in some cases, two capabilities may have a nested relationship. Existing car scene choreography technology does not provide a method for automatically generating interfaces containing nested capabilities. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method, device, equipment and medium for generating an interface in automobile scene arrangement to solve the problem in the prior art that an interface with nesting capabilities cannot be generated conveniently and quickly during automobile scene arrangement.

[0004] A first aspect of an embodiment of the present application provides an interface generation method in automobile scene arrangement, comprising:

[0005] Create a cell class, which includes at least a first component, a second component and a third component, wherein the first component is the parent component of all content components, the second component is the parent component of all conditional capability views, and the third component is the parent component of all action capability views;

[0006] Create an interface generation method, the interface generation method includes loading parameters, and the loading parameters are used to load the interface object of the interface to be generated;

[0007] Call the remove method to remove all preset controls in the cell class except the first component;

[0008] In response to determining that the number of elements in the loading parameters is greater than 1, calling a filtering method, filtering the loading parameters to obtain condition data and action data of the cell class, and saving the condition data in a first array and saving the action data in a second array;

[0009] Traverse the first array, save the name parameter obtained by the traversal in the first variable, and save the value parameter in the second variable;

[0010] Create a first view object, call a data refresh method of the first view object, pass the first variable and the second variable as parameters of the data refresh method, and obtain a first display view;

[0011] Add the first display view to the second component of the cell class;

[0012] Traverse the second array, save the name parameter obtained by the traversal in the third variable, and save the value parameter in the fourth variable;

[0013] Create a second view object, call the data refresh method of the second view object, pass the third variable and the fourth variable as parameters of the data refresh method, and obtain a second display view;

[0014] Add the second display view to the third component of the cell class;

[0015] Add the second and third components of the cell class to the first component to obtain the interface to be generated.

[0016] A second aspect of the embodiment of the present application provides an interface generation device in automobile scene arrangement, including:

[0017] A creation module, wherein the creation module is configured to create a cell class, wherein the cell class includes at least a first component, a second component, and a third component, wherein the first component is a parent component of all content components, the second component is a parent component of all conditional capability views, and the third component is a parent component of all action capability views;

[0018] The creation module is further configured to create an interface generation method, the interface generation method includes loading parameters, and the loading parameters are used to load the interface objects of the interface to be generated;

[0019] A removal module, wherein the removal module is configured to call a removal method to remove all preset controls except the first component in the cell class;

[0020] A screening module, the screening module is configured to, in response to determining that the number of elements in the loading parameter is greater than 1, call a screening method, filter the loading parameter to obtain condition data and action data of the cell class, and save the condition data in a first array and save the action data in a second array;

[0021] A traversal module, the traversal module is configured to traverse the first array, save the name parameter obtained by the traversal in the first variable, and save the value parameter in the second variable;

[0022] The creation module is further configured to create a first view object, call a data refresh method of the first view object, pass the first variable and the second variable as parameters of the data refresh method, and obtain a first display view;

[0023] An adding module, the adding module is configured to add the first display view to the second component of the cell class;

[0024] The traversal module is further configured to traverse the second array, save the name parameter obtained by the traversal in the third variable, and save the value parameter in the fourth variable;

[0025] The creation module is further configured to create a second view object, call a data refresh method of the second view object, pass the third variable and the fourth variable as parameters of the data refresh method, and obtain a second display view;

[0026] The adding module is further configured to add the second presentation view to the third component of the cell class;

[0027] A generation module is configured to add the second component and the third component of the cell class to the first component to obtain a generated interface.

[0028] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0029] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0030] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application create a cell class for generating a car scene arrangement interface containing nested capabilities, call an interface generation method to filter, classify and save the data in the interface object of the generated interface, and call a data refresh method to obtain a conditional capability display view and an action capability display view in the nested capability, and then combine the conditional capability display view and the action capability display view to obtain a generated interface containing nested capabilities, thereby providing a method for automatically generating an interface containing nested capabilities in car scene arrangement, improving the interface generation efficiency of car scene arrangement, and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0032] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application.

[0033] Figure 2 It is a flow chart of an interface generation method in a car scene arrangement provided in an embodiment of the present application.

[0034] Figure 3It is a flowchart of a method for removing all preset controls except the first component in a cell class provided in an embodiment of the present application.

[0035] Figure 4 It is a flowchart of a method for obtaining conditional data and action data of a cell class by self-loading parameter screening provided in an embodiment of the present application.

[0036] Figure 5 It is a flowchart of a method for obtaining a first display view by passing a first variable and a second variable as parameters of a data refresh method provided in an embodiment of the present application.

[0037] Figure 6 It is a flowchart of a method for obtaining a second display view by passing a third variable and a fourth variable as parameters of a data refresh method provided in an embodiment of the present application.

[0038] Figure 7 It is a flow chart of an interface generation method in a car scene arrangement provided in an embodiment of the present application.

[0039] Figure 8 It is a flow chart of an interface generation method in a car scene arrangement provided in an embodiment of the present application.

[0040] Fig. 9 It is a schematic diagram of an interface generated by the interface generation method in the automobile scene arrangement provided by the embodiment of the present application.

[0041] Fig.10 It is a schematic diagram of an interface generation device in a car scene arrangement provided in an embodiment of the present application.

[0042] Fig.11 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0044] Glossary:

[0045] UITableView: Table view in the iPhone Operating System (iOS).

[0046] tableviewcell: A control that represents a row of data in UITableView.

[0047] ScreenplayNestCell: A custom control inherited from tableviewcell.

[0048] ScreenplayModel: A custom model object that represents each capability (including conditions and actions).

[0049] Traversal: Visit each element in the collection once.

[0050] A method and device for generating an interface in a car scene arrangement according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0051] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include a vehicle 1, a server 2, and a network 3.

[0052] Vehicle 1 can be hardware or software. When vehicle 1 is hardware, it can be various on-board electronic devices that support communication with roadside devices and server 2, including but not limited to on-board communication devices (Telematics-BOX, TBOX), on-board units (On board Unit, OBU), on-board entertainment systems, etc.; when vehicle 1 is software, it can be installed in the electronic devices described above. Vehicle 1 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present application are not limited to this. Furthermore, various applications can be installed on vehicle 1, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0053] Server 2 can be a server that provides various services, for example, a backend server that receives a request sent by vehicle 1 that establishes a communication connection with it, and the backend server can process and store the received vehicle data, and then implement vehicle scene arrangement based on various data. Server 2 can be a single server, a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present application.

[0054] It should be noted that the server 2 can be hardware or software. When the server 2 is hardware, it can be various electronic devices that provide various services for the vehicle 1. When the server is software, it can be multiple software or software modules that provide various services for the vehicle 1, or it can be a single software or software module that provides various services for the vehicle 1, and the embodiments of the present application are not limited to this.

[0055] Network 3 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.

[0056] The vehicle 1 can establish a communication connection with the server 2 via the network 3 to receive or send information, etc.

[0057] It should be noted that the specific types, quantities and combinations of the vehicle 1, server 2 and network 3 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.

[0058] As mentioned above, in existing car scene choreography, interfaces of various capabilities are generated separately. However, in some cases, two capabilities may have a nested relationship. Existing car scene choreography technology does not provide a method for automatically generating interfaces containing nested capabilities.

[0059] In view of this, an embodiment of the present application provides an interface generation method in automobile scene arrangement, by creating a cell class for generating an automobile scene arrangement interface containing nested capabilities, calling the interface generation method to filter, classify and save the data in the interface object of the generated interface, and calling the data refresh method to obtain the conditional capability display view and the action capability display view in the nested capability, and then combining the conditional capability display view and the action capability display view to obtain the generated interface containing nested capabilities. A method for automatically generating an interface containing nested capabilities in automobile scene arrangement is provided, which improves the interface generation efficiency of automobile scene arrangement and enhances user experience.

[0060] Figure 2 It is a flow chart of an interface generation method in a car scene arrangement provided in an embodiment of the present application. Figure 2 The interface generation method in the car scene arrangement can be Figure 1 The server executes. Figure 2 As shown, the interface generation method in the car scene arrangement includes the following steps:

[0061] In step S201, a cell class is created.

[0062] The cell class includes at least a first component, a second component and a third component, wherein the first component is the parent component of all content components, the second component is the parent component of all conditional capability views, and the third component is the parent component of all action capability views.

[0063] In step S202, an interface generation method is created.

[0064] The interface generation method includes loading parameters, and the loading parameters are used to load interface objects of the interface to be generated.

[0065] In step S203, the remove method is called to remove all preset controls in the cell class except the first component.

[0066] In step S204, in response to determining that the number of elements in the loading parameters is greater than 1, a filtering method is called to filter the loading parameters to obtain conditional data and action data of the cell class, and the conditional data is saved in the first array and the action data is saved in the second array.

[0067] In step S205, the first array is traversed, and the name parameter obtained by the traversal is saved in the first variable, and the value parameter is saved in the second variable.

[0068] In step S206, a first view object is created, a data refresh method of the first view object is called, and the first variable and the second variable are passed in as parameters of the data refresh method to obtain a first display view.

[0069] In step S207 , the first presentation view is added to the second component of the cell class.

[0070] In step S208, the second array is traversed, and the name parameter obtained by the traversal is saved in the third variable, and the value parameter is saved in the fourth variable.

[0071] In step S209, a second view object is created, a data refresh method of the second view object is called, and the third variable and the fourth variable are passed in as parameters of the data refresh method to obtain a second display view.

[0072] In step S210 , the second presentation view is added to the third component of the cell class.

[0073] In step S211, the second component and the third component of the cell class are added to the first component to obtain the interface to be generated.

[0074] The interface generation method in the car scene arrangement provided in the embodiment of the present application can be implemented in UITableView. Since the layout of the interface in UITableView is performed in units of tableviewcell, a cell class can be created first, and the cell class includes at least a first component, a second component, and a third component, wherein the first component is the parent component of all content components, the second component is the parent component of all conditional capability views, and the third component is the parent component of all action capability views.

[0075] Furthermore, the cell class may also include a first component title, a second component title, and a fourth component. The first component title is the title of all conditional components representing the nested capability, the second component title is the title of all action components representing the nested capability, and the fourth component is a component for displaying capability content, which includes conditional content and action content.

[0076] In an example, the cell class can be named ScreenplayNestCell, the first component can be named parentView, the second component can be named topStackView, the third component can be named bottomStackView, the first component title can be named ifLabel, the second component title can be named thenLabel, and the fourth component can be named NestItem. The various properties of the cell class are shown in Table 1:

[0077] Table 1

[0078]

[0079] In an embodiment of the present application, an interface generation method may be created, and the interface to be generated may be obtained by updating data and the interface using the interface composition method. In one example, the method may be named method 1. Method 1 may include a loading parameter datas, and the loading parameter datas is used to load the interface object ScreenplayModel of the interface to be generated, and the interface object ScreenplayModel of the interface to be generated is array type data, representing externally input data.

[0080] In the embodiment of the present application, since each cell class may receive different external data sources, the interface of each cell class may also be different. Therefore, after each call to method 1, all other preset controls in the cell class except parentView should be removed first to avoid unnecessary controls and interface confusion. In other words, the removal method can be called to remove all preset controls in the cell class except the first component.

[0081] Next, you can start creating the interface with the incoming loading parameter datas. First, you need to determine the number of elements in the loading parameter datas. When the number of elements in the loading parameter datas is greater than 1, it indicates that there are multiple data sources at this time, so the current layout should be "nested type". For the "nested type" layout method, the interface must have both "conditions" and "actions" capability data. Therefore, you can call the filtering method to filter the cell class's conditional data and action data from the loading parameters, and save the conditional data in the first array and the action data in the second array. In one example, the first array can be named conditions, and the second array can be named actions.

[0082] After getting the first array conditions and the second array actions which store the condition data and action data respectively, you can start to create the interface with nesting capabilities. At this point, you need to add back the ifLabel, topStackView, thenLabel and bottomStackView controls that were removed previously.

[0083] Specifically, the first array conditions can be traversed, and the name parameter obtained by the traversal can be saved in the first variable, and the value parameter can be saved in the second variable; the first view object can be created, and the data refresh method of the first view object can be called, and the first variable and the second variable can be passed in as parameters of the data refresh method to obtain the first display view. The first display view obtained here is the display data including the conditional data, that is, the NestItem component in the topStackView component. By adding the first display view to the topStackView component of the cell class, the topStackView component containing the display content can be obtained.

[0084] Furthermore, the second array actions can be traversed, and the name parameter obtained by the traversal is saved in the third variable, and the value parameter is saved in the fourth variable; a second view object is created, and the data refresh method of the second view object is called, and the third variable and the fourth variable are passed in as parameters of the data refresh method to obtain a second display view. The second display view obtained here is the display data including the action data, that is, the NestItem component in the bottomStackView component. By adding the second display view to the bottomStackView component of the cell class, the bottomStackView component containing the display content can be obtained.

[0085] In the embodiment of the present application, the second component and the third component of the cell class are added to the first component to obtain the generated interface. That is, the topStackView component containing the displayed content and the bottomStackView component containing the displayed content obtained above are added to the parentView to obtain the generated interface.

[0086] According to the technical solution provided in the embodiment of the present application, by creating a cell class for generating a car scene arrangement interface containing nested capabilities, calling an interface generation method to filter, classify and save the data in the interface object of the generated interface, and calling a data refresh method to obtain a conditional capability display view and an action capability display view in the nested capability, and then combining the conditional capability display view and the action capability display view to obtain a generated interface containing nested capabilities, a method for automatically generating an interface containing nested capabilities in car scene arrangement is provided, the interface generation efficiency of car scene arrangement is improved, and the user experience is enhanced.

[0087] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0088] Figure 3 is a flow chart of a method for removing all preset controls except the first component in a cell class provided by an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0089] In step S301, a removal method is called to remove the first component title and the second component title.

[0090] In step S302, all subviews in the second component and the third component are traversed, and all traversed subviews are removed.

[0091] In step S303, the second component and the third component are removed.

[0092] In the embodiment of the present application, when calling the remove method to remove all preset controls except the first component in the cell class, the remove method can be called first to remove the first component title and the second component title. Then, all subviews of the second component and the third component are traversed and all subviews obtained by traversal are removed. Finally, the second component and the third component are removed.

[0093] In one example, the removal method can be named Method 2, which encapsulates all operations for removing controls in the cell class, thereby avoiding errors caused by frequent calls to the removal operation. The specific implementation logic of Method 2 can be: ifLabel and thenLabel call the system's removal method to remove; traverse all subviews of topStackView and bottomStackView, and remove all subviews while traversing; after removing the subviews, topStackView and bottomStackView themselves may still cause interface confusion, so they also need to be removed. Among them, all subviews of topStackView and bottomStackView are all NestItem views in topStackView and bottomStackView.

[0094] As mentioned above, the interface object ScreenplayModel in the embodiment of the present application is an array type data, which may include a first attribute and a second attribute. Among them, the first attribute is used to represent the capability category object associated with the interface object, and the second attribute is used to represent the index of the capability associated with the interface object in all the capabilities included in the first attribute. The detailed information of ScreenplayModel is shown in Table 2:

[0095] Table 2

[0096]

[0097] Figure 4 1 is a flow chart of a method for obtaining conditional data and action data of a cell class by self-loading parameter screening provided by an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:

[0098] In step S401, the screening condition of the screening method is set to the first screening condition, and the screening method is called to obtain the conditional data of the cell class by screening the first parameter corresponding to the first attribute in the self-loading parameters based on the first screening condition.

[0099] The first screening condition includes specifying that a second parameter corresponding to a second attribute in the loading parameters is a first value.

[0100] In step S402, the screening condition of the screening method is set to the second screening condition, and the screening method is called to obtain the action data of the cell class by screening the first parameter corresponding to the first attribute in the self-loading parameter screen based on the second screening condition.

[0101] The second screening condition includes specifying that a second parameter corresponding to the second attribute in the loading parameters is a second value.

[0102] In an embodiment of the present application, when calling a filtering method and filtering the self-loading parameters to obtain conditional data of the cell class, the filtering condition of the filtering method can be set to a first filtering condition, and the filtering method is called based on the first filtering condition to filter the first parameter corresponding to the first attribute in the self-loading parameters to obtain the conditional data of the cell class, wherein the first filtering condition includes specifying a second parameter corresponding to the second attribute in the loading parameters as a first value.

[0103] Specifically, the filtering method may be a filtering method filter provided by the system for the loading parameter datas. When filtering condition data, the filtering condition of the filtering method may be specified as a first filtering condition, and the first filtering condition may be to specify that the second parameter corresponding to the second attribute in the loading parameter is a first value. For example, since the loading parameter datas loads the data of ScreenplayModel, it is also an array, which includes a first parameter corresponding to the first attribute and a second parameter corresponding to the second attribute. In one example, the second parameter corresponding to the second attribute in the loading parameter datas is named the type parameter of the element. If the value of the conditional capability parameter in the type parameter of the element of the loading parameter datas is 1, the first filtering condition may be specified as "the value of the type parameter of the element is 1".

[0104] Similarly, when calling the filtering method and filtering the self-loading parameters to obtain the action data of the cell class, the filtering condition of the filtering method can be set to the second filtering condition, and the filtering method is called based on the second filtering condition to filter the first parameter corresponding to the first attribute in the self-loading parameters to obtain the action data of the cell class, wherein the second filtering condition includes specifying the second parameter corresponding to the second attribute in the loading parameters as a second value.

[0105] Specifically, the filtering method may be a filtering method filter provided by the system for the loading parameter datas. When filtering action data, the filtering action of the filtering method may be specified as a second filtering action, and the second filtering action may be to specify the second parameter corresponding to the second attribute in the loading parameter as a second value. For example, since the loading parameter datas loads the data of ScreenplayModel, it is also an array, which includes a first parameter corresponding to the first attribute and a second parameter corresponding to the second attribute. In one example, the second parameter corresponding to the second attribute in the loading parameter datas is named the type parameter of the element. If the value of the action capability parameter in the type parameter of the element of the loading parameter datas is 0, the second filtering action may be specified as "the value of the type parameter of the element is 0".

[0106] Furthermore, after filtering out the first array conditions and the second array actions which respectively store the condition data and the action data, the first array conditions can be traversed, and the name parameters obtained through the traversal can be saved in the first variable, and the value parameters can be saved in the second variable; and the second array actions can be traversed, and the name parameters obtained through the traversal can be saved in the third variable, and the value parameters can be saved in the fourth variable.

[0107] Specifically, the first array conditions can be traversed, and in each traversal process, the value in the first array conditions is taken out with the current traversal number as the index, and the name parameter name of the taken value is saved in the first variable, and the value parameter value is saved in the second variable. In an example, the first variable can be named title, and the second variable can be named content.

[0108] Furthermore, the second array actions can be traversed, and in each traversal process, the value in the second array actions is taken out with the current traversal number as the index, and the name parameter name of the taken value is saved in the third variable, and the value parameter value is saved in the fourth variable. The third variable and the first variable can be the same variable, that is, the third variable can also be the variable title, and the fourth variable and the second variable page can be the same variable, that is, the fourth variable can also be the variable content.

[0109] Figure 5 1 is a flow chart of a method for obtaining a first display view by passing a first variable and a second variable as parameters of a data refresh method provided by an embodiment of the present application. Figure 5 As shown, the method comprises the following steps:

[0110] In step S501, the first variable and the second variable are passed in as parameters of the data refresh method to obtain a third display view including the second component.

[0111] In step S501, the first component title is added to the second component to obtain a first display view.

[0112] In an embodiment of the present application, the first variable and the second variable can be passed in as parameters of the data refresh method to obtain a third display view including the second component, and then the first component title is added to the second component to obtain the first display view.

[0113] That is to say, you can first create a NestItem view object. Since it is a non-nested type, it means that the background color of the view should be set to white. Further, call the NestItem view object to refresh the data method, pass the variable title as the first variable and the variable content as the second variable as parameters, and a specific display view can be generated. Furthermore, add the NestItem view object to the topStackView for the automatic layout provided by the system, and add the ifLabel control. After the layout is completed, you can get the conditional capability interface for protecting the nesting capability, that is, the first display view mentioned above.

[0114] Figure 6 1 is a flow chart of a method for obtaining a second display view by passing the third variable and the fourth variable as parameters of the data refresh method provided by an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:

[0115] In step S601, the third variable and the fourth variable are passed in as parameters of the data refresh method to obtain a fourth display view including the third component.

[0116] In step S602, the second component title is added to the third component to obtain a second display view.

[0117] In an embodiment of the present application, the third variable and the fourth variable can be passed in as parameters of the data refresh method to obtain a fourth display view including the third component, and then the second component title is added to the third component to obtain a second display view.

[0118] That is to say, you can first create a NestItem view object. Since it is a non-nested type, it means that the background color of the view should be set to white. Further, call the NestItem view object to refresh the data method, pass the variable title as the third variable and the variable content as the fourth variable as parameters, and you can generate another specific display view. Furthermore, add the NestItem view object to the bottomStackView for the automatic layout provided by the system, and add the thenLabel control. After the layout is completed, you can get the action capability interface that protects the nesting capability, which is the second display view mentioned above.

[0119] Figure 7 It is a flow chart of an interface generation method in a car scene arrangement provided in an embodiment of the present application. Figure 7 Steps S701 to S711 in the embodiment shown are Figure 2Steps S201 to S211 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 7 As shown, the method also includes the following steps:

[0120] In step S712, in response to determining that the number of elements in the loading parameter is equal to 1, the name parameter of the element in the loading parameter is saved in the fifth variable, and the value parameter is saved in the sixth variable.

[0121] In step S713, a third view object is created, a data refresh method of the third view object is called, and the fifth variable and the sixth variable are passed in as parameters of the data refresh method to obtain a third display view.

[0122] In step S714, the third display view is added to the second component of the cell class, and the second component of the cell class is added to the first component to obtain a generated interface.

[0123] In the embodiment of the present application, when it is determined that the number of elements in the loading parameters is equal to 1, the name parameter of the element in the loading parameters can be saved in the fifth variable, and the value parameter can be saved in the sixth variable. Then create a third view object, call the data refresh method of the third view object, pass the fifth variable and the sixth variable as parameters of the data refresh method, and obtain the third display view. Finally, add the first display view to the second component of the cell class, and add the second component of the cell class to the first component to obtain the generated interface.

[0124] That is to say, when it is determined that the number of elements in the loading parameter datas is equal to 1, it indicates that the current layout type is "no nested type", and at this time, the loading parameter datas only includes one element. At this time, the name parameter name of the element can be saved in the fifth variable, and the value parameter value can be saved in the sixth variable. Among them, the fifth variable and the first variable can be the same variable, that is, the fifth variable can also be the variable title, and the sixth variable and the second variable page can be the same variable, that is, the sixth variable can also be the variable content.

[0125] Then create a NestItem view object. Since it is a non-nested type, it means that the background color of the view should be set to white. Further, call the NestItem view object to refresh the data method, pass the variable title as the fifth variable and the variable content as the sixth variable as parameters, and generate another specific display view. Furthermore, at this time, it is necessary to add the removed topStackView to the parentView, and add the NestItem object view to the topStackView for the automatic layout provided by the system. After the layout is completed, you can get a non-nested interface.

[0126] In the embodiment of the present application, the cell class also includes a fourth component, which is a component for displaying capability content, and the capability content includes conditional content and action content; in the generated interface, the fourth component is composed of the first, second and third view objects. As shown in Table 1, the cell class also includes a NestItem component, which is a component for displaying capability content, and the capability content includes conditional content and action content. The first, second and third view objects mentioned above can all constitute the fourth component.

[0127] Figure 8 FIG. 1 is a flow chart of a method for generating an interface in a car scene arrangement provided by an embodiment of the present application. Figure 8As shown, in an embodiment of the present application, method 1 can be first created, parameter datas can be loaded in method 1, and then method 1 can be called. The specific steps are as follows: first call method 2, and the specific steps of method 2 are as follows: call the system's removal method to remove ifLabel and thenLabel; traverse all subviews of topStackView and bottomStackView, and remove all subviews while traversing; remove topStackView and bottomStackView, so that all threshold controls are removed. Next, execute the next step in method 1 to determine the number of elements in datas. If the number is 1, take out the name parameter of the first element of datas and save it in the variable title; take out the value parameter of the first element of datas and save it in the variable content; create a NestItem view object; call the NestItem object's refresh data method, passing title and content as parameters; generate a specific display view; add the removed topStackView to parentView; thereby completing the successful display of the non-nested interface; on the other hand, if the number of elements in datas is not 1, filter the conditional capability data and action capability data respectively. The specific filtering operations are as follows: call the filter method of datas, and specify the filtering condition of the filtering method as "the value of the element type type parameter is 1", and the return value of the method is saved in the array conditions; specify the filtering condition as "the value of the element type type parameter is 0" and then call dat as's filter method saves the method's return value in the array actions, and obtains the condition data and action data; starts to create a nested type interface; adds back ifLabel, topStackView, thenLabel, and bottomStackView; traverses the conditions array, and traverses the actions array. The specific traversal process is as follows: in each traversal process, take out the value with the current traversal count as the index in conditions; take out the name value of the value and save it in the variable title, and take out the value value of the value and save it in the variable content; create a NestItem view object and add the NestItem view object to the topStackView; on the other hand, traverse the actions array in the same way, and then add the NestItem view object to the bottomStackView. At this point, the layout is completed, the interface can be displayed, and the entire nested interface creation process is completed.

[0128] By adopting the technical solution of the embodiment of the present application, different methods can be used to automatically create interfaces with nesting capabilities and interfaces without nesting capabilities, which greatly improves the efficiency of car scene arrangement; and the interfaces can be clearly distinguished without causing differences in understanding, thereby improving the user experience.

[0129] Fig. 9 Schematic diagram of an interface generated by the interface generation method in the car scene arrangement provided by the embodiment of the present application. Fig. 9 As shown, when the interface is an interface with nesting capabilities, the generated interface is a cell class ScreenplayNestCell, which includes parentView, topStackView, bottomStackView, ifLabel, thenLabel, and NestItem. When the interface is an interface without nesting capabilities, the generated interface is a cell class ScreenplayNestCell, which only includes parentView and topStackView.

[0130] The interface generation method in the automobile scene arrangement provided in the embodiment of the present application is applicable to but not limited to the scenes including the following capabilities:

[0131] (1) A warm return home.

[0132] (2) Full scenario (i.e., a scenario that includes all capability parameters).

[0133] (3) Different scenarios corresponding to different driving speeds.

[0134] (4) Any other custom nested scenarios.

[0135] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0136] Fig.10 Schematic diagram of an interface generation device in a car scene arrangement provided by an embodiment of the present application. Fig.10 As shown, the interface generation device in the car scene arrangement includes:

[0137] Creation module 1001, the creation module is configured to create a cell class, the cell class includes at least a first component, a second component and a third component, wherein the first component is the parent component of all content components, the second component is the parent component of all conditional capability views, and the third component is the parent component of all action capability views.

[0138] The removal module 1002 is configured to call a removal method to remove all preset controls in the cell class except the first component.

[0139] The creation module 1001 is further configured to create an interface generation method, which includes loading parameters, and the loading parameters are used to load interface objects of the interface to be generated.

[0140] The filtering module 1003 is configured to call a filtering method in response to determining that the number of elements in the loading parameters is greater than 1, filter the loading parameters to obtain conditional data and action data of the cell class, and save the conditional data in a first array and the action data in a second array.

[0141] The traversal module 1004 is configured to traverse the first array, save the name parameter obtained by the traversal in the first variable, and save the value parameter in the second variable.

[0142] The creation module 1001 is further configured to create a first view object, call a data refresh method of the first view object, pass the first variable and the second variable as parameters of the data refresh method, and obtain a first display view.

[0143] Adding module 1005, the adding module is configured to add the first display view to the second component of the cell class.

[0144] The traversal module 1004 is further configured to traverse the second array, save the name parameter obtained by the traversal in the third variable, and save the value parameter in the fourth variable.

[0145] The creation module 1001 is further configured to create a second view object, call a data refresh method of the second view object, pass the third variable and the fourth variable as parameters of the data refresh method, and obtain a second display view.

[0146] The adding module 1005 is further configured to add the second presentation view to the third component of the cell class.

[0147] The generation module 1006 is configured to add the second component and the third component of the cell class to the first component to obtain a generated interface.

[0148] According to the technical solution provided in the embodiment of the present application, by creating a cell class for generating a car scene arrangement interface containing nested capabilities, calling an interface generation method to filter, classify and save the data in the interface object of the generated interface, and calling a data refresh method to obtain a conditional capability display view and an action capability display view in the nested capability, and then combining the conditional capability display view and the action capability display view to obtain a generated interface containing nested capabilities, a method for automatically generating an interface containing nested capabilities in car scene arrangement is provided, the interface generation efficiency of car scene arrangement is improved, and the user experience is enhanced.

[0149] In an embodiment of the present application, the cell class also includes a first component title and a second component title, the first component title is the title of all conditional components representing the nesting capability, and the second component title is the title of all action components representing the nesting capability; calling the removal method to remove all preset controls in the cell class except the first component, including: calling the removal method to remove the first component title and the second component title; traversing all subviews in the second component and the third component, and removing all traversed subviews; removing the second component and the third component.

[0150] In an embodiment of the present application, the interface object of the interface to be generated is array type data, including a first attribute and a second attribute. The first attribute is used to represent the capability category object associated with the interface object, and the second attribute is used to represent the index of the capability associated with the interface object in all capabilities included in the first attribute.

[0151] In an embodiment of the present application, a screening method is called to obtain conditional data and action data of a cell class from the self-loading parameters, including: setting the screening condition of the screening method to a first screening condition, calling the screening method based on the first screening condition, and filtering the first parameter corresponding to the first attribute in the self-loading parameters to obtain the conditional data of the cell class, wherein the first screening condition includes specifying that the second parameter corresponding to the second attribute in the loading parameters is a first value; setting the screening condition of the screening method to a second screening condition, calling the screening method based on the second screening condition, and filtering the first parameter corresponding to the first attribute in the self-loading parameters to obtain the action data of the cell class, wherein the second screening condition includes specifying that the second parameter corresponding to the second attribute in the loading parameters is a second value.

[0152] In an embodiment of the present application, the first variable and the second variable are passed in as parameters of the data refresh method to obtain a first display view, including: the first variable and the second variable are passed in as parameters of the data refresh method to obtain a third display view including the second component; the first component title is added to the second component to obtain the first display view; the third variable and the fourth variable are passed in as parameters of the data refresh method to obtain a second display view, including: the third variable and the fourth variable are passed in as parameters of the data refresh method to obtain a fourth display view including the third component; the second component title is added to the third component to obtain the second display view.

[0153] In an embodiment of the present application, it also includes: in response to determining that the number of elements in the loading parameters is equal to 1, saving the name parameter of the element in the loading parameters in the fifth variable, and saving the value parameter in the sixth variable; creating a third view object, calling the data refresh method of the third view object, passing the fifth variable and the sixth variable as parameters of the data refresh method, and obtaining a third display view; adding the third display view to the second component of the cell class, and adding the second component of the cell class to the first component to obtain a generated interface.

[0154] In an embodiment of the present application, the cell class also includes a fourth component, which is a component for displaying capability content, and the capability content includes conditional content and action content; in the generated interface, the fourth component is composed of the first, second and third view objects.

[0155] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0156] Fig.11 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device 11 of this embodiment includes: a processor 1101, a memory 1102, and a computer program 1103 stored in the memory 1102 and executable on the processor 1101. When the processor 1101 executes the computer program 1103, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1101 executes the computer program 1103, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0157] The electronic device 11 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 11 may include, but is not limited to, a processor 1101 and a memory 1102. Those skilled in the art will appreciate that Fig.11 The electronic device 11 is merely an example and does not limit the electronic device 11 , and may include more or less components than those shown in the figure, or different components.

[0158] The processor 1101 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0159] The memory 1102 may be an internal storage unit of the electronic device 11, for example, a hard disk or memory of the electronic device 11. The memory 1102 may also be an external storage device of the electronic device 11, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 11. The memory 1102 may also include both an internal storage unit of the electronic device 11 and an external storage device. The memory 1102 is used to store computer programs and other programs and data required by the electronic device.

[0160] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0161] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0162] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for generating an interface in a car scene arrangement, characterized in that: include: Create a cell class, the cell class includes at least a first component, a second component and a third component, wherein the first component is the parent component of all content components, the second component is the parent component of all conditional capability views, and the third component is the parent component of all action capability views; Creating an interface generation method, the interface generation method comprising loading parameters, the loading parameters being used to load interface objects of the interface to be generated; Call the remove method to remove all preset controls in the cell class except the first component; In response to determining that the number of elements in the loading parameters is greater than 1, calling a screening method, screening the loading parameters to obtain condition data and action data of the cell class, and storing the condition data in a first array and storing the action data in a second array; Traverse the first array, save the name parameter obtained by the traversal in the first variable, and save the value parameter in the second variable; Create a first view object, call a data refresh method of the first view object, pass the first variable and the second variable as parameters of the data refresh method, and obtain a first display view; Adding the first display view to the second component of the cell class; Traverse the second array, save the name parameter obtained by the traversal in the third variable, and save the value parameter in the fourth variable; Creating a second view object, calling a data refresh method of the second view object, passing the third variable and the fourth variable as parameters of the data refresh method, and obtaining a second display view; Adding the second display view to the third component of the cell class; Add the second component and the third component of the cell class to the first component to obtain a generated interface; Among them, the cell class also includes a first component title and a second component title, the first component title is the title of all conditional components representing the nesting capability, the second component title is the title of all action components representing the nesting capability, and the preset controls are other components in the cell class except the first component, the first component title and the second component title.

2. The method according to claim 1, characterized in that: The calling of the removal method removes all preset controls in the cell class except the first component, including: Call the remove method to remove the first component title and the second component title; Traverse all subviews of the second component and the third component, and remove all traversed subviews; The second component and the third component are removed.

3. The method according to claim 1, characterized in that The interface object of the interface to be generated is array type data, including a first attribute and a second attribute. The first attribute is used to represent the capability category object associated with the interface object, and the second attribute is used to represent the index of the capability associated with the interface object in all capabilities included in the first attribute.

4. The method according to claim 3, characterized in that The calling screening method obtains the condition data and action data of the cell class from the loading parameters, including: The filtering condition of the filtering method is set to be a first filtering condition, and the filtering method is called to filter the first parameter corresponding to the first attribute in the loading parameter to obtain the condition data of the cell class based on the first filtering condition, wherein the first filtering condition includes specifying the second parameter corresponding to the second attribute in the loading parameter as a first value; The filtering condition of the filtering method is set to the second filtering condition, and the filtering method is called based on the second filtering condition to filter the action data of the cell class from the first parameter corresponding to the first attribute in the loading parameters, wherein the second filtering condition includes specifying the second parameter corresponding to the second attribute in the loading parameters as a second value.

5. The method according to claim 2, characterized in that: The step of passing the first variable and the second variable as parameters of the data refresh method to obtain a first display view includes: Passing the first variable and the second variable as parameters of the data refresh method to obtain a third display view including the second component; Add the first component title to the second component to obtain the first display view; The step of passing the third variable and the fourth variable as parameters of the data refresh method to obtain a second display view includes: Passing the third variable and the fourth variable as parameters of the data refresh method to obtain a fourth display view including the third component; Add the second component title to the third component to obtain the second display view.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In response to determining that the number of elements in the loading parameter is equal to 1, storing a name parameter of the element in the loading parameter in a fifth variable and a value parameter in a sixth variable; Creating a third view object, calling a data refresh method of the third view object, passing the fifth variable and the sixth variable as parameters of the data refresh method, and obtaining a third display view; The third display view is added to the second component of the cell class, and the second component of the cell class is added to the first component to obtain a generated interface.

7. The method according to claim 6, characterized in that The cell class further includes a fourth component, which is a component for displaying capability content, and the capability content includes condition content and action content; In the generated interface, the fourth component is composed of the first, second and third view objects.

8. An interface generation device in automobile scene arrangement, characterized in that: include: A creation module, wherein the creation module is configured to create a cell class, wherein the cell class includes at least a first component, a second component, and a third component, wherein the first component is a parent component of all content components, the second component is a parent component of all conditional capability views, and the third component is a parent component of all action capability views; A removal module, wherein the removal module is configured to call a removal method to remove all preset controls in the cell class except the first component; The creation module is further configured to create an interface generation method, wherein the interface generation method includes loading parameters, and the loading parameters are used to load interface objects of the interface to be generated; a screening module, the screening module being configured to, in response to determining that the number of elements in the loading parameters is greater than 1, call a screening method, filter the loading parameters to obtain condition data and action data of the cell class, and save the condition data in a first array and save the action data in a second array; A traversal module, the traversal module is configured to traverse the first array, save the name parameter obtained by the traversal in a first variable, and save the value parameter in a second variable; The creation module is further configured to create a first view object, call a data refresh method of the first view object, pass the first variable and the second variable as parameters of the data refresh method, and obtain a first display view; An adding module, wherein the adding module is configured to add the first display view to a second component of the cell class; The traversal module is further configured to traverse the second array, save the name parameter obtained by the traversal in a third variable, and save the value parameter in a fourth variable; The creation module is further configured to create a second view object, call a data refresh method of the second view object, pass the third variable and the fourth variable as parameters of the data refresh method, and obtain a second display view; The adding module is further configured to add the second display view to a third component of the cell class; A generation module, wherein the generation module is configured to add the second component and the third component of the cell class to the first component to obtain a generated interface; Among them, the cell class also includes a first component title and a second component title, the first component title is the title of all conditional components representing the nesting capability, the second component title is the title of all action components representing the nesting capability, and the preset controls are other components in the cell class except the first component, the first component title and the second component title.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Vehicle application scene processing method and device, equipment and storage medium

    CN115185434A

  • Data processing method, device and equipment and computer storage medium

    CN116189421A