Data reporting method and device based on token bucket algorithm, equipment and medium

By applying the token bucket algorithm on the vehicle terminal, reporting the touch coordinate data of the vehicle touch screen according to the number of tokens, the problem of not being able to complete CarPlay authentication normally in the existing technology is solved, the hardware update cost is reduced, and CarPlay authentication is realized stability and efficiency.

CN119182729APending Publication Date: 2024-12-24BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411243381.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing touch point reporting method cannot complete CarPlay authentication normally, resulting in high hardware and time costs.

Method used

Using the data reporting method based on the token bucket algorithm, the number of tokens in the token bucket is initialized and the touch coordinate data of the vehicle machine touch screen is reported according to the number of tokens. If the token is insufficient, the unreported touch point data will be discarded. , ensure that the number of points reported per second meets CarPlay requirements.

Benefits of technology

It effectively solves the problem that CarPlay authentication cannot be completed normally when the explosion point rate is insufficient, reduces the cost and time cost of hardware updates, and ensures the successful completion of CarPlay authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182729A_ABST
    Figure CN119182729A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data reporting method, device and equipment based on a token bucket algorithm and a medium, the method is applied to a controller of a vehicle terminal, the vehicle terminal further comprises a vehicle touch screen in communication connection with the controller, and the vehicle terminal is in network connection with a mobile terminal. The method comprises the following steps: initializing the total number of tokens generated in a first unit time in a token bucket; setting the number generated in second unit time according to the first unit time, wherein the first unit time comprises a plurality of second unit time; reporting touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data comprises a plurality of pieces of touch point data generated in the second unit time. According to the embodiment of the invention, the touch coordinate data from the vehicle touch screen can be reported according to the number of tokens in the token bucket, and the problem that CarPlay authentication cannot be normally completed when the explosion point rate is insufficient can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data reporting method, device, equipment and medium based on a token bucket algorithm. Background Art

[0002] When the in-vehicle multimedia entertainment host (referred to as the car machine) is connected to Apple's official CarPlay certification, it is necessary to report the number of screen touch points to the mobile phone according to the screen refresh rate of the car machine. Usually 30 or 60 points need to be reported per second, and the number of points cannot be more or less, otherwise it will cause CarPlay certification to fail; specifically, the number of touch points reported per second is completely determined by the underlying screen driver scanning program. If the scan is fast enough, the number of points reported will be more, otherwise the number of points reported will be less. Once the points need to be added or deleted, the screen manufacturer needs to update the firmware or update the screen driver, which has high hardware and time costs.

[0003] Therefore, the existing touch point reporting method has the problem of being unable to normally complete CarPlay authentication. Summary of the invention

[0004] The embodiments of the present invention provide a data reporting method, device, equipment and medium based on a token bucket algorithm, aiming to solve the problem that the existing touch point reporting method cannot normally complete CarPlay authentication.

[0005] In a first aspect, an embodiment of the present invention provides a data reporting method based on a token bucket algorithm, the method is applied to a controller of a vehicle terminal, the vehicle terminal also includes a vehicle touch screen that is communicatively connected to the controller, the vehicle terminal is connected to a mobile terminal through a network, and the method includes:

[0006] Initialize the total number of tokens in the token bucket generated in the first unit time;

[0007] The number of generated in a second unit time is set according to the first unit time, wherein the first unit time includes a plurality of second unit times;

[0008] Reporting touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes a plurality of touch point data generated within the second unit time.

[0009] In a second aspect, an embodiment of the present invention further provides a data reporting device based on a token bucket algorithm, wherein the device is configured in a controller of a vehicle terminal, wherein the vehicle terminal further comprises a vehicle terminal touch screen that is communicatively connected to the controller, and wherein the vehicle terminal is connected to a mobile terminal through a network, and wherein the device comprises:

[0010] An initialization unit, used to initialize the total number of tokens generated in the token bucket within the first unit time;

[0011] A setting unit, configured to set the number of items generated in a second unit time according to the first unit time, wherein the first unit time includes a plurality of second unit times;

[0012] A data reporting unit is used to report touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes a plurality of touch point data generated within the second unit time.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and wherein the program instructions, when executed by a processor, can implement the method described in the first aspect above.

