WO2015192447A1 - 一种数据处理方法、装置和终端 - Google Patents

一种数据处理方法、装置和终端 Download PDF

Info

Publication number
WO2015192447A1
WO2015192447A1 PCT/CN2014/084168 CN2014084168W WO2015192447A1 WO 2015192447 A1 WO2015192447 A1 WO 2015192447A1 CN 2014084168 W CN2014084168 W CN 2014084168W WO 2015192447 A1 WO2015192447 A1 WO 2015192447A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation instruction
text information
keyword
information
executing
Prior art date
Application number
PCT/CN2014/084168
Other languages
English (en)
French (fr)
Inventor
吕何平
杨清峰
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to US15/318,467 priority Critical patent/US20170154068A1/en
Priority to EP14895056.1A priority patent/EP3156915A4/en
Publication of WO2015192447A1 publication Critical patent/WO2015192447A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, and terminal.
  • BACKGROUND OF THE INVENTION Speech technology has developed rapidly, and speech technology involves various aspects of speech recognition. Based on voice recognition technology, users can perform shortcut operations and reduce the time to launch an application or service. For example: After the user voice input "Open Address Book", the terminal can quickly open the address book after recognizing the voice data.
  • the complexity of speech recognition technology is high, the accuracy of recognition needs to be improved, and there are certain requirements for the surrounding environment, such as: a relatively quiet environment is required.
  • some engines need to exchange information through the network in order to obtain subsequent action instructions to achieve the purpose of quickly launching an application or service, and are not friendly to the actual operation of the user.
  • speech recognition is limited, and if the user wants to perform For quick operation, you can only open the corresponding application manually, and input the operation you want to perform in the application. This will not be the purpose of quickly launching the application or service. For example: When the user wants to search for the location where the A address is located, when the voice recognition is restricted, the map application can be manually opened, and the A address is searched for, and the location where the A address is located is complicated, and the user experience is not good.
  • a data processing method including: extracting text information in a user interface; and obtaining an operation instruction corresponding to the text information based on the text information; wherein the operation instruction Used to start an application or service process; execute the operation instruction.
  • the obtaining an operation instruction corresponding to the text information based on the text information includes: parsing a keyword in the text information; and retrieving an operation corresponding to the keyword in a preset grammar rule base An instruction; wherein the grammar rule base records operation instructions corresponding to different keywords.
  • the method further includes: performing fault tolerance processing on the extracted text information.
  • the method further includes: using the keyword as information for executing the application or a service process.
  • the method further includes: displaying display information and/or an action option set for the operation instruction.
  • the executing the operation instruction includes: when the obtained operation instruction is multiple, executing the selected operation instruction or performing in a preset order.
  • a data processing apparatus including: an extracting module configured to extract text information in a user interface; and an obtaining module configured to obtain the text based on the text information An operation instruction corresponding to the information; wherein the operation instruction is used to start an application or a service process; and the execution module is configured to execute the operation instruction.
  • the obtaining module is specifically configured to: parse a keyword in the text information; and retrieve, in a preset grammar rule library, an operation instruction corresponding to the keyword; wherein, the grammar rule library records The operation instructions corresponding to different keywords.
  • the obtaining module is further configured to: perform fault tolerance processing on the extracted text information.
  • the execution module is further configured to use the keyword as information for executing the application or service process.
  • the device further comprises a display module configured to display display information and/or action options set for the operation instruction.
  • the execution module is specifically configured to: when the obtained operation instruction is multiple, execute the selected operation instruction or trigger in a preset order.
  • a terminal is provided, the terminal using the data processing apparatus described above.
  • FIG. 2 is a flow chart showing steps of obtaining an operation instruction corresponding to text information according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a user interface according to an embodiment of the present invention
  • FIG. 5 is a structural diagram of a data processing apparatus according to an embodiment of the present invention.
  • DETAILED DESCRIPTION In order to solve the problem that an application or service cannot be quickly launched in an environment where speech recognition is limited.
  • the embodiment of the invention provides a data processing method, device and terminal.
  • the main idea of the embodiment of the present invention is to obtain text information in a user interface, and execute an operation instruction corresponding to the text information according to the text information.
  • FIG. 1 is a flowchart of a data processing method according to an embodiment of the present invention.
  • Step S110 extracting text information in a user interface (UI).
  • Text information includes: text, letters, characters, and so on.
  • Extracting text information in the user interface includes: real-time listening for elements in the user interface; determining whether elements in the user interface are operated; detecting whether there is text information in the element when the element is operated; if there is text in the element The information identifies the textual information and extracts the textual information from the element. If the user The elements in the interface are not manipulated, or there is no text information in the element, and the elements in the user interface continue to be listened or detected.
  • Elements in the user interface are vectors for textual information, including but not limited to icons, buttons, dialog boxes, web pages, search bars.
  • Elements in the user interface all contain text attributes. Contains text information in the text attribute. Extracting text information from an element means separating information such as words, letters, and characters from the element.
  • text information can be extracted from the text attribute of the element.
  • elements are collectively referred to as controls.
  • extracting the text information in the user interface mainly relies on the existing control separation technology, separates the control of the user interface, and extracts the text information in the text attribute of the control.
  • Control separation techniques include: hierarchy viewer uiautomatorviewer and so on.
  • the control separation technology can also be a custom program set by the developer, and the text information in the control is extracted by using the screen pixel collection point. After the text information is extracted, it is stored in the specified stack or variable array.
  • the application name to which the text information belongs, and the process name and/or process identifier can also be obtained.
  • the text information, the application name, and the process name and/or PID are stored correspondingly.
  • the text escaping mode may be defined in the terminal, the text escaping mode is initiated, and the data processing function of the present invention is set to be initiated.
  • the text escape mode can be used as a menu, submenu or switch in the system-setup. Text escape mode can be initiated by clicking on the control icon or a physical button. For example: Press the home button for a long time, press the up and down buttons at the same time, and so on. After the text escaping mode is started, the elements in the user interface can be listened to in real time, and the text information in the user interface is extracted.
  • Step S120 based on the text information, obtain an operation instruction corresponding to the text information.
  • the operation instruction refers to: a command for starting an application or a service process; wherein, the service is, for example, a Global Positioning System (GPS) process.
  • the process of obtaining an operation instruction corresponding to the text information includes: parsing a keyword in the text information; and retrieving an operation instruction corresponding to the keyword in a preset grammar rule library.
  • the operation instructions corresponding to different keywords are recorded in the grammar rule base.
  • the grammar rule base includes mapping relationships and grammar rules.
  • the mapping relationship includes at least: a mapping relationship between the keyword and the application (correspondence relationship), a mapping relationship between the application program and the operation instruction, and a mapping relationship between the operation instruction and the display information.
  • the grammar rules include at least: fault-tolerant rules, parsing rules, and standardized processing rules.
  • the grammar rule base can be a data table or a database.
  • the operational instructions and applications in the grammar rule base use machine identification or machine identification statements. Machine identification codes and machine recognition statements can be quickly identified by the system. For example, in the android system, you can use the startActivity (Intent) statement to start a process or application.
  • the grammar rule base can be generated locally, such as: by collecting local application generation; it can also be generated by the server and loaded/updated locally by the server. However, the local needs to set a program to detect which operation commands are local. Can be implemented, otherwise a null pointer exception may occur.
  • the method before parsing the keywords in the text information, the method further includes: performing fault tolerance processing on the extracted text information.
  • the purpose of fault-tolerant processing is to spell and grammarize textual information and correct errors in textual information. For example: Correct the typos in the text message.
  • the method after parsing the keywords in the text information, the method further includes: normalizing the parsed keywords to make the forms of the keywords uniform.
  • FIG. 2 is a flow chart showing the steps of obtaining an operation instruction corresponding to text information according to an embodiment of the present invention. Step S210, performing fault tolerance processing on the mentioned text information. Set up fault tolerance rules in the grammar rule base in advance.
  • the specific fault-tolerant rules can be incorrect spelling, grammar and correct spelling, grammar mapping, and can also be trained in the way of artificial intelligence, and the obtained error detection algorithm can also be an existing error detection algorithm.
  • the keywords in the text information are parsed.
  • the parsing rule includes characters, letters, and characters that can be used as keywords. If these characters, letters, and characters appear in the text information, they can be used as keywords for text information. Specifically, the keywords in the text information are directly retrieved based on the keywords included in the analysis rule.
  • the text information can also be split, the separated data parts are analyzed, and the keywords are extracted, and the splitting rules can be set in the parsing rules.
  • the text information can be split according to the grammatical structure, for example: The text information is "I am at Zhongshan Road”, and the text information is split according to the grammatical structure of the main, the predicate, the guest, the fixed, the shape, and the complement. After the text information is split, the "I”, “In”, “Zhongshan” can be obtained. ", "road”, in which the "road” is included in the parsing rules, the "road” in the text information can be used as a key. Step S230, performing normalization processing on the parsed keywords. This standardization process refers to unifying different forms of keywords.
  • Keywords can be in the form of Chinese, English, Japanese, and so on. So, convert different forms of keywords into a unified form, such as: Convert keywords to English.
  • the standardized processing rules for keywords can be set in advance in the grammar rule base. For example: For each Chinese word or word, set one-to-one correspondence.
  • the standardized keywords are cached in a character array or stack.
  • an escape sentence is formed based on the keywords.
  • the escape statement is a machine identification code or a machine identification statement.
  • the formation rules for escape statements can be set in the grammar rule base.
  • the English word for the keyword "road” is road
  • the escaping statement for the road is go to X road
  • "x" is the variable in the escape statement.
  • splitting text information if you get the keyword and the keyword's attribute, you can use the attribute as the variable value of the variable in the escape sentence, such as: Split "Zhongshan Road” to get “Zhongshan”, “Road “, "Zhongshan” is the attribute of the keyword "road”, you can use "Zhongshan” as the variable value.
  • the mapping relationship between the keyword and the escape sentence is pre-set in the grammar rule base, and the information is retrieved in the grammar rule base according to the keyword and its escape sentence.
  • Step S240 in the grammar rule library set in advance, an operation instruction corresponding to the keyword is retrieved.
  • This keyword is standardized.
  • the keyword is used as a search term, and the mapping relationship related to the keyword is retrieved, thereby obtaining an operation instruction corresponding to the keyword. If the operation instruction corresponding to the keyword is not retrieved, the search fails or the text information in the user interface is continuously extracted.
  • the extracted keywords can be one or more.
  • the operation instruction corresponding to the keyword may also be one or more. If the keywords are in the form of C and D, the mapping relationship related to C, the mapping relationship related to D, and the mapping relationship related to C and D can be retrieved in the grammar rule base.
  • mapping relationship related to "weather”, the mapping relationship related to "road”, and the “weather” and “road” can be retrieved in the grammar rule base.
  • Mapping relations After the escape sentence is formed based on the keyword, the keyword and the escape sentence can be used as search terms, and the search relationship is performed in the mapping relationship, thereby obtaining an operation instruction corresponding to the keyword and the escape sentence. For example, if the keyword is r 0 ad and the escape statement is go to X road, the mapping relationship shown in Table 1 can be retrieved. Table 1
  • Step S130 executing an operation instruction.
  • the search is successful, and one or more operation instructions corresponding to the keyword are obtained.
  • the selected operation instructions are executed, or are executed in a preset order.
  • the order of execution can be in accordance with the time of the search, or the priority of the operation instructions.
  • the priority of the operation instructions can be set by the designer. Multiple operation instructions can be typed, and the same type of operation instructions form a queue.
  • the type of the operation instruction may be the priority of the operation instruction, the application that the operation instruction needs to be started, and the like. For example: Form a separate queue to process the alarm commands, forming a separate queue to process the positioning instructions.
  • the method further includes: displaying display information and/or action options set for the operation instruction.
  • the display information corresponds to the operation instruction, as indicated by the representation 1, and can be obtained in the grammar rule base.
  • Action options are options for human-computer interaction. For example: Ask the user to choose whether to execute the operation instruction.
  • the menu action option including the plurality of display information may be displayed, and when the display information in the menu is selected, the operation instruction corresponding to the display information is executed.
  • the intent component is used to start the corresponding application or service process; under the windos system, the corresponding application or service process can be started by using the hook program.
  • the operation instruction corresponding to the text information After executing the operation instruction corresponding to the text information, the corresponding application or service is started, and the keyword is used as the information for executing the application or the service process to perform the action related to the keyword.
  • the operation instruction of Table 1 "send intent to (com.baidu.map, x road, gps(now station”” includes the statement “gps(now Station)"
  • the GPS system after executing the operation command, can be called to locate the current geographical location, and after the current geographic location is located, the current geographic location is navigated to "x road”.
  • the speech recognition can be achieved.
  • the purpose of quickly launching an application or service. In this process, the user's needs can be automatically identified. If the user is found to need to launch the application or service, the user is provided with a choice of follow-up actions.
  • the system level commands are executed, the execution efficiency is higher, and the user experience is better.
  • FIG. 3 is a schematic diagram of a user interface according to an embodiment of the present invention.
  • the system used in this embodiment is an android system.
  • Step S310 acquiring an element and a text attribute value (text information) in the user interface.
  • the current user interface has three controls: Control 1 is TextView, and its text property value 1 (text information) is "X and Y chat interface”.
  • Control 2 is Multiline Text, and its text attribute value is 2 "I am on Zhongshan Road”.
  • Control 3 is Multiline Text, and its text attribute value is 3, "OK, I will go.”
  • the name of the activity to which the controls 1-3 belong is: talklistActivty. Extract the text attribute value and activity name of the control 1-3. Step S320, parsing keywords in the text attribute value, and normalizing the keywords. According to the grammatical structure of Chinese, the above three text attribute values are parsed. Parsing the text property value 1, you can get "X”, “and”, "Y,,,” “ears”, “interface” parsing text attribute value 2, ,
  • Step S330 in the grammar rule base, retrieve an operation instruction corresponding to the keyword.
  • the search results shown in Table 1 can be obtained.
  • intent 1 send intent to (com . androi d . googl emap , xx road);
  • intent2 send intent to (com.baidu.map , xx Road, gps(now station));
  • intent3 send intent to (com. android. googl emap,line(xx road,gps(now station))).
  • Table 3 The operation instructions, display information, and key information activity names in Table 2 that identify the user interface process are recorded in memory, as shown in Table 3.
  • Step S340 executing the selected operation instruction.
  • a menu option that displays the display information of three Intents in the user interface.
  • FIG. In Fig. 4 A schematic diagram of a user interface in accordance with an embodiment of the present invention is shown in FIG. In Fig. 4, the variable “XX" in each display information in Table 3 is replaced with the variable value "Zhongshan", and the display information is displayed in the form of a list in the user interface.
  • the intent corresponding to the display information is selected. For example: When the user clicks "Google Map Location XX Road”, the menu click event executes an instruction, similar to the sendlntentG method to start Gaode navigation, and input the information of "Zhongshan Road” into the navigation map, so that the user can intuitively perceive the map. .
  • FIG. 5 is a structural diagram of a data processing apparatus according to an embodiment of the present invention.
  • the apparatus includes: an extraction module 510 configured to extract text information in a user interface; and an obtaining module 520 configured to obtain an operation instruction corresponding to the text information based on the text information. Operational instructions are used to launch an application or service process.
  • the obtaining module 520 is specifically configured to: parse a keyword in the text information; and retrieve an operation instruction corresponding to the keyword in a preset grammar rule library.
  • the grammar rule library records operation instructions corresponding to different keywords.
  • the obtaining module 420 is further configured to: perform fault tolerance processing on the extracted text information.
  • the execution module 530 is configured to execute an operation instruction corresponding to the text information.
  • the execution module 430 is specifically configured to: when the obtained operation instruction is plural, execute the selected operation instruction or execute in a preset order.
  • Execution module 530 is also arranged to use the keywords as information to execute an application or service process.
  • the apparatus also includes a display module 540 configured to display display information and/or action options set for the operational command.
  • the data processing device is disposed in the terminal to provide a data processing function for a user who uses the terminal to quickly launch an application or service.
  • a data processing method, apparatus, and terminal provided by an embodiment of the present invention have the following beneficial effects: By detecting text information, an operation instruction corresponding to text information is obtained, and by triggering the operation instruction, the operation instruction can be quickly Launch the app to improve the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)
  • Digital Computer Display Output (AREA)

