Coordinate Automatic Configuration Method, Device, Equipment and Storage Medium for In-Vehicle Games
By receiving and processing the game data of the car computer in the cloud, using clustering algorithms to obtain the control point locations, and generating and issuing configuration files, the problem of untimely uploading configuration files by staff is solved, and the user's gaming experience is improved.
Patent Information
- Application Number
- CN202211475903.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-11-23
AI Technical Summary
In the prior art, staff members do not upload configuration files in time, resulting in users being unable to use virtual handles to operate games on the car machine, affecting users' gaming experience.
By receiving game data sent by multiple car machines in the cloud, the target coordinate data corresponding to the target identification data is obtained, and the control point position is obtained through the clustering algorithm, the configuration file is determined, and the coordinates of the car machine are sent to the car machine to configure the coordinates of the on-board game.
It realizes the automatic generation and issuance of configuration files, reduces the intervention time of staff, improves the user's gaming experience, and ensures that users can use virtual handles to operate games on the car in a timely manner.
Smart Images

Figure CN115721931B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent vehicles, and particularly to a method, device, equipment and storage medium for automatically configuring coordinates of in-vehicle games. Background Art
[0002] With the progress of technology, concepts such as AI and intelligent vehicles are widely applied in vehicles, greatly facilitating people's lives.
[0003] As an in-vehicle device for realizing information communication between people and vehicles, and between vehicles and the outside world (vehicle-to-vehicle), current in-vehicle infotainment systems (IVI) not only have the functions of radios, music and video playback, and navigation that traditional IVI have, but also have more entertainment functions including games. When playing games on the IVI controlled by a virtual joystick, it is necessary for the mid-office configuration personnel to upload a configuration file to the cloud, and then the IVI downloads the configuration file of the game from the cloud.
[0004] When the game is updated or there is a new game, if the configuration personnel cannot upload the configuration file to the cloud in time, many users will not be able to control the game with a virtual joystick, affecting the user's gaming experience. Summary of the Invention
[0005] This application provides a method, device, equipment and storage medium for automatically configuring coordinates of in-vehicle games, so as to solve the problem that the staff fails to upload the configuration file in time and users cannot use the virtual joystick to operate the games on the IVI.
[0006] On the one hand, this application provides a method for automatically configuring coordinates of in-vehicle games, which is applied to the cloud and includes:
[0007] Receiving game data sent by multiple IVIs, where the game data includes coordinate data and identification data, the coordinate data is generated by the click position of the user click event, and the identification data includes at least one of an IVI identifier, a screen identifier, a screen size, or an in-vehicle game identifier;
[0008] Obtaining multiple target coordinate data corresponding to the same target identification data, and obtaining the position of the control point according to the multiple target coordinate data;
[0009] Determining a configuration file according to the target identification data and the position of the control point, where the configuration file is used to be sent to the IVI to configure the coordinates of the in-vehicle game.
[0010] Optionally, the obtaining the position of the control point according to the multiple target coordinate data includes:
[0011] Obtaining the expected number of clusters N according to the distribution range of the multiple target coordinate data;
[0012] According to the number of clusters N and the multiple target coordinate data, N cluster centers are obtained through the Kmeans algorithm;
[0013] Take the positions of the N cluster centers as the positions of the corresponding N control points.
[0014] Optionally, the obtaining the desired number of clusters N according to the distribution range of the multiple target coordinate data includes:
[0015] According to the distribution range of the multiple target coordinate data, obtain the density of the target coordinate data at different distribution positions;
[0016] According to the density of the target coordinate data at different distribution positions, determine the clustering range, where the density is positively correlated with the area of the clustering range;
[0017] Take the clustering range covering more than the preset number of target coordinate data as the target clustering range;
[0018] Obtain the desired number of clusters N according to the number of the target clustering ranges.
[0019] Optionally, the obtaining N cluster centers through the Kmeans algorithm according to the number of clusters N and the multiple target data includes:
[0020] According to the target coordinate data within each target clustering range, obtain the cluster centers within the target clustering range through the Kmeans algorithm;
[0021] Obtain the corresponding N cluster centers according to the N target clustering ranges.
[0022] Optionally, after determining the configuration file according to the target identification data and the control point positions, it further includes:
[0023] Associate and store the target identification data and the configuration file in the cloud database;
[0024] Receive a configuration file request sent by the in-vehicle unit;
[0025] According to the identification data carried in the configuration file request, send the configuration file corresponding to the identification data to the in-vehicle unit.
[0026] Optionally, before receiving the configuration file request sent by the in-vehicle unit, the method further includes:
[0027] Query the target in-vehicle unit identifiers in the cloud database for which the configuration file has not been sent;
[0028] Send a notification message to the in-vehicle unit corresponding to the target in-vehicle unit identifier, where the notification message is used to notify that the configuration file has been completed, and the notification message includes an in-vehicle game identifier.
[0029] In a second aspect, the present application provides a method for automatically configuring coordinates of an in-vehicle game, which is applied to an in-vehicle unit and includes:
[0030] Obtain game data, where the game data includes coordinate data and identifier data. The coordinate data is generated by the click position of a user click event, and the identifier data includes at least one of an in-vehicle unit identifier, a screen identifier, a screen size, or an in-vehicle game identifier;
[0031] Send the game data to the cloud so that the cloud generates a configuration file according to the game data,
[0032] Obtain the configuration file fed back by the cloud and perform screen manipulation point configuration according to the configuration file.
[0033] Optionally, the obtaining the configuration file fed back by the cloud includes:
[0034] Receive a notification message sent by the cloud, where the notification message includes an in-vehicle game identifier;
[0035] Send a configuration file request to the cloud according to the notification message;
[0036] Receive the configuration file sent by the cloud.
[0037] Optionally, the performing screen manipulation point configuration according to the configuration file includes:
[0038] Determine the program to be configured according to the in-vehicle game identifier;
[0039] Determine the analog joystick on the in-vehicle unit screen according to the screen size, the screen identifier, and the manipulation point position.
[0040] In a third aspect, the present application provides an apparatus for automatically configuring coordinates of an in-vehicle game, which is applied to the cloud and includes:
[0041] A receiving module, configured to receive game data sent by multiple in-vehicle units, where the game data includes coordinate data and identifier data. The coordinate data is generated by the click position of a user click event, and the identifier data includes at least one of an in-vehicle unit identifier, a screen identifier, a screen size, or an in-vehicle game identifier;
[0042] An obtaining module, configured to obtain multiple target coordinate data corresponding to the same target identifier data, and obtain a manipulation point position according to the multiple target coordinate data;
[0043] A determination module, configured to determine a configuration file according to the target identification data and the manipulation point positions, where the configuration file is used to be sent to a vehicle head unit to configure the coordinates of an in-vehicle game.
[0044] In a possible implementation, the obtaining module is specifically configured to:
[0045] Obtain an expected number of clusters N according to the distribution range of the multiple target coordinate data;
[0046] According to the number of clusters N and the multiple target coordinate data, obtain N cluster centers through the Kmeans algorithm;
[0047] Use the positions of the N cluster centers as the corresponding N manipulation point positions.
[0048] In a possible implementation, the obtaining module is specifically configured to:
[0049] Obtain the density of the target coordinate data at different distribution positions according to the distribution range of the multiple target coordinate data;
[0050] Determine a clustering range according to the density of the target coordinate data at different distribution positions, where the density is positively correlated with the area of the clustering range;
[0051] Use the clustering ranges that cover a number of target coordinate data greater than a preset number as target clustering ranges;
[0052] Obtain an expected number of clusters N according to the number of the target clustering ranges.
[0053] In a possible implementation, the obtaining module is specifically configured to:
[0054] According to the target coordinate data within each target clustering range, obtain the cluster centers within the target clustering range through the Kmeans algorithm;
[0055] Obtain the corresponding N cluster centers according to the N target clustering ranges.
[0056] In a possible implementation, the determination module is specifically configured to:
[0057] Associate and store the target identification data and the configuration file in a cloud database;
[0058] Receive a configuration file request sent by a vehicle head unit;
[0059] According to the identification data carried in the configuration file request, send the configuration file corresponding to the identification data to the vehicle head unit.
[0060] In a possible implementation, the determination module is specifically configured to:
[0061] Query the target in-vehicle unit identifier in the cloud database for which the configuration file has not been sent down;
[0062] According to the target in-vehicle unit identifier, send a notification message to the in-vehicle unit corresponding to the target in-vehicle unit identifier, where the notification message is used to notify that the configuration file has been completed, and the notification message includes the in-vehicle game identifier.
[0063] In a fourth aspect, the present application provides an in-vehicle game coordinate automatic configuration device, which is applied to an in-vehicle unit and includes:
[0064] An acquisition module, configured to acquire game data, where the game data includes coordinate data and identification data, the coordinate data is generated by the click position of a user click event, and the identification data includes at least one of an in-vehicle unit identifier, a screen identifier, a screen size, or an in-vehicle game identifier;
[0065] A sending module, configured to send the game data to the cloud, so that the cloud generates a configuration file according to the game data,
[0066] A configuration module, configured to acquire the configuration file fed back by the cloud and perform screen manipulation point configuration according to the configuration file.
[0067] In a possible implementation manner, the determination module is specifically configured to:
[0068] Receive a notification message sent by the cloud, where the notification message includes an in-vehicle game identifier;
[0069] Send the configuration file request to the cloud according to the notification message;
[0070] Receive the configuration file sent by the cloud.
[0071] In a possible implementation manner, the configuration module is specifically configured to:
[0072] Determine the program to be configured according to the in-vehicle game identifier;
[0073] Determine the analog joystick on the in-vehicle unit screen according to the screen size, the screen identifier, and the manipulation point position.
[0074] In a fifth aspect of the present application, there is provided an electronic device, including:
[0075] A processor and a memory;
[0076] The memory stores computer execution instructions;
[0077] The processor executes the computer execution instructions stored in the memory, so that the electronic device executes the method according to any one of the first aspect.
[0078] In a sixth aspect of the present application, there is provided a computer-readable storage medium storing computer-executable instructions, which are used to implement the method for determining the driver program of the hardware peripheral according to any one of the first aspect when executed by a processor.
[0079] This embodiment provides a method, apparatus, device, and storage medium for automatically configuring coordinates of an in-vehicle game. The method obtains game data through a vehicle-mounted computer; the vehicle-mounted computer sends the game data to the cloud so that the cloud generates a configuration file according to the game data; the cloud receives the game data sent by multiple vehicle-mounted computers; the cloud obtains multiple target coordinate data corresponding to the same target identification data, and obtains the position of the control point according to the multiple target coordinate data; the cloud determines the configuration file according to the target identification data and the position of the control point, and the configuration file is used to be sent to the vehicle-mounted computer to configure the coordinates of the in-vehicle game; the vehicle-mounted computer obtains the configuration file fed back by the cloud and configures the screen control point according to the configuration file. This method collects the game data of multiple vehicle-mounted computers, clusters the coordinate data therein to obtain a configuration file including the position of the control point and sends it to the vehicle-mounted computer, so that the vehicle-mounted computer can set the position of the operation point according to the configuration file, solving the problem that the staff fails to upload the configuration file in time and the user cannot use the virtual joystick to operate the game on the vehicle-mounted computer. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0081] Figure 1 It is a specific application scenario diagram of the method for automatically configuring coordinates of an in-vehicle game provided by the present application;
[0082] Figure 2 It is the flow of the method for automatically configuring coordinates of an in-vehicle game provided by an embodiment of the present application Figure 1 ;
[0083] Figure 3a It is the flow of the method for automatically configuring coordinates of an in-vehicle game provided by an embodiment of the present application Figure 2 ;
[0084] Figure 3b It is the clustering effect diagram provided by an embodiment of the present application;
[0085] Figure 3c It is the clustering schematic diagram provided by an embodiment of the present application Figure 1 ;
[0086] Figure 3d It is the clustering schematic diagram provided by an embodiment of the present application Figure 2 ;
[0087] Figure 4Flowchart III of the method for automatically configuring coordinates of in-vehicle games provided by an embodiment of this application;
[0088] Figure 5 Structural schematic of an apparatus for automatically configuring coordinates of in-vehicle games provided by an embodiment of this application Figure 1 ;
[0089] Figure 6 Structural schematic of an apparatus for automatically configuring coordinates of in-vehicle games provided by an embodiment of this application Figure 2 ;
[0090] Figure 7 Hardware structure diagram of the device for automatically configuring coordinates of in-vehicle games provided by an embodiment of this application.
[0091] Through the above-mentioned drawings, specific embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0092] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with this application. On the contrary, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0093] Figure 1 is a specific application scenario diagram of the method for automatically configuring coordinates of in-vehicle games provided by this application. As Figure 1 shown, this application scenario includes: a vehicle head unit 101, a virtual interface program 102, a cloud 103, and a configuration file 104.
[0094] The vehicle head unit refers to the physical vehicle head unit on the vehicle, and the corresponding one is the virtual vehicle head unit installed on the cloud. The vehicle head unit displays the virtual vehicle head unit on the vehicle through the virtual interface program installed thereon, and all operations performed on the vehicle head unit screen are uploaded to the virtual vehicle head unit on the cloud in the form of events through the virtual interface program.
[0095] The cloud refers to a cloud server, which is a server based on cloud applications. The configuration file refers to a file installed on the cloud virtual machine and including information required for game operations. When a user needs to operate a game using a screen other than the vehicle head unit, the configuration file of the game needs to be downloaded into the virtual interface program on the vehicle head unit.
[0096] Exemplarily, when a user wants to access the cloud 103 through the virtual interface program 102 on the in-vehicle device 101 and operate the game on the cloud 103 through a virtual joystick, the in-vehicle device 101 needs to obtain the configuration file 104 located on the cloud 103 through the virtual interface program 102 and install it on the virtual interface program 102. The configuration file is usually uploaded to the cloud by the staff. When the amount of games is too large, there will be a phenomenon of untimely configuration. At this time, users who have not operated the game through the virtual interface program on the in-vehicle device cannot use the virtual joystick to operate the game, which greatly reduces the user experience.
[0097] The present application provides a method for automatically configuring coordinates of in-vehicle games. The method collects game data of multiple in-vehicle devices, performs clustering processing on the coordinate data therein to obtain a configuration file including the positions of control points, and sends it to the in-vehicle device, so that the in-vehicle device can set the positions of operation points according to the configuration file, solving the problem that the staff uploads the configuration file untimely and users cannot use the virtual joystick to operate the games on the in-vehicle device.
[0098] The method for automatically configuring coordinates of in-vehicle games provided by the present application aims to solve the above technical problems in the prior art.
[0099] The following uses specific embodiments to elaborate in detail on the technical solution of the present application and how the technical solution of the present application solves the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0100] Figure 2 It is the flow of the method for automatically configuring coordinates of in-vehicle games provided by the embodiments of the present application Figure 1 。
[0101] As Figure 2 shown, the method of this embodiment includes:
[0102] S201. The in-vehicle device obtains game data, where the game data includes coordinate data and identification data. The coordinate data is generated by the click position of the user click event, and the identification data includes at least one of the in-vehicle device identification, screen identification, screen size, or in-vehicle game identification;
[0103] In this embodiment, the coordinate data in the game data is the coordinate data of the click position generated by the click event when the user plays the game on the in-vehicle device and directly operates the in-vehicle device screen.
[0104] The purpose of collecting coordinate data is to process the coordinate data through algorithms to accurately locate the position of the real control point. At the same time, due to the different models of in-vehicle infotainment systems (IVI) configured for different vehicles, some vehicles are equipped with more than one IVI screen, and the screen sizes of different IVIs are different. When processing coordinate data through algorithms, it is necessary to classify the IVI data with the same screen size before processing, so it is also necessary to collect identification data.
[0105] S202. The IVI sends game data to the cloud so that the cloud can generate a configuration file based on the game data.
[0106] In this embodiment, a virtual IVI interface program is installed on the IVI to connect to the cloud server based on cloud services, that is, the cloud. In this case, the virtual IVI interface program is also called the cloud base. The IVI sends game data to the cloud through the virtual IVI interface program.
[0107] The IVI extracts event and vehicle model information through the virtual IVI interface program, and uploads the stored game data to the cloud through WebRtc so that the cloud can generate a configuration file based on the game data. Among them, WebRTC (Web Real-Time Communications) is a real-time communication technology that allows web applications or sites to establish peer-to-peer connections between browsers without the help of an intermediate medium to achieve the transmission of video streams and / or audio streams or any other data.
[0108] S203. The cloud receives game data sent by multiple IVIs. The game data includes coordinate data and identification data. The coordinate data is generated by the click position of the user click event, and the identification data includes at least one of the IVI identification, screen identification, screen size, or in-vehicle game identification.
[0109] In this embodiment, in order to form a more accurate configuration file based on the game data, the cloud needs to perform clustering processing on multiple coordinate data. At the same time, because of the different IVI screens on the vehicle, it is necessary to receive game data sent by multiple IVIs to prepare for subsequent data processing.
[0110] S204. The cloud obtains multiple target coordinate data corresponding to the same target identification data, and obtains the control point position based on the multiple target coordinate data.
[0111] In this embodiment, after the cloud receives the game data of multiple in-vehicle units, it first needs to process the game data. First, the game data is parsed and noise-reduced. Since the game data also includes identification data, the data corresponding to different identifications is classified according to the identification data. For example, the data of different games need to be processed separately, and the data of different screen sizes need to be processed separately. After the classification processing, the cloud will perform clustering processing on the target coordinate data corresponding to the target identification data of the same game and the same screen size to obtain the position of the control point.
[0112] S205. The cloud determines a configuration file according to the target identification data and the position of the control point. The configuration file is used to be sent to the in-vehicle unit to configure the coordinates of the in-vehicle game.
[0113] In this embodiment, the configuration file includes not only the position of the control point, but also the screen identification, screen size or in-vehicle game identification, so that the in-vehicle unit can determine the game that requires the configuration file and the screen corresponding to the configuration file according to the configuration file.
[0114] The cloud packs the positions of the control points corresponding to different screen sizes in the same in-vehicle game identification together with their corresponding screen identification, screen size and in-vehicle game identification to form a configuration file. After waiting to be sent to the in-vehicle unit, the in-vehicle unit can set the matching control point positions according to the screen identification, screen size and in-vehicle game identification.
[0115] S206. The in-vehicle unit obtains the configuration file fed back by the cloud and configures the screen control points according to the configuration file.
[0116] In this embodiment, the in-vehicle unit receives the configuration file sent by the cloud through the virtual vehicle technology program interface and configures the game and the screen according to the configuration file. After the configuration is completed, the game on the in-vehicle unit can be operated through a virtual joystick. The virtual joystick includes, but is not limited to, devices such as mobile phones.
[0117] This embodiment provides a method for automatically configuring coordinates of in-vehicle games. The method obtains game data through a vehicle-mounted computer; the vehicle-mounted computer sends the game data to the cloud so that the cloud generates a configuration file based on the game data; the cloud receives the game data sent by multiple vehicle-mounted computers; the cloud obtains multiple target coordinate data corresponding to the same target identification data, and based on the multiple target coordinate data, obtains the position of a control point; the cloud determines a configuration file based on the target identification data and the position of the control point. The configuration file is used to be sent to the vehicle-mounted computer to configure the coordinates of the in-vehicle game; the vehicle-mounted computer obtains the configuration file fed back by the cloud and configures the screen control point according to the configuration file. By collecting the game data of multiple vehicle-mounted computers, clustering the coordinate data therein to obtain a configuration file including the position of the control point and sending it to the vehicle-mounted computer, the vehicle-mounted computer can set the position of the operation point according to the configuration file, solving the problem that the staff fails to upload the configuration file in time and the user cannot use the virtual joystick to operate the game on the vehicle-mounted computer.
[0118] Figure 3a Flow chart of the method for automatically configuring coordinates of in-vehicle games provided by the embodiments of the present application Figure 2 , Figure 3b is the clustering effect diagram provided by the embodiments of the present application, Figure 3c is the clustering schematic provided by the embodiments of the present application Figure 1 , Figure 3d is the clustering schematic provided by the embodiments of the present application Figure 2 。As Figure 3a 、 Figure 3b 、 Figure 3c and Figure 3d shown, the method of this embodiment is applied to the cloud to elaborate on the process of obtaining the position of the control point based on multiple target coordinate data.
[0119] S301. Obtain the density of target coordinate data at different distribution positions according to the distribution range of the multiple target coordinate data;
[0120] In this embodiment, before using the algorithm for clustering processing of coordinate data, it is necessary to process the coordinate data, which can improve the speed of algorithm iteration. Because the selection of the initial center point has a great influence on the number of iterations. If the initial center point is randomly selected, it is easy to have a too long calculation period. If the randomly selected initial center points all belong to the same clustering cluster, the calculation amount is relatively large. At the same time, determining the number K value of the clustering clusters in advance is also the key to saving time. The K value is usually determined according to experience. The application scenario of this application is the determination of game operation points. Therefore, the K value is basically determined and adjusted according to different games.
[0121] In this embodiment, the density of the target coordinate data refers to the number of target coordinate data within the area of a specified shape. The specified shape and area are related to the size and shape of the game operation point.
[0122] S302. Determine the clustering range according to the density of the target coordinate data at different distribution positions, where the density is positively correlated with the area of the clustering range.
[0123] In this embodiment, determining the clustering range can perform noise reduction processing on a large amount of target coordinate data, excluding the discrete target coordinate data that does not conform to the position of the operating point. There are various ways to determine the clustering range according to the density of the target coordinate data at different distribution positions. For example, set a density threshold, calculate the density at each place within the screen size, and those greater than the density threshold are the clustering ranges.
[0124] S303. Take the clustering ranges that cover a number of target coordinate data greater than a preset number as the target clustering ranges.
[0125] In this embodiment, the number of target clustering ranges should be less than or equal to the number of control point centers. Therefore, after determining the clustering range according to the set density threshold, the threshold needs to be adjusted according to the number of control point centers. Until a certain set threshold is taken, the number of clustering ranges is less than or equal to the number of control point centers, and the clustering range at this time is the target clustering range.
[0126] S304. Obtain the expected number of clusters N according to the number of target clustering ranges.
[0127] In this embodiment, the number of target clustering ranges is the same as the expected number of clusters N, and both should be less than or equal to the number of control point centers.
[0128] S305. According to the target coordinate data within each target clustering range, use the Kmeans algorithm to obtain the clustering centers within the target clustering ranges.
[0129] In this embodiment, after determining the expected number of clusters N, first randomly determine a center point within each target clustering range, calculate the distances from the remaining points within the target clustering range to the center point respectively, and take the shortest distance from each point to the center point as the cluster it belongs to. Select points in sequence within each cluster, calculate the sum of the distances from this point to all points within the current cluster, and finally the point with the smallest sum of distances is regarded as the new center point. Traverse the points within the target clustering range, take them all as center points, calculate the distances from the remaining points to the center point, until the unchanged center point is selected.
[0130] Taking the data {a, b, c, d, e, f, g, h, i, k} as an example, if the expected number of clusters K = 2, the steps are as follows:
[0131] First, randomly select c and i as the center points in the sample data.
[0132] Secondly, if the distances from a, b, d, and e to c are calculated to be the closest, and the distances from f, k, g, and h to i are the closest, then a, b, d, and e form cluster C1, and f, k, g, and h form cluster C2. A schematic diagram is shown as Figure 3c shown.
[0133] Furthermore, in the two clustering sets C1 and C2, calculate the minimum value of the sum of the distances from one point to other points as the new center point. Suppose the sum of the distances from b to all other points in C1 is calculated to be the minimum, and the sum of the distances from k to all other points in C2 is calculated to be the minimum. A schematic diagram is shown as Figure 3d shown.
[0134] Finally, using D and E as the center points of the clusters, repeat the above steps until the center points no longer change.
[0135] S306. Obtain the corresponding N clustering centers according to N target clustering ranges;
[0136] In this embodiment, for N target clustering ranges, the clustering centers are determined by the Kmeans algorithm, and the corresponding N clustering centers can be obtained. After clustering, the result is shown as Figure 3b shown.
[0137] S307. Use the positions of the N clustering centers as the positions of the corresponding N control points.
[0138] In this embodiment, the positions of the N clustering centers are the positions of the N control points in the configuration file. Here, the position of the control point is the position of the center of the control button, and the area of the control button can be determined by the area size of the target clustering range or by a set value, which is not limited in this application.
[0139] This embodiment provides a method for automatically configuring coordinates of in-vehicle games. The method obtains the density of target coordinate data at different distribution positions according to the distribution range of multiple target coordinate data; determines the clustering range according to the density of target coordinate data at different distribution positions, where the density is positively correlated with the area of the clustering range; takes the clustering range covering a number of target coordinate data greater than a preset number as the target clustering range; obtains the expected number of clusters N according to the number of target clustering ranges; obtains the cluster centers within the target clustering range through the Kmeans algorithm according to the target coordinate data within each target clustering range; obtains the corresponding N cluster centers according to the N target clustering ranges; and takes the positions of the N cluster centers as the positions of the corresponding N control points. This method determines the number of clusters through the distribution range of target coordinate data, uses the Kmeans algorithm to further determine the cluster centers, and finally obtains the positions of the control points, so that a configuration file including the positions of the control points of the game can be obtained without the need for staff to upload a configuration file, thereby reducing the time and process of coordinate configuration of in-vehicle games and improving the user experience.
[0140] Figure 4 This is the third flowchart of the method for automatically configuring coordinates of in-vehicle games provided by the embodiments of the present application. As Figure 4 shown, the method of this embodiment details the process of sending the configuration file to the vehicle head unit after the configuration file is determined.
[0141] S401. The cloud stores the target identification data and the configuration file in the cloud database in an associated manner;
[0142] In this embodiment, in order for the cloud to accurately push the configuration file to the vehicle head unit without a configuration file, it is necessary to record the identification of the vehicle head unit that has operated the game, and then determine the identification of the vehicle head unit that has not operated the game in the cloud database. The source of the target identification data is the vehicle head unit with a game operation record. Therefore, the identification of the vehicle head unit that has not operated the game can be determined through the association between the target identification data and the configuration file.
[0143] S402. The cloud queries the target vehicle head unit identification that has not been issued with a configuration file in the cloud database;
[0144] In this embodiment, by querying the cloud database, the identification of the vehicle head unit that has not been associated with the configuration file among the vehicle head units registered in the cloud is the target vehicle head unit identification that has not been issued with a configuration file.
[0145] S403. The cloud sends a notification message to the vehicle corresponding to the target vehicle head unit identification according to the target vehicle head unit identification. The notification message is used to notify that the configuration file has been completed, and the notification message includes the in-vehicle game identification;
[0146] In this embodiment, to save the network traffic of the in-vehicle unit, a method of pushing messages is adopted to inquire whether the in-vehicle unit needs to obtain a configuration file, thus saving the storage space of the in-vehicle unit. The in-vehicle unit can determine whether it needs the corresponding configuration file through the in-vehicle game identifier in the notification message.
[0147] S404. The in-vehicle unit receives the notification message sent by the cloud, and the notification message includes the in-vehicle game identifier;
[0148] In this embodiment, the in-vehicle unit can determine whether it needs the corresponding configuration file through the in-vehicle game identifier in the notification message. If the in-vehicle game corresponding to the in-vehicle game identifier is not installed on the in-vehicle unit or the in-vehicle game corresponding to the in-vehicle game identifier has not been logged in for a long time, the in-vehicle unit can choose not to obtain the configuration file. The in-vehicle unit can also determine whether to obtain the configuration file by seeking the user's consent.
[0149] S405. The in-vehicle unit sends a configuration file request to the cloud according to the notification message;
[0150] In this embodiment, the in-vehicle unit determines the in-vehicle game identifier according to the notification message, and puts the in-vehicle unit identifier, screen identifier, screen size, and in-vehicle game identifier into the configuration file request, and sends it to the cloud through the virtual in-vehicle unit interface program.
[0151] S406. The cloud receives the configuration file request sent by the in-vehicle unit;
[0152] S407. The cloud sends the configuration file corresponding to the identifier data to the in-vehicle unit according to the identifier data carried in the configuration file request;
[0153] In this embodiment, after receiving the configuration file request sent by the in-vehicle unit, the cloud parses the configuration file request to obtain the corresponding in-vehicle unit identifier, screen identifier, screen size, and in-vehicle game identifier. By searching the database, the cloud finds the configuration file corresponding to the identifier data and sends it to the in-vehicle unit through the virtual in-vehicle unit interface program.
[0154] S408. The in-vehicle unit receives the configuration file sent by the cloud;
[0155] In this embodiment, after receiving the configuration file sent by the cloud, the in-vehicle unit parses the configuration file. The parsed data is passed to the virtual in-vehicle unit interface program.
[0156] S409. The in-vehicle unit determines the program to be configured according to the in-vehicle game identifier;
[0157] S410. The in-vehicle unit determines the analog joystick on the in-vehicle unit screen according to the screen size, screen identifier, and position of the control point.
[0158] In this embodiment, after the virtual in-vehicle head unit interface program determines the screen identifier, it sets, through a function in the Activity component, that the game is to be launched on the screen corresponding to the screen identifier and the position of the control points of the analog joystick. Through the package manager, it checks whether the game to be opened currently is configured with a corresponding configuration file, and if not, it configures it through the package manager. This embodiment provides a method for automatically configuring coordinates of in-vehicle games. The method stores the target identifier data and the configuration file associated with each other in the cloud database through the cloud; the cloud queries the target in-vehicle head unit identifiers in the cloud database for which the configuration file has not been issued; the cloud sends a notification message to the in-vehicle head unit corresponding to the target in-vehicle head unit identifier according to the target in-vehicle head unit identifier, the notification message is used to notify that the configuration file has been completed, and the notification message includes the in-vehicle game identifier; the in-vehicle head unit receives the notification message sent by the cloud, and the notification message includes the in-vehicle game identifier; the in-vehicle head unit sends a configuration file request to the cloud according to the notification message; the cloud receives the configuration file request sent by the in-vehicle head unit; the cloud sends the configuration file corresponding to the identifier data to the in-vehicle head unit according to the identifier data carried in the configuration file request; the in-vehicle head unit receives the configuration file sent by the cloud; the in-vehicle head unit determines the program to be configured according to the in-vehicle game identifier; the in-vehicle head unit determines the analog joystick on the in-vehicle head unit screen according to the screen size, the screen identifier, and the position of the control points. This method filters out the in-vehicle head units without a configuration file through the cloud and sends a notification message to them. The in-vehicle head unit obtains the configuration file according to the notification message and configures the analog joystick according to the configuration file, improving the efficiency of issuing the configuration file and preventing repeated issuance from occupying the in-vehicle head unit memory.
[0159] The technical solution of the present application will be described in detail below with a specific embodiment.
[0160] The in-vehicle head unit first maintains an mRecent Tsk through the Activity Manager Service, that is, maintains a recent application button. Clicking this button can pop up all the applications in the interface. It will place the currently visible applications in the frontmost position. Then it uses task.affinity to monitor the package name of the currently foremost application in real time, and collects relevant information such as the package name of the currently foremost application, the coordinates of the click event Motion Event, and the identifier and size of the currently controlled screen through the Activity component.
[0161] After collecting game data, the in-vehicle unit needs to store the data. The in-vehicle unit uses the Activity component to complete the operation of storing game data in an excel table. Call add Coordinate() in dispatch Touch Event() to write the data into the memory. Call Workbook.get Workbook() and Workbook.Create Workbook() to find or create a new table. Then call new Wwb.Get Sheet() to obtain the table with the specified index. Call newWwb.write() to write the data in the memory into the table.
[0162] After that, the in-vehicle unit uploads the table to the cloud through the virtual in-vehicle unit interface program. After receiving the table, the cloud converts it into an InputStream. After obtaining the specified table by calling Workbook.getWorkbook(), call workbook.getSheet() to obtain the specified worksheet, and then put the data into the original data dataSetArrayList of Kmeans. <floatarray>Among them, the position of the operating point is determined by the Kmeans algorithm, and then the configuration file is obtained. Then, in the cloud database, among the registered in-vehicle unit identifiers, the in-vehicle unit identifiers that have no association with the configuration file are queried, and a notification message is sent to them. After receiving the configuration file request sent by the in-vehicle unit, the configuration file is sent to it according to the in-vehicle unit identifier.
[0163] Figure 5 is a schematic structural diagram of an automatic coordinate configuration device for an in-vehicle game provided by an embodiment of the present application Figure 1 . The device in this embodiment can be in the form of software and / or hardware. For example Figure 5 As shown, an automatic coordinate configuration device 500 for an in-vehicle game provided by an embodiment of the present application is applied to the cloud, and includes a receiving module 501, an obtaining module 502, and a determining module 503.
[0164] The receiving module 501 is configured to receive game data sent by multiple in-vehicle units. The game data includes coordinate data and identification data. The coordinate data is generated by the click position of the user click event, and the identification data includes at least one of the in-vehicle unit identifier, the screen identifier, the screen size, or the in-vehicle game identifier.
[0165] The obtaining module 502 is configured to obtain multiple target coordinate data corresponding to the same target identification data, and obtain the position of the control point according to the multiple target coordinate data.
[0166] The determining module 503 is configured to determine a configuration file according to the target identification data and the position of the control point. The configuration file is used to be sent to the in-vehicle unit to configure the coordinates of the in-vehicle game.
[0167] In a possible implementation manner, the obtaining module is specifically configured to:
[0168] Obtain the expected number of clusters N according to the distribution range of the multiple target coordinate data;
[0169] According to the number of clusters N and the multiple target coordinate data, obtain N cluster centers through the Kmeans algorithm;
[0170] Use the positions of the N cluster centers as the corresponding N control point positions.
[0171] In a possible implementation manner, the obtaining module is specifically configured to:
[0172] Obtain the density of the target coordinate data at different distribution positions according to the distribution range of the multiple target coordinate data;
[0173] Determine the clustering range according to the density of the target coordinate data at different distribution positions, where the density is positively correlated with the area of the clustering range;
[0174] Take the clustering range whose number of target coordinate data to be covered is greater than the preset number as the target clustering range;
[0175] According to the number of target clustering ranges, obtain the expected number of clusters N.
[0176] In a possible implementation manner, the obtaining module is specifically configured to:
[0177] According to the target coordinate data within each target clustering range, use the Kmeans algorithm to obtain the clustering center within the target clustering range;
[0178] According to the N target clustering ranges, obtain the corresponding N clustering centers.
[0179] In a possible implementation manner, the determining module is specifically configured to:
[0180] Associate and store the target identification data and the configuration file in the cloud database;
[0181] Receive a configuration file request sent by the in-vehicle unit;
[0182] According to the identification data carried in the configuration file request, send the configuration file corresponding to the identification data to the in-vehicle unit.
[0183] In a possible implementation manner, the determining module is specifically configured to:
[0184] Query the target in-vehicle unit identification of the configuration file that has not been sent down in the cloud database;
[0185] According to the target in-vehicle unit identification, send a notification message to the in-vehicle unit corresponding to the target in-vehicle unit identification. The notification message is used to notify that the configuration file has been completed, and the notification message includes the in-vehicle game identification.
[0186] Figure 6 This is the structural schematic of an in-vehicle game coordinate automatic configuration device provided by an embodiment of the present application Figure 2 . The device in this embodiment can be in the form of software and / or hardware. As Figure 6 shown, an in-vehicle game coordinate automatic configuration device 600 provided by an embodiment of the present application is applied to an in-vehicle unit and includes an obtaining module 601, a sending module 602, and a configuration module 603.
[0187] The obtaining module 601 is configured to obtain game data, where the game data includes coordinate data and identification data. The coordinate data is generated by the click position of the user click event, and the identification data includes at least one of the in-vehicle unit identification, the screen identification, the screen size, or the in-vehicle game identification;
[0188] The sending module 602 is configured to send the game data to the cloud so that the cloud generates a configuration file according to the game data.
[0189] A configuration module 603, configured to obtain a configuration file fed back by the cloud and perform screen manipulation point configuration according to the configuration file.
[0190] In a possible implementation, the determination module is specifically configured to:
[0191] Receive a notification message sent by the cloud, where the notification message includes a vehicle-mounted game identifier;
[0192] Send a configuration file request to the cloud according to the notification message;
[0193] Receive the configuration file sent by the cloud.
[0194] In a possible implementation, the configuration module is specifically configured to:
[0195] Determine the program to be configured according to the vehicle-mounted game identifier;
[0196] Determine a simulated joystick on the in-vehicle screen according to the screen size, screen identifier, and manipulation point position.
[0197] The device for automatically configuring coordinates of a vehicle-mounted game provided in this embodiment can be used to execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here in this embodiment.
[0198] Figure 7 This is a hardware structure diagram of a device for automatically configuring coordinates of a vehicle-mounted game provided in an embodiment of the present application. As Figure 7 shown, the device 700 for automatically configuring coordinates of a vehicle-mounted game includes:
[0199] A processor 701 and a memory 702;
[0200] The memory stores computer execution instructions;
[0201] The processor executes the computer execution instructions stored in the memory 702, causing the electronic device to execute the method for automatically configuring coordinates of a vehicle-mounted game as described above.
[0202] It should be understood that the above-mentioned processor 701 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed and completed by a hardware processor, or can be executed and completed by a combination of hardware and software modules in the processor. The memory 702 may include a high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disc, etc.
[0203] The embodiment of the present application correspondingly also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the method for automatically configuring coordinates of an in-vehicle game.
[0204] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for the user to choose to authorize or refuse.
[0205] Those skilled in the art will readily think of other implementation schemes of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptive changes of the present application, and these variations, uses, or adaptive changes follow the general principles of the present application and include the common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and the embodiments are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0206] It should be understood that the present application is not limited to the precise structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.< / floatarray>
Claims
1. A method for automatically configuring coordinates of in-vehicle games, applied to the cloud, characterized in that, including: Receiving game data sent by multiple in-vehicle units, the game data including coordinate data and identification data, the coordinate data being generated by the click position of a user click event, and the identification data including at least one of an in-vehicle unit identification, a screen identification, a screen size, or an in-vehicle game identification; Obtaining multiple target coordinate data corresponding to the same target identification data, and obtaining a control point position according to the multiple target coordinate data; Determining a configuration file according to the target identification data and the control point position, the configuration file being used to be sent to the in-vehicle unit to configure the coordinates of the in-vehicle game; The obtaining a control point position according to the multiple target coordinate data includes: Obtaining an expected number of clusters N according to the distribution range of the multiple target coordinate data; Obtaining N cluster centers through the Kmeans algorithm according to the number of clusters N and the multiple target coordinate data; Taking the positions of the N cluster centers as the corresponding N control point positions.
2. The method according to claim 1, characterized in that, The obtaining an expected number of clusters N according to the distribution range of the multiple target coordinate data includes: Obtaining the density of target coordinate data at different distribution positions according to the distribution range of the multiple target coordinate data; Determining a clustering range according to the density of target coordinate data at different distribution positions, where the density is positively correlated with the area of the clustering range; Taking the clustering range covering a number of target coordinate data greater than a preset number as the target clustering range; Obtaining an expected number of clusters N according to the number of the target clustering ranges.
3. The method according to claim 1, characterized in that, The obtaining N cluster centers through the Kmeans algorithm according to the number of clusters N and the multiple target coordinate data includes: Obtaining the cluster center within the target clustering range through the Kmeans algorithm according to the target coordinate data within each target clustering range; Obtaining the corresponding N cluster centers according to the N target clustering ranges.
4. The method according to claim 1, characterized in that, After determining the configuration file according to the target identification data and the control point position, it further includes: Associatively storing the target identification data and the configuration file in a cloud database; Receiving a configuration file request sent by the in-vehicle unit; Sending the configuration file corresponding to the identification data to the in-vehicle unit according to the identification data carried in the configuration file request.
5. The method according to claim 4, characterized in that, Before receiving the configuration file request sent by the in-vehicle unit, the method further includes: Querying the target in-vehicle unit identification in the cloud database for which the configuration file has not been sent; Sending a notification message to the in-vehicle unit corresponding to the target in-vehicle unit identification according to the target in-vehicle unit identification, the notification message being used to notify that the configuration file has been completed, and the notification message including an in-vehicle game identification.
6. A method for automatically configuring coordinates of in-vehicle games, applied to the in-vehicle computer, characterized in that, including: Obtaining game data, the game data including coordinate data and identification data, the coordinate data being generated by the click position of a user click event, and the identification data including at least one of an in-vehicle unit identification, a screen identification, a screen size, or an in-vehicle game identification; Sending the game data to the cloud so that the cloud generates a configuration file according to the game data, Obtaining the configuration file fed back by the cloud and performing screen control point configuration according to the configuration file; Among them, the configuration file is determined according to the target identification data and the position of the control point, the position of the control point is the position of the cluster center, and the cluster center is obtained by the Kmeans algorithm based on multiple target coordinate data.
7. The method according to claim 6, characterized in that, The obtaining the configuration file fed back by the cloud includes: Receiving a notification message sent by the cloud, the notification message including the in-vehicle game identifier; Sending a configuration file request to the cloud according to the notification message; Receiving the configuration file sent by the cloud.
8. The method according to claim 6, characterized in that, The performing screen control point configuration according to the configuration file includes: Determining the program to be configured according to the in-vehicle game identifier; Determining an analog joystick on the in-vehicle screen according to the screen size, the screen identifier, and the position of the control point.
9. An automatic coordinate configuration device for in-vehicle games, characterized in that, Applied to the cloud, it includes: A receiving module, configured to receive game data sent by multiple in-vehicle units, the game data including coordinate data and identification data, the coordinate data being generated by the click position of a user click event, and the identification data including at least one of an in-vehicle unit identifier, a screen identifier, a screen size, or an in-vehicle game identifier; An obtaining module, configured to obtain multiple target coordinate data corresponding to the same target identification data, and obtain the position of the control point according to the multiple target coordinate data; A determining module, configured to determine a configuration file according to the target identification data and the position of the control point, the configuration file being used to be sent to the in-vehicle unit to configure the coordinates of the in-vehicle game; The obtaining module is specifically configured to: Obtain an expected number of clusters N according to the distribution range of the multiple target coordinate data; Obtain N cluster centers through the Kmeans algorithm according to the number of clusters N and the multiple target coordinate data; Taking the positions of the N cluster centers as the corresponding N positions of the control points.
10. An automatic coordinate configuration device for in-vehicle games, characterized in that, Applied to the in-vehicle unit, it includes: An obtaining module, configured to obtain game data, the game data including coordinate data and identification data, the coordinate data being generated by the click position of a user click event, and the identification data including at least one of an in-vehicle unit identifier, a screen identifier, a screen size, or an in-vehicle game identifier; A sending module, configured to send the game data to the cloud so that the cloud generates a configuration file according to the game data, A configuration module, configured to obtain the configuration file fed back by the cloud and perform screen control point configuration according to the configuration file; Among them, the configuration file is determined according to the target identification data and the position of the control point, the position of the control point is the position of the cluster center, and the cluster center is obtained by the Kmeans algorithm based on multiple target coordinate data.
11. An electronic device, comprising: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 5, or executes the method according to any one of claims 6 to 8.
12. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 5, or execute the method according to any one of claims 6 to 8.
Citation Information
Patent Citations
Self-adaptive method for processing viewpoint smoothing filtering data
CN101916338A
Information display method and device, vehicle and machine-readable medium
CN110478909A