[0015] The embodiment of the present invention provides a data reporting method, device, equipment and medium based on a token bucket algorithm, the method is applied to a controller of a vehicle terminal, the vehicle terminal also includes a vehicle touch screen that is communicatively connected to the controller, the vehicle terminal is connected to a mobile terminal through a network, the method includes: initializing the total number of tokens generated in the token bucket in the first unit time; setting the number generated in the second unit time according to the first unit time, the first unit time includes multiple second unit times; reporting touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes multiple touch point data generated in the second unit time. The embodiment of the present invention can report the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket, which can solve the problem that CarPlay authentication cannot be completed normally when the burst point rate is insufficient; specifically, if there is a token in the token bucket in the second unit time, the touch coordinate data is reported according to the number of tokens in the token bucket; if there is no token in the token bucket in the second unit time, the unreported touch point data in the touch coordinate data is discarded. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 A schematic diagram of a data reporting method based on a token bucket algorithm provided in an embodiment of the present invention;

[0018] Figure 2 A schematic block diagram of a data reporting device based on a token bucket algorithm provided in an embodiment of the present invention;

[0019] Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0022] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0023] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. The embodiment of the present invention provides a data reporting method, device, equipment and medium based on a token bucket algorithm. The data reporting method based on a token bucket algorithm can be found in Figure 1 , Figure 1 A flowchart of a data reporting method based on a token bucket algorithm provided by an embodiment of the present invention. The method is applied to a controller of a vehicle terminal, wherein the vehicle terminal further comprises a vehicle terminal touch screen that is communicatively connected to the controller, and the vehicle terminal is connected to a mobile terminal through a network.

[0024] Figure 1 The flowchart of the data reporting method based on the token bucket algorithm provided by the embodiment of the present invention is as follows. Figure 1As shown, the method includes the following steps S110-S130.

[0025] S110, initializing the total number of tokens in the token bucket generated in the first unit time.

[0026] In this embodiment, the total number of tokens generated in the token bucket within the first unit time can be initialized according to the underlying screen driver scanning program; wherein the first unit time can be set to 1 second, and the total number of tokens generated in the token bucket within the first unit time can be set to 60.

[0027] S120. Set the number of times generated in a second unit time according to the first unit time, where the first unit time includes multiple second unit times.

[0028] In this embodiment, the second unit time can be set to 100 milliseconds (i.e. 0.1 seconds). If the first unit time is 1 second, and the total number of tokens generated in the token bucket in the first unit time is 60, then the number of tokens generated in the token bucket in the second unit time is 6.

[0029] In one embodiment, after step S120, it also includes: determining whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time timing, and obtaining a detection judgment result; if the detection judgment result is yes, obtaining the touch coordinate data according to the screen touch event.

[0030] In this embodiment, if the second unit time is set to 100 milliseconds (i.e. 0.1 seconds), it is determined every 100 milliseconds whether a screen touch event from the vehicle touch screen is detected during this period to obtain a detection and judgment result; specifically, when the user performs a touch input operation on the vehicle touch screen, the vehicle touch screen receives the current screen touch event; if the detection and judgment result is yes, the touch coordinate data is obtained according to the screen touch event; wherein, the touch coordinate data includes multiple touch point data generated within the second unit time.

[0031] In one embodiment, the method of determining whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time timing, after obtaining the detection judgment result, further includes: if the detection judgment result is no, repeatedly reporting the last reported touch point data according to the number of tokens in the token bucket.

[0032] In this embodiment, the touch point data is the coordinate point data generated by the contact between the user's finger and the vehicle touch screen; if no screen touch event is detected from the vehicle touch screen within the second unit time, the last reported touch point data is repeatedly reported according to the number of tokens in the token bucket; specifically, if the number of tokens generated in the token bucket within the second unit time is 6, and the last reported touch point data is (X1, Y1), the touch point data (X1, Y1) is reported 6 times.

[0033] S130. Reporting touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes a plurality of touch point data generated within the second unit time.

[0034] In this embodiment, the token bucket algorithm is a process of reporting touch coordinate data based on the tokens in the token bucket; reporting the touch coordinate data from the vehicle touch screen based on the number of tokens in the token bucket; wherein the touch coordinate data includes multiple touch point data generated within the second unit time; specifically, if there are tokens in the token bucket within the second unit time, the touch coordinate data is reported based on the number of tokens in the token bucket; if there are no tokens in the token bucket within the second unit time, the unreported touch point data in the touch coordinate data is discarded.

