WO2019071721A1 - 操作响应方法、装置和车载系统 - Google Patents
操作响应方法、装置和车载系统 Download PDFInfo
- Publication number
- WO2019071721A1 WO2019071721A1 PCT/CN2017/111958 CN2017111958W WO2019071721A1 WO 2019071721 A1 WO2019071721 A1 WO 2019071721A1 CN 2017111958 W CN2017111958 W CN 2017111958W WO 2019071721 A1 WO2019071721 A1 WO 2019071721A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- array
- empty
- accessed
- operation response
- module
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0736—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function
- G06F11/0742—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in functional embedded systems, i.e. in a data processing system designed as a combination of hardware and software dedicated to performing a certain function in a data processing system embedded in a mobile device, e.g. mobile phones, handheld devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
Definitions
- the present invention relates to the field of electronic technologies, and in particular, to an operation response method, apparatus, and vehicle system.
- the response speed of an electronic device to user operations and the stability of the system are important factors that affect the user experience.
- the electronic device In response to user operations, the electronic device needs to access the corresponding array.
- the array that is accessed by the user may be an empty array, and the access to the null pointer may occur, causing abnormal problems such as system stall, crash, crash, etc., thereby affecting the system. stability.
- a primary object of the present invention is to provide an operation response method, apparatus, and vehicle-mounted system, which are directed to solving anomalous problems such as jams, crashes, and crashes caused by accessing a null pointer, and improving system stability.
- an embodiment of the present invention provides an operation response method, where the method includes the following steps.
- the step of detecting whether the array to be accessed by the operation is empty is:
- the method further includes:
- the step of determining whether the array to be accessed by the operation is a frequently accessed array includes: when the array is a view view array, a package packages array, an activity activity array, a process proce ss array, or The thread thread array ⁇ determines that the array is an array with frequent access.
- the method further includes: directly accessing the array when the array is not an array with frequent access.
- the method further includes:
- the method is applied to an in-vehicle system.
- Embodiments of the present invention also provide an operation response apparatus, and the apparatus includes:
- a detecting module configured to detect whether an array to be accessed by the operation is empty
- a processing module configured to: when the array is empty, does not respond to the operation; when the array is not empty
- the detecting module includes:
- a reading unit configured to read a size of the array
- a determining unit configured to determine whether a size of the array is less than or equal to a threshold
- a determining unit configured to determine that the array is empty when the size of the array is less than or equal to a threshold ⁇ .
- the device further includes a determining module, where the determining module is configured to:
- the determining module is configured to: when the array is a view view array, a package package array, an activity activity array, a process process array, or a thread thread array, determine that the array is an frequently accessed array .
- the processing module is further configured to: directly access the array when the judgment result of the determining module is that the array is not an array with frequent access.
- the device further includes a prompting module, where the prompting module is configured to: when the array is empty, return prompt information.
- the device is applied to an in-vehicle system.
- Embodiments of the present invention also provide an in-vehicle system, the system including a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, the application The program is configured to perform the aforementioned operational response method.
- An operation response method provided by an embodiment of the present invention detects whether the array is empty before accessing the array, and does not respond to the operation when the array is empty, thereby preventing a null pointer from being accessed by the empty array. Access, avoiding abnormal problems such as stuck, crash, crash, etc. caused by accessing null pointers, improves system stability.
- FIG. 1 is a flow chart of a first embodiment of an operational response method of the present invention
- FIG. 2 is a flow chart of a second embodiment of the operation response method of the present invention.
- FIG. 3 is a block diagram showing a first embodiment of the operation response device of the present invention.
- FIG. 4 is a block diagram of the detection module of FIG. 3;
- FIG. 5 is a block diagram showing a second embodiment of the operation response device of the present invention.
- FIG. 6 is a block diagram showing a third embodiment of the operation response device of the present invention.
- terminal and terminal device used herein include both a device of a wireless signal receiver, a device having only a wireless signal receiver without a transmitting capability, and a receiving and receiving device.
- Such a device may comprise: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Persona 1 Communications Service), which may combine voice, Data processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, notepads, calendars and/or GPS ( Global Positioning System, Receiver; Conventional laptop and/or palmtop computer or other device having a conventional laptop and/or palmtop computer or other device that includes and/or includes a radio frequency receiver.
- PCS Personala 1 Communications Service
- PDA Personal Digital Assistant
- terminal may be portable, transportable, installed in a vehicle (aviation, sea and/or land), or adapted and/or configured to operate locally, and/or Run in any other location on the Earth and/or space in a distributed fashion.
- the "terminal” and “terminal device” used may also be a communication terminal, an internet terminal, a music/video playing terminal, and may be, for example, a PDA, a MID (Mobile Internet Device), and/or a music/video playing function.
- Mobile phones can also be smart TVs, set-top boxes and other devices.
- the operation response method and apparatus of the embodiments of the present invention can be applied to various electronic devices, including a mobile terminal such as an in-vehicle system, a mobile phone, a tablet, a computer terminal such as a personal computer or a notebook computer, and the like. limited.
- a mobile terminal such as an in-vehicle system
- a mobile phone such as a mobile phone, a tablet
- a computer terminal such as a personal computer or a notebook computer, and the like. limited.
- the following is a detailed description of the application to the in-vehicle system.
- the operation response method includes the following steps:
- step S11 when the user operates the in-vehicle system, the in-vehicle system determines an array to be accessed by the operation according to the operation of the user, and detects whether the array is empty. Specifically, the in-vehicle system reads the size of the array, and determines whether the size of the array is less than or equal to the threshold; when the size of the array is less than or equal to the threshold
- the threshold can be set according to actual needs, for example, it can be set to 0-100B.
- step S12 when it is detected that the array is empty, the in-vehicle system does not respond to the operation, and does not access the array, thereby preventing access to the null pointer and causing abnormal phenomena such as stuck, crash, crash, etc., and improving system stability. Sex.
- step S13 when it is detected that the array is not empty, the in-vehicle system responds to the operation and accesses the array.
- the in-vehicle system may also return a prompt message, such as "this operation fails, please re-operation", "this operation is abnormal, please re-operation", " Please re-operate "etc.” to let the user know that the operation is abnormal, then re-operate to avoid the user's long wait for the vehicle system to respond and waste the time, which improves the user experience.
- a prompt message such as "this operation fails, please re-operation", "this operation is abnormal, please re-operation”, " Please re-operate "etc.”
- step S10 Determine whether the array to be accessed in this operation is an array with frequent access.
- step S11 When the array is a frequently accessed array, go to the next step S11; when the array is not a frequently accessed array, go directly to step S13, that is, if the array is not empty, directly respond to this operation and access the array.
- step S13 that is, if the array is not empty, directly respond to this operation and access the array.
- other operations may be performed, which are not limited by the present invention.
- the array to be accessed is a view array, a package array, an activity array, a process array, or a thread array
- the array is determined to be Access frequently arrays.
- other arrays may be accessed frequently, and other arrays are identified as frequently accessed arrays.
- this embodiment Considering that the probability of an empty array being frequently accessed is relatively large, this embodiment only detects whether an frequently accessed array is empty, so as to improve response efficiency.
- the operation response method of the embodiment of the present invention detects whether the array is empty before accessing the array, and does not respond to the operation when the array is empty, thereby preventing null pointer access from accessing the empty array, thereby avoiding Anomalous problems such as stuck, crashes, crashes, etc. caused by accessing null pointers improve the stability of the system.
- the apparatus includes a detection module 10 and a processing module 20, wherein: the detection module 10 is configured to detect whether an array to be accessed by the operation is empty.
- the processing module 20 is configured to: when the array to be accessed in this operation is empty, does not respond to the operation; when the array is not empty, the operation is responded to.
- the detecting module 10 determines an array to be accessed by the operation according to the operation of the user, and detects whether the array is empty.
- the detecting module 10 includes a reading unit 11, a determining unit 12, and a determining unit 13, wherein: the reading unit 11 is configured to read the size of the array to be accessed by the operation.
- the determining unit 12 is configured to determine whether the size of the array is less than or equal to a threshold; the determining unit 13 is configured to determine that the array is empty when the size of the array is less than or equal to a threshold ;; when the size of the array is greater than a threshold, Determine that the array is not empty.
- the threshold can be set according to actual needs, for example, it can be set to 0-100B.
- the detecting module 10 can also detect whether the array is empty by using other methods in the prior art. The invention is not described here in detail.
- the processing module 20 accesses the array in response to the operation, traversing each element in the array.
- the processing module 20 does not respond to the operation, and does not access the array, thereby preventing access to the null pointer and causing abnormalities such as stagnation, crash, and crash, thereby improving system stability.
- the apparatus further includes a prompting module 30 for: returning the prompt information when the array is empty.
- the prompt information may be voice information, text information, and/or image information.
- the prompt information such as "this operation failed, please re-operation”, "this operation is abnormal, please re-operation”, "please re-operation”, etc., so that the user knows that the operation is abnormal, then re-do Operation, to avoid the user's long wait for the on-board system to respond to waste of time, improve the user experience.
- the apparatus further includes a determining module 40, configured to: determine whether the array to be accessed in this operation is The frequent array is accessed, and when the array is an array that is frequently accessed, the detection module 10 is notified to cause the detection module 10 to determine whether the array is empty.
- the decision module 40 notifies the processing module 20, and the processing module 20 directly responds to the operation and directly accesses the array.
- the processing module 20 can perform other operations, which is not limited by the present invention.
- the determining module 40 determines This array is an array that is accessed frequently.
- the judgment module 40 identifies other arrays as frequently accessed arrays.
- this embodiment only detects whether an frequently accessed array is empty, so as to improve response efficiency.
- the prompting module 30 of FIG. 6 may also be omitted to form a new embodiment.
- the operation response apparatus of the embodiment of the present invention detects whether the array is empty before accessing the array, and does not respond to the operation when the array is empty, thereby preventing null pointer access from accessing the empty array, thereby avoiding Accessing null pointers causes abnormalities such as catastrophes, crashes, and crashes, which improves system stability.
- the present invention also provides an in-vehicle system including a memory, a processor, and at least one An application stored in the memory and configured to be executed by the processor, the application being configured to perform an operational response method.
- the operation response method includes the following steps: detecting whether the array to be accessed by the operation is empty; when the array is empty, the operation is not responded; when the array is not empty, the operation is responded to.
- the operation response method described in this embodiment is the operation response method involved in the foregoing embodiment of the present invention, and details are not described herein again.
- the in-vehicle system of the embodiment of the present invention detects whether the array is empty before accessing the array, and does not respond to the operation when the array is empty, thereby preventing null pointer access when accessing the empty array, thereby avoiding access.
- the null pointer causes abnormal problems such as catastrophic, crash, and crash, which improves the stability of the system.
- the present invention includes apparatus related to performing one or more of the operations described herein.
- These devices may be specially designed and manufactured for the required purposes, or may also include known devices in a general purpose computer.
- These devices have computer programs stored therein that are selectively activated or reconfigured.
- Such computer programs may be stored in a device (eg, computer) readable medium or in any type of medium suitable for storing electronic instructions and respectively coupled to a bus, including but not limited to any Types of disks (including floppy disks, hard disks, CDs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only)
- a readable medium includes any medium that is stored or transmitted by a device (e.g., a computer) in a readable form.
- each block of the block diagrams and/or block diagrams and/or flow diagrams can be implemented by computer program instructions, and/or in the block diagrams and/or block diagrams and/or flow diagrams. The combination of boxes.
- these computer program instructions can be implemented by a general purpose computer, a professional computer, or a processor of other programmable data processing methods, such that the processor is executed by a computer or other programmable data processing method.
- the block diagrams and/or block diagrams of the invention and/or the schemes specified in the blocks or blocks of the flow diagram are invented.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
一种操作响应方法,所述方法包括以下步骤:检测本次操作拟访问的数组是否为空(S11);当数组为空时,不予响应本次操作(S12);当数组不为空时,响应本次操作(S13)。上述操作响应方法,通过在访问数组之前先检测该数组是否为空,当数组为空时则不响应本次操作,从而防止访问空数组时出现空指针访问。
Description
操作响应方法、 装置和车载系统 技术领域
[0001] 本发明涉及电子技术领域, 特别是涉及到一种操作响应方法、 装置和车载系统 背景技术
[0002] 随着电子技术的发展, 电子设备已广泛应用于人类生活中的各个方面, 包括应 用于车辆的车载系统, 应用于生活娱乐的手机、 平板等移动终端, 应用于工作 的个人电脑、 笔记本电脑等计算机终端, 等等。
[0003] 电子设备对用户操作的响应速度和系统的稳定性, 是影响用户体验的重要因素 。 电子设备在响应用户操作吋, 需要访问对应的数组, 然而有吋访问的数组可 能是空数组, 就会出现访问空指针的情况, 导致系统卡顿、 崩溃、 死机等异常 问题, 从而影响系统的稳定性。
技术问题
[0004] 本发明的主要目的为提供一种操作响应方法、 装置和车载系统, 旨在解决访问 空指针导致的卡顿、 崩溃、 死机等异常问题, 提高系统的稳定性。
问题的解决方案
技术解决方案
[0005] 为达以上目的, 本发明实施例提出一种操作响应方法, 所述方法包括以下步骤
[0006] 检测本次操作拟访问的数组是否为空;
[0007] 当所述数组为空吋, 不予响应本次操作;
[0008] 当所述数组不为空吋, 响应本次操作。
[0009] 可选地, 所述检测本次操作拟访问的数组是否为空的步骤包括:
[0010] 读取所述数组的大小;
[0011] 判断所述数组的大小是否小于或等于阈值;
[0012] 当所述数组的大小小于或等于阈值吋, 判定所述数组为空。
[0013] 可选地, 所述检测本次操作拟访问的数组是否为空的步骤之前还包括:
[0014] 判断本次操作拟访问的数组是否为访问频繁的数组;
[0015] 当所述数组为访问频繁的数组吋, 进入下一步骤: 检测本次操作拟访问的数组 是否为空。
[0016] 可选地, 所述判断本次操作拟访问的数组是否为访问频繁的数组的步骤包括: 当所述数组为视图 view数组、 软件包 packages数组、 活动 activity数组、 进程 proce ss数组或线程 thread数组吋, 判定所述数组为访问频繁的数组。
[0017] 可选地, 所述判断本次操作拟访问的数组是否为访问频繁的数组的步骤之后还 包括: 当所述数组不是访问频繁的数组吋, 直接访问所述数组。
[0018] 可选地, 所述检测本次操作拟访问的数组是否为空的步骤之后还包括:
[0019] 当所述数组为空吋, 返回提示信息。
[0020] 可选地, 所述方法应用于车载系统。
[0021] 本发明实施例同吋提出一种操作响应装置, 所述装置包括:
[0022] 检测模块, 用于检测本次操作拟访问的数组是否为空;
[0023] 处理模块, 用于当所述数组为空吋, 不予响应本次操作; 当所述数组不为空吋
, 响应本次操作。
[0024] 可选地, 所述检测模块包括:
[0025] 读取单元, 用于读取所述数组的大小;
[0026] 判断单元, 用于判断所述数组的大小是否小于或等于阈值;
[0027] 判决单元, 用于当所述数组的大小小于或等于阈值吋, 判定所述数组为空。
[0028] 可选地, 所述装置还包括判断模块, 所述判断模块用于:
[0029] 判断本次操作拟访问的数组是否为访问频繁的数组, 当所述数组为访问频繁的 数组吋, 通知所述检测模块, 以使所述检测模块判断所述数组是否为空。
[0030] 可选地, 所述判断模块用于: 当所述数组为视图 view数组、 软件包 packages数 组、 活动 activity数组、 进程 process数组或线程 thread数组吋, 判定所述数组为访 问频繁的数组。
[0031] 可选地, 所述处理模块还用于: 当所述判断模块的判断结果为所述数组不是访 问频繁的数组吋, 直接访问所述数组。
[0032] 可选地, 所述装置还包括提示模块, 所述提示模块用于: 当所述数组为空吋, 返回提示信息。
[0033] 可选地, 所述装置应用于车载系统。
[0034] 本发明实施例同吋提出一种车载系统, 所述系统包括存储器、 处理器和至少一 个被存储在所述存储器中并被配置为由所述处理器执行的应用程序, 所述应用 程序被配置为用于执行前述操作响应方法。
发明的有益效果
有益效果
[0035] 本发明实施例所提供的一种操作响应方法, 通过在访问数组之前先检测该数组 是否为空, 当数组为空吋则不响应本次操作, 从而防止访问空数组吋出现空指 针访问, 避免了访问空指针导致的卡顿、 崩溃、 死机等异常问题, 提高了系统 的稳定性。
对附图的简要说明
附图说明
[0036] 图 1是本发明的操作响应方法第一实施例的流程图;
[0037] 图 2是本发明的操作响应方法第二实施例的流程图;
[0038] 图 3是本发明的操作响应装置第一实施例的模块示意图;
[0039] 图 4是图 3中的检测模块的模块示意图;
[0040] 图 5是本发明的操作响应装置第二实施例的模块示意图;
[0041] 图 6是本发明的操作响应装置第三实施例的模块示意图。
[0042] 本发明目的的实现、 功能特点及优点将结合实施例, 参照附图做进一步说明。
实施该发明的最佳实施例
本发明的最佳实施方式
[0043] 应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于限定本发 明。
[0044] 下面详细描述本发明的实施例, 所述实施例的示例在附图中示出, 其中自始至 终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。 下
面通过参考附图描述的实施例是示例性的, 仅用于解释本发明, 而不能解释为 对本发明的限制。
[0045] 本技术领域技术人员可以理解, 除非特意声明, 这里使用的单数形式"一"、 " 一个"、 "所述 "和"该"也可包括复数形式。 应该进一步理解的是, 本发明的说明 书中使用的措辞"包括"是指存在所述特征、 整数、 步骤、 操作、 元件和 /或组件 , 但是并不排除存在或添加一个或多个其他特征、 整数、 步骤、 操作、 元件、 组件和 /或它们的组。 应该理解, 当我们称元件被"连接"或"耦接"到另一元件吋 , 它可以直接连接或耦接到其他元件, 或者也可以存在中间元件。 此外, 这里 使用的"连接"或"耦接"可以包括无线连接或无线耦接。 这里使用的措辞 "和 /或"包 括一个或更多个相关联的列出项的全部或任一单元和全部组合。
[0046] 本技术领域技术人员可以理解, 除非另外定义, 这里使用的所有术语 (包括技 术术语和科学术语) , 具有与本发明所属领域中的普通技术人员的一般理解相 同的意义。 还应该理解的是, 诸如通用字典中定义的那些术语, 应该被理解为 具有与现有技术的上下文中的意义一致的意义, 并且除非像这里一样被特定定 义, 否则不会用理想化或过于正式的含义来解释。
[0047] 本技术领域技术人员可以理解, 这里所使用的 "终端"、 "终端设备"既包括无线 信号接收器的设备, 其仅具备无发射能力的无线信号接收器的设备, 又包括接 收和发射硬件的设备, 其具有能够在双向通信链路上, 执行双向通信的接收和 发射硬件的设备。 这种设备可以包括: 蜂窝或其他通信设备, 其具有单线路显 示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备; PCS (Persona 1 Communications Service, 个人通信系统) , 其可以组合语音、 数据处理、 传真 和 /或数据通信能力; PDA (Personal Digital Assistant, 个人数字助理) , 其可以 包括射频接收器、 寻呼机、 互联网 /内联网访问、 网络浏览器、 记事本、 日历和 / 或 GPS (Global Positioning System, 全球定位系统) 接收器; 常规膝上型和 /或掌 上型计算机或其他设备, 其具有和 /或包括射频接收器的常规膝上型和 /或掌上型 计算机或其他设备。 这里所使用的 "终端"、 "终端设备"可以是便携式、 可运输、 安装在交通工具 (航空、 海运和 /或陆地) 中的, 或者适合于和 /或配置为在本地 运行, 和 /或以分布形式, 运行在地球和 /或空间的任何其他位置运行。 这里所使
用的"终端"、 "终端设备"还可以是通信终端、 上网终端、 音乐 /视频播放终端, 例如可以是 PDA、 MID (Mobile Internet Device, 移动互联网设备) 和 /或具有音 乐 /视频播放功能的移动电话, 也可以是智能电视、 机顶盒等设备。
[0048] 本发明实施例的操作响应方法和装置, 可以应用于各种电子设备, 包括车载系 统, 手机、 平板等移动终端, 个人电脑、 笔记本电脑等计算机终端, 等等, 本 发明对此不作限定。 以下以应用于车载系统为例进行详细说明。
[0049] 参照图 1, 提出本发明的操作响应方法第一实施例, 所述操作响应方法包括以 下步骤:
[0050] Sl l、 检测本次操作拟访问的数组是否为空。 当数组为空吋, 进入步骤 S12; 当 数组不为空吋, 进入步骤 S13。
[0051] S12、 不予响应本次操作。
[0052] S13、 响应本次操作。
[0053] 步骤 S11中, 当用户对车载系统进行操作吋, 车载系统根据用户的操作确定本 次操作拟访问的数组, 并检测该数组是否为空。 具体的, 车载系统读取数组的 大小, 判断数组的大小是否小于或等于阈值; 当数组的大小小于或等于阈值吋
, 判断数组为空; 当数组的大小大于阈值吋, 判定数组不为空。 阈值可以根据 实际需要设定, 例如可以设定为 0-100B。
[0054] 此外, 也可以采用现有技术中的其它方式来检测数组是否为空, 本发明在此不 在一一列举赘述。
[0055] 步骤 S12中, 当检测到数组为空吋, 车载系统则不予响应本次操作, 不访问该 数组, 从而防止访问空指针而出现卡顿、 崩溃、 死机等异常现象, 提高系统稳 定性。
[0056] 步骤 S13中, 当检测到数组不为空吋, 车载系统则响应本次操作, 访问该数组
, 遍历该数组中的每一个元素。
[0057] 进一步地, 当检测到数组为空吋, 车载系统还可以返回提示信息, 所述提示信 息如"本次操作失败, 请重新操作"、 "本次操作异常, 请重新操作"、 "请重新操 作"等, 以使用户得知本次操作异常, 则重新进行操作, 避免用户长吋间等待车 载系统响应而浪费吋间, 提升了用户体验。
[0058] 进一步地, 如图 2所示, 在本发明的操作响应方法第二实施例中, 步骤 S11之前 还包括以下步骤:
[0059] S10、 判断本次操作拟访问的数组是否为访问频繁的数组。 当该数组是访问频 繁的数组吋, 进入下一步骤 S11 ; 当该数组不是访问频繁的数组吋, 直接进入步 骤 S13, 即不对数组是否为空进行检测, 直接响应本次操作, 访问该数组。 当然 , 当该数组不是访问频繁的数组吋, 也可以做其它操作, 本发明对此不作限定
[0060] 可选地, 当拟访问的数组为视图 (view) 数组、 软件包 (packages) 数组、 活 动 (activity) 数组、 进程 (process) 数组或线程 (thread) 数组吋, 则判定该数 组为访问频繁的数组。 当然, 根据实际需要, 也可能其它数组访问频繁, 则将 其它数组认定为访问频繁的数组。
[0061] 考虑到通常访问频繁的数组出现空数组的几率比较大, 因此本实施例只对访问 频繁的数组是否为空进行检测, 以提高响应效率。
[0062] 本发明实施例的操作响应方法, 通过在访问数组之前先检测该数组是否为空, 当数组为空吋则不响应本次操作, 从而防止访问空数组吋出现空指针访问, 避 免了访问空指针导致的卡顿、 崩溃、 死机等异常问题, 提高了系统的稳定性。
[0063] 参照图 3, 提出本发明的操作响应装置第一实施例, 所述装置包括检测模块 10 和处理模块 20, 其中: 检测模块 10, 用于检测本次操作拟访问的数组是否为空 ; 处理模块 20, 用于当本次操作拟访问的数组为空吋, 不予响应本次操作; 当 数组不为空吋, 响应本次操作。
[0064] 本发明实施例中, 当用户对车载系统进行操作吋, 检测模块 10则根据用户的操 作确定本次操作拟访问的数组, 并检测该数组是否为空。
[0065] 可选地, 如图 4所示, 检测模块 10包括读取单元 11、 判断单元 12和判决单元 13 , 其中: 读取单元 11, 用于读取本次操作拟访问的数组的大小; 判断单元 12, 用于判断该数组的大小是否小于或等于阈值; 判决单元 13, 用于当该数组的大 小小于或等于阈值吋, 判定该数组为空; 当该数组的大小大于阈值吋, 判定该 数组不为空。 阈值可以根据实际需要设定, 例如可以设定为 0-100B。
[0066] 此外, 检测模块 10也可以采用现有技术中的其它方式来检测数组是否为空, 本
发明在此不在一一列举赘述。
[0067] 当检测到数组不为空吋, 处理模块 20则响应本次操作, 访问该数组, 遍历该数 组中的每一个元素。 当检测到数组为空吋, 处理模块 20则不予响应本次操作, 不访问该数组, 从而防止访问空指针而出现卡顿、 崩溃、 死机等异常现象, 提 高系统稳定性。
[0068] 进一步地, 如图 5所示, 在本发明的操作响应装置第二实施例中, 该装置还包 括提示模块 30, 其用于: 当数组为空吋, 返回提示信息。 所述提示信息可以是 语音信息、 文字信息和 /或图像信息。
[0069] 所述提示信息如"本次操作失败, 请重新操作"、 "本次操作异常, 请重新操作" 、 "请重新操作 "等, 以使用户得知本次操作异常, 则重新进行操作, 避免用户长 吋间等待车载系统响应而浪费吋间, 提升了用户体验。
[0070] 进一步地, 如图 6所示, 在本发明的操作响应装置第三实施例中, 该装置还包 括判断模块 40, 该判断模块 40用于: 判断本次操作拟访问的数组是否为访问频 繁的数组, 当数组为访问频繁的数组吋, 通知检测模块 10, 以使检测模块 10判 断该数组是否为空。 当数组不是访问频繁的数组吋, 判断模块 40则通知处理模 块 20, 处理模块 20则直接响应本次操作, 直接访问该数组。 当然, 当数组不是 访问频繁的数组吋, 处理模块 20也可以做其它操作, 本发明对此不作限定。
[0071] 可选地, 当拟访问的数组为视图 (view) 数组、 软件包 (packages) 数组、 活 动 (activity) 数组、 进程 (process) 数组或线程 (thread) 数组吋, 判断模块 40 则判定该数组为访问频繁的数组。 当然, 根据实际需要, 也可能其它数组访问 频繁, 判断模块 40则将其它数组认定为访问频繁的数组。
[0072] 考虑到通常访问频繁的数组出现空数组的几率比较大, 因此本实施例只对访问 频繁的数组是否为空进行检测, 以提高响应效率。
[0073] 在某些实施例中, 也可以省略图 6中的提示模块 30, 形成新的实施例。
[0074] 本发明实施例的操作响应装置, 通过在访问数组之前先检测该数组是否为空, 当数组为空吋则不响应本次操作, 从而防止访问空数组吋出现空指针访问, 避 免了访问空指针导致的卡顿、 崩溃、 死机等异常现象, 提高了系统的稳定性。
[0075] 本发明同吋提出一种车载系统, 所述车载系统包括存储器、 处理器和至少一个
被存储在存储器中并被配置为由处理器执行的应用程序, 所述应用程序被配置 为用于执行操作响应方法。 所述操作响应方法包括以下步骤: 检测本次操作拟 访问的数组是否为空; 当数组为空吋, 不予响应本次操作; 当数组不为空吋, 响应本次操作。 本实施例中所描述的操作响应方法为本发明中上述实施例所涉 及的操作响应方法, 在此不再赘述。
[0076] 本发明实施例的车载系统, 通过在访问数组之前先检测该数组是否为空, 当数 组为空吋则不响应本次操作, 从而防止访问空数组吋出现空指针访问, 避免了 访问空指针导致的卡顿、 崩溃、 死机等异常问题, 提高了系统的稳定性。
[0077] 本领域技术人员可以理解, 本发明包括涉及用于执行本申请中所述操作中的一 项或多项的设备。 这些设备可以为所需的目的而专门设计和制造, 或者也可以 包括通用计算机中的已知设备。 这些设备具有存储在其内的计算机程序, 这些 计算机程序选择性地激活或重构。 这样的计算机程序可以被存储在设备 (例如 , 计算机) 可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何 类型的介质中, 所述计算机可读介质包括但不限于任何类型的盘 (包括软盘、 硬盘、 光盘、 CD-ROM、 和磁光盘) 、 ROM (Read-Only Memory , 只读存储器 ) 、 RAM (Random Access Memory , 随机存储器) 、 EPROM (Erasable Programmable Read-Only
Memory , 可擦写可编程只读存储器) 、 EEPROM (Electrically Erasable Programmable Read-Only Memory , 电可擦可编程只读存储器) 、 闪存、 磁性卡 片或光线卡片。 也就是, 可读介质包括由设备 (例如, 计算机) 以能够读的形 式存储或传输信息的任何介质。
[0078] 本技术领域技术人员可以理解, 可以用计算机程序指令来实现这些结构图和 / 或框图和 /或流图中的每个框以及这些结构图和 /或框图和 /或流图中的框的组合。 本技术领域技术人员可以理解, 可以将这些计算机程序指令提供给通用计算机 、 专业计算机或其他可编程数据处理方法的处理器来实现, 从而通过计算机或 其他可编程数据处理方法的处理器来执行本发明公幵的结构图和 /或框图和 /或流 图的框或多个框中指定的方案。
[0079] 本技术领域技术人员可以理解, 本发明中已经讨论过的各种操作、 方法、 流程
中的步骤、 措施、 方案可以被交替、 更改、 组合或刪除。 进一步地, 具有本发 明中已经讨论过的各种操作、 方法、 流程中的其他步骤、 措施、 方案也可以被 交替、 更改、 重排、 分解、 组合或刪除。 进一步地, 现有技术中的具有与本发 明中公幵的各种操作、 方法、 流程中的步骤、 措施、 方案也可以被交替、 更改 、 重排、 分解、 组合或刪除。
以上参照附图说明了本发明的优选实施例, 并非因此局限本发明的权利范围。 本领域技术人员不脱离本发明的范围和实质, 可以有多种变型方案实现本发明 , 比如作为一个实施例的特征可用于另一实施例而得到又一实施例。 凡在运用 本发明的技术构思之内所作的任何修改、 等同替换和改进, 均应在本发明的权 利范围之内。
Claims
权利要求书
一种操作响应方法, 其特征在于, 包括以下步骤:
检测本次操作拟访问的数组是否为空;
当所述数组为空吋, 不予响应本次操作;
当所述数组不为空吋, 响应本次操作。
根据权利要求 1所述的操作响应方法, 其特征在于, 所述检测本次操 作拟访问的数组是否为空的步骤包括:
读取所述数组的大小;
判断所述数组的大小是否小于或等于阈值;
当所述数组的大小小于或等于阈值吋, 判定所述数组为空。
根据权利要求 1所述的操作响应方法, 其特征在于, 所述检测本次操 作拟访问的数组是否为空的步骤之前还包括:
判断本次操作拟访问的数组是否为访问频繁的数组;
当所述数组为访问频繁的数组吋, 进入下一步骤: 检测本次操作拟访 问的数组是否为空。
根据权利要求 3所述的操作响应方法, 其特征在于, 所述判断本次操 作拟访问的数组是否为访问频繁的数组的步骤包括:
当所述数组为视图 view数组、 软件包 packages数组、 活动 activity数组 、 进程 process数组或线程 thread数组吋, 判定所述数组为访问频繁的 数组。
根据权利要求 3所述的操作响应方法, 其特征在于, 所述判断本次操 作拟访问的数组是否为访问频繁的数组的步骤之后还包括: 当所述数组不是访问频繁的数组吋, 直接访问所述数组。
根据权利要求 1所述的操作响应方法, 其特征在于, 所述检测本次操 作拟访问的数组是否为空的步骤之后还包括:
当所述数组为空吋, 返回提示信息。
根据权利要求 1所述的操作响应方法, 其特征在于, 所述方法应用于 车载系统。
一种操作响应装置, 其特征在于, 包括:
检测模块, 用于检测本次操作拟访问的数组是否为空;
处理模块, 用于当所述数组为空吋, 不予响应本次操作; 当所述数组 不为空吋, 响应本次操作。
根据权利要 8所述的操作响应装置, 其特征在于, 所述检测模块包括 读取单元, 用于读取所述数组的大小;
判断单元, 用于判断所述数组的大小是否小于或等于阈值; 判决单元, 用于当所述数组的大小小于或等于阈值吋, 判定所述数组 为空。
根据权利要求 8所述的操作响应装置, 其特征在于, 所述装置还包括 判断模块, 所述判断模块用于:
判断本次操作拟访问的数组是否为访问频繁的数组, 当所述数组为访 问频繁的数组吋, 通知所述检测模块, 以使所述检测模块判断所述数 组是否为空。
根据权利要求 10所述的操作响应装置, 其特征在于, 所述判断模块用 于: 当所述数组为视图 view数组、 软件包 packages数组、 活动 activity 数组、 进程 process数组或线程 thread数组吋, 判定所述数组为访问频 繁的数组。
根据权利要求 10所述的操作响应装置, 其特征在于, 所述处理模块还 用于: 当所述判断模块的判断结果为所述数组不是访问频繁的数组吋 , 直接访问所述数组。
根据权利要求 8所述的操作响应装置, 其特征在于, 所述装置还包括 提示模块, 所述提示模块用于: 当所述数组为空吋, 返回提示信息。 根据权利要求 8所述的操作响应装置, 其特征在于, 所述装置应用于 车载系统。
一种车载系统, 包括存储器、 处理器和至少一个被存储在所述存储器 中并被配置为由所述处理器执行的应用程序, 其特征在于, 所述应用
程序被配置为用于执行权利要求 1所述的操作响应方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710931643.1 | 2017-10-09 | ||
CN201710931643.1A CN107678877B (zh) | 2017-10-09 | 2017-10-09 | 操作响应方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019071721A1 true WO2019071721A1 (zh) | 2019-04-18 |
Family
ID=61137984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/111958 WO2019071721A1 (zh) | 2017-10-09 | 2017-11-20 | 操作响应方法、装置和车载系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107678877B (zh) |
WO (1) | WO2019071721A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409739A (zh) * | 2007-10-12 | 2009-04-15 | 中兴通讯股份有限公司 | 一种优化的手机电话本数据访问方法 |
CN101470665A (zh) * | 2007-12-27 | 2009-07-01 | Tcl集团股份有限公司 | 一种无mmu平台的应用系统内存管理的方法及系统 |
CN102609477A (zh) * | 2012-01-19 | 2012-07-25 | 北京神州数码思特奇信息技术股份有限公司 | 一种流水号生成器的实现方法 |
CN106843806A (zh) * | 2016-12-20 | 2017-06-13 | 中国科学院信息工程研究所 | 一种多核环境下基于数组结构的无等待栈操作方法 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102479210A (zh) * | 2010-11-30 | 2012-05-30 | 金蝶软件(中国)有限公司 | 一种在集合中添加数据的处理方法、装置、终端 |
EP2720391B8 (en) * | 2012-10-12 | 2015-03-18 | Alcatel Lucent | Optical transport network power-save technique based on client signal information |
CN104935452B (zh) * | 2014-03-21 | 2018-05-11 | 成都鼎桥通信技术有限公司 | 一种基于pool组网的数字集群系统实现方法 |
CN107172391A (zh) * | 2017-05-19 | 2017-09-15 | 常州普适信息科技有限公司 | 基于Hadoop架构的分布式视频存储管理方法及系统 |
-
2017
- 2017-10-09 CN CN201710931643.1A patent/CN107678877B/zh active Active
- 2017-11-20 WO PCT/CN2017/111958 patent/WO2019071721A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409739A (zh) * | 2007-10-12 | 2009-04-15 | 中兴通讯股份有限公司 | 一种优化的手机电话本数据访问方法 |
CN101470665A (zh) * | 2007-12-27 | 2009-07-01 | Tcl集团股份有限公司 | 一种无mmu平台的应用系统内存管理的方法及系统 |
CN102609477A (zh) * | 2012-01-19 | 2012-07-25 | 北京神州数码思特奇信息技术股份有限公司 | 一种流水号生成器的实现方法 |
CN106843806A (zh) * | 2016-12-20 | 2017-06-13 | 中国科学院信息工程研究所 | 一种多核环境下基于数组结构的无等待栈操作方法 |
Also Published As
Publication number | Publication date |
---|---|
CN107678877B (zh) | 2020-12-22 |
CN107678877A (zh) | 2018-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9460735B2 (en) | Intelligent ancillary electronic device | |
US9438465B2 (en) | Determining the context of a computing device | |
US10002528B2 (en) | IR communication method and electronic device thereof | |
WO2019183791A1 (zh) | 同步信号块传输方法、设备及存储介质 | |
US20080020747A1 (en) | Alarm systems having multiple communication alternatives for contacting a monitoring service and methods of operating the same | |
WO2019085312A9 (zh) | 移动终端防盗方法、装置、设备以及计算机可读存储介质 | |
WO2017071579A1 (zh) | Android系统漏洞挖掘的方法及装置 | |
KR20150025609A (ko) | 저전력으로 위치 변화를 측정하는 전자 장치 및 방법 | |
CN107832874A (zh) | 一种天气提醒方法、装置、设备及计算机可读存储介质 | |
JP2019185771A (ja) | ブルートゥーススピーカーデータ処理の方法、装置及びブルートゥーススピーカー | |
US8095817B2 (en) | Information processing apparatus that maintains sound controller in power saving mode when speaker is set in volume full-mute state | |
US20110021144A1 (en) | Method and device for testing bluetooth function of electronic device | |
CN111176744A (zh) | 电子设备控制方法、装置、终端及存储介质 | |
CN107526512B (zh) | 用于电子设备的切换方法和系统 | |
JP2003319443A (ja) | 位置特定システム、移動通信端末、位置サーバおよびコンピュータプログラム | |
WO2019071721A1 (zh) | 操作响应方法、装置和车载系统 | |
US8893152B2 (en) | Application registration with a non-OS service | |
US8588871B1 (en) | Signal detect battery saver | |
CN110365446A (zh) | 在ofdm系统中对抢占的资源盲检的电子装置和方法 | |
CN106851535B (zh) | 多系统共享蓝牙的方法及装置 | |
CN116601620A (zh) | 消息通知方法及装置 | |
CN104954583A (zh) | 一种终端 | |
US20040003145A1 (en) | Method and apparatus to transfer information | |
US20120052927A1 (en) | System and method for managing mobile device power supply | |
US20050220008A1 (en) | Host fail-over switch presence detection compatible with existing protocol and host controllers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17928169 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17928169 Country of ref document: EP Kind code of ref document: A1 |