Abstract

本发明公开了一种数据处理方法、装置和终端。该方法包括:提取用户界面中的文本信息;基于所述文本信息,获得与所述文本信息对应的操作指令;其中,所述操作指令用于启动应用程序或服务进程;执行所述操作指令。本发明有效地解决了在语音识别受限的环境中,无法快速启动应用或服务的问题。本发明通过检测文本信息,获得与文本信息对应的操作指令,通过触发该操作指令,能够快速启动应用程序,提高了用户体验效果。

Description

一种数据处理方法、 装置和终端 技术领域 本发明涉及数据处理技术领域, 特别是涉及一种数据处理方法、 装置和终端。 背景技术 语音技术发展迅速, 语音技术涉及语音识别的各个方面。 基于语音识别技术, 用 户可以执行快捷操作, 缩短启动应用或服务的时间。 例如: 用户语音输入 "打开通信 录", 则终端识别语音数据后, 可以快速打开通信录。 但是, 语音识别技术的复杂度很高, 识别的准确度也有待提高, 并且对周围的环 境有一定的要求, 比如: 需要相对安静的环境。 而且, 有些引擎需要借助网络交换信 息的方式, 才能获取后续的动作指令, 以达到快速启动应用或服务的目的, 对用户的 实际操作不友好。 目前,在语音条件受限的环境(如,会议模式)中,或者在有文本呈现的界面(如, 短信会话界面、 网页浏览界面) 中, 语音识别受到限制, 这时, 若用户想要进行快捷 操作, 只能通过手动的方式打开相应的应用, 并在应用中输入想要执行的操作, 这样, 不能起到快速启动应用或服务的目的。 例如: 用户想要搜索 A地址所在的位置, 当语 音识别受到限制时,则只能手动打开地图应用,输入 A地址,搜索 A地址所在的位置, 操作过程复杂, 用户体验效果不佳。 发明内容 本发明实施例要解决的技术问题是提供一种数据处理方法、 装置和终端, 用以至 少解决在语音识别受限的环境中, 无法快速启动应用或服务的问题。 为解决上述技术问题, 本发明实施例是通过以下技术方案来实现的。 在本发明的一个实施例中, 提供了一种数据处理方法, 包括: 提取用户界面中的 文本信息; 基于所述文本信息, 获得与所述文本信息对应的操作指令; 其中, 所述操 作指令用于启动应用程序或服务进程; 执行所述操作指令。 其中, 基于所述文本信息, 获得与所述文本信息对应的操作指令, 包括: 解析所 述文本信息中的关键字; 在预先设置的语法规则库中, 检索与所述关键字相对应的操 作指令; 其中, 所述语法规则库中记载了不同的关键字对应的操作指令。 其中, 在解析所述文本信息中的关键字之前, 还包括: 对提取到的所述文本信息 进行容错处理。 其中, 在执行所述操作指令之后, 所述方法还包括: 将所述关键字作为执行所述 应用程序或服务进程的信息。 其中, 在执行所述操作指令之前, 还包括: 显示为所述操作指令设置的显示信息 和 /或动作选项。 其中, 执行所述操作指令, 包括: 当获得的操作指令为多个时, 执行被选定的操 作指令或者按照预先设置的顺序执行。 在本发明的另一实施例中, 还提供了一种数据处理装置, 包括: 提取模块, 设置 为提取用户界面中的文本信息; 获得模块, 设置为基于所述文本信息, 获得与所述文 本信息对应的操作指令; 其中, 所述操作指令用于启动应用程序或服务进程; 执行模 块, 设置为执行所述操作指令。 其中, 所述获得模块具体设置为: 解析所述文本信息中的关键字; 在预先设置的 语法规则库中, 检索与所述关键字相对应的操作指令; 其中, 所述语法规则库中记载 了不同的关键字对应的操作指令。 其中, 所述获得模块还设置为: 对提取到的所述文本信息进行容错处理。 其中, 所述执行模块还设置为, 将所述关键字作为执行所述应用程序或服务进程 的信息。 其中, 所述装置还包括显示模块, 设置为显示为所述操作指令设置的显示信息和 / 或动作选项。 其中, 执行模块具体设置为: 当获得的操作指令为多个时, 执行被选定的操作指 令或者按照预先设置的顺序进行触发。 在本发明的再一实施例中, 还提供了一种终端, 所述终端使用上述的数据处理装 置。 本发明实施例有益效果如下: 本发明实施例通过检测文本信息, 获得与文本信息对应的操作指令, 通过执行执 行该操作指令, 快速启动应用程序或服务, 避免了语音识别受限的问题, 提高了用户 体验效果。 附图说明 图 1 是根据本发明一实施例的数据处理方法的流程图; 图 2是根据本发明一实施例的获得与文本信息对应的操作指令的步骤流程图; 图 3是根据本发明一实施例的数据处理方法的流程图; 图 4 是根据本发明一实施例的用户界面的示意图; 图 5是根据本发明一实施例的数据处理装置的结构图。 具体实施方式 为了解决在语音识别受限的环境中, 无法快速启动应用或服务的问题。 本发明实 施例提供了一种数据处理方法、 装置和终端。 本发明实施例的主要思想在于, 获取用户界面中的文本信息, 根据该文本信息, 执行与该文本信息对应的操作指令。 这样, 可以快速的执行应用程序或服务, 在语音 识别受限的环境中, 也不会影响该方式的执行, 提高执行效率。 以下结合附图以及实施例, 对本发明实施例进行进一步详细说明。 应当理解, 此 处所描述的具体实施例仅仅用以解释本发明, 并不限定本发明。 如图 1所示, 图 1是根据本发明一实施例的数据处理方法的流程图。 步骤 S110, 提取用户界面 (User Interface, UI) 中的文本信息。 文本信息包括: 文字、 字母、 字符等。 提取用户界面中的文本信息包括: 针对用户界面中的元素进行实时侦听; 确定用 户界面中的元素是否被操作; 当有元素被操作时, 检测元素中是否有文本信息; 如果 元素中存在文本信息, 则识别文本信息, 并将文本信息从元素中抽离出来。 如果用户 界面中的元素未被操作, 或者元素中不存在文本信息, 则继续对用户界面中的元素进 行侦听或检测。 用户界面中的元素为文本信息的载体, 包括但不限于图标、 按钮、 对话框、 网页、 搜索栏。 用户界面中的元素都包含文本 (text) 属性。 在 text属性中包含文本信息。 从元素中抽离文本信息是指将文字、字母、字符等信息从元素中分离出来。例如: 从短信息对话框中分离出用户输入的文字。 进一步地, 可以从元素的 text属性中提取 文本信息。 具体而言, 在 android (安卓) 系统中, 元素被统一称作控件。 对于采用 android 系统的终端而言, 提取用户界面中的文本信息, 主要依托于现有的控件分离技术, 分 离出用户界面的控件, 并提取出控件 text 属性中的文本信息。 控件分离技术包括: hierarchy viewer uiautomatorviewer等。该控件分离技术也可以是开发者设置的自定义 程序, 利用屏幕像素采集点提取出控件中的文本信息。 文本信息被抽离出来后, 存储到指定的堆栈或者变量数组中。 当用户界面中存在多个元素时, 还可以获取文本信息所属的应用程序名称、 以及 进程名称和 /或进程识别符(Process Identification, PID)。将文本信息、应用程序名称、 以及进程名称和 /或 PID对应存储。 在一实施例中, 可以在终端中定义文本转义模式, 启动文本转义模式, 设置为启 动本发明的数据处理功能。 文本转义模式可以作为系统-设置中的菜单、 子菜单或开关 等。 文本转义模式可以通过点击控件图标、 或者是物理按键来启动。 例如: 长时间按 home键、 上下键同时按下等。在启动文本转义模式后, 即可以实时侦听用户界面中的 元素, 对用户界面中的文本信息进行提取。
步骤 S120, 基于文本信息, 获得与该文本信息对应的操作指令。 操作指令是指: 用于启动应用程序或服务进程的命令; 其中, 服务例如为全球定 位系统 (Global Positioning System, GPS) 进程。 获得与文本信息对应的操作指令的过程, 包括: 解析文本信息中的关键字; 在预 先设置的语法规则库中, 检索与关键字相对应的操作指令。 语法规则库中记载了不同 的关键字对应的操作指令。 具体而言, 语法规则库包括映射关系和语法规则。 映射关系中至少包括: 关键字 与应用程序的映射关系(对应关系)、应用程序与操作指令的映射关系、操作指令与显 示信息的映射关系。 语法规则至少包括: 容错规则、 解析规则、 标准化处理规则。 进 一步地, 语法规则库可以是数据表或数据库。 在一个实施例中, 语法规则库中的操作指令和应用程序使用机器识别码或机器识 别语句。机器识别码或和机器识别语句能被系统快速识别。比如在 android系统中的可 以用 startActivity(Intent)语句来用于启动一个进程或应用。 语法规则库可以由本地生成, 如: 通过搜集本地的应用程序生成; 也可以由服务 器生成, 通过服务端同步加载 /更新到本地, 但是, 本地需要设置一个程序, 设置为检 测哪些操作指令是本地可以实现的, 否则可能出现空指针异常。 在一个实施例中, 在解析文本信息中的关键字之前, 还包括: 对提取到的文本信 息进行容错处理。 容错处理的目的在于: 对文本信息进行拼写、 语法检查, 纠正文本 信息中的错误。 如: 纠正文本信息中的错别字。 在一个实施例中, 在解析文本信息中的关键字之后, 还包括: 对解析出的关键字 进行标准化处理, 使关键字的形式统一。 如图 2所示, 图 2是根据本发明一实施例的获得与文本信息对应的操作指令的步 骤流程图。 步骤 S210, 对提到的文本信息进行容错处理。 预先在语法规则库中设置容错规则。 具体的容错规则可以是错误的拼写、 语法与 正确的拼写、 语法的映射关系, 还可以按照人工智能的方式进行训练, 得到的检错算 法, 也可以是现有的检错算法。 步骤 S220, 解析出文本信息中的关键字。 预先在语法规则库中设置解析规则。 该解析规则用于确定文本信息中的关键字。 例如: 该解析规则包括可以作为关键字的文字、 字母、 字符, 文本信息中若出现这些 文字、 字母、 字符, 则可以作为文本信息的关键字。 具体而言, 根据解析规则中包含的关键字, 直接检索出文本信息中的关键字。 还 可以对文本信息进行拆分,对拆分出的各个数据部分进行分析,抽取出其中的关键字, 该拆分规则可以在解析规则中设置。可以按照语法结构, 对文本信息进行拆分, 例如: 文本信息为"我在中山路", 则按照主、谓、 宾、定、状、补的语法结构拆分文本信息, 文本信息被拆分后, 可以得到 "我"、 "在"、 "中山"、 "路"这几个部分, 其中, 在解 析规则中包括 "路", 则可以将文本信息中的 "路"作为关键字。 步骤 S230, 针对解析出的关键字进行标准化处理。 该标准化处理是指, 将不同形式的关键字进行统一。 因为解析的出的关键字形式多样, 如: 关键字可以是中文、 英文、 日文等形式。 所以, 将不同形式的关键字转化为统一的形式, 如: 将关键字都转化为英文形式。 关键字的标准化处理规则, 可以预先在语法规则库中设置。 如: 为每个中文的字 或词, 设置一一对应的英文单词。 将标准化后的关键字缓存在字符数组或堆栈中。 在一个实施例中, 在对关键字进行标准化处理后, 基于关键字, 形成转义语句。 该转义语句为机器识别码或机器识别语句。 转义语句的形成规则可以在语法规则库中 设置。例如: 关键字 "路"的英文单词为 road, 该 road的转义语句为 go to X road, "x " 为转义语句中的变量。 在对文本信息进行拆分时, 若得到关键字和关键字的定语, 可 以将定语作为转义语句中的变量的变量值, 如: 对 "中山路 "进行拆分得到 "中山"、 "路", "中山"为关键字 "路" 的定语, 则可以将 "中山"作为变量值。 如果可以将 关键字转化为转义语句, 则在语法规则库中预先设置关键字和转义语句的映射关系, 根据关键字和其转义语句在语法规则库中进行信息检索。 步骤 S240, 在预先设置的语法规则库中, 检索与关键字相对应的操作指令。 该关 键字经过标准化处理。 将关键字作为检索词, 检索与关键字相关的映射关系, 从而获得与关键字对应的 操作指令。 如果未检索到与关键字相对应的操作指令, 则显示检索失败或者继续提取 用户界面中的文本信息。 提取出的关键字可以是一个或多个。 与关键字对应的操作指令也可以是一个或多 个。 如果关键字为 C和 D的形式, 则在语法规则库中可以检索与 C有关的映射关系、 与 D有关的映射关系、 以及与 C和 D有关的映射关系。如: 关键字为"天气" + "路", 则在语法规则库中可以检索与 "天气"有关的映射关系、 与 "路"有关的映射关系、 以及与 "天气"和 "路"有关的映射关系。 当基于关键字形成转义语句后, 可以将关键字和转义语句作为检索词, 在映射关 系中进行检索, 从而获得与关键字、 转义语句对应的操作指令。 例如: 关键字为 r0ad、转义语句为 go to X road, 可以检索到如表 1所示映射关系。 表 1
Figure imgf000009_0001
步骤 S130, 执行操作指令。 检索成功, 获得与关键字对应的一个或多个操作指令。 当获得多个操作指令时,执行被选定的操作指令,或者按照预先设置的顺序执行。 执行顺序可以按照检索的时间先后, 也可以按照操作指令的优先级高低。 操作指令的 优先级可以由设计者进行设置。 可以对多个操作指令进行类型划分, 相同类型的操作指令组成一个队列。 操作指 令的类型可以是操作指令的优先级、 操作指令需要启动的应用程序等。 例如: 形成单 独的队列来处理闹钟指令, 形成单独的队列来处理定位指令。 在执行文本信息对应的操作指令之前, 还包括: 显示为操作指令设置的显示信息 和 /或动作选项。显示信息与操作指令对应,如表示 1所示,可以在语法规则库中获得。 动作选项是指人机交互的选项。 例如: 请用户选择是否执行操作指令。 进一步地, 当 获得的操作指令为多个时, 可以显示包含多个显示信息的菜单动作选项, 当菜单中的 显示信息被选中后, 执行该显示信息对应的操作指令。 执行操作指令后, 在 android系统中, 使用 intent组件启动相应的应用程序或服务 进程; 在 windos系统下, 可使用 hook程序启动相应的应用程序或服务进程。 执行文本信息对应的操作指令之后, 启动相应的应用程序或服务进行, 将关键字 作为执行应用程序或服务进程的信息, 来执行与关键字相关的动作。 例如: 表 1的操 作指令 " send intent to (com.baidu.map,x road,gps(now station》" 中包括语句 "gps(now station)", 则执行操作指令后, 可以调用 GPS系统, 定位当前的地理位置, 在定位当 前的地理位置后, 实现当前地理位置到 "x road" 的导航。 通过上述方法, 可以达到在语音识别技术受限的环境中, 快速启动应用程序或服 务的目的。 在此过程中, 可以自动识别用户的需求, 如果发现用户可能需要启动应用 程序或服务时, 为用户提供后续动作的选择, 并采用系统级命令进行执行, 执行效率 较高, 用户体验较好。
基于上述方法, 给出一个实例, 来说明本发明的数据处理方法。 如图 3所示, 图 3是根据本发明一实施例的用户界面的示意图。本实施例所使用的系统为 android系统。 步骤 S310, 获取用户界面中的元素及 text属性值 (文本信息)。 利用 uiautomatorviewer获取用户界面中的元素及 text属性值。 当前用户界面有 3个控件: 控件 1为 TextView, 其 text属性值 1 (文本信息) 为 " X与 Y聊天界面"。 控件 2为 Multiline Text, 其 text属性值 2为 "我在中山路"。 控件 3为 Multiline Text, 其 text属性值 3为 "好, 我这就去"。 控件 1-3所属的 activity名称为: talklistActivty。 提取控件 1-3的 text属性值、 activity名称。 步骤 S320, 解析 text属性值中的关键字, 并对关键字进行标准化处理。 按照汉语的语法结构, 解析上述三个 text属性值。 解析 text属性值 1, 可以得到 "X"、 "与"、 "Y,,、 "耳卯天"、 "界面" 解析 text属性值 2, ,
可以得到 "我"、 "在"、 "中山 "、 "路, 解析 text属性值 3, 可以得到 "好"、 "我"、 "这"、 " " +,
就"、 云 如果在语法规则库的解析规则中, 只包括"路", 则将 text属性值 2中 "路"作为 关键字。将该关键字转换为英文 "road"。 "road"的转义语句为 "go to xx road"。将 "路" 的定语 "中山"作为转义语句和操作指令中的变量值。 记录关键字、 转义语句、 activity名称, 如表 2所示。 表 2
Figure imgf000011_0001
步骤 S330, 在语法规则库中, 检索与关键字相对应的操作指令。 通过检索语法规则库, 可以获得表 1所示的检索结果。 将三种操作指令取出, 借助 android的系统实例化三个 intent实例: intent 1= send intent to (com . androi d . googl emap ,xx road); intent2= send intent to (com.baidu.map ,xx road,gps(now station)); intent3= send intent to (com. android. googl emap,line(xx road,gps(now station)))。 将操作指令、显示信息、 以及表 2中标识用户界面进程的关键信息 activity名称记 录在内存中, 如表 3所示。 表 3
Figure imgf000011_0002
步骤 S340, 执行被选中的操作指令。 在用户界面中显示 3个 Intent的显示信息的菜单选项。 如图 4所示的根据本发明 一实施例的用户界面的示意图。 在图 4中, 将表 3中每个显示信息中的变量 " XX "替 换为变量值"中山", 并且, 将显示信息以列表的形式显示在用户界面中。 当用户选择 其中一个显示信息时, 则该显示信息对应的 intent被选中。 例如: 当用户点击 "谷歌 地图定位 XX路", 菜单点击事件执行一条指令, 类似 sendlntentG方式启动高德导航, 并将 "中山路" 的信息输入到导航地图上, 这样用户就可以直观的感知地图。
本发明实施例还提供了一种数据处理装置。 如图 5所示, 图 5是根据本发明一实 施例的数据处理装置的结构图。 该装置包括: 提取模块 510, 设置为提取用户界面中的文本信息; 获得模块 520, 设置为基于文本信息, 获得与文本信息对应的操作指令。 操作指 令用于启动应用程序或服务进程。 获得模块 520具体设置为: 解析文本信息中的关键字; 在预先设置的语法规则库 中, 检索与关键字相对应的操作指令。 其中, 语法规则库中记载了不同的关键字对应 的操作指令。进一步地, 获得模块 420还设置为: 对提取到的文本信息进行容错处理。 执行模块 530, 设置为执行文本信息对应的操作指令。 执行模块 430具体设置为: 当获得的操作指令为多个时, 执行被选定的操作指令或者按照预先设置的顺序进行执 行。 执行模块 530还设置为, 将关键字作为执行应用程序或服务进程的信息。 装置还包括显示模块 540,设置为显示为操作指令设置的显示信息和 /或动作选项。 将该数据处理装置设置在终端中, 为使用该终端的用户提供数据处理功能, 以便 快速启动应用程序或服务。 本发明实施例所述的装置的功能已经在图 1-图 4 所示的方法实施例中进行了描 述, 故本实施例的描述中未详尽之处, 可以参见前述实施例中的相关说明, 在此不做 赘述。 尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人员将意识到 各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当不限于上述实施例。 工业实用性 如上所述, 本发明实施例提供的一种数据处理方法、 装置和终端, 具有以下有益 效果: 通过检测文本信息, 获得与文本信息对应的操作指令, 通过触发该操作指令, 能够快速启动应用程序, 提高了用户体验效果。

