Note-taking capability exposure framework, method, device, and storage medium
By pre-installing a note-taking capability sharing library in the electronic device's operating system, providing handwriting and element editing capabilities, the problem of high development difficulty and increased code volume in text editing applications is solved, and efficient text editing functions are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2023-12-29
- Publication Date
- 2026-05-01
AI Technical Summary
Developing text editing applications requires consideration of the coordination between electronic device hardware and software, which increases development difficulty and code volume, making promotion more challenging.
Integrate a pre-built note-taking capability sharing library into the operating system of electronic devices, providing handwriting and element editing capabilities, reducing development difficulty and code volume, and implementing text editing functions through underlying system improvements.
It reduces the development difficulty for developers and the amount of data in application files, while improving text editing efficiency and user experience.
Smart Images

Figure CN120276713B_ABST
Abstract
Description
Open frameworks, methods, devices, and storage media for note-taking capabilities Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an open framework, method, device and storage medium for note-taking capabilities. Background Technology
[0002] In the use of text-based files such as images, documents, and journals, there is often a need to edit existing files by handwriting, drawing, or inserting elements (such as text boxes or images). For example, this could involve editing portable document format (PDF) courseware to take course notes. Based on this, there is a demand for developing corresponding applications (APPs) to enable text editing of existing files.
[0003] Currently, developers of such apps typically need to pre-write the logic code for implementing text editing capabilities in the app's application files. However, implementing text editing capabilities requires consideration of coordination between the app and the hardware and software of electronic devices, making development quite challenging. Furthermore, this logic code significantly increases the data size of the application files, thus increasing the difficulty of promoting the app. Summary of the Invention
[0004] This application provides an open framework, method, device, and storage medium for note-taking capabilities, which can reduce the development difficulty of text editing apps and the amount of data in these apps. The technical solution is as follows:
[0005] Firstly, an open framework for note-taking capabilities is provided. This framework includes a note-taking capability sharing library pre-installed in the operating system of an electronic device. This library can provide text editing capabilities for any application. Specifically, the note-taking capability sharing library includes at least one of a handwriting capability module and an element capability module; the handwriting capability module provides handwriting editing capabilities to the application; and the element capability module provides element editing capabilities to the application.
[0006] This application embodiment pre-installs a note-taking capability sharing library within the operating system of the electronic device, providing text editing capabilities for any application. This library is open to any application, allowing them to utilize its text editing capabilities to implement text-editing related business functions. By improving the underlying system of the electronic device, developers can directly utilize the publicly available note-taking capability sharing library to develop text editing functions for their apps, without needing to fully understand the specific hardware and software information of the electronic device or consider coordination with its hardware and software. This reduces development difficulty and improves the developer experience. Furthermore, since the app can directly utilize the text editing capabilities provided by the electronic device's note-taking capability sharing library, there is no need to integrate the specific implementation code of the text editing capabilities into the app's application file, significantly reducing the data size of the application file and thus lowering the difficulty of app promotion. In addition, in this application embodiment, different apps can use different capabilities of the note-taking capability sharing library according to their business needs to achieve different business functions, thereby greatly reducing the difficulty of business implementation.
[0007] The handwriting editing capability refers to the ability to draw corresponding handwritten strokes based on handwriting operations, that is, the ability to draw corresponding curves or graphics based on handwriting operations. For example, the handwriting capability module can provide a handwriting editing layer for the application. This layer is used to draw corresponding handwritten strokes based on handwriting operations, allowing users to perform handwriting drawing through the handwriting editing layer. The handwriting operation can be a stylus operation or a finger swipe operation, etc., and this embodiment does not limit the specific type of operation.
[0008] Element editing capabilities refer to the ability to insert corresponding elements based on element editing operations, and the ability to edit (modify or delete) inserted elements. For example, element editing capabilities can provide an element editing layer for the application. This layer is used to insert corresponding elements based on element editing operations and to edit the inserted elements, allowing users to edit elements through the layer. Elements can include one or more of the following: text boxes, images, formulas, graphics, tables, charts, graphs, web links, or bookmarks.
[0009] In one embodiment, the note-taking capability sharing library also includes a business management module. This module provides business management capabilities for the application's text editing functions, such as providing business management capabilities for modules like handwriting editing layers or element editing layers. For example, the business management module can provide layer management and operation management functions for layers such as handwriting editing layers and element editing layers.
[0010] In one embodiment, the layer management function manages one or more of the following layer functions: layer visibility configuration, layer editability configuration, and layer element copying. That is, the layer management function can be used to set any of the above layers to be visible or invisible, or to be editable or non-editable, and to copy elements within the layer.
[0011] In one embodiment, the operation management function manages one or more of the following operations: push operations, pop operations, and disk write operations. That is, operations on the layer can be managed using a stack storage structure. After a user performs an operation on the layer, the executed operation can be pushed onto or popped from the stack. Pushing an operation onto the stack records the operation, while popping an operation undoes and restores the operation. Disk write refers to storing the relevant data of the operation. It should be understood that the general operation logic may also include other operation logic, such as logic modules for implementing screenshot operations, touch event control, and gesture recognition.
[0012] In one embodiment, the note-taking capability sharing library may further include a background module for setting the application's editable file as the editing background. For example, the background module can provide a background layer for the application, which is used to set the application's editable file as the editing background. This background layer is located below other layers such as the handwriting editing layer and the element editing layer, serving as the background for those other layers. This allows the application's editable file to be set as the editing background for secondary editing.
[0013] In one embodiment, the note-taking capability sharing library also includes a pagination management module. The note-taking capability sharing library provides at least one layer for overlaying and generating a canvas corresponding to the editable file in the application. The pagination management module is used to paginate the canvas, and each pagination is generated based on the overlay of this at least one layer and has the capabilities of the corresponding layer. For example, each pagination has a background layer, an element editing layer, and a handwriting editing layer, providing capabilities such as setting the background, handwriting editing, and element editing.
[0014] In one embodiment, the note-taking capability sharing library includes at least one code file, which implements the capabilities of the aforementioned logic modules. The filename of the at least one code file is obtained by obfuscating the original filename of the at least one code file using a first obfuscation strategy, which differs from the second obfuscation strategy used for the filenames of the application's code files.
[0015] In this embodiment of the application, to prevent code files in the application file from being overwritten by code files with the same name in the note-taking capability sharing library during the loading process, a specific obfuscation strategy can be used to obfuscate the initial filename of the note-taking capability sharing library's code files, thereby reducing the probability of code files with the same name appearing in the note-taking capability sharing library and the application file. If the code files of the note-taking capability sharing library are also obfuscated using the same general obfuscation strategy as the application file, the probability of the obfuscated filenames being identical is also high. Therefore, by using a first obfuscation strategy, which is different from the second obfuscation strategy used for the filenames of the application's code files, to obfuscate the original filenames of at least one code file included in the note-taking capability sharing library, the probability of code files with the same name appearing in the application file can be reduced.
[0016] In one embodiment, the filename obtained by obfuscating using the first obfuscation strategy contains a fixed string. This fixed string is a preset string, which can be set as needed, such as "penkit". In this embodiment, to distinguish it from the general obfuscation strategy used for the code filenames of application files, the first obfuscation strategy used for the code filenames of the note-taking capability sharing library can also be called a targeted obfuscation strategy.
[0017] For example, a second obfuscation strategy can be used to initially obfuscate the original filenames of at least one code file included in the note-taking capability sharing library, and then a fixed string can be added to the filenames after the initial obfuscation. For example, a fixed string can be added to each string separated by a delimiter in the filenames after the initial obfuscation, so that the fixed string can be distinguished from the code filenames of applications obfuscated using the second obfuscation strategy.
[0018] Furthermore, you can first perform case conversion on the filenames after the initial obfuscation process, such as converting lowercase characters to uppercase and lowercase characters, and then add a fixed string to the case-converted filenames. For example, you can add a fixed string to each string separated by a delimiter within the case-converted file.
[0019] In one embodiment, the note-taking capability sharing library also includes a pagination management module. The note-taking capability sharing library provides at least one layer for overlaying and generating a canvas corresponding to the editable file in the application. The pagination management module is used to paginate the canvas, and each pagination is generated based on the overlay of this at least one layer and has the corresponding layer's capabilities. For example, each pagination has a background layer, an element editing layer, and a handwriting editing layer, providing capabilities such as setting the background, handwriting editing, and element editing.
[0020] In one embodiment, the note-taking capability sharing library also includes a cross-layer operation control module; the cross-layer operation control module is used to provide applications with cross-layer operation capabilities, such as providing cross-layer copy operation capabilities.
[0021] In one embodiment, the note-taking capability open framework further includes an application management module pre-installed in the operating system of the electronic device. This application management module loads the note-taking capability shared library into the application's process. For example, when the application detects that the application integrates a target SDK, the application management module loads the note-taking capability shared library into the application's process, and the target SDK uses the library to call the note-taking capability shared library. By loading the note-taking capability shared library into the app's process, the latency of the application using the terminal's text editing capabilities can be reduced, improving text editing efficiency.
[0022] Secondly, a method for opening up note-taking capabilities is provided and applied to an electronic device. The electronic device has a first application installed, and the operating system of the electronic device includes a note-taking capability sharing library and an application management module. The note-taking capability sharing library is used to provide text editing capabilities for any application. The method includes: after the first application starts, the application management module loads the note-taking capability sharing library into the application process of the first application; the first application implements text editing functions through the loaded note-taking capability sharing library in the application process.
[0023] In this embodiment, the system's underlying open note-taking capability sharing library can be loaded into the application process, allowing the application to use the library's capabilities to perform text editing. This reduces latency and improves text editing efficiency.
[0024] In one embodiment, after the first application starts, if the application management module detects that the first application integrates the target SDK, it loads the note-taking capability sharing library into the application process of the first application, and the target SDK is used to call the note-taking capability sharing library.
[0025] In one embodiment, after the note-taking capability sharing library is loaded into the application process of the first application, the first application can call the note-taking capability sharing library through the target SDK within the application process to implement text editing functions. For example, the first application can display a canvas for text editing on the application interface through the called note-taking capability sharing library within the application process. The canvas is generated by overlaying one or more of the following layers: an element editing layer, a handwriting editing layer, and a background layer. This facilitates secondary editing of existing documents on the canvas, improving the user experience.
[0026] In one embodiment, the canvas includes multiple pages, each page being generated by overlaying one or more of the following layers: an element editing layer, a handwriting editing layer, and a background layer. For example, the document to be edited includes at least one page, and the background layer of at least one of the multiple pages is used to set that at least one page as the editing background. This facilitates paginated editing of existing documents for the user, improving the flexibility of text editing.
[0027] In one embodiment, in response to a pagination addition operation on the canvas, the added pagination is displayed on the canvas, and the background layer of the added pagination has an editing background that is either the page of the document to be edited or a blank background. This allows users to easily add pagination to the canvas as needed, improving the flexibility of text editing.
[0028] Thirdly, a note-taking capability opening device is provided, which has the function of implementing the note-taking capability opening framework in the first aspect. The note-taking capability opening device includes at least one module, which is used to implement the note-taking capability opening framework provided in the first aspect.
[0029] Fourthly, a note-taking capability opening device is provided, which has the function of implementing the note-taking capability opening method behavior described in the second aspect above. The note-taking capability opening device includes at least one module, which is used to implement the note-taking capability opening method provided in the second aspect above.
[0030] Fifthly, a note-taking capability open device is provided, the structure of which includes a processor and a memory, the memory being used to store programs that support the note-taking capability open device in executing the note-taking capability open framework provided in the first aspect.
[0031] Sixthly, a note-taking capability opening device is provided. The device includes a processor and a memory. The memory stores a program that supports the device in executing the note-taking capability opening method provided in the second aspect, and stores data related to implementing the note-taking capability opening method described in the first aspect. The processor is configured to execute the program stored in the memory. The device may further include a communication bus for establishing a connection between the processor and the memory.
[0032] In a seventh aspect, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the note-taking capability opening method described in the second aspect above.
[0033] Eighthly, a computer program product containing instructions is provided that, when run on a computer, causes the computer to execute the note-taking capability opening method described in the second aspect above.
[0034] The technical effects achieved by the second, third, fourth, fifth, sixth, seventh, and eighth aspects mentioned above are similar to the technical effects achieved by the corresponding technical means in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0035] Figure 1 is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0036] Figure 2 is a block diagram of a terminal software system provided in an embodiment of this application;
[0037] Figure 3 is a comparative diagram of different obfuscation strategies used to obfuscate the file names of the note-taking capability sharing library according to an embodiment of this application.
[0038] Figure 4 is a schematic diagram of the logical structure of a note-taking capability sharing library provided in an embodiment of this application;
[0039] Figure 5 is a schematic diagram of a canvas pagination method provided in an embodiment of this application;
[0040] Figure 6 is a schematic flowchart of a note-taking capability opening method provided in an embodiment of this application;
[0041] Figure 7 is a schematic flowchart of initializing a note-taking capability sharing library according to an embodiment of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0043] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0044] In the use of text-based files such as images, documents, and digital journals, there is often a need to edit existing files by handwriting or inserting elements (such as text boxes or images). Documents can include Word, PDF, and other text formats. For example, users may need to handwrite signatures or graphics on images to edit them; or, users may need to handwrite text or graphics on digital journals and insert text boxes or images to create personalized journals; or, users may need to annotate courseware in PDF or other document formats to record course notes. It should be understood that other scenarios exist for editing existing files, which will not be illustrated in detail in this application's embodiments.
[0045] Based on the aforementioned need for secondary editing of existing documents, there is a growing demand for the development of apps (such as note-taking apps) that can meet this need, allowing users to edit existing documents using these apps.
[0046] Currently, developers typically need to pre-write the specific logic code for implementing text editing capabilities in the app's application files (such as the application package) when developing such apps. However, this development approach has the following problems:
[0047] 1) The implementation of text editing capabilities is highly dependent on the coordination between the hardware and software of electronic devices. Therefore, when writing the specific logic code to implement text editing capabilities, developers need to fully understand the hardware and software information of electronic devices and ensure that the logic code they write can coordinate with the hardware and software of electronic devices, which makes the development quite difficult.
[0048] 2) These logic codes will significantly increase the data size of the application files, thereby increasing the difficulty of promoting the app. For example, in order to implement the handwriting drawing function, a rendering engine capable of handwriting rendering needs to be integrated into the application files, which will cause the data size of the application files to increase dramatically.
[0049] 3) Due to the variety of text editing methods, different business logic needs to be written for different business requirements. The business logic is complex to write, so the business implementation is difficult.
[0050] To address the aforementioned issues, this application provides an open note-taking framework. This framework pre-installs a note-taking capability shared library within the electronic device's operating system, providing text editing capabilities to any application. This shared library is open to any application, allowing them to utilize its text editing capabilities to implement text-editing related business functions. By improving the underlying system of the electronic device, developers can directly utilize the publicly available note-taking capability shared library to develop text editing functions for their apps, without needing to fully understand the specific hardware and software information of the electronic device or consider coordination with its hardware and software. This reduces development difficulty and improves the developer experience. Furthermore, since apps can directly utilize the text editing capabilities provided by the electronic device's note-taking capability shared library, there is no need to integrate the specific implementation code of text editing capabilities into the app's application files, significantly reducing the data size of the application files and thus lowering the difficulty of app promotion. In addition, in this application embodiment, different apps can use different capabilities of the note-taking capability shared library according to their business needs to achieve different business functions, thereby greatly reducing the difficulty of business implementation.
[0051] The note-taking capability open framework and method provided in this application are applicable to electronic devices. The operating system of this electronic device has a pre-built note-taking capability shared library, which provides text editing capabilities for any application. This electronic device can also be referred to as a terminal, user equipment (UE), mobile station (MS), or mobile terminal (MT), etc. The electronic device can be a mobile phone, tablet computer, computer, smart wearable device, smart TV, or similar terminal; this application does not limit this. The embodiments of this application do not limit the specific technology or device form used in the electronic device. The following description uses an electronic device as an example of a terminal.
[0052] Before providing a detailed explanation of the note-taking capability open framework and note-taking capability open method provided in the embodiments of this application, the terminal involved in the embodiments of this application will be described first.
[0053] Figure 1 is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Referring to Figure 1, the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0054] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal 100. In other embodiments of this application, the terminal 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0055] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0056] The controller can serve as the central nervous system and command center of the terminal 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0057] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0058] The wireless communication function of terminal 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. The shooting function of terminal 100 can be implemented through ISP, camera 193, video codec, GPU, display screen 194, and application processor. The audio function, such as music playback and recording, of terminal 100 can be implemented through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0059] Terminal 100 can implement display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0060] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, terminal 100 may include one or N displays 194, where N is an integer greater than 1.
[0061] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions, such as saving music, video, and other files on the external storage card.
[0062] Internal memory 121 can be used to store computer-executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of terminal 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created by terminal 100 during use (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0063] Electronic device 100 also includes various sensors that can convert different physical signals into electrical signals. For example, pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. Gyroscope sensor 180B can be used to determine the motion posture of electronic device 100. Barometric pressure sensor 180C is used to measure air pressure. Magnetic sensor 180D includes a Hall sensor. Accelerometer sensor 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). Distance sensor 180F is used to measure distance. Electronic device 100 can measure distance using infrared or laser. Proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photodetector, such as a photodiode. Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 according to the sensed ambient light brightness. Fingerprint sensor 180H is used to collect fingerprints. Electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application lock, fingerprint photography, fingerprint answering of calls, etc. Temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. The bone conduction sensor 180M can acquire vibration signals.
[0064] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Terminal 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, terminal 100 detects the touch operation intensity based on pressure sensor 180A. Terminal 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than the pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed. For example, in this embodiment of the application, the movement trajectory of the handwriting operation can be calculated based on the detection signal of the pressure sensor 180A, such as calculating the movement trajectory of the stylus or the movement trajectory of the user's finger, so as to draw the corresponding handwriting based on the movement trajectory, such as drawing the corresponding curve or graphic.
[0065] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. Touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. Exemplarily, in this embodiment, touch sensor 180K can detect a user's click on an application icon and transmit the detected click operation to the application processor, determining that the click operation is used to launch or run the application, thereby executing the application's operation.
[0066] The software system of terminal 100 will be described next.
[0067] The software system of terminal 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Android system as an example to illustrate the software system of terminal 100.
[0068] Figure 2 is a block diagram of a software system for a terminal 100 according to an embodiment of this application. Referring to Figure 2, the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer (also called the application layer), the application framework layer (also called the application framework layer), and the kernel layer.
[0069] The application layer may include a series of application packages. As shown in Figure 2, the application packages may include APP1, APP2, and APP3, etc. These APPs may be applications such as gallery, calendar, map, SMS, and office software, or they may be specially developed applications for secondary editing of text files. This application embodiment does not limit this.
[0070] In one embodiment, for apps in the application layer, to enable these apps to use the capabilities provided by the note-taking capability sharing library in the application framework layer, developers can pre-integrate the SDK corresponding to the note-taking capability sharing library in the application files of the corresponding apps during development. In this way, the apps can call the relevant capabilities provided by the note-taking capability sharing library through the integrated SDK to implement text editing functions and related business logic. As shown in Figure 2, APP1, APP2, and APP3 all integrate the SDK corresponding to the note-taking capability sharing library, and the SDK has a corresponding SDK identifier.
[0071] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer. The application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer may include a note-taking capability sharing library and an application management module. The note-taking capability sharing library provides text editing capabilities for any application; that is, it is the logic code that exposes the terminal's text editing capabilities. For example, the note-taking capability sharing library includes a handwriting capability module, an element capability module, a business management module, and a rendering engine.
[0072] The handwriting capability module provides handwriting editing capabilities, namely the ability to draw corresponding handwritten strokes based on handwriting operations. For example, it can draw corresponding curves or shapes based on handwriting operations. For instance, the handwriting capability module can provide a handwriting editing layer for the application. This layer is used to draw corresponding handwritten strokes based on handwriting operations, such as drawing corresponding curves or shapes, so that users can perform handwriting drawing through the handwriting editing layer. The handwriting operation can be a stylus operation or a finger swipe operation, etc., and this embodiment does not limit the specific type of operation.
[0073] The rendering engine provides rendering capabilities for the handwriting module. For example, it can render handwriting on the handwriting editing layer based on the movement trajectory of the handwriting operation, so that the handwriting editing layer can display the corresponding handwriting. Of course, the rendering engine can also provide rendering capabilities for other modules, and this embodiment does not limit this.
[0074] The element capabilities module provides element editing capabilities, including the ability to insert corresponding elements based on element editing operations, and the ability to edit (modify or delete) inserted elements. For example, element editing capabilities can provide an element editing layer for the application. This layer is used to insert corresponding elements based on element editing operations and to edit inserted elements, allowing users to edit elements through the element editing layer. Elements can include one or more of the following: text boxes, images, formulas, graphics, tables, charts, graphs, web links, or bookmarks.
[0075] The business management module provides business management capabilities for text editing operations, such as for modules like handwriting editing or element editing. For example, the business management module can provide layer management and operation management functions for layers such as handwriting editing layers and element editing layers. The layer management function manages one or more of the following layer functions: layer visibility configuration, layer editability configuration, and layer element copying. The operation management function manages one or more of the following operations: push operation, pop operation, and disk operation.
[0076] As an example, the note-taking capability sharing library can also include a background module, which is used to set the background of the file to be edited. For instance, the background module can provide a background layer for the application, which is used to set the background of the file to be edited. This background layer is located below other layers such as the handwriting editing layer and the element editing layer, serving as the background for those other layers. This allows the application to set the file to be edited as the background for further editing.
[0077] As an example, the note-taking capability sharing library can also include a background module and a cross-layer operation control module. The cross-layer operation control module is used to provide applications with cross-layer operation capabilities, such as the ability to cut, copy, or paste between layers such as handwriting editing layers and element editing layers.
[0078] As an example, the note-taking capability sharing library also includes a pagination management module. The library provides at least one layer for overlaying and generating a canvas corresponding to the editable file in the application. The pagination management module is used to paginate the canvas, and each pagination is generated based on this at least one layer and has the corresponding layer's capabilities. For example, each pagination has a background layer, an element editing layer, and a handwriting editing layer, providing capabilities such as setting the background, handwriting editing, and element editing.
[0079] The application management module loads the note-taking capability sharing library into the application process of the app within the application layer, enabling the app to call the library within its own application process. For example, the application management module can be a package manager service (PMS). By loading the note-taking capability sharing library into the app's application process, the latency of the app calling the library can be reduced, improving business response efficiency.
[0080] As an example, after the app starts, if the application management module detects that the app integrates a Software Development Kit (SDK) corresponding to a note-taking capability sharing library, it loads the note-taking capability sharing library into the app's application process at the application layer. For instance, the application management module can determine that the app integrates a target SDK if it detects the SDK identifier of the target SDK integrated in the app, and then load the note-taking capability sharing library into the app's application process at the application layer. Here, the target SDK is the SDK corresponding to the note-taking capability sharing library, and the SDK identifier can be the name or ID of the target SDK, etc., which is not limited in this embodiment.
[0081] As an example, after a cold start of the app, if the application management module detects that the app has an SDK corresponding to the note-taking capability sharing library, it can load the note-taking capability sharing library into the app's application process in the application layer.
[0082] As an example, the application framework layer can also include a class loader. The application management module can use the class loader to load the note-taking capability sharing library into the app's application process. For instance, the application framework layer can also include a first class loader and a second class loader, with the application management module using the first class loader to load the app's application files into the app's application process and the second class loader to load the note-taking capability sharing library into the app's application process.
[0083] Different apps in the application layer can leverage the capabilities provided by the note-taking sharing library in the application framework layer to develop different text editing functions. For example, as shown in Figure 2, App 1 can provide element editing layers and function management for image text editing, App 2 can provide handwriting editing layers and element editing layers, as well as function management for journal text editing, and App 3 can provide handwriting editing layers and function management for document text editing.
[0084] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, sensor drivers, and stylus drivers, but this embodiment does not limit the specific components.
[0085] As an example, a software system can also include the Android Runtime and the system layer. The Android Runtime and the system layer are located between the software framework layer and the kernel layer.
[0086] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that Java calls, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0087] The system library can include multiple functional modules, such as a surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing libraries are used for 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D graphics.
[0088] It is understood that the software system shown in Figure 2 does not constitute a limitation on the software system of the terminal. The software system of the terminal may include more or fewer modules than the software system shown in Figure 2, or the relevant modules in Figure 2 may be modified or replaced as needed. This application embodiment does not limit this.
[0089] It is understood that, in order to implement the note-taking capability open framework and note-taking capability open method in the embodiments of this application, the terminal includes hardware and / or software modules corresponding to the execution of various functions. Based on the algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments.
[0090] It should be noted that although the embodiments of this application are illustrated using the Android system as an example, the basic principles are equally applicable to electronic devices based on operating systems such as iOS or Windows.
[0091] The following section provides a brief overview of the note-taking capability opening method provided in this application embodiment, based on the aforementioned software architecture.
[0092] During the app development phase, developers can add the corresponding SDK and SDK identifier for the note-taking capability sharing library to the app according to business needs. This SDK is used to call the note-taking capability sharing library. For example, the SDK may include one or more interfaces, with different interfaces used to call different capabilities of the note-taking capability sharing library. As shown in Figure 2, APP1, APP2, and APP3 all integrate the SDK corresponding to the note-taking capability sharing library, and the SDK has a corresponding SDK identifier.
[0093] After the electronic device downloads and installs the app, the app can be displayed as an icon on the terminal 100 screen. When the user clicks the app icon to trigger it, the terminal 100 starts the app. After the app starts, it can create an app process. If the application management module in the application framework layer detects that the app integrates the SDK identifier of the target SDK, it can load the note-taking capability sharing library in the application framework layer into the app process. The app can directly call the note-taking capability sharing library in the app process by calling the target SDK to utilize the text editing capabilities provided by the note-taking capability sharing library to implement text editing functions.
[0094] Furthermore, different apps can utilize different capabilities of the note-taking capability sharing library to achieve different business functions based on their business needs. For example, App 1 can leverage the element editing and business management capabilities of the note-taking capability sharing library to provide element editing layers and related business management functions for images. App 2 can utilize the handwriting editing, element editing, and business management capabilities of the note-taking capability sharing library to provide handwriting editing layers, element editing layers, and related business management functions for journals. App 3 can utilize the handwriting editing and business management capabilities of the note-taking capability sharing library to provide handwriting editing layers and related business management functions for documents.
[0095] Next, the note-taking capability open framework provided in the embodiments of this application will be described in detail from the following aspects.
[0096] 1) Capacity Pre-configuration Management
[0097] The note-taking capability open framework in this application embodiment can be built into the system, pre-installing the logical modules (i.e., note-taking capability shared library) in the electronic device that enable text editing capabilities in the operating system's application framework layer, so as to open up the electronic device's text editing capabilities to any APP.
[0098] As an example, this note-taking capability open framework can also provide corresponding capability identifiers for apps. These identifiers indicate the note-taking capability sharing library and can serve as indexes of the library's capabilities. For instance, this capability identifier can be an .aar file. For an app, if developers want to add text editing functionality, they can add this capability identifier to the app. Then, during app startup, if the application management module detects that this capability identifier is integrated into the app, it can load the note-taking capability sharing library into the app's process. This allows the app to directly call the note-taking capability sharing library within its own process, thereby enabling text editing-related functionalities.
[0099] It should be noted that in traditional app development methods, where logic code for text editing capabilities is pre-written in the app's application files, the app needs to call relevant services from the application framework layer after startup. This calling method requires the application framework layer to start a system process, which then runs the relevant tasks and returns the results to the application process. In other words, two processes (the app process and the system process) need to run simultaneously, and the app process needs to obtain the required task results across processes, resulting in significant latency and power consumption, and low business response efficiency. However, in this embodiment, by loading the note-taking capability sharing library into the app process, the app can directly call the note-taking capability sharing library and obtain relevant task results within its own app process, without needing to simultaneously start and run the system process. This reduces the latency of the app acquiring data, lowers device power consumption, and improves business response efficiency.
[0100] As an example, the aforementioned capability identifier could be an SDK identifier for an SDK related to the note-taking capability sharing library. For instance, an app can integrate a target SDK and its SDK identifier based on business needs. The target SDK is an SDK related to the note-taking capability sharing library and can be used to call the library. For example, the target SDK can provide one or more interfaces, with different interfaces used to call different capabilities of the note-taking capability sharing library. Correspondingly, during app startup, if the application management module detects that the target SDK's SDK identifier is integrated into the app, it will load the note-taking capability sharing library into the app process.
[0101] As an example, this note-taking capability open framework can also provide different capability identifiers for apps. Different capability identifiers are used to indicate different capability ranges of the note-taking capability sharing library, so that the scope of external access to the note-taking capability sharing library can be controlled by different capability identifiers in different business scenarios.
[0102] For example, different capability identifiers can include a first capability identifier, a second capability identifier, and a third capability identifier. A first capability identifier indicates that the publicly accessible note-taking capability sharing library has handwriting editing capabilities but not element editing capabilities; that is, the first capability identifier indicates that the loaded note-taking capability sharing library includes a handwriting editing module but not an element capability module. A second capability identifier indicates that the publicly accessible note-taking capability sharing library has element editing capabilities but not handwriting editing capabilities; that is, the second capability identifier indicates that the loaded note-taking capability sharing library includes an element capability module but not a handwriting editing module. A third capability identifier indicates that the publicly accessible note-taking capability sharing library has both handwriting editing capabilities and element editing capabilities; that is, the third capability identifier indicates that the loaded note-taking capability sharing library includes both element capability modules and a handwriting editing module.
[0103] As another example, this note-taking capability open framework can provide different SDKs for apps. These different SDKs have different SDK identifiers and provide different interfaces. The interfaces provided by different SDKs can call different capabilities of the note-taking capability shared library.
[0104] In addition, during the app startup process, besides loading the note-taking capability sharing library into the app process, the application management module also needs to load the app's application files into the app process first. For example, the application management module can use a first type of loader to load the app's application files into the app process, and a second type of loader to load the note-taking capability sharing library into the app process. Both the application files and the note-taking capability sharing library include one or more code files, which can be class files or method files, etc., and this application embodiment does not limit this. For example, the note-taking capability sharing library includes at least one code file, which is used to implement the capabilities of one or more modules in the note-taking capability sharing library mentioned above.
[0105] In this embodiment, to ensure a high success rate for loading the note-taking capability sharing library, its loading priority must be higher than that of the app's application files. However, if the note-taking capability sharing library has a higher loading priority than the app's application files, and a code file with the same name appears in both the note-taking capability sharing library and the application files, the note-taking capability sharing library's code file will overwrite the code file with the same name in the application files. This could lead to app errors or business logic disruptions.
[0106] In this embodiment of the application, in order to avoid the code file in the application file being overwritten by the code file with the same name in the note-taking capability sharing library during the loading process, a specific obfuscation strategy can be used to obfuscate the initial code file name of the note-taking capability sharing library, so as to reduce the probability that the note-taking capability sharing library and the application file have the same code file name.
[0107] For apps, if developers don't want to open-source their app, they typically need to obfuscate the original filenames of the app's code files before release. This prevents others from deducing the original filenames from the obfuscated ones, thus avoiding the possibility of extracting the app's source code. Currently, apps usually use a common obfuscation strategy for filename obfuscation. This strategy typically involves replacing strings in the original filenames with preset characters. For example, each string in the original filename can be replaced with a, b, c, etc. For instance, filenames are often separated by "." symbols. For strings preceding the same separator in different original filenames, they can be replaced with a, b, c, etc., in alphabetical order.
[0108] Without open-sourcing the note-taking capability sharing library, the original filenames of the code files that load the library need to be obfuscated before pre-installing it in the application framework layer. However, if the code files of the note-taking capability sharing library also use the same general obfuscation strategy as the application files for filename obfuscation, the probability of duplicate filenames after obfuscation is relatively high. In this embodiment, to reduce the probability of code files having the same name as application files, a first obfuscation strategy, different from the second obfuscation strategy used for the filenames of the application's code files, can be used to obfuscate the original filenames of at least one code file included in the note-taking capability sharing library.
[0109] As an example, the filenames obtained by obfuscating using the first obfuscation strategy contain a fixed string. This fixed string is a preset string, which can be set as needed, such as "penkit". In this embodiment, to distinguish it from the general obfuscation strategy used for the code filenames of application files, the first obfuscation strategy used for the code filenames of the note-taking capability sharing library can also be called a targeted obfuscation strategy.
[0110] For example, a second obfuscation strategy can be used to initially obfuscate the original filenames of at least one code file included in the note-taking capability sharing library, and then a fixed string can be added to the filenames after the initial obfuscation. For example, a fixed string can be added to each string separated by a delimiter in the filenames after the initial obfuscation, so that the fixed string can be distinguished from the code filenames of applications obfuscated using the second obfuscation strategy.
[0111] Furthermore, you can first perform case conversion on the filenames after the initial obfuscation process, such as converting lowercase characters to uppercase and lowercase characters, and then add a fixed string to the case-converted filenames. For example, you can add a fixed string to each string separated by a delimiter within the case-converted file.
[0112] Please refer to Figure 3, which is a comparative diagram illustrating the obfuscation of code filenames in a note-taking capability sharing library using different obfuscation strategies, as provided in this application embodiment. As shown in Figure 3, the source code written by developers for the note-taking capability sharing library may include system class files and additional class files developed outside of the system class files. These additional class files can reference the system class files. Then, the system class files and the additional class files can be packaged to obtain the original file package of the note-taking capability sharing library. For the packaged original file package, an appropriate obfuscation strategy can be used to obfuscate the class filenames in the original file package so that the application management module can load the obfuscated file package into the APP's application process via the class loader when needed. For example, the obfuscation results of the class filenames in the original file package using the current general obfuscation strategy and the targeted obfuscation strategy provided in this application embodiment are shown in Table 1 below:
[0113] Table 1
[0114]
[0115] As shown in Table 1 above, for class filenames in the original file package, if a general obfuscation strategy is used for obfuscation, the string before the first delimiter "." in the class filename can be replaced with a, b, c, etc., in alphabetical order. For example, "com" can be replaced with "a", and "org" can be replaced with "b". For class filenames with the same string before the first delimiter ".", the string before the second delimiter "." can be replaced with a, b, c, etc., in alphabetical order, and so on, to obtain the processing result of the general obfuscation strategy in Table 1 above, thus achieving the obfuscation of class filenames.
[0116] In this embodiment, to reduce the probability of code files with the same name appearing in the note-taking capability sharing library and application files, a targeted obfuscation strategy, different from the general obfuscation strategy, can be used to obfuscate the class file names in the original file package. As shown in Table 1 above, the results of the targeted obfuscation strategy indicate that each string separated by a delimiter after obfuscation includes the fixed string "penkit," meaning that the replacement strings used by the targeted obfuscation strategy all contain the fixed string "penkit." For example, a general obfuscation strategy can be used first to perform initial obfuscation on the class file names in the original file package. Then, lowercase characters in the file names after initial obfuscation can be converted to uppercase and lowercase characters, and the fixed string "penkit" can be added before the converted uppercase characters to obtain the final obfuscation result.
[0117] As shown in Figure 3 and Table 1 above, the filenames obtained after obfuscation using the general obfuscation strategy and the targeted obfuscation strategy provided in the embodiments of this application are significantly different, and the probability of having the same name is low. Therefore, by using the targeted obfuscation strategy to obfuscate the original code filename of the note-taking capability sharing library, the probability of the note-taking capability sharing library and the application file having the same code file name can be reduced, thereby avoiding the possible overwriting of code files during the loading of application files and note-taking capability sharing library to a certain extent.
[0118] 2) Hierarchical management
[0119] The note-taking capability open framework in this application embodiment can adopt a hierarchical management mechanism. The hierarchical management mechanism includes a horizontal management mechanism and a vertical management mechanism.
[0120] For example, a horizontal management mechanism can be adopted for independent functional modules to ensure that all capabilities can be relatively independent and used separately, thus reserving enough room for expansion.
[0121] For example, a vertical management mechanism can be adopted for common operational logic, allowing various independent functional modules to share this common operational logic. This can be achieved by encapsulating this common operational logic within each independent functional module to ensure business continuity. Common operational logic can include layer management, operation management, screenshot operations, touch event control, and gesture recognition, among others.
[0122] In this embodiment of the application, by adopting a hierarchical management mechanism, the relevant capabilities of text editing can be carried using different layers, and the capabilities of each layer can be used and managed through a common operation logic.
[0123] As an example, the functional modules managed using the horizontal management mechanism described above can also be designed using the adapter pattern. The adapter pattern is a structural design pattern that allows incompatible objects to be converted into compatible interfaces. It enables incompatible interfaces to function correctly without changing existing code by creating an intermediate adapter to transform an object into the interface required by the business logic. That is, corresponding adapters can be pre-created for the aforementioned functional modules to convert them into the corresponding interfaces. In this way, the integrated app can manage its content according to the adapter list without needing to pay attention to the capabilities of the note-taking sharing library. When the corresponding capability is needed, the corresponding layer can be activated.
[0124] Please refer to Figure 4, which is a schematic diagram of the logical structure of a note-taking capability sharing library provided in an embodiment of this application. As shown in Figure 4, the note-taking capability sharing library may include an element editing layer, a handwriting editing layer, a composite layer, and a background layer. These layers can be managed using a horizontal management mechanism. The element editing layer is the editing location of the composite layer, where corresponding elements can be inserted according to element editing operations, and the inserted elements can be modified or deleted. The handwriting editing layer is used to draw corresponding handwriting based on handwriting operations. The composite layer is used to display the elements edited by the element editing operations, such as text boxes, images, or formulas. The background layer is used to set the background of the file to be edited. The file to be edited can be a document, image, journal, or control, etc. The document can be in PDF, text, or Word format, etc., and the control can be a user control, extended control, or custom control.
[0125] As an example, the layers are positioned from top to bottom as a handwriting editing layer, a compositing layer, and a background layer. The element editing layer can be triggered by the user's element editing operation and displayed above other layers for the user to edit elements. After the user finishes editing, the element editing layer is displayed below the handwriting editing layer, becoming a compositing layer. This avoids the elements in the element editing layer obscuring the handwriting in the handwriting editing layer. It should be understood that the element editing layer can also be displayed above the handwriting editing layer based on pre-configuration or user operation, such as displaying the element editing layer above other layers based on the user's layer-on-top or layer-up operation. This embodiment of the application does not limit this. The background layer is displayed below other layers to configure the file to be edited as the editing background of other layers, facilitating secondary editing by the user using the file to be edited as the background. In one possible implementation, the editing background of the background layer can be set by injection, and a lifecycle-based maintenance interface can also be provided for the background layer.
[0126] As shown in Figure 4, the note-taking capability sharing library can also include general operation logic managed using a vertical management mechanism: a layer management module and an operation management module. The layer management function manages the relevant functions of layers, such as managing one or more of the following: layer visibility configuration, layer editability configuration, and layer element copying. That is, the layer management function can set any of the above layers to be visible or invisible, or editable or non-editable, and can copy elements within a layer. The operation management function manages the operations within layers, such as performing one or more of the following: operation push, operation pop, and data write to disk. That is, operations on layers can be managed using a stack storage structure. After a user performs an operation on a layer, the performed operation can be pushed onto or popped from the stack. Pushing an operation onto the stack records the operation, and popping an operation undoes and restores the operation. Data write to disk refers to storing the relevant data of the operation. It should be understood that the general operation logic can also include other operation logic, such as logic modules for implementing screenshot operations, touch event control, and gesture recognition.
[0127] As shown in Figure 4, the note-taking capability sharing library may also include a cross-layer operation control module, a canvas size management module, and a pagination management module, etc., which are not limited in this embodiment. Among them, the cross-layer operation control module is used to provide cross-layer operation capabilities, such as the ability to copy or paste elements across layers.
[0128] In this embodiment, one or more of the element editing layer, handwriting editing layer, composite layer, and background layer can be combined into a canvas for text editing. The canvas size management module manages the canvas size and provides the ability to enlarge or reduce the canvas size. For example, the canvas size management module can manage the canvas size based on preset canvas parameters or user-defined canvas size settings. The canvas size setting operation can be a configuration operation for canvas size parameters, such as configuring the canvas width and / or height parameters through a relevant settings interface. Alternatively, the canvas size setting operation can be a canvas enlargement or reduction operation, such as enlarging or reducing the canvas size by dragging the canvas boundaries. Of course, other operations can also be used to enlarge or reduce the canvas size; this embodiment does not limit this approach.
[0129] As an example, the note-taking sharing library can also provide the ability to bind a canvas to a background layer. Zooming in or out of the canvas, scrolling the canvas, and other similar actions can be synchronized to the background layer. For instance, the background layer can scale up or down based on the zoom in or out of the canvas, and scroll accordingly. For example, the background layer can scroll upwards based on a swipe down on the canvas, and downwards based on a swipe up on the canvas.
[0130] It should be noted that this application embodiment also provides a pagination management function for the canvas. This function allows the canvas to be divided into multiple pages, each of which includes one or more of the aforementioned layers, and each layer can be used to perform corresponding functions. For example, the pagination management function can determine the number of pages in the canvas based on the number of pages in the file to be edited, and then paginate the canvas according to the determined number of pages. Alternatively, the pagination management function can add pages to the canvas based on the user's page addition operation.
[0131] In this embodiment, the note-taking capability sharing library provides applications with the ability to set and edit backgrounds by offering a background layer, such as the ability to customize background settings. It also provides applications with the ability to insert pages by offering a pagination management module. Furthermore, it provides applications with the ability to bind the canvas and background layer, enabling them to zoom in, zoom out, or slide the background based on canvas operations.
[0132] Please refer to Figure 5, which is a schematic diagram of canvas pagination provided in an embodiment of this application. As shown in canvas 10 in Figure 5, when the PDF document to be edited has two pages, the canvas can be divided into two pages. The editing background of page 1 is the first page of the PDF document, and the editing background of page 2 is the second page of the PDF document. In addition, pagination addition controls can be displayed between each page, before the first page, and after the last page. The pagination addition controls are used to trigger the pagination management function to add pages to the canvas. For example, if a user wants to add a blank page between page 1 and page 2 to take notes on the blank page, they can click the pagination addition control between page 1 and page 2. As shown in canvas 20 in Figure 5, in response to the user's click operation, the pagination management function can add one page (page 3) between page 1 and page 2. The editing background of page 3 is a blank background. It should be noted that each page in Figure 5 includes one or more of the above-mentioned layers, such as a handwriting editing layer, an element editing layer, and a background layer. For example, the background layer of page 1 in canvas 20 is set to the first page of the PDF document, the background layer of page 2 is set to the second page of the PDF document, and the background layer of page 3 has no background or is set to a blank page. Furthermore, for each page, through the layer management module, users can configure any layer on the page to be visible or invisible, to show or hide the layer; or, configure any layer on the page to be non-editable or editable, to lock or unlock the layer. It should be understood that text editing functionality can also be implemented through the note-taking capability sharing library; this embodiment will not provide further examples of such functionality.
[0133] The following describes the specific implementation process of the note-taking capability opening method provided in the embodiments of this application, with reference to the accompanying drawings.
[0134] Figure 6 is a schematic flowchart of a note-taking capability opening method provided in an embodiment of this application, which can be executed by an electronic device. The hardware structure diagram of the electronic device can be as shown in Figure 1, and the software structure block diagram of the electronic device can be as shown in Figure 2, but the embodiments of this application are not limited thereto.
[0135] Step 601: Developers import SDK 1 and the corresponding SDK identifier into the Notes App.
[0136] In this embodiment of the application, in order to enable the Notes App to use the capabilities of the underlying note-taking capability sharing library of the terminal system, developers can import SDK 1 and the corresponding SDK identifier into the Notes App according to business needs when developing the Notes App.
[0137] SDK 1 is the SDK corresponding to the underlying note-taking capability sharing library of the terminal system, used to call the note-taking capability sharing library. SDK 1 can provide multiple interfaces, which are used to call different capabilities of the note-taking capability sharing library. The multiple interfaces of SDK 1 can be configured according to business needs, so as to call the capabilities provided by the note-taking capability sharing library that meet business needs through these multiple interfaces. The SDK identifier of SDK 1 can be the name or ID of SDK 1, etc., which is not limited in this embodiment.
[0138] It should be noted that the embodiments of this application are only used as an example of developers developing a note-taking APP based on the note-taking capability sharing library of the terminal system. It should be understood that the note-taking APP can also be replaced by other APPs, and the embodiments of this application do not limit this.
[0139] Step 602: The developers publish the note-taking app to the app store.
[0140] After the developers complete the development of the note-taking app, the app can be released for users to download and install. It should be noted that this embodiment only illustrates the example of releasing the note-taking app to an app store; it should be understood that the note-taking app can also be released to other downloadable locations, such as the website corresponding to the note-taking app.
[0141] Step 603: The user downloads and installs the Notes app from the app store using the terminal.
[0142] Step 604: After the Notes App starts, create the App process.
[0143] After the note-taking app is installed, users can launch it, for example, by clicking the app's icon. In response to the user's action, the app will launch on the device.
[0144] After the Notes app is launched, the Notes app can create a corresponding app process.
[0145] Step 605: The PMS in the application framework layer detected the SDK identifier of SDK1 integrated in the Notes APP.
[0146] Step 606: PMS loads the application framework layer into the Notes App's App process.
[0147] After the Notes app starts, if the PMS in the application framework layer detects that the Notes app integrates the SDK identifier of SDK1, it can load the Notes Capability Sharing Library in the application framework layer into the Notes app's app process. This allows the Notes app to directly use the capabilities of the Notes Capability Sharing Library in its own app process, thereby reducing the latency of the Notes app using the terminal's text editing capabilities and improving text editing efficiency.
[0148] Additionally, after the note-taking app is launched, PMS can also load the app's application files into the app's process. For example, PMS can use class loader 1 in the application framework layer to load the note-taking app's application files into the app's process, and use class loader 2 in the application framework layer to load the note-taking capability sharing library into the app's process.
[0149] It should be noted that the PMS can load the application file first and then load the note-taking capability sharing library, or load the note-taking capability sharing library first and then load the application file, or load both simultaneously. This application embodiment does not limit the order in which the two are loaded.
[0150] Step 607: In the APP process, initialize the note-taking capability sharing library by calling interface 1 provided by SDK 1.
[0151] After the note-taking capability sharing library is loaded into the app process, the note-taking app can call interface 1 provided by SDK 1 within the app process to initialize the note-taking capability sharing library through interface 1. Interface 1 is the initialization interface for the note-taking capability sharing library.
[0152] In this embodiment of the application, the initialization operation for initializing the note-taking capability sharing library may include one or more of the following operations: setting the storage directory of note files, implementing storage monitoring of attachments, initializing the pagination management module, initializing the canvas for text editing, displaying the canvas on the application interface of the note-taking APP, and initializing text editing parameters.
[0153] The implementation of attachment storage monitoring refers to configuring and listening for storage events of attachments such as notes to achieve data synchronization. Initializing the pagination management module includes initializing parameters such as the number of pages. Initializing the canvas for text editing can include composing the canvas based on the initialized layers, such as the element editing layer, handwriting editing layer, and background layer. Initializing text editing parameters can include parameters related to the element editing layer and / or handwriting editing layer, such as the pen shape parameters for the handwriting editing layer.
[0154] As an example, the above initialization operation may also include setting the editing background of the background layer. For instance, if the file to be edited is not loaded, a blank background can be set as the editing background of the background layer; if the file to be edited is loaded, the file to be edited can be set as the editing background of the background layer. For ease of understanding, this application embodiment will be described using a scenario where the file to be edited has not yet been loaded during the initialization process.
[0155] Please refer to Figure 7, which is a schematic flowchart illustrating the initialization of a note-taking capability sharing library according to an embodiment of this application. As shown in Figure 7, after the note-taking capability sharing library is loaded into the APP process, the note-taking APP can call the initialization interface provided by SDK1 to set the storage directory of note files, implement attachment storage monitoring, initialize the pagination management module, set a custom background, set the canvas, and initialize text editing parameters. Setting a custom background may include: determining a background that matches the background layer and injecting the matched background into the background layer. Setting the canvas may include: reading the canvas from the note-taking capability sharing library and displaying the read canvas on the application interface of the note-taking APP. Initializing text editing parameters may include: calling relevant interfaces to set parameters such as pen shape through the relevant interfaces. Setting the canvas is an optional operation.
[0156] Step 608: Display the canvas for text editing in the Notes app's application interface.
[0157] The canvas can include one or more of the following: element editing layers, handwriting editing layers, composition layers, and background layers. For example, the canvas can be created by compositing the aforementioned layers.
[0158] Step 609: In response to the user's selection of document 1, load document 1 in the APP process.
[0159] Document 1 is the document selected by the user for text editing. It should be understood that Document 1 can also be other files to be edited, such as pictures or journal entries.
[0160] As an example, a note-taking app can provide users with an entry point to select files to be edited, allowing them to choose one or more files from their local files.
[0161] Step 610: In the APP process, set document 1 as the background of the canvas by calling interface 2 provided by SDK 1.
[0162] Interface 2 provides an open interface for the background module's capabilities, allowing users to call the background module. Through interface 2, document 1 can be set as the editing background of the canvas's background layer, enabling users to edit text against the background of document 1 and thus perform secondary editing of document 1.
[0163] Step 611: In response to the user's text editing operation on the canvas, the APP process calls the initialized note-taking capability sharing library through the relevant interface provided by SDK 1 to implement the corresponding text editing function.
[0164] The text editing operation can be a handwriting editing operation or an element editing operation, etc., and this application embodiment does not limit it. For different operations, different interfaces provided by SDK 1 can be called to call different capabilities of the note-taking capability sharing library to implement the corresponding text editing function.
[0165] In one embodiment, the canvas may include multiple pages, each page being composed of one or more of the following layers: an element editing layer, a handwriting editing layer, a composition layer, and a background layer. For example, after loading document 1, the canvas can be paginated according to the number of pages in document 1 to split the canvas into a corresponding number of pages. For instance, if document 1 has n pages, the canvas can be split into n pages, with the background of each of the n pages corresponding one-to-one with the n pages of document 1.
[0166] In one embodiment, the user can also add more pages to the canvas. In response to the page addition operation on the canvas, the note-taking app displays the added page on the canvas. The background layer of the added page can have a blank background or be a page from Document 1. For example, referring to Figure 5, the user can click the page addition control on the canvas to add pages.
[0167] Step 612: In response to the user's save operation, save the edited document 1 as a note file.
[0168] After editing Document 1 through the Notes app, users can save the edited document 1 by clicking the save control provided by the Notes app.
[0169] In this embodiment, the note-taking app can save the edited document 1 as a new file independent of the original document 1, such as saving the edited document 1 as a note file. It should be understood that it can also be saved in other file formats, and this embodiment does not limit this. For example, the edited document 1 can be saved to the storage location corresponding to the note file storage directory set during initialization.
[0170] In this embodiment, the system's underlying open note-taking capability sharing library can be loaded into the APP process, allowing the APP to use the capabilities of the note-taking capability sharing library to perform text editing functions within its own APP process. This reduces the latency of the APP using the terminal's text editing capabilities and improves text editing efficiency.
[0171] This application also provides a chip coupled to a memory, which is used to read and execute computer programs or instructions stored in the memory to perform the methods in the above embodiments.
[0172] This application also provides an electronic device including a chip for reading and executing computer programs or instructions stored in a memory, causing the methods in the various embodiments to be performed.
[0173] This embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the methods described in the above embodiments.
[0174] This embodiment also provides a computer program product, which is a computer-readable storage medium storing program code. When the computer program product is run on a computer, it causes the computer to perform the above-described related steps to implement the method in the above embodiment.
[0175] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the methods in the above-described method embodiments.
[0176] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0177] This application does not impose any particular limitation on the specific structure of the execution subject of the method provided in this application embodiment. As long as a program containing the code of the method provided in this application embodiment can be run to perform text editing according to the method provided in this application embodiment, it is acceptable. For example, the execution subject of the method provided in this application embodiment can be an electronic device, or a functional module in an electronic device that can call and execute a program.
[0178] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0179] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0180] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0181] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium and includes several instructions that cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0182] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An open framework for note-taking capabilities, characterized in that, The note-taking capability open framework includes a note-taking capability shared library pre-installed in the application framework layer of the operating system of an electronic device. This shared library provides text editing capabilities for any application. It includes at least one of a handwriting capability module and an element capability module. The handwriting capability module provides handwriting editing capabilities for the application, whereby handwriting editing refers to the ability to draw corresponding handwritten strokes based on handwriting operations. The element capability module provides element editing capabilities for the application, whereby element editing refers to the ability to insert corresponding elements based on element editing operations. The note-taking capability shared library includes at least one code file, which implements the capabilities of the handwriting capability module and / or the element capability module. The filename of the at least one code file is obtained by obfuscating the original filename of the at least one code file using a first obfuscation strategy. This first obfuscation strategy differs from the second obfuscation strategy used for the filename of the application's code file. The filename obtained by obfuscating using the first obfuscation strategy contains a fixed string.
2. The framework as described in claim 1, characterized in that, The note-taking capability sharing library also includes a business management module, which provides business management capabilities for the text editing business of any of the applications.
3. The framework as described in claim 1, characterized in that, The note-taking capability sharing library also includes a background module, which is used to set the file to be edited by any of the applications as the editing background.
4. The frame as described in any one of claims 1-3, characterized in that, The handwriting capability module is used to provide a handwriting editing layer for any of the applications, and the handwriting editing layer is used to draw corresponding handwriting strokes according to the handwriting operation; the element capability module is used to provide an element editing layer for any of the applications, and the element editing layer is used to insert corresponding elements according to the element editing operation.
5. The framework as described in claim 4, characterized in that, The note-taking capability sharing library also includes a business management module, which provides layer management and operation management functions for layers. The layer management function manages one or more of the following functions of the layer: the visibility function of the layer, the editability function of the layer, and the element copying function of the layer. The operation management function manages one or more of the following operations in the layer: operation push, operation pop, and data write to disk.
6. The framework as described in claim 4, characterized in that, The note-taking capability sharing library also includes a background module; the background module is used to provide a background layer for any application, the background layer is used to set the file to be edited by any application as the editing background, and the background layer is located below the handwriting editing layer and the element editing layer.
7. The framework as described in claim 4, characterized in that, The note-taking capability sharing library provides at least one layer for compositing a canvas corresponding to the file to be edited in any of the applications. The note-taking capability sharing library also includes a pagination management module. The pagination management module is used to paginate the canvas, and each pagination includes one or more layers provided by the note-taking capability sharing library.
8. The framework as described in claim 4, characterized in that, The note-taking capability sharing library also includes a cross-layer operation control module; the cross-layer operation control module is used to provide cross-layer operation capabilities for any of the applications.
9. The framework as described in claim 1, characterized in that, The note-taking capability open framework also includes an application management module pre-installed in the application framework layer of the electronic device's operating system; the application management module is used to load the note-taking capability shared library into the application process of any of the applications.
10. The framework as described in claim 9, characterized in that, The application management module is used to load the note-taking capability sharing library into the application process of any application when it is detected that any application integrates the target SDK, and the target SDK is used to call the note-taking capability sharing library.
11. A method for enabling note-taking capabilities, characterized in that, The method is applied to an electronic device, wherein the electronic device has a first application installed, and the application framework layer of the operating system of the electronic device includes a note-taking capability sharing library and an application management module. The note-taking capability sharing library is used to provide text editing capabilities for any application. The method includes: after the first application is launched, the application management module loads the note-taking capability sharing library into the application process of the first application; the first application implements text editing functions in the application process through the loaded note-taking capability sharing library; wherein the note-taking capability sharing library includes at least one code file, the at least one code file is used to implement the capabilities of a handwriting capability module and / or an element capability module, and the filename of the at least one code file is obtained by obfuscating the original filename of the at least one code file using a first obfuscation strategy. The first obfuscation strategy is different from the second obfuscation strategy used for the filename of the code file of the first application, and the filename obtained by obfuscating using the first obfuscation strategy has a fixed string.
12. The method as described in claim 11, characterized in that, After the first application starts, the application management module loads the note-taking capability sharing library into the application process of the first application, including: after the first application starts, if the application management module detects that the first application integrates a target SDK, it loads the note-taking capability sharing library into the application process of the first application, and the target SDK is used to call the note-taking capability sharing library.
13. The method as described in claim 12, characterized in that, The first application, within the application process, implements text editing functionality through the loaded note-taking capability sharing library, including: the first application, within the application process, calls the note-taking capability sharing library through the target SDK, and implements text editing functionality through the called note-taking capability sharing library.
14. The method as described in claim 13, characterized in that, The text editing function implemented by calling the note-taking capability sharing library includes: the first application, in the application process, displays a canvas for text editing on the application interface by calling the note-taking capability sharing library. The canvas is generated by overlaying one or more of the following layers: an element editing layer, which is used to insert corresponding elements according to element editing operations; a handwriting editing layer, which is used to draw corresponding handwriting strokes according to handwriting operations; and a background layer, which is used to set the file to be edited as the editing background.
15. The method as described in claim 14, characterized in that, The canvas includes multiple pages, each page being generated by overlaying one or more of the following layers: the element editing layer, the handwriting editing layer, and the background layer.
16. The method as described in claim 15, characterized in that, The file to be edited includes at least one page, and the background layer of at least one of the multiple pages is used to set the at least one page as the editing background.
17. The method as described in any one of claims 14-15, characterized in that, The method further includes: in response to a page addition operation on the canvas, displaying the added page on the canvas, wherein the background of the background layer of the added page is the page of the document to be edited or a blank background.
18. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program including the note-taking capability open framework as described in any one of claims 1-10.
19. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 11 to 17.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 11 to 17.
Citation Information
Patent Citations
Note-taking generation method, electronic device, and computer storage medium
CN109085965A