CN103279453B - Document handling method and device - Google Patents

Document handling method and device Download PDF

Info

Publication number
CN103279453B
CN103279453B CN201310215259.3A CN201310215259A CN103279453B CN 103279453 B CN103279453 B CN 103279453B CN 201310215259 A CN201310215259 A CN 201310215259A CN 103279453 B CN103279453 B CN 103279453B
Authority
CN
China
Prior art keywords
text content
file
attribute
resource
identifier
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201310215259.3A
Other languages
Chinese (zh)
Other versions
CN103279453A (en
Inventor
杨亮
曾健
徐萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201310215259.3A priority Critical patent/CN103279453B/en
Publication of CN103279453A publication Critical patent/CN103279453A/en
Application granted granted Critical
Publication of CN103279453B publication Critical patent/CN103279453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of document handling method and device, belong to field of terminal equipment.Described method includes: receives user and opens the instruction of specified file;When specified file exists the identifier for identifying non-textual content, obtain non-textual contents attribute;Search and obtain, according to non-textual contents attribute, the Current resource that non-textual content is corresponding;Content of text based on described specified file, exports the Current resource that described non-textual content is corresponding.The present invention is by when opening the file comprising non-textual content, according to the Current resource obtaining this non-textual content that non-textual content is real-time, even if ensure that information corresponding to non-textual content changes, also the resource after renewal can be exported, avoid owing to resource that non-textual content is corresponding changes and the skimble-scamble problem of terminal device information that causes, while having reached the purpose of record, it is ensured that the accuracy of display content.

Description

File processing method and device
Technical Field
The present invention relates to the field of terminal devices, and in particular, to a file processing method and apparatus.
Background
With the development of intelligent mobile terminals, people can utilize the mobile terminals to perform simple operations such as office work and character recording. In order to realize the functions of character recording and the like, the mobile terminal provides some text tools, such as: notes, memos, etc.
In order to enrich the presentation of text tools, some text tools also provide for the insertion of non-text content, such as inserting pictures, contacts, etc., at the same time. Generally, to enable the insertion of non-textual content in text, the text tool provides an insertion interface through which local resources, such as pictures, contacts, etc., can be selected and inserted into the current file, the text tool will save these local resources in the file in the format it supports.
Taking the example of inserting a contact in a note as an example, the following steps are performed: when the user selects to insert the contact in the note, the user address book page can be opened through the insertion interface of the note to select, and when the user selects to insert the 'zhang san', the telephone number of zhang san is extracted from the address book and displayed in the note as follows: [ Zhang III: 254232555]
In the process of implementing the invention, the inventor finds that the related art has at least the following problems:
because the local resource inserted in the file is extracted and copied, and the copy version of the local resource is stored in the file, when the inserted local resource changes, the copy version of the local resource stored in the file cannot respond, so that the information cannot be unified on the same mobile terminal, and the purpose of recording cannot be achieved. For example: when the telephone number of Zhang III is changed, the telephone number inserted in the note does not change.
Disclosure of Invention
The embodiment of the invention provides a file processing method, a file processing device and terminal equipment, and aims to avoid the problem that non-text contents are not uniform due to the fact that the local resource contents corresponding to an inserted object are changed. The technical scheme is as follows:
in one aspect, a file processing method is provided, and the method includes:
receiving an instruction of a user for opening a specified file;
when an identifier for identifying non-text content exists in the designated file, acquiring non-text content attributes;
searching and acquiring a current resource corresponding to the non-text content according to the non-text content attribute;
and outputting the current resource corresponding to the non-text content based on the text content of the specified file.
When the identifier for identifying the non-text content exists in the designated file, before the non-text content attribute is acquired, the method further comprises:
when an instruction for inserting non-text content into the designated file is received, acquiring an identifier corresponding to the non-text content attribute based on the non-text content attribute corresponding to the instruction, and inserting the identifier and the non-text content into a position corresponding to the instruction.
Searching and acquiring the current resource corresponding to the non-text content according to the non-text content attribute comprises the following steps:
when the non-text content attribute is used for indicating a local resource, acquiring a resource storage path corresponding to the non-text content attribute based on the non-text content attribute; based on the resource storage path, taking the non-text content as an index in the resource storage path to obtain a current resource corresponding to the non-text content;
and when the non-text content attribute is used for indicating the network resource, acquiring a searching interface corresponding to the non-text content attribute based on the non-text content attribute, and searching the current resource corresponding to the text content in the network resource through the searching interface.
Outputting the current resource corresponding to the non-text content based on the text content of the specified file comprises:
analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and when the text content of the specified file is output, displaying the current resource corresponding to the non-text content at the position of the specified file corresponding to the identifier.
The non-text content attribute comprises a multimedia file, a contact person, a website, a bookmark, a shortcut and a file or file content which is self-defined by a user and can be obtained through address reference.
In another aspect, there is provided a document processing apparatus, the apparatus including:
the receiving module is used for receiving an instruction of opening a specified file by a user;
the attribute acquisition module is used for acquiring the attribute of the non-text content when the identifier for identifying the non-text content exists in the specified file;
the content acquisition module is used for searching and acquiring the current resource corresponding to the non-text content according to the non-text content attribute;
and the output module is used for outputting the current resource corresponding to the non-text content based on the text content of the specified file.
The device further comprises:
and the inserting module is used for acquiring an identifier corresponding to the attribute of the non-text content based on the attribute of the non-text content corresponding to the instruction when the instruction for inserting the non-text content into the designated file is received, and inserting the identifier and the non-text content into the position corresponding to the instruction.
The content acquisition module includes:
a first content obtaining unit, configured to, when the non-text content attribute is used to indicate a local resource, obtain, based on the non-text content attribute, a resource storage path corresponding to the non-text content attribute; based on the resource storage path, taking the non-text content as an index in the resource storage path to obtain a current resource corresponding to the non-text content;
and the second content acquisition unit is used for acquiring a search interface corresponding to the non-text content attribute based on the non-text content attribute when the non-text content attribute is used for indicating the network resource, and searching the current resource corresponding to the text content in the network resource through the search interface.
The output module includes:
the analysis unit is used for analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and the output unit is used for displaying the current resource corresponding to the non-text content at the position of the designated file corresponding to the identifier when the text content of the designated file is output.
The non-text content attribute comprises a multimedia file, a contact person, a website, a bookmark, a shortcut and a file or file content which is self-defined by a user and can be obtained through address reference.
In yet another aspect, a terminal device is provided that includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
receiving an instruction of a user for opening a specified file;
when an identifier for identifying non-text content exists in the designated file, acquiring non-text content attributes;
searching and acquiring a current resource corresponding to the non-text content according to the non-text content attribute;
and outputting the current resource corresponding to the non-text content based on the text content of the specified file.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
when a file containing the non-text content is opened, the current resource of the non-text content is acquired in real time according to the non-text content, so that the updated resource can be output even if the information corresponding to the non-text content is changed, the problem of non-uniform information of the terminal equipment caused by the change of the resource corresponding to the non-text content is solved, the purpose of recording is achieved, and the accuracy of the displayed content is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a file processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a file processing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a document processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a file processing method according to an embodiment of the present invention. Referring to fig. 1, the method includes:
101. receiving an instruction of a user for opening a specified file;
the specified file may refer to a file supported by a note, memo, or other text tool.
102. When an identifier for identifying the non-text content exists in the specified file, acquiring the attribute of the non-text content;
the non-text content attribute includes, but is not limited to, a multimedia file, a contact, a website, a bookmark, a shortcut, a user-defined file or file content that can be obtained by address reference, and the like. As a preferred embodiment, the multimedia file may include a picture, an audio file, a video file, and the like.
It should be noted that different non-text content attributes correspond to different identifiers to avoid confusion between the identifiers, for example, the image file corresponds to an identifier ofThe identifier corresponding to the contact is "#".
In the embodiment of the present invention, a pre-established database is stored on the home terminal device, and the database is used for storing a correspondence between an identifier of the non-text content, an attribute of the non-text content, and a resource storage path of the non-text content.
103. Searching and acquiring a current resource corresponding to the non-text content according to the non-text content attribute;
104. and outputting the current resource corresponding to the non-text content based on the text content of the specified file.
According to the method provided by the embodiment of the invention, when the file containing the non-text content is opened, the current resource of the non-text content is obtained in the local resource in real time according to the non-text content, so that the updated resource can be output even if the information corresponding to the non-text content is changed, the problem of non-uniform information of the terminal equipment caused by the change of the local resource corresponding to the non-text content is avoided, and the accuracy of the displayed content is ensured while the recording purpose is achieved.
Preferably, when the identifier for identifying the non-text content exists in the designated file, before the obtaining of the attribute of the non-text content, the method further includes:
when an instruction for inserting the non-text content into the designated file is received, an identifier corresponding to the non-text content attribute is obtained based on the non-text content attribute corresponding to the instruction, and the identifier and the non-text content are inserted into the position corresponding to the instruction.
Preferably, the obtaining the current resource corresponding to the non-text content from the local resource corresponding to the non-text content attribute includes:
based on the non-text content attribute, acquiring a resource storage path corresponding to the non-text content attribute;
and based on the resource storage path, acquiring the current resource corresponding to the non-text content in the resource storage path by taking the non-text content as an index.
Preferably, outputting the current resource corresponding to the non-text content based on the text content of the specified file includes:
analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and when the text content of the specified file is output, displaying the current resource corresponding to the non-text content at the position of the specified file corresponding to the identifier.
According to the method provided by the embodiment of the invention, when the file containing the non-text content is opened, the current resource of the non-text content is obtained in real time according to the non-text content, so that the updated resource can be output even if the information corresponding to the non-text content is changed, the problem of non-uniform information of the terminal equipment caused by the change of the resource corresponding to the non-text content is avoided, and the accuracy of the displayed content is ensured while the recording purpose is achieved.
Fig. 2 is a flowchart of a file processing method according to an embodiment of the present invention. Referring to fig. 2, the embodiment of the present invention specifically includes:
201. receiving an instruction of a user for opening a specified file;
before this step 201, the method further comprises a step 200: when an instruction for inserting the non-text content into the designated file is received, an identifier corresponding to the non-text content attribute is obtained based on the non-text content attribute corresponding to the instruction, and the identifier and the non-text content are inserted into the position corresponding to the instruction. The specified file may be a currently created file or an existing file.
In the present embodiment, the designation file is described by taking a note file as an example.
202. Analyzing the text content in the specified file;
and the terminal equipment analyzes the text content in the designated file according to a preset analysis mode. The preset parsing manner corresponds to an encoding manner of the designated file, which is not limited in the embodiment of the present invention.
203. When an identifier for identifying the non-text content exists in the specified file, acquiring the attribute of the non-text content;
in this embodiment, the non-text content specifically refers to content that is embodied as a non-pure character string when performing display output, and may be, for example: pictures, business cards, express bill numbers, mailbox addresses with hyperlink directions and the like.
In the process of parsing the designated file, when knowing that an identifier for identifying the non-text content exists in the designated file, the terminal device may determine that the designated file has the non-text content inserted in a position indicated by the identifier. If yes, the current designated file is judged to containIf so, the specified file is indicated to have the picture inserted in the position.
And when the non-text content is inserted into the designated file, acquiring the non-text content attribute corresponding to the identifier according to the corresponding relation among the identifier of the pre-stored non-text content, the non-text content attribute and the resource storage path of the non-text content.
For example, when the user inserts a picture, the identifier may specifically beWherein,for an identifier indicating that the current non-text content attribute is a picture, "12345678" is a field for indicating the non-text content;
in the embodiment of the present invention, when the attribute of the non-text content is a contact, preferably, the data format of the non-text content includes: the identifier and the field, preferably, the identifier is composed of a first "###" and a second "#" at the end of the field, and the field is composed of a phone number, "@" and a contact name, which is only exemplified by the data format in the embodiment of the present invention, and in an actual scenario, the data format may also include only the identifier and a part of the field.
For example, when the user inserts a contact, the identifier may specifically be "# # 254232555 @ zhangsan # #" when the user inserts a contact, where the first "# #" is an identifier for indicating that the current non-text content attribute is a contact, "254232555 @ zhangsan" is a field for indicating the non-text content, and the second "# #" represents an end symbol of the current identifier, where "254232555" is a phone number of the contact and "zhangsan" is a name of the contact.
204. Based on the non-text content attribute, searching and acquiring a current resource corresponding to the non-text content attribute;
the current resource corresponding to the non-text content may be a local resource or a network resource, and the non-text content is used to indicate the local resource or the network resource. Accordingly, for different inserted non-text contents, the current resource needs to be searched in different resources, for example:
when the non-text content inserted in the note is a contact name card, searching for the current resource in local resources (all contact name cards stored locally);
when the note is inserted with the express bill number, the current resource needs to be searched in the network resource (a database of express tracking processing details provided by an express manufacturer).
The following two cases are specifically described:
(1) when the non-text content attribute is used to indicate a local resource, a current resource corresponding to the non-text content attribute needs to be searched in the local resource, and this step 204 includes the following steps:
204-1, acquiring a resource storage path corresponding to the non-text content attribute based on the non-text content attribute;
as a preferred embodiment, the resource storage path corresponding to the non-text content attribute is obtained according to a correspondence relationship among the identifier of the non-text content, the non-text content attribute, and the resource storage path of the non-text content, which are stored in advance.
Only the following non-text content attributes are taken as an example for explanation, when the non-text content attribute corresponding to the identifier is a multimedia file, the resource storage path corresponding to the non-text content attribute maps a local multimedia folder; when the non-text content attribute corresponding to the identifier is a picture, mapping a resource storage path corresponding to the non-text content attribute to a local album; or when the non-text content attribute corresponding to the identifier is the contact, the resource storage path corresponding to the non-text content attribute maps the local address book; or when the non-text content attribute corresponding to the identifier is a file which is self-defined by the user and can be obtained by address reference, the resource storage path corresponding to the non-text content attribute maps the file.
204-2, based on the resource storage path, taking the non-text content as an index in the resource storage path, and acquiring a current resource corresponding to the non-text content;
the non-textual content is a field, which may in fact be a file identification or file name or file keyword, etc. for querying the corresponding resource, or a hyperlink, which may be used to map a resource storage path of the non-textual content.
Only taking the following non-text content attributes as an example for explanation, when the non-text content attribute corresponding to the identifier is a multimedia file, taking the non-text content as an index in a multimedia folder, and acquiring a current resource corresponding to the non-text content; when the non-text content attribute corresponding to the identifier is a picture, taking the non-text content as an index in the local album, and acquiring a current resource corresponding to the non-text content; or when the non-text content attribute corresponding to the identifier is a contact, acquiring the current resource corresponding to the non-text content in the local address book by taking the name field in the non-text content as an index; or, when the attribute of the non-text content corresponding to the identifier is a file which is self-defined by the user and can be obtained by address reference, the non-text content is used as an index in the file name to obtain the current resource corresponding to the non-text content.
For example, taking the detected identifier as "###" as an example, it indicates that the currently inserted object non-text content is a contact. If the read non-text content is "# # 254232555 @ zhangsan # #", inquiring the local address book according to zhangsan to obtain the current telephone number of zhangsan.
The description is given by taking the non-text content attribute as the contact, and as the name of the contact is not changed generally, the latest resource of the contact can be searched in the local address book according to the name of the contact inserted in the specified file.
(2) When the non-text content attribute is used to indicate a network resource, a current resource corresponding to the non-text content attribute needs to be searched in the network resource, and this step 204 may adopt the following method:
and acquiring a search interface corresponding to the non-text content attribute, and searching the current resource corresponding to the text content in the network resource through the search interface.
For example: and when the non-text content inserted into the note is the express bill number of the A express company, returning the express bill number to the database through the query interface provided by the A company, and searching the latest state of the express bill as the current resource.
205. Analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
it should be noted that different non-text content attributes may correspond to different parsing manners, and after the non-text content attribute is determined, the current resource corresponding to the non-text content is parsed according to the parsing manner corresponding to the non-text content.
206. And when the text content of the specified file is output, displaying the current resource corresponding to the non-text content at the position of the specified file corresponding to the identifier.
As a preferred embodiment, the information included in the current resource corresponding to the displayed non-text content has a direct relationship with the non-text content attribute, when the non-text content attribute is a picture, the displayed current resource is a picture, and when the non-text content attribute is a contact, the displayed current resource may include an avatar, a phone number, a name, and the like, and the displayed information may be defined by a user or a developer.
In addition, for the current resource of the non-text content, the current resource can be output in the form of a hyperlink, when the user clicks the hyperlink, the resource content corresponding to the hyperlink is displayed, as for example, the non-text content is taken as a contact person, when the specified file is displayed, the hyperlink can be displayed at the insertion position of the non-text content, so that when the user clicks the hyperlink, the name card of the contact person can be displayed.
And explaining by taking the non-text content attribute as a hyperlink as an example, when the non-text content contained in the designated file is an express bill number and the non-text content attribute is the hyperlink, inquiring the latest message of the express according to the bill number, and displaying the latest message at a position corresponding to the non-text content of the designated file.
It should be noted that, if, when inserting the non-text content into the designated file, the non-text content corresponds to content 1, and if the telephone number of contact zhang is "010101", and a real-time query is made from a local resource according to the non-text content through a response to the current instruction to open the designated file, the obtained telephone number of zhang is "254232555", the name of zhang and the updated telephone number are displayed on the basis of the text content of the designated file, and of course, a plurality of pieces of information corresponding to the non-text content may also be displayed. At this time, the resource when the non-text content is initially inserted is different from the resource displayed when the non-text content is currently opened, and the displayed resource is the latest resource corresponding to the non-text content, so that the situation that information is inconsistent due to the change of local resources is avoided, and continuous user experience is provided for a terminal device user.
According to the method provided by the embodiment of the invention, when the file containing the non-text content is opened, the current resource of the non-text content is acquired from the network or the local in real time according to the non-text content, so that the updated resource can be output even if the information corresponding to the non-text content is changed, the problem of non-uniform information of the terminal equipment caused by the change of the local resource or the network resource corresponding to the non-text content is avoided, and the accuracy of the displayed content is ensured while the recording purpose is achieved.
FIG. 3 is a schematic structural diagram of a document processing apparatus according to an embodiment of the present invention. Referring to fig. 3, the apparatus includes:
a receiving module 301, configured to receive an instruction of a user to open a specified file;
an attribute obtaining module 302, configured to obtain the attribute of the non-text content when an identifier for identifying the non-text content exists in the specified file;
a content obtaining module 303, configured to search and obtain a current resource corresponding to the non-text content according to the non-text content attribute;
and the output module 304 is configured to output the current resource corresponding to the non-text content based on the text content of the specified file.
Preferably, the apparatus further comprises:
and the inserting module is used for acquiring an identifier corresponding to the attribute of the non-text content based on the attribute of the non-text content corresponding to the instruction when receiving the instruction for inserting the non-text content into the designated file, and inserting the identifier and the non-text content into the position corresponding to the instruction.
Preferably, the content acquiring module includes:
a first content obtaining unit, configured to, when the non-text content attribute is used to indicate a local resource, obtain, based on the non-text content attribute, a resource storage path corresponding to the non-text content attribute; based on the resource storage path, taking the non-text content as an index in the resource storage path to obtain a current resource corresponding to the non-text content;
and the second content acquisition unit is used for acquiring a search interface corresponding to the non-text content attribute based on the non-text content attribute when the non-text content attribute is used for indicating the network resource, and searching the current resource corresponding to the text content in the network resource through the search interface.
Preferably, the output module includes:
the analysis unit is used for analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and the output unit is used for displaying the current resource corresponding to the non-text content at the position of the specified file corresponding to the identifier when the text content of the specified file is output.
Preferably, the non-textual content attributes include multimedia files, contacts, web sites, bookmarks, shortcuts, user-defined files or file content available through address references.
The device provided by the embodiment of the invention can acquire the current resource of the non-text content in real time according to the non-text content when the file containing the non-text content is opened, thereby ensuring that the updated resource can be output even if the information corresponding to the non-text content is changed, avoiding the problem of non-uniform information of the terminal equipment caused by the change of the resource corresponding to the non-text content, achieving the purpose of recording and ensuring the accuracy of the displayed content.
It should be noted that: in the document processing apparatus provided in the above embodiment, only the division of the functional modules is exemplified in document processing, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the file processing apparatus and the file processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device may be used to implement the file processing method provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the terminal device 400 may include RF (Radio Frequency) circuitry 110, a memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, audio circuitry 160, a WiFi (wireless fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 4 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal device 400, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Preferably, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. Preferably, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphic user interfaces of the terminal apparatus 400, which may be configured by graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 4, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal device 400 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Preferably, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 141 and/or the backlight when the terminal device 400 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the terminal device 400, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and the terminal device 400. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and outputs the audio data to the processor 180 for processing, and then transmits the audio data to, for example, another terminal device via the RF circuit 110, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of peripheral headphones with the terminal device 400.
WiFi belongs to short-distance wireless transmission technology, and the terminal device 400 can help the user send and receive e-mails, browse web pages, access streaming media, etc. through the WiFi module 170, and it provides wireless broadband internet access for the user. Although fig. 4 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the terminal device 400, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal device 400, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal device 400 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal device 400 further includes a power supply 190 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 180 via a power management system, so as to manage charging, discharging, and power consumption via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal device 400 may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the display unit of the terminal device is a touch screen display, the terminal device further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
receiving an instruction of a user for opening a specified file;
when an identifier for identifying non-text content exists in the designated file, acquiring the attribute of the non-text content;
acquiring a current resource corresponding to the non-text content from a local resource corresponding to the non-text content attribute;
and outputting the current resource corresponding to the non-text content based on the text content of the specified file.
Preferably, the memory is further configured to store instructions for:
when an instruction for inserting non-text content into the designated file is received, acquiring an identifier corresponding to the non-text content attribute based on the non-text content attribute corresponding to the instruction, and inserting the identifier and the non-text content into a position corresponding to the instruction.
Preferably, the memory is further configured to store instructions for:
when the non-text content attribute is used for indicating a local resource, acquiring a resource storage path corresponding to the non-text content attribute based on the non-text content attribute; based on the resource storage path, taking the non-text content as an index in the resource storage path to obtain a current resource corresponding to the non-text content;
and when the non-text content attribute is used for indicating the network resource, acquiring a searching interface corresponding to the non-text content attribute based on the non-text content attribute, and searching the current resource corresponding to the text content in the network resource through the searching interface.
Preferably, the memory is further configured to store instructions for:
analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and when the text content of the specified file is output, displaying the current resource corresponding to the non-text content at the position of the specified file corresponding to the identifier.
Preferably, the non-text content attribute includes a multimedia file, a contact, a website, a bookmark, a shortcut, a file or file content which is self-defined by a user and can be obtained by address reference, and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method of file processing, the method comprising:
receiving an instruction of a user for opening a specified file;
analyzing the text content in the designated file according to an analysis mode corresponding to the encoding mode of the designated file;
when an identifier for identifying non-text content exists in the designated file, acquiring non-text content attributes;
when the non-text content attribute is used for indicating a local resource, acquiring a resource storage path corresponding to the non-text content attribute based on the non-text content attribute; based on the resource storage path, taking the non-text content as an index in the resource storage path to obtain a current resource corresponding to the non-text content;
when the non-text content attribute is used for indicating network resources, acquiring a search interface corresponding to the non-text content attribute based on the non-text content attribute, and searching current resources corresponding to the non-text content in the network resources through the search interface;
and outputting the current resource corresponding to the non-text content based on the text content of the specified file.
2. The method according to claim 1, wherein when the identifier for identifying the non-text content exists in the designated file, before the obtaining of the non-text content attribute, the method further comprises:
when an instruction for inserting non-text content into the designated file is received, acquiring an identifier corresponding to the non-text content attribute based on the non-text content attribute corresponding to the instruction, and inserting the identifier and the non-text content into a position corresponding to the instruction.
3. The method of claim 1, wherein outputting the current resource corresponding to the non-textual content based on the textual content of the specified file comprises:
analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and when the text content of the specified file is output, displaying the current resource corresponding to the non-text content at the position of the specified file corresponding to the identifier.
4. The method of claim 1, wherein the non-textual content attribute comprises a multimedia file, a contact, a web address, a bookmark, a shortcut, a user-defined file or file content available via an address reference.
5. A document processing apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving an instruction of opening a specified file by a user; analyzing the text content in the designated file according to an analysis mode corresponding to the encoding mode of the designated file;
the attribute acquisition module is used for acquiring the attribute of the non-text content when the identifier for identifying the non-text content exists in the specified file;
a content obtaining module, configured to, when the non-text content attribute is used to indicate a local resource, obtain, based on the non-text content attribute, a resource storage path corresponding to the non-text content attribute; based on the resource storage path, taking the non-text content as an index in the resource storage path to obtain a current resource corresponding to the non-text content; when the non-text content attribute is used for indicating network resources, acquiring a search interface corresponding to the non-text content attribute based on the non-text content attribute, and searching current resources corresponding to the non-text content in the network resources through the search interface;
and the output module is used for outputting the current resource corresponding to the non-text content based on the text content of the specified file.
6. The apparatus of claim 5, further comprising:
and the inserting module is used for acquiring an identifier corresponding to the attribute of the non-text content based on the attribute of the non-text content corresponding to the instruction when the instruction for inserting the non-text content into the designated file is received, and inserting the identifier and the non-text content into the position corresponding to the instruction.
7. The apparatus of claim 5, wherein the output module comprises:
the analysis unit is used for analyzing the current resource corresponding to the non-text content according to the analysis mode corresponding to the non-text content;
and the output unit is used for displaying the current resource corresponding to the non-text content at the position of the designated file corresponding to the identifier when the text content of the designated file is output.
8. The apparatus of claim 5, wherein the non-textual content attribute comprises a multimedia file, a contact, a web address, a bookmark, a shortcut, a user-defined file or file content available via an address reference.
CN201310215259.3A 2013-05-31 2013-05-31 Document handling method and device Active CN103279453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310215259.3A CN103279453B (en) 2013-05-31 2013-05-31 Document handling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310215259.3A CN103279453B (en) 2013-05-31 2013-05-31 Document handling method and device

Publications (2)

Publication Number Publication Date
CN103279453A CN103279453A (en) 2013-09-04
CN103279453B true CN103279453B (en) 2016-08-17

Family

ID=49061978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310215259.3A Active CN103279453B (en) 2013-05-31 2013-05-31 Document handling method and device

Country Status (1)

Country Link
CN (1) CN103279453B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843789A (en) * 2016-04-01 2016-08-10 乐视控股(北京)有限公司 Rich text monitoring method and device
CN106775916B (en) * 2017-02-17 2020-02-28 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783062A (en) * 2004-11-29 2006-06-07 国际商业机器公司 File editing device and file editing method
CN1790316A (en) * 2005-12-20 2006-06-21 无锡永中科技有限公司 Method of inserting and playing slide in file
CN1973285A (en) * 2004-06-24 2007-05-30 佳思腾软件公司 Document processing method and device
TW200905481A (en) * 2007-07-20 2009-02-01 Ensky Technology Co Ltd File processing apparatus and method therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1973285A (en) * 2004-06-24 2007-05-30 佳思腾软件公司 Document processing method and device
CN1783062A (en) * 2004-11-29 2006-06-07 国际商业机器公司 File editing device and file editing method
CN1790316A (en) * 2005-12-20 2006-06-21 无锡永中科技有限公司 Method of inserting and playing slide in file
TW200905481A (en) * 2007-07-20 2009-02-01 Ensky Technology Co Ltd File processing apparatus and method therefor

Also Published As

Publication number Publication date
CN103279453A (en) 2013-09-04

Similar Documents

Publication Publication Date Title
CN108496150B (en) Screen capture and reading method and terminal
CN105900466B (en) Message processing method and device
US10643021B2 (en) Method and device for processing web page content
US9241242B2 (en) Information recommendation method and apparatus
CN104852885B (en) Method, device and system for verifying verification code
AU2014200621B2 (en) Method and apparatus for sharing part of web page
CN108549519B (en) Split screen processing method and device, storage medium and electronic equipment
US20190317864A1 (en) Data backup method, electronic device, and storage medium
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
JP2018513502A (en) Method and device for displaying web page annotation and mobile terminal
WO2018196588A1 (en) Information sharing method, apparatus and system
CN107436948B (en) File searching method and device and terminal
CN104281394A (en) Method and device for intelligently selecting words
CN103279288A (en) Method, device and terminal units for transmitting data
CN110020293B (en) Multimedia data display method, device and storage medium
CN106951492B (en) File searching method and device and electronic equipment
CN109495638B (en) Information display method and terminal
CN103607377B (en) Information sharing method, Apparatus and system
WO2014146450A1 (en) Method, device and system for data searching
CN110688497A (en) Resource information searching method and device, terminal equipment and storage medium
CN105095161B (en) Method and device for displaying rich text information
CN104731806B (en) A kind of method and terminal for quickly searching user information in social networks
CN110196662B (en) Method, device, terminal and storage medium for displaying synchronization state
CN107153715B (en) Method and device for adding file on page
CN103279453B (en) Document handling method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Xiaomi Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100102 CHAOYANG, BEIJING TO: 100085 HAIDIAN, BEIJING

C14 Grant of patent or utility model
GR01 Patent grant