Claims

权 利 要 求 书 、 一种数据处理方法, 包括: 提取用户界面中的文本信息;
基于所述文本信息, 获得与所述文本信息对应的操作指令; 其中, 所述操 作指令用于启动应用程序或服务进程; 执行所述操作指令。 、 如权利要求 1所述的方法, 其中, 基于所述文本信息, 获得与所述文本信息对 应的操作指令, 包括: 解析所述文本信息中的关键字;
在预先设置的语法规则库中,检索与所述关键字相对应的操作指令;其中, 所述语法规则库中记载了不同的关键字对应的操作指令。 、 如权利要求 2所述的方法, 其中, 在解析所述文本信息中的关键字之前, 还包 括: 对提取到的所述文本信息进行容错处理。 、 如权利要求 2所述的方法, 其中, 在执行所述操作指令之后, 所述方法还包括: 将所述关键字作为执行所述应用程序或服务进程的信息。 、 如权利要求 1或 2所述的方法, 其中, 在执行所述操作指令之前, 还包括: 显 示为所述操作指令设置的显示信息和 /或动作选项。 、 如权利要求 5所述的方法, 其中, 执行所述操作指令, 包括: 当获得的操作指令为多个时, 执行被选定的操作指令或者按照预先设置的 顺序执行。 、 一种数据处理装置, 包括:
提取模块, 设置为提取用户界面中的文本信息;
获得模块, 设置为基于所述文本信息, 获得与所述文本信息对应的操作指 令; 其中, 所述操作指令用于启动应用程序或服务进程;
执行模块, 设置为执行所述操作指令。 、 如权利要求 7所述的装置, 其中, 所述获得模块具体设置为: 解析所述文本信息中的关键字; 在预先设置的语法规则库中,检索与所述关键字相对应的操作指令;其中, 所述语法规则库中记载了不同的关键字对应的操作指令。 、 如权利要求 8所述的装置, 其中, 所述获得模块还设置为: 对提取到的所述文 本信息进行容错处理。 0、 如权利要求 8所述的装置, 其中, 所述执行模块还设置为, 将所述关键字作为执行所述应用程序或服务进程的信息。 1、 如权利要求 7或 8所述的装置, 其中, 所述装置还包括显示模块, 设置为显示 为所述操作指令设置的显示信息和 /或动作选项。 、 如权利要求 11所述的装置, 其中, 执行模块具体设置为: 当获得的操作指令为多个时, 执行被选定的操作指令或者按照预先设置的 顺序进行触发。 3、 一种终端, 所述终端使用权利要求 7-12任一项所述的数据处理装置。
PCT/CN2014/084168 2014-06-16 2014-08-12 一种数据处理方法、装置和终端 WO2015192447A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/318,467 US20170154068A1 (en) 2014-06-16 2014-08-12 Method, device and terminal for data processing
EP14895056.1A EP3156915A4 (en) 2014-06-16 2014-08-12 Method, device and terminal for data processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410268541.2A CN105278970A (zh) 2014-06-16 2014-06-16 一种数据处理方法、装置和终端
CN201410268541.2 2014-06-16