[0035] For example, if 100 touch point data are generated in the second unit time, if the number of tokens generated in the token bucket in the second unit time is 6, in order to ensure that CarPlay authentication is completed normally, the first 6 touch point data in the touch coordinate data are reported in chronological order, and the remaining 94 touch point data are discarded.

[0036] For example 2, 2 touch point data are generated in the second unit time. If the number of tokens generated in the token bucket in the second unit time is 6, 2 touch point data are reported in the second unit time, and 2 data are reported. The remaining number of tokens in the token bucket is reduced by 2. At this time, the remaining number of tokens in the token bucket is 4. In order to ensure that CarPlay authentication is completed normally, the last reported touch point data is reported 4 times.

[0037] In one embodiment, step S130 includes: obtaining one of the touch point data as the target data in chronological order; judging whether the remaining number of tokens is greater than zero, and obtaining a first judgment result; wherein the remaining number of tokens is the remaining number of tokens in the token bucket within the second unit time; if the first judgment result is yes, reporting the target data, and reducing the remaining number of tokens by one; judging whether there is any touch point data that has not been reported, and obtaining a second judgment result; if the second judgment result is yes, obtaining the next touch point data as the target data and returning to the step of judging whether the remaining number of tokens is greater than zero, and obtaining the first judgment result.

[0038] In this embodiment, one touch point data is obtained from the touch coordinate data in sequence as target data; it is determined whether the remaining number of tokens is greater than zero to obtain a first judgment result; wherein the remaining number of tokens is the remaining number of tokens in the token bucket within the second unit time; if the first judgment result is yes, the target data is reported, and the remaining number of tokens is reduced by one, that is, one token can report one touch point data; it is determined whether there is any touch point data that has not been reported to obtain a second judgment result; if the second judgment result is yes, the next touch point data is obtained as the target data and the step of determining whether the remaining number of tokens is greater than zero to obtain the first judgment result is returned.

[0039] In one embodiment, the determining whether the remaining number of tokens is greater than zero, after obtaining a first determination result, further includes: if the first determination result is no, discarding the unreported touch point data.

[0040] In this embodiment, if the first judgment result is that the remaining number of tokens is zero, the touch point data that is not reported in the touch coordinate data is discarded to ensure that the number of touch point data reported within the second unit time is always a preset number, that is, if the number of tokens generated in the token bucket within the second unit time is X, then the number of touch point data reported within the second unit time is X.

[0041] In one embodiment, the determining whether there is any unreported touch point data, after obtaining a second determination result, further includes: if the second determination result is no, repeatedly reporting the target data according to the remaining number of tokens.

[0042] In this embodiment, if the second judgment result is that all the touch point data have been reported, the target data is repeatedly reported according to the remaining number of tokens to ensure that CarPlay authentication is completed normally.

[0043] In one embodiment, if the second judgment result is no, the target data is repeatedly reported according to the remaining number of tokens, including: judging whether the remaining number of tokens is greater than zero according to the second unit time to obtain a token judgment result; if the token judgment result is yes, the target data is repeatedly reported according to the remaining number of tokens; if the token judgment result is no, returning to execute the step of judging whether the remaining number of tokens is greater than zero according to the second unit time to obtain a token judgment result.

[0044] In this embodiment, it is determined whether the remaining number of tokens is greater than zero according to the second unit time to obtain a token determination result; if the token determination result is yes, the target data is repeatedly reported according to the remaining number of tokens; if the token determination result is no, the step of determining whether the remaining number of tokens is greater than zero according to the second unit time to obtain a token determination result is returned to execute, so that the number of touch point data reported in each first unit time is always the preset total number, thereby ensuring that CarPlay authentication is completed normally.

[0045] To summarize, the embodiment of the present invention can report the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket, which can solve the problem that CarPlay authentication cannot be completed normally when the burst rate is insufficient; specifically, if there are tokens in the token bucket within the second unit time, the touch coordinate data is reported according to the number of tokens in the token bucket; if there are no tokens in the token bucket within the second unit time, the touch point data not reported in the touch coordinate data is discarded.

[0046] Figure 2 A schematic block diagram of a data reporting device based on a token bucket algorithm provided by an embodiment of the present invention. Figure 2 As shown, corresponding to the data reporting method based on the token bucket algorithm, the present invention also provides a data reporting device based on the token bucket algorithm, the device is configured in the controller of the vehicle terminal, the vehicle terminal also includes a vehicle terminal touch screen that is connected to the controller for communication, and the vehicle terminal is connected to the mobile terminal through the network. Figure 2 , the data reporting device 700 based on the token bucket algorithm includes:

[0047] An initialization unit 701 is used to initialize the total number of tokens generated in the token bucket within a first unit time;

[0048] A setting unit 702, configured to set the number of times generated in a second unit time according to the first unit time, wherein the first unit time includes a plurality of second unit times;

[0049] The data reporting unit 703 is used to report the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes a plurality of touch point data generated within the second unit time.

[0050] In some embodiments, when the data reporting unit 703 performs the step of reporting the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket, it is specifically used to:

[0051] Acquire one of the touch point data as the target data in chronological order; determine whether the remaining number of tokens is greater than zero to obtain a first determination result; wherein the remaining number of tokens is the remaining number of tokens in the token bucket within the second unit time; if the first determination result is yes, report the target data and reduce the remaining number of tokens by one; determine whether there is any touch point data that has not been reported to obtain a second determination result; if the second determination result is yes, acquire the next touch point data as the target data and return to the step of determining whether the remaining number of tokens is greater than zero to obtain the first determination result.

[0052] In some embodiments, after executing the step of determining whether the remaining number of tokens is greater than zero and obtaining a first determination result, the data reporting unit 703 is further configured to:

[0053] If the first judgment result is no, the unreported touch point data is discarded.

[0054] In some embodiments, after executing the step of determining whether there is any unreported touch point data and obtaining a second determination result, the data reporting unit 703 is further configured to:

[0055] If the second judgment result is no, the target data is repeatedly reported according to the remaining number of tokens.

[0056] In some embodiments, when the data reporting unit 703 executes the step of repeatedly reporting the target data according to the remaining number of tokens if the second judgment result is no, it is specifically used to:

[0057] Judging whether the remaining number of tokens is greater than zero according to the second unit time timing, obtaining a token judgment result; if the token judgment result is yes, repeatedly reporting the target data according to the remaining number of tokens; if the token judgment result is no, returning to execute judging whether the remaining number of tokens is greater than zero according to the second unit time timing, obtaining a token judgment result.

[0058] In some embodiments, after executing the step of setting the number generated in the second unit time according to the first unit time, the first unit time including a plurality of second unit time steps, the setting unit 702 is further used to:

[0059] According to the second unit time timing, it is determined whether a screen touch event from the vehicle touch screen is detected within the second unit time to obtain a detection result; if the detection result is yes, the touch coordinate data is obtained according to the screen touch event.

[0060] In some embodiments, after executing the step of determining whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time and obtaining a detection determination result, the setting unit 702 is further used to:

[0061] If the detection result is no, the touch point data reported last is repeatedly reported according to the number of tokens in the token bucket.

[0062] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned data reporting device based on the token bucket algorithm and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and conciseness of the description, it will not be repeated here.

[0063] The data reporting device based on the token bucket algorithm can be implemented in the form of a computer program. Figure 3 Runs on the computer device shown.

[0064] See also Figure 3 , Figure 3 800 is a schematic block diagram of an electronic device provided by an embodiment of the present invention. The computer device 800 may be a terminal or a server, wherein the terminal may be an electronic device with a communication function. The server may be an independent server or a server cluster composed of multiple servers.

[0065] See also Figure 3 The electronic device 800 includes a processor 802 , a memory and a network interface 805 connected via a system bus 801 , wherein the memory may include a non-volatile storage medium 803 and an internal memory 804 .

[0066] The non-volatile storage medium 803 can store an operating system 8031 ​​and a computer program 8032. The computer program 8032 includes program instructions, and when the program instructions are executed, the processor 802 can execute a data reporting method based on a token bucket algorithm.

[0067] The processor 802 is used to provide computing and control capabilities to support the operation of the entire electronic device 800 .

[0068] The internal memory 804 provides an environment for the operation of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can execute a data reporting method based on a token bucket algorithm.

[0069] The network interface 805 is used to communicate with other devices over the network. Figure 3 The structure shown in the figure is merely a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the electronic device 800 to which the solution of the present invention is applied. The specific electronic device 800 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0070] The processor 802 is used to run the computer program 8032 stored in the memory to implement the following steps:

[0071] Initialize the total number of tokens in the token bucket generated within the first unit time; set the number generated within the second unit time based on the first unit time, the first unit time includes multiple second unit times; report touch coordinate data from the vehicle touch screen based on the number of tokens in the token bucket; wherein the touch coordinate data includes multiple touch point data generated within the second unit time.

