Method and computing device for displaying multiple files in different formats on one page
By using Service and AIDL services in the Android system, multiple files in different formats are displayed and operated simultaneously on one page of the office software, solving the problem that cannot be displayed and operated simultaneously in the existing technology and improving work efficiency.
Patent Information
- Application Number
- CN202011441244.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-08
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-12-08
AI Technical Summary
The existing office software cannot display and operate multiple files of different formats on one page at the same time, resulting in frequent switching of users, which increases work burden and waste of time.
By configuring Service services and AIDL services in the Android system, the main process obtains document data of multiple target files and generates multiple subprocesses for parsing and typing, uses AIDL services for cross-process communication, and sends the parsed data packet to the main process for Display, implement the display and operation of multiple documents on one page at the same time.
It realizes that multiple files in different formats are displayed and operated simultaneously on one page of the office software, and supports separate operations. Internal operations do not affect other documents, which improves work efficiency.
Smart Images

Figure CN114611458B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for displaying multiple files in different formats on one page, and in particular to a method and a computing device for simultaneously displaying and operating documents in one or more formats of doc format, docx format, xls format, xlsx format, ppt format, pptx format, txt format and pdf format on one page. Background Art
[0002] Usually, only one format of document can be displayed on one page in office software. If multiple documents are opened, they need to be switched constantly for viewing, and multiple files of different formats cannot be displayed and operated on the same page at the same time. Such switching back and forth increases the workload, wastes time and is inconvenient.
[0003] Therefore, it is urgent to propose a new technical solution to solve the above problems. Summary of the invention
[0004] Existing office software cannot display and operate multiple files of different formats on one page at the same time. Such switching back and forth increases the workload, wastes time and is inconvenient. The purpose of the present invention is to solve the problems existing in the prior art and provide a method and computing device for displaying multiple files of different formats on one page. The specific scheme is as follows:
[0005] A method for displaying multiple files in different formats on one page, comprising: configuring a Service service and an AIDL service in an Android system program, wherein the Service service supports office software running on the Android system, and the AIDL service supports cross-process communication between the office software and the Android system; running the office software, the main process of the office software obtains document data of multiple target files from the Android system, opens multiple target files, the main process calls the Service service to generate multiple sub-processes that support the operation of the multiple target files; the sub-process obtains document data from the main process, parses and typesets the document data to obtain a parsed data packet, the sub-process calls the AIDL service to send the parsed data packet to the main process, and the main process displays the parsed data packet.
[0006] Furthermore, in the above technical solution, the main process of the office software obtains the document data of multiple target files from the Android system by calling the AIDL service, and calls the recyclerview control to display the obtained document data to the user.
[0007] Furthermore, a plurality of the target files are opened, and the main process of the office software calls the Service service to generate a plurality of sub-processes supporting the running of the plurality of the target files, wherein one target file corresponds to one sub-process.
[0008] Furthermore, the formats of the multiple target files include one or more of doc format, docx format, xls format, xlsx format, ppt format, pptx format, txt format and pdf format.
[0009] Furthermore, the child process calls the AIDL service to obtain document data from the main process, where the document data includes a document path and a document name.
[0010] Furthermore, after the sub-process parses and typesets the document data to obtain a parsed data packet, the sub-process sends a signal to the main process through the AIDL service. After the main process receives the signal, the main process uses a view tool to draw the received parsed data packet to obtain the document content of the target file. The main process displays the drawn document content on the interface of the office software.
[0011] The present invention also provides a computing device, which includes an Android system, wherein an AndroidManifest configuration file of the Android system is configured with a Service service and an AIDL service, an application of office software is implanted in the Android system, one or more target files are opened with the office software, and one or more target files are displayed on an interface of the office software.
[0012] The above technical solution further includes opening one or more target files with the office software, and displaying one or more target files on the interface of the office software. The specific implementation steps include:
[0013] The office software runs on the Android system with the support of the Service.
[0014] Open multiple target files on the Android system, and the main process of the office software obtains document data of the multiple target files through the AIDL service.
[0015] The main process creates multiple sub-processes corresponding to the multiple target files one by one through the Service service.
[0016] The sub-process obtains the document data of the target file corresponding to the main process through the AIDL service, and parses and typesets the obtained document data to obtain a parsed data packet.
[0017] The sub-process sends the parsed data packet to the main process through the AIDL service, and the main process draws the parsed data packet and displays the drawn document content on the interface of the office software.
[0018] Compared with the prior art, the method and computing device for displaying multiple files in different formats on one page provided by the present invention can realize the simultaneous display and operation of multiple documents in different formats on one page of office software without switching back and forth for viewing. All documents displayed on the same page support separate operation, and all internal operations do not affect other documents, which conforms to work reality and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is a block diagram of the relationship between the Android system and the main process of the office software of the present invention;
[0021] Figure 2 It is a block diagram of the interaction relationship between the main process and the sub-process of the office software of the present invention;
[0022] Figure 3 It is a principle flow chart of the method for displaying multiple files in different formats on one page according to the present invention.
[0023] Among them: 10-Android system; 11-Service service; 12-AIDL service; 20-main process. DETAILED DESCRIPTION
[0024] The following will be combined with the accompanying drawings of the embodiments of the present invention to clearly and completely describe the technical solutions of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] In the description of the present invention, it should be understood that the terms "upper", "lower", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In the description of the present invention, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0026] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] The gist of the present invention is further explained below with reference to the accompanying drawings and embodiments.
[0028] Example:
[0029] Existing office software cannot display and operate multiple files of different formats on one page at the same time. Such switching back and forth increases the workload, wastes time and is inconvenient. The purpose of the present invention is to solve the problems existing in the prior art and provide a method and computing device for displaying multiple files of different formats on one page. Figure 1-3 .
[0030] In one aspect, the present invention provides a method for displaying multiple files of different formats on one page, see Figure 1-3, which includes: configuring a Service service 11 and an AIDL service 12 in a program of an Android system 10, wherein the Service service 11 supports office software running on the Android system 10, and the AIDL service 12 supports cross-process communication between office software and the Android system 10; running office software, a main process 20 of the office software obtains document data of multiple target files from the Android system 10, opens multiple target files, and the main process 20 calls the Service service 11 to generate multiple sub-processes that support the running of the multiple target files; the sub-process obtains document data from the main process 20, and parses and typesets the document data to obtain a parsed data packet, the sub-process calls the AIDL service 12 to send the parsed data packet to the main process 20, and the main process 20 displays the parsed data packet.
[0031] In one embodiment, see Figure 1 The main process 20 of the office software obtains the document data of multiple target files from the Android system 10 by calling the AIDL service 12, and calls the recyclerview control to display the obtained document data to the user.
[0032] In one embodiment, see Figure 2 , opening multiple target files, the main process 20 of the office software calls the Service service 11 to generate multiple sub-processes that support the running of the multiple target files, wherein one target file corresponds to one sub-process.
[0033] In one embodiment, the formats of the plurality of target files include one or more of doc format, docx format, xls format, xlsx format, ppt format, pptx format, txt format and pdf format.
[0034] In one embodiment, the child process calls the AIDL service 12 to obtain document data from the main process 20, where the document data includes a document path and a document name.
[0035] In one embodiment, see Figure 3 After the sub-process parses and typesets the document data to obtain a parsed data packet, the sub-process sends a signal to the main process 20 through the AIDL service 12. After the main process 20 receives the signal, the main process 20 uses a view tool to draw the received parsed data packet to obtain the document content of the target file. The main process 20 displays the drawn document content on the interface of the office software.
[0036] The present invention also provides a computing device, which includes an Android system 10, wherein the AndroidManifest configuration file of the Android system 10 is configured with a Service service 11 and an AIDL service 12, and an application of office software is implanted in the Android system 10, and one or more target files are opened with the office software, and one or more target files are displayed on the interface of the office software.
[0037] The above technical solution further includes opening one or more target files with the office software, and displaying one or more target files on the interface of the office software. The specific implementation steps include:
[0038] The office software runs on the Android system 10 with the support of the Service 11.
[0039] Open multiple target files on the Android system 10, and the main process 20 of the office software obtains the document data of the multiple target files through the AIDL service 12,
[0040] The main process 20 creates multiple sub-processes corresponding to the multiple target files one by one through the Service service 11.
[0041] The sub-process obtains the document data of the target file corresponding to it from the main process 20 through the AIDL service 12, and parses and typesets the obtained document data to obtain a parsed data packet.
[0042] The sub-process sends the parsed data packet to the main process 20 through the AIDL service 12, and the main process 20 draws the parsed data packet and displays the drawn document content on the interface of the office software.
[0043] Compared with the prior art, the method and computing device for displaying multiple files in different formats on one page provided by the present invention can realize the simultaneous display and operation of multiple documents in different formats on one page of office software without switching back and forth for viewing. All documents displayed on the same page support separate operation, and all internal operations do not affect other documents. In addition, doc format, docx format, xls format, xlsx format, ppt format, pptx format, txt format and pdf format can all be displayed on one page at the same time, and also support separate operation without affecting each other.
[0044] The general implementation principle of the method for displaying multiple files of different formats on one page provided by the present invention is as follows: the office software supports the display and operation of multiple documents on one page by using the Android Service 11 to open a new process and perform cross-process communication through AIDL. That is, when opening a document, the program adds a new document process by binding the Service 11, and then uses AIDL to pass the data required by the document process through the main process 20. After receiving the data, the document starts the document parsing operation, and after the parsing is completed, the main process 20 is notified to display it.
[0045] In order to realize the simultaneous operation of multiple documents, it is necessary to open multiple processes to manage multiple documents. The main process 20 is equivalent to the administrator, who issues orders to the documents that need to be operated. Figure 2 .
[0046] When multiple documents are displayed on the same page by the method of displaying multiple files of different formats on one page described in the present invention, the relevant Service service 11 and AIDL related configurations must be configured in the AndroidManifest configuration file of Android. It should be noted here that if the Service service 11 is needed, the Service related information must be configured in the AndroidManifest configuration file. This is a necessary operation for Android to use the Service service 11, while the use of the AIDL service 12 does not need to be configured in the AndroidManifest configuration file. It has its own usage process, which involves the usage of basic knowledge of Android. The configuration here is equivalent to laying the foundation for realizing this function.
[0047] When the office software program is opened, the main process 20 of the office software will obtain the document data in the Android device, display the data through the recyclerview control, open the target file, and the main process 20 will be bound to the Service service 11 in the configuration file to open a child process (i.e., document process), named here as child process 1. Child process 1 and main process 20 are two processes that have nothing to do with each other. Then the main process 20 and child process 1 will communicate across processes through the AIDL service 12 (the main process 20 and the child process belong to two different processes, and processes generally cannot directly exchange data. The AIDL service 12 can solve the problem of data exchange between the two processes. The communication here can be regarded as data transmission, and the cross-process communication here is only communication between processes). The document-related data that the main process 20 can obtain (the document data is not the content of the document itself, but the basic information of the document, such as the document path) is passed to the child process 1. After receiving this information, the child process 1 performs content parsing and typeset on the document to be opened through internal parsing steps.
[0048] When child process 1 finishes parsing and typesetting the document, it sends a signal to the main process through AIDL. After receiving the signal, the main process notifies the view of the main process to draw the document content, so that the document content is displayed on the interface. After the parsing is completed, the parsed data packet is used by the main process to complete the page drawing. Correspondingly, when the corresponding changes are made, they must also be passed to the child process through the main process, and then the child process will update the data.
[0049] It should also be noted that opening multiple documents of different formats at the same time is also handled according to the above process. Since they are different processes, the operations of multiple documents will only be processed in their own processes and will not affect other documents. When opening multiple files, the main process will generate multiple window views, and these windows will correspond to these documents one by one. Since the content size of each document is different, the time for the sub-process to complete the parsing is not fixed, so the timing of the document content appearing in the view window is also not fixed. The document opened first may be slower than the content of the file opened later due to the long parsing time, so there will be a sequence of page display. Due to the existence of the view window, it does not affect the browsing of the document.
[0050] In summary, the method and computing device for displaying multiple files in different formats on one page provided by the present invention can realize the simultaneous display and operation of multiple documents in different formats on one page of office software without switching back and forth for viewing. All documents displayed on the same page support independent operation, and all internal operations do not affect other documents.
[0051] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification.
[0052] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify and vary the above embodiments within the scope of the present invention.
Claims
1. A method for displaying multiple files of different formats on one page, characterized in that: It includes: Configure a Service service and an AIDL service in the Android system program, wherein the Service service supports the office software to run on the Android system, and the AIDL service supports cross-process communication between the office software and the Android system; Running the office software, wherein the main process of the office software obtains document data of multiple target files from the Android system, opens the multiple target files, and the main process calls the Service to generate multiple sub-processes that support the running of the multiple target files, wherein one target file corresponds to one sub-process; The sub-process obtains document data from the main process, and parses and typesets the document data to obtain a parsed data packet. The sub-process calls the AIDL service to send the parsed data packet to the main process, and the main process displays the parsed data packet.
2. The method for displaying multiple files in different formats on one page according to claim 1, characterized in that: The main process of the office software obtains document data of multiple target files from the Android system by calling the AIDL service, and calls the recyclerview control to display the obtained document data to the user.
3. The method for displaying multiple files of different formats on one page according to claim 1, characterized in that: The formats of the multiple target files include one or more of doc format, docx format, xls format, xlsx format, ppt format, pptx format, txt format and pdf format.
4. The method for displaying multiple files in different formats on one page according to claim 1, characterized in that: Said The child process calls the AIDL service to obtain document data from the main process, where the document data includes a document path and a document name.
5. The method for displaying multiple files in different formats on one page according to claim 1, characterized in that: After the sub-process parses and typesets the document data to obtain a parsed data packet, the sub-process sends a signal to the main process through the AIDL service. After the main process receives the signal, the main process uses a view tool to draw the received parsed data packet to obtain the document content of the target file. The main process displays the drawn document content on the interface of the office software.
6. A computing device, characterized in that: It includes an Android system, wherein the AndroidManifest configuration file of the Android system is configured with a Service service and an AIDL service, an application of office software is implanted in the Android system, one or more target files are opened with the office software, and one or more target files are displayed on the interface of the office software, The office software is opened, and one or more target files are displayed on the interface of the office software. The specific implementation steps include: The office software runs on the Android system with the support of the Service, opens multiple target files on the Android system, and the main process of the office software obtains the document data of the multiple target files through the AIDL service. The main process creates multiple sub-processes corresponding to the multiple target files one by one through the Service service. The sub-process obtains the document data of the target file corresponding to the main process through the AIDL service, and parses and typesets the obtained document data to obtain a parsed data packet. The sub-process sends the parsed data packet to the main process through the AIDL service, and the main process draws the parsed data packet and displays the drawn document content on the office software.