Publications (1)

Publication Number Publication Date
WO2015192447A1 true WO2015192447A1 (zh) 2015-12-23

Family

ID=54934742

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084168 WO2015192447A1 (zh) 2014-06-16 2014-08-12 一种数据处理方法、装置和终端

Country Status (4)

Country Link
US (1) US20170154068A1 (zh)
EP (1) EP3156915A4 (zh)
CN (1) CN105278970A (zh)
WO (1) WO2015192447A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445764A (zh) * 2016-09-29 2017-02-22 福州大学 一种实现安卓设备稳定性自动化测试的方法

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899322B (zh) * 2015-06-18 2021-09-17 百度在线网络技术(北京)有限公司 搜索引擎及其实现方法
WO2018032516A1 (zh) * 2016-08-19 2018-02-22 华为技术有限公司 应用数据的共享方法、装置和终端设备
CN108572885A (zh) * 2017-03-10 2018-09-25 阿里巴巴集团控股有限公司 一种操作处理方法、装置及电子设备
CN107835310B (zh) * 2017-10-31 2020-07-17 维沃移动通信有限公司 一种移动终端设置方法及移动终端
CN109255214B (zh) * 2018-09-13 2021-03-19 广东电网有限责任公司 一种权限配置方法及装置
CN110069724A (zh) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 应用程序快捷跳转方法、装置、电子设备和存储介质
CN116126197A (zh) * 2021-11-12 2023-05-16 荣耀终端有限公司 应用程序推荐方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923432A (zh) * 2010-06-10 2010-12-22 北京捷通华声语音技术有限公司 一种移动终端中应用程序的调用方法及装置
CN102027470A (zh) * 2008-05-19 2011-04-20 高通股份有限公司 用于呈现上下文动作的系统和方法
CN102799594A (zh) * 2011-05-27 2012-11-28 腾讯科技(深圳)有限公司 一种信息推送方法及装置
CN103237136A (zh) * 2013-05-10 2013-08-07 上海华勤通讯技术有限公司 移动终端及其主题词的检索方法

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5873107A (en) * 1996-03-29 1999-02-16 Apple Computer, Inc. System for automatically retrieving information relevant to text being authored
CN101414112A (zh) * 2007-10-16 2009-04-22 康佳集团股份有限公司 一种照相防抖的方法及其装置
US20100288828A1 (en) * 2009-05-14 2010-11-18 Aisaku Pradhan Accessible user interface for electronic devices
US20110016421A1 (en) * 2009-07-20 2011-01-20 Microsoft Corporation Task oriented user interface platform
US10276170B2 (en) * 2010-01-18 2019-04-30 Apple Inc. Intelligent automated assistant
CN101808025B (zh) * 2010-04-13 2014-08-20 中兴通讯股份有限公司 一种实现智能家居应用的装置、系统和方法
WO2012092709A1 (en) * 2011-01-05 2012-07-12 Google Inc. Method and system for facilitating text input
JP5025808B1 (ja) * 2011-03-31 2012-09-12 株式会社東芝 情報処理装置及び情報処理プログラム
US8688726B2 (en) * 2011-05-06 2014-04-01 Microsoft Corporation Location-aware application searching
CN102520788B (zh) * 2011-11-16 2015-01-21 歌尔声学股份有限公司 一种语音识别控制方法
CN103182938B (zh) * 2011-12-30 2016-08-10 上海博泰悦臻电子设备制造有限公司 车载应用的适配装置、启动方法和系统,车载端
CN103116483A (zh) * 2012-11-29 2013-05-22 深圳市金立通信设备有限公司 一种调用微博的方法、装置及终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102027470A (zh) * 2008-05-19 2011-04-20 高通股份有限公司 用于呈现上下文动作的系统和方法
CN101923432A (zh) * 2010-06-10 2010-12-22 北京捷通华声语音技术有限公司 一种移动终端中应用程序的调用方法及装置
CN102799594A (zh) * 2011-05-27 2012-11-28 腾讯科技(深圳)有限公司 一种信息推送方法及装置
CN103237136A (zh) * 2013-05-10 2013-08-07 上海华勤通讯技术有限公司 移动终端及其主题词的检索方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3156915A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445764A (zh) * 2016-09-29 2017-02-22 福州大学 一种实现安卓设备稳定性自动化测试的方法