[0072] In some embodiments, when the processor 802 implements the step of reporting the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket, the processor 802 specifically implements the following steps:

[0073] Acquire one of the touch point data as the target data in chronological order; determine whether the remaining number of tokens is greater than zero to obtain a first determination result; wherein the remaining number of tokens is the remaining number of tokens in the token bucket within the second unit time; if the first determination result is yes, report the target data and reduce the remaining number of tokens by one; determine whether there is any touch point data that has not been reported to obtain a second determination result; if the second determination result is yes, acquire the next touch point data as the target data and return to the step of determining whether the remaining number of tokens is greater than zero to obtain the first determination result.

[0074] In some embodiments, after implementing the step of determining whether the number of remaining tokens is greater than zero and obtaining a first determination result, the processor 802 further implements the following steps:

[0075] If the first judgment result is no, the unreported touch point data is discarded.

[0076] In some embodiments, after the processor 802 implements the step of determining whether there is any unreported touch point data and obtaining the second determination result, it further implements the following steps:

[0077] If the second judgment result is no, the target data is repeatedly reported according to the remaining number of tokens.

[0078] In some embodiments, when the processor 802 implements the step of repeatedly reporting the target data according to the remaining number of tokens if the second judgment result is no, the processor 802 specifically implements the following steps:

[0079] Judging whether the remaining number of tokens is greater than zero according to the second unit time timing, obtaining a token judgment result; if the token judgment result is yes, repeatedly reporting the target data according to the remaining number of tokens; if the token judgment result is no, returning to execute judging whether the remaining number of tokens is greater than zero according to the second unit time timing, obtaining a token judgment result.

[0080] In some embodiments, after the processor 802 implements setting the number generated in the second unit time according to the first unit time, where the first unit time includes a plurality of second unit time steps, it further implements the following steps:

[0081] According to the second unit time timing, it is determined whether a screen touch event from the vehicle touch screen is detected within the second unit time to obtain a detection result; if the detection result is yes, the touch coordinate data is obtained according to the screen touch event.

[0082] In some embodiments, after the processor 802 implements the step of determining whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time and obtaining a detection determination result, the processor 802 further implements the following steps:

[0083] If the detection result is no, the touch point data reported last is repeatedly reported according to the number of tokens in the token bucket.

[0084] It should be understood that in the embodiment of the present invention, the processor 802 may be a central processing unit (CPU), and the processor 802 may also be 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. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0085] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0086] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:

[0087] Initialize the total number of tokens in the token bucket generated within the first unit time; set the number generated within the second unit time based on the first unit time, the first unit time includes multiple second unit times; report touch coordinate data from the vehicle touch screen based on the number of tokens in the token bucket; wherein the touch coordinate data includes multiple touch point data generated within the second unit time.

[0088] In one embodiment, when the processor executes the program instructions to implement the step of reporting the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket, the processor specifically implements the following steps:

[0089] Acquire one of the touch point data as the target data in chronological order; determine whether the remaining number of tokens is greater than zero to obtain a first determination result; wherein the remaining number of tokens is the remaining number of tokens in the token bucket within the second unit time; if the first determination result is yes, report the target data and reduce the remaining number of tokens by one; determine whether there is any touch point data that has not been reported to obtain a second determination result; if the second determination result is yes, acquire the next touch point data as the target data and return to the step of determining whether the remaining number of tokens is greater than zero to obtain the first determination result.

[0090] In one embodiment, after the processor executes the program instructions to determine whether the remaining number of tokens is greater than zero and obtains the first determination result, it further implements the following steps:

[0091] If the first judgment result is no, the unreported touch point data is discarded.

[0092] In one embodiment, the processor executes the program instructions to determine whether there is any unreported touch point data, and after obtaining the second determination result step, further implements the following steps:

[0093] If the second judgment result is no, the target data is repeatedly reported according to the remaining number of tokens.

[0094] In one embodiment, after the processor executes the program instructions to implement the step of repeatedly reporting the target data according to the remaining number of tokens if the second judgment result is no, it further implements the following steps:

[0095] Judging whether the remaining number of tokens is greater than zero according to the second unit time timing, obtaining a token judgment result; if the token judgment result is yes, repeatedly reporting the target data according to the remaining number of tokens; if the token judgment result is no, returning to execute judging whether the remaining number of tokens is greater than zero according to the second unit time timing, obtaining a token judgment result.

[0096] In one embodiment, the processor executes the program instructions to set the number generated in the second unit time according to the first unit time, and after the first unit time includes a plurality of second unit time steps, further implements the following steps:

[0097] According to the second unit time timing, it is determined whether a screen touch event from the vehicle touch screen is detected within the second unit time to obtain a detection result; if the detection result is yes, the touch coordinate data is obtained according to the screen touch event.

[0098] In one embodiment, after the processor executes the program instructions to determine whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time, and obtains the detection and determination result step, it further implements the following steps:

[0099] If the detection result is no, the touch point data reported last is repeatedly reported according to the number of tokens in the token bucket.

[0100] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0101] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0102] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0103] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention 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.

[0104] If the integrated 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 storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0105] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data reporting method based on a token bucket algorithm, characterized in that: The method is applied to a controller of a vehicle terminal, the vehicle terminal further comprising a vehicle touch screen in communication connection with the controller, the vehicle terminal is connected to a mobile terminal through a network, and the method comprises: Initialize the total number of tokens in the token bucket generated in the first unit time; The number of generated in a second unit time is set according to the first unit time, wherein the first unit time includes a plurality of second unit times; Reporting touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes a plurality of touch point data generated within the second unit time.

2. The data reporting method based on the token bucket algorithm according to claim 1 is characterized in that: The step of reporting the touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket includes: Acquire the touch point data one by one in chronological order as target data; Determine whether the remaining number of tokens is greater than zero, and obtain a first determination result; wherein the remaining number of tokens is the remaining number of tokens in the token bucket within the second unit time; If the first judgment result is yes, reporting the target data and reducing the remaining number of tokens by one; Determine whether there is any unreported touch point data, and obtain a second determination result; If the second judgment result is yes, the next touch point data is obtained as the target data and the process returns to the step of judging whether the remaining number of tokens is greater than zero to obtain the first judgment result.

3. The data reporting method based on the token bucket algorithm according to claim 2 is characterized in that: The step of determining whether the remaining number of tokens is greater than zero, after obtaining a first determination result, further includes: If the first judgment result is no, the unreported touch point data is discarded.

4. The data reporting method based on the token bucket algorithm according to claim 2 is characterized in that: The determining whether there is any unreported touch point data, after obtaining a second determination result, further includes: If the second judgment result is no, the target data is repeatedly reported according to the remaining number of tokens.

5. The data reporting method based on the token bucket algorithm according to claim 4 is characterized in that: If the second judgment result is no, then repeatedly reporting the target data according to the remaining number of tokens includes: Determine whether the remaining number of tokens is greater than zero according to the second unit time, and obtain a token determination result; If the token judgment result is yes, then repeatedly reporting the target data according to the remaining number of tokens; If the token judgment result is no, the process returns to the step of determining whether the remaining number of tokens is greater than zero according to the second unit time to obtain the token judgment result.

6. The data reporting method based on the token bucket algorithm according to claim 1, characterized in that: The step of setting the number of items generated in the second unit time according to the first unit time, wherein the first unit time includes a plurality of second unit times, further includes: determining whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time, and obtaining a detection and determination result; If the detection result is yes, the touch coordinate data is acquired according to the screen touch event.

7. The data reporting method based on the token bucket algorithm according to claim 6 is characterized in that: The method of determining whether a screen touch event from the vehicle touch screen is detected within the second unit time according to the second unit time, and obtaining the detection and determination result, further includes: If the detection result is no, the touch point data reported last is repeatedly reported according to the number of tokens in the token bucket.

8. A data reporting device based on a token bucket algorithm, characterized in that: The device is configured in a controller of a vehicle terminal, the vehicle terminal further comprises a vehicle touch screen that is communicatively connected to the controller, the vehicle terminal is connected to a mobile terminal through a network, and the device comprises: An initialization unit, used to initialize the total number of tokens generated in the token bucket within the first unit time; A setting unit, configured to set the number of items generated in a second unit time according to the first unit time, wherein the first unit time includes a plurality of second unit times; A data reporting unit is used to report touch coordinate data from the vehicle touch screen according to the number of tokens in the token bucket; wherein the touch coordinate data includes a plurality of touch point data generated within the second unit time.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data reporting method based on the token bucket algorithm according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the data reporting method based on the token bucket algorithm according to any one of claims 1 to 7.