Also Published As

Publication number Publication date
EP3156915A4 (en) 2017-07-12
CN105278970A (zh) 2016-01-27
EP3156915A1 (en) 2017-04-19
US20170154068A1 (en) 2017-06-01

Similar Documents

Publication Publication Date Title
WO2015192447A1 (zh) 一种数据处理方法、装置和终端
US11682380B2 (en) Systems and methods for crowdsourced actions and commands
US20170160879A1 (en) Method and system for inputting information
US20160328205A1 (en) Method and Apparatus for Voice Operation of Mobile Applications Having Unnamed View Elements
CN108369580B (zh) 针对屏幕上项目选择的基于语言和域独立模型的方法
WO2016150083A1 (zh) 一种信息输入方法和装置
US20200285353A1 (en) Apparatus for vision and language-assisted smartphone task automation and method thereof
JP7130194B2 (ja) ユーザ意図認識方法、装置、電子機器、コンピュータ可読記憶媒体及びコンピュータプログラム
US11775254B2 (en) Analyzing graphical user interfaces to facilitate automatic interaction
TWI510965B (zh) 輸入方法編輯器整合
US10586528B2 (en) Domain-specific speech recognizers in a digital medium environment
US20170195737A1 (en) Method for video search and electronic device
US20180366108A1 (en) Crowdsourced training for commands matching
JP6978438B2 (ja) 自然言語ユーザインターフェース入力に基づいて自然言語出力を生成すること
CN105895093A (zh) 语音信息处理方法及装置
CN111753064B (zh) 一种人机交互方法及其装置
CN111949240A (zh) 交互方法、存储介质、服务程序和设备
CN109192212B (zh) 语音控制方法及装置
JP2015176099A (ja) 対話システム構築支援装置、方法、及びプログラム
WO2019152511A1 (en) Personalized digital assistant device and related methods
AU2016204573A1 (en) Common data repository for improving transactional efficiencies of user interactions with a computing device
US20180366113A1 (en) Robust replay of digital assistant operations
WO2020037921A1 (zh) 表情图片提示方法、装置、计算机设备及存储介质
CN111046060A (zh) 一种基于Elasticsearch的数据检索方法、装置、设备、介质
WO2016155643A1 (zh) 一种基于输入的显示候选词的方法和装置

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: 14895056

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014895056

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014895056

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 15318467

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE