CN110147334B - Storage method and terminal for edited content - Google Patents

Storage method and terminal for edited content Download PDF

Info

Publication number
CN110147334B
CN110147334B CN201910380391.7A CN201910380391A CN110147334B CN 110147334 B CN110147334 B CN 110147334B CN 201910380391 A CN201910380391 A CN 201910380391A CN 110147334 B CN110147334 B CN 110147334B
Authority
CN
China
Prior art keywords
content
target
editing
terminal
service type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910380391.7A
Other languages
Chinese (zh)
Other versions
CN110147334A (en
Inventor
王慧
付强
高学智
赵洪飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910380391.7A priority Critical patent/CN110147334B/en
Publication of CN110147334A publication Critical patent/CN110147334A/en
Application granted granted Critical
Publication of CN110147334B publication Critical patent/CN110147334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a storage method and a terminal for editing contents, wherein the method comprises the following steps: receiving an editing operation input by a user, wherein the editing operation user edits the content of the target service type; responding to the editing operation, calling a target object in at least two content editing objects, wherein the target object corresponds to the target service type; intercepting target content, wherein the target content is as follows: content edited based on a method of the target object under the editing operation; and storing the target content to a database. According to the storage method for the edited content, provided by the embodiment of the invention, the terminal does not need to independently set a set of independent storage logic for each service type, so that the workload of setting an automatic real-time storage mechanism is reduced; in addition, under the condition that the service type of the editing content is changed, the storage logic does not need to be changed, and the expansibility of an automatic implementation storage mechanism is improved.

Description

Storage method and terminal for edited content
Technical Field
The invention belongs to the technical field of data storage, and particularly relates to a storage method and a terminal for edited content.
Background
With the rapid development of information technology, smart phones, tablet computers, and other terminals are becoming more and more popular and become a part of people's daily life. In order to meet the requirements of people, the terminal has more and more abundant functions, particularly the function of editing contents. The user can write contents such as articles and the like on the terminal for releasing through the function of editing the contents by the terminal, so that the user can write the contents more conveniently, and the user experience effect is improved.
The terminal is usually provided with an inductionless automatic real-time storage mechanism, and the currently edited content of the terminal can be automatically cached in a local database in real time in the process that a user writes the content by using the terminal, so that the edited content can be prevented from being lost when the terminal is unstable in system, network or program. Because a user can edit different types of contents through the terminal, such as editing titles, texts, classification types, covers and the like, in the current automatic real-time storage mechanism, an independent storage logic needs to be set for each type of content storage in the terminal, so that the automatic real-time storage mechanism of the terminal is complex and is not beneficial to the expansion of the automatic real-time storage mechanism.
Disclosure of Invention
The embodiment of the invention provides a storage method and a terminal for editing contents, and aims to solve the problem of low expansibility of the existing automatic real-time storage mechanism.
To solve the above problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a method for storing edited content, which is applied to a terminal provided with at least two content editing objects, where different content editing objects correspond to different service types; the method comprises the following steps:
receiving an editing operation input by a user, wherein the editing operation is used for editing the content of a target service type;
responding to the editing operation, calling a target object in the at least two content editing objects, wherein the target object corresponds to the target service type;
intercepting target content, wherein the target content is as follows: content edited based on the method of the target object under the editing operation;
and storing the target content to a database.
In a second aspect, an embodiment of the present invention further provides a terminal, where the terminal is provided with at least two content editing objects, and different content editing objects correspond to different service types; the terminal includes:
the operation receiving module is used for receiving editing operation input by a user, wherein the editing operation is used for editing the content of a target service type;
an object calling module, configured to call a target object among the at least two content editing objects in response to the editing operation, where the target object corresponds to the target service type;
the content interception module is used for intercepting target content, wherein the target content is as follows: content edited based on the method of the target object under the editing operation;
and the storage module is used for storing the target content to a database.
In a third aspect, an embodiment of the present invention further provides a terminal, which is characterized by including a processor, a memory, and a computer program stored in the memory and being executable on the processor, where the computer program, when executed by the processor, implements the steps of the method for storing edited content.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the above-mentioned storing method for editing content.
According to the embodiment of the invention, the editing operation input by a user is received, wherein the editing operation is used for editing the content of the target service type; responding to the editing operation, calling a target object in the at least two content editing objects, wherein the target object corresponds to the target service type; intercepting target content, wherein the target content is as follows: content edited based on the method of the target object under the editing operation; and storing the target content to a database. Therefore, the terminal does not need to independently set a set of independent storage logic for each service type, and the workload of setting an automatic real-time storage mechanism is reduced; in addition, under the condition that the service type of the editing content is changed, the storage logic does not need to be changed, and the expansibility of an automatic implementation storage mechanism is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a storage method of edited content according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an implementation of a real-time storage mechanism provided by an embodiment of the present invention;
FIG. 3 is a diagram illustrating a terminal displaying an article editing interface according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 5 is a second schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 6 is a third schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for storing edited content according to an embodiment of the present invention, and is applied to a terminal having at least two content editing objects, where different content editing objects correspond to different service types; as shown in fig. 1, the method comprises the steps of:
step 101, receiving an editing operation input by a user, wherein the editing operation is used for editing the content of a target service type;
step 102, responding to the editing operation, calling a target object in the at least two content editing objects, wherein the target object corresponds to the target service type;
step 103, intercepting target content, wherein the target content is as follows: content edited based on the method of the target object under the editing operation;
and 104, storing the target content in a database.
Here, the terminal may dynamically invoke a content editing object (i.e., a target object) corresponding to the service type of the content edited by the editing operation when receiving the editing operation, and intercept the content edited by the editing operation, i.e., the content modified based on the invoked content editing object, to implement dynamically storing the content of each edited service type, thereby eliminating the need to separately set a set of independent storage logic for each service type, and reducing the workload of setting an automatic real-time storage mechanism; in addition, under the condition that the service type of the editing content is changed, the storage logic does not need to be changed, and the expansibility of an automatic implementation storage mechanism is improved.
It should be noted that the terminal may be any terminal capable of editing content, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), and the like, and may be other terminals such as a digital camera, an electronic book, a navigator, and the like.
In step 101, when the terminal displays a material (the content of the material can be displayed through a plurality of pages), if the user needs to edit the content of the target service type in the material, the user can input an editing operation for editing the content of the target service type in the terminal, and the terminal can receive the editing operation.
The material may be an article, an album, or a picture, and the material includes editable contents of at least two service types, for example: when the material is an article, the article may include a title content, a text content, a cover content, a category type content, and the like, that is, the at least two service types include a title, a text, a cover, a category type, and the like.
In addition, the terminal is provided with at least two content editing objects, different content editing objects correspond to different service types of the material, each content editing object comprises a method body and an attribute body, and when the terminal receives an editing operation for editing the content of a certain service type, the terminal can modify the content of the service type through the method in the method body of the content editing object corresponding to the service type, so as to edit the content of the service type.
Exemplarily, as shown in fig. 2, in the case that the above-mentioned material is an article, the service logic layer of the terminal includes a service interface class, the service interface class is provided with a title of at least two content editing objects, such as a title editing object, a body editing object, a cover editing object, and a category type editing object, and the like, and the title editing object includes a title change method for editing the title; the text editing object comprises a text change method for editing text; the cover editing object comprises a cover change method for editing a cover; the classification type editing object includes a classification type change method for editing a classification type, and the like.
It should be noted that the editing operation may be an operation of editing content of at least one or more service types, that is, the target service type may be only one service type, or may include multiple service types, which is not limited herein.
In step 102, when the terminal receives the editing operation, the terminal may invoke a content editing object corresponding to the target service type, that is, a target object, in response to the editing operation, so that the target object corresponding to the editing operation may be dynamically invoked from at least two content editing objects.
The terminal may call a content editing object corresponding to the target service type, that is, a target object, by any method capable of dynamically calling the target object corresponding to the editing operation from at least two content editing objects according to the editing operation, which is not limited herein.
In step 103, after the terminal calls the target object, the terminal may intercept the content edited by the terminal based on the method of the target object, that is, the target content, under the editing operation, so as to obtain the target content edited by the editing operation in real time.
The terminal may intercept the target content by any method capable of intercepting the content edited by the method based on the target object under the editing operation, and the method is not limited herein.
In some embodiments, the invoking the target object in the at least two content editing objects may include: calling a target object in the at least two content editing objects through a proxy operation class; the intercepting the target content may include: the target content is intercepted by the dynamic calling method, so that the target content edited by the editing operation of the user can be easily and dynamically acquired.
For example, in the case that the element is an article, when the editing operation is an operation of editing the title content and the body content in the written article page 31 of the article shown in fig. 3, and the target service types are a title and a body, the terminal may call a title editing object and a body editing object through a proxy operation (ProxyObject) class shown in fig. 2, that is, the target object includes a title editing object and a body editing object; and in the case that the terminal inputs an editing operation for the content of the target service type, the ProxyObject class of the terminal calls a target object corresponding to the target service type, and intercepts the content modified by the method of the target object according to the method of the target object by an invoke method (namely, a dynamic call method), wherein the content is the content edited by the editing operation (namely, the target content), for example, in the case that the target service type is a service type such as a title and a body, the invoke method can intercept the content edited by the editing operation for the title and the body according to the method of the title editing object and the method of the body editing object.
The proxy operation class is a class used for calling a target object in a service interface class of the terminal, and the terminal can call the proxy operation class to call the target object through the proxy operation class when the terminal receives the editing operation.
In a further embodiment, before the invoking the target object in the at least two content editing objects by the proxy operation class, the method may further include: judging whether the agent operation class exists in the terminal or not; and under the condition that the proxy operation class does not exist in the terminal, creating the proxy operation class by calling a processing dynamic calling processing interface.
Here, the terminal may determine whether the proxy operation class exists in the terminal when receiving the editing operation, and may create the proxy operation class in time by dynamically calling the processing interface when the proxy operation class does not exist in the terminal, so that the terminal may normally call the target object in some special scenarios, such as when using the automatic real-time storage mechanism for the first time.
For example, as shown in fig. 2, when the terminal needs to call an object in the service interface class, the terminal may determine whether there is a proxy operation class, and in a case that it is determined that there is no ProxyObject class (i.e., the proxy operation class), the terminal creates a proxy instance, i.e., creates a ProxyObject class, through an invoke handler implementation class (i.e., a dynamic call processing interface implementation class); of course, in the case where the terminal determines that the ProxyObject class exists, if the ProxyObject class was created in the last editing process, the terminal may directly call the ProxyObject class created in the last time.
In addition, when the terminal receives the editing operation, the terminal may edit the content of the target service type by using a method of a target object corresponding to the editing operation, that is, the content of the target service type is changed by using the method of the target object.
In step 104, after the terminal intercepts the target content, the terminal may store the target content in the database, so as to avoid the loss of the target content when the terminal has an emergency situation such as system, network, or program instability.
The terminal stores the target content in the database, or the terminal directly stores the target content after intercepting the target content.
Alternatively, in the case of intercepting the target content by the dynamic call method, the step 104 may include: storing the target content to a database in the event that the method of the target object is provided with an update annotation.
Here, the terminal may determine whether the method of the target object is provided with the update annotation after intercepting the target content, and store the target content in the database only when the method of the target object is provided with the update annotation, so that the target content may be selectively stored. Of course, in the case where the above-described method of the target object is not provided with an update comment, the terminal does not store the target content in the database.
The update note set by the method of the target object may be any identifier used for indicating that the content of the service type corresponding to the target object needs to be stored in real time, and the terminal may set the update note for the method of editing the object for the content corresponding to part or all of the service types in the service logic layer.
Exemplarily, as shown in fig. 2, the terminal may add an update annotation (annotation) to a method corresponding to each service type that needs to be stored in real time through the service interface class, and mark the content of the service type through the update annotation and need to be stored in real time; when the terminal intercepts the content edited by the method of the target object by the invoke method, the terminal may determine whether the annotation of the method terminal of the target object is not null by the invoke method, and store the content of the method of the target object in a local database (i.e., the database) when the annotation of the method of the target object is not null (i.e., the method of the target object is provided with the annotation), for example: the service interface classes are a title change method, a text change method, a cover change method, a classification type change method and the like, update annotations are added, when the content edited by the title change method is intercepted by the terminal through the invoke method, whether the annotation of the title change method is not null or not can be judged through the invoke method, and under the condition that the annotation of the title change method is not null, the content edited by the title change method is stored in a local database, and the like.
In addition, in the case that the material includes contents of a plurality of service types, the storing of the target content in the database may be a storing of only contents edited in the material by the terminal, for example: if the editing operation is to edit the title and the text, the terminal can store only the title content and the text content in the local database when the terminal intercepts the edited title content and the text content by the invoke method.
Alternatively, in some embodiments, the storing the target content in the database includes:
storing currently edited material including the target content to the database as a whole, wherein the material includes content of a plurality of service types.
Here, when the content of any service type in the material changes, the terminal can store the material as a whole into the database, so that the integrity of the material can be ensured, the complexity of storing the target content can be reduced, and the storage mode is more flexible.
For example: if the material is an article and the article includes a title, a body, a cover page and contents of a classification type, and if the editing operation is an operation of editing only the title and the body, the terminal may store all the contents of the article in the local database.
In addition, when the user edits the content in the material through an editing operation, the terminal can not only store the edited content in the local database, but also update the content cached in the memory.
Specifically, after intercepting the target content, the method further includes: and updating the data source of the target service type to update the edited content entity of the target service type to the target content, thereby realizing the updating of the content cached in the memory of the terminal.
Illustratively, as shown in fig. 2, a service implementation class implementation interface is set in the service logic of the terminal, and in a case that the terminal intercepts the target content by the invoke method, the service implementation class implementation interface may invoke the target content intercepted by the invoke method and change the data source according to the target content, so as to update the edited content entity of the target service type to the target content.
It should be noted that, the terminal may not only intercept, modify, and store the target content in real time by using a dynamic call method, but also implement other functions by using the dynamic call method, for example, as shown in fig. 2, the terminal may also implement other functions such as adding a log to the target content or uploading the target content by using an invoke method, which is not described herein again.
In the embodiment of the invention, the editing operation input by a user is received, wherein the editing operation is used for editing the content of a target service type; responding to the editing operation, calling a target object in the at least two content editing objects, wherein the target object corresponds to the target service type; intercepting target content, wherein the target content is as follows: content edited based on the method of the target object under the editing operation; and storing the target content to a database. Therefore, the terminal does not need to independently set a set of independent storage logic for each service type, and the workload of setting an automatic real-time storage mechanism is reduced; in addition, under the condition that the service type of the editing content is changed, the storage logic does not need to be changed, and the expansibility of an automatic implementation storage mechanism is improved.
Referring to fig. 4, fig. 4 is a structural diagram of a terminal according to an embodiment of the present invention, where the terminal is provided with at least two content editing objects, and different content editing objects correspond to different service types, as shown in fig. 4, the terminal 400 includes:
an operation receiving module 401, configured to receive an editing operation input by a user, where the editing operation is used to edit a content of a target service type;
an object invoking module 402, configured to invoke a target object in the at least two content editing objects in response to the editing operation, where the target object corresponds to the target service type;
a content interception module 403, configured to intercept target content, where the target content is: content edited based on the method of the target object under the editing operation;
a storage module 404, configured to store the target content in a database.
Optionally, the object invoking module 402 is specifically configured to:
calling a target object in the at least two content editing objects through a proxy operation class;
the content interception module 403 is specifically configured to:
and intercepting the target content by a dynamic calling method.
Optionally, as shown in fig. 5, the terminal 400 further includes:
a judging module 405, configured to judge whether the proxy operation class exists in the terminal;
a class creating module 406, configured to create the proxy operation class by calling a processing dynamic call processing interface when it is determined that the proxy operation class does not exist in the terminal.
Optionally, the storage module 404 is specifically configured to:
storing the target content to a database in the event that the method of the target object is provided with an update annotation.
Optionally, as shown in fig. 6, the terminal 400 further includes:
and the data source updating module 407 is configured to update the data source of the target service type, so that the edited content entity of the target service type is updated to the target content.
Optionally, the storage module 404 is specifically configured to:
storing currently edited material including the target content to the database as a whole, wherein the material includes content of a plurality of service types.
The terminal 400 provided in the embodiment of the present invention can implement each process implemented by the terminal in the method embodiment in fig. 1, and is not described herein again to avoid repetition.
Fig. 7 is a schematic diagram of a hardware structure of a terminal for implementing various embodiments of the present invention.
The terminal 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, a power supply 711, and the like. Those skilled in the art will appreciate that the terminal configuration shown in fig. 7 is not intended to be limiting, and that the terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. The terminal 700 is provided with at least two content editing objects, and different content editing objects correspond to different service types.
Wherein, the processor 710 is configured to:
receiving an editing operation input by a user, wherein the editing operation is used for editing the content of a target service type;
responding to the editing operation, calling a target object in the at least two content editing objects, wherein the target object corresponds to the target service type;
intercepting target content, wherein the target content is as follows: content edited based on the method of the target object under the editing operation;
and storing the target content to a database.
Optionally, the processor 710 is specifically configured to:
calling a target object in the at least two content editing objects through a proxy operation class;
and intercepting the target content by a dynamic calling method.
Optionally, the processor 710 is further configured to:
judging whether the agent operation class exists in the terminal or not;
and under the condition that the proxy operation class does not exist in the terminal, creating the proxy operation class by calling a processing dynamic calling processing interface.
Optionally, the processor 710 is specifically configured to:
storing the target content to a database in the event that the method of the target object is provided with an update annotation.
Optionally, the processor 710 is further configured to:
and updating the data source of the target service type so as to update the edited content entity of the target service type into the target content.
Optionally, the processor 710 is specifically configured to:
storing currently edited material including the target content to the database as a whole, wherein the material includes content of a plurality of service types.
The terminal 700 provided in the embodiment of the present invention can implement each process implemented by the terminal in the method embodiment in fig. 1, and is not described here again to avoid repetition.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 710; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 701 may also communicate with a network and other devices through a wireless communication system.
The terminal provides wireless broadband internet access to the user via the network module 702, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output related to a specific function performed by the terminal 700 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used to receive audio or video signals. The input Unit 704 may include a Graphics Processing Unit (GPU) 7041 and a microphone 7042, and the Graphics processor 7041 processes picture data of still pictures or videos obtained by a picture capturing device (e.g., a camera) in a video capturing mode or a picture capturing mode. The processed picture frame may be displayed on the display unit 706. The picture frame processed by the graphic processor 7041 may be stored in the memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 701 in case of a phone call mode.
The terminal 700 also includes at least one sensor 705, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 7061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7061 and/or a backlight when the terminal 700 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 705 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 706 is used to display information input by the user or information provided to the user. The Display unit 706 may include a Display panel 7061, and the Display panel 7061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 707 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 7071 (e.g., operations by a user on or near the touch panel 7071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 7071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 710, receives a command from the processor 710, and executes the command. In addition, the touch panel 7071 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, the other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 7071 may be overlaid on the display panel 7061, and when the touch panel 7071 detects a touch operation on or near the touch panel 7071, the touch operation is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Although the touch panel 7071 and the display panel 7061 are shown in fig. 7 as two separate components to implement the input and output functions of the terminal, in some embodiments, the touch panel 7071 and the display panel 7061 may be integrated to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 708 is an interface for connecting an external device to the terminal 700. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 708 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 700 or may be used to transmit data between the terminal 700 and the external device.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program (such as a sound playing function, a picture playing function, etc.) required by at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 709 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 710 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 709 and calling data stored in the memory 709, thereby integrally monitoring the terminal. Processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 710.
The terminal 700 may also include a power supply 711 (e.g., a battery) for providing power to the various components, and preferably, the power supply 711 may be logically coupled to the processor 710 via a power management system, such that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the terminal 700 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal, including a processor 710, a memory 709, and a computer program stored in the memory 709 and capable of running on the processor 710, where the computer program is executed by the processor 710 to implement each process of the above storage method for editing content, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned storage method for editing content, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A storage method of editing content is applied to a terminal provided with at least two content editing objects, and different content editing objects correspond to different service types; wherein each content editing object comprises a method body and an attribute body, the method comprising:
receiving an editing operation input by a user, wherein the editing operation is used for editing the content of a target service type, and the target service type is one service type or comprises a plurality of service types;
responding to the editing operation, calling a target object in the at least two content editing objects, wherein the target object corresponds to the target service type;
intercepting target content, wherein the target content is as follows: content edited based on a method of the target object under the editing operation, the method of the target object being a method in a method body of the target object;
storing the target content to a database;
wherein the invoking a target object in the at least two content editing objects comprises:
calling a target object in the at least two content editing objects through a proxy operation class;
the intercepting target content comprises the following steps:
and intercepting the target content by a dynamic calling method.
2. The method of claim 1, wherein prior to invoking the target object in the at least two content-editing objects via the proxy operation class, further comprising:
judging whether the agent operation class exists in the terminal or not;
and under the condition that the proxy operation class does not exist in the terminal, creating the proxy operation class by calling a processing dynamic calling processing interface.
3. The method of claim 1, wherein storing the target content to a database comprises:
storing the target content to a database in the event that the method of the target object is provided with an update annotation.
4. The method according to any one of claims 1 to 3, wherein after intercepting the target content, further comprising:
and updating the data source of the target service type so as to update the edited content entity of the target service type into the target content.
5. The method of any one of claims 1 to 3, wherein storing the target content to a database comprises:
storing currently edited material including the target content to the database as a whole, wherein the material includes content of a plurality of service types.
6. A terminal is provided with at least two content editing objects, and different content editing objects correspond to different service types; characterized in that each content editing object comprises a method body and an attribute body, and the terminal comprises:
the system comprises an operation receiving module, a service type editing module and a service type editing module, wherein the operation receiving module is used for receiving editing operation input by a user, the editing operation is used for editing the content of a target service type, and the target service type is one service type or comprises a plurality of service types;
an object calling module, configured to call a target object among the at least two content editing objects in response to the editing operation, where the target object corresponds to the target service type;
the content interception module is used for intercepting target content, wherein the target content is as follows: content edited based on a method of the target object under the editing operation, the method of the target object being a method in a method body of the target object;
the storage module is used for storing the target content to a database;
the object calling module is specifically configured to:
calling a target object in the at least two content editing objects through a proxy operation class;
the content interception module is specifically configured to:
and intercepting the target content by a dynamic calling method.
7. The terminal of claim 6, further comprising:
the judging module is used for judging whether the agent operation class exists in the terminal;
and the class creating module is used for creating the proxy operation class by calling and processing a dynamic calling and processing interface under the condition that the proxy operation class does not exist in the terminal.
8. The terminal according to claim 6, wherein the storage module is specifically configured to:
storing the target content to a database in the event that the method of the target object is provided with an update annotation.
9. The terminal according to any of claims 6 to 8, further comprising:
and the data source updating module is used for updating the data source of the target service type so as to update the edited content entity of the target service type into the target content.
10. The terminal according to any one of claims 6 to 8, wherein the storage module is specifically configured to:
storing currently edited material including the target content to the database as a whole, wherein the material includes content of a plurality of service types.
11. A terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method of storing edited content as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, realizes the steps of the storing method of editing content according to any one of claims 1 to 5.
CN201910380391.7A 2019-05-08 2019-05-08 Storage method and terminal for edited content Active CN110147334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910380391.7A CN110147334B (en) 2019-05-08 2019-05-08 Storage method and terminal for edited content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910380391.7A CN110147334B (en) 2019-05-08 2019-05-08 Storage method and terminal for edited content

Publications (2)

Publication Number Publication Date
CN110147334A CN110147334A (en) 2019-08-20
CN110147334B true CN110147334B (en) 2021-10-08

Family

ID=67595175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910380391.7A Active CN110147334B (en) 2019-05-08 2019-05-08 Storage method and terminal for edited content

Country Status (1)

Country Link
CN (1) CN110147334B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1368683A (en) * 2001-02-02 2002-09-11 英业达股份有限公司 Fault-tolerant method by means of synchronous directory
CN1467642A (en) * 2002-07-09 2004-01-14 ��ʿͨ��ʽ���� Data protection program and data protection method
CN103150684A (en) * 2012-12-28 2013-06-12 中国电力科学研究院 Evaluation index degradation impact analysis method based on analytic hierarchy process

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60316141T2 (en) * 2002-05-10 2008-05-29 Silicon Graphics, Inc., Sunnyvale REAL-TIME STORAGE AREA NETWORK
CN101599011B (en) * 2008-06-05 2016-11-16 天津书生投资有限公司 DPS and method
CN103365873B (en) * 2012-03-28 2016-08-10 阿里巴巴集团控股有限公司 The method for pushing of business datum and device
CN108830268A (en) * 2018-05-28 2018-11-16 北京小米移动软件有限公司 Content acquisition method, device, terminal and storage medium
CN109150992A (en) * 2018-07-27 2019-01-04 深圳Tcl数字技术有限公司 Synchronization drawing practice, device, readable storage medium storing program for executing and system based on Android

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1368683A (en) * 2001-02-02 2002-09-11 英业达股份有限公司 Fault-tolerant method by means of synchronous directory
CN1467642A (en) * 2002-07-09 2004-01-14 ��ʿͨ��ʽ���� Data protection program and data protection method
CN103150684A (en) * 2012-12-28 2013-06-12 中国电力科学研究院 Evaluation index degradation impact analysis method based on analytic hierarchy process

Also Published As

Publication number Publication date
CN110147334A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN110752980B (en) Message sending method and electronic equipment
US11658932B2 (en) Message sending method and terminal device
KR102554191B1 (en) Information processing method and terminal
CN109614061B (en) Display method and terminal
WO2020238449A1 (en) Notification message processing method and terminal
WO2020215932A1 (en) Method for displaying unread message and terminal device
US20220278950A1 (en) Information display method, information sending method, and electronic device
CN109522278B (en) File storage method and terminal equipment
WO2020192322A1 (en) Display method and terminal device
WO2021139613A1 (en) Information processing method and electronic device
WO2021083036A1 (en) Message reply method, server and electronic device
WO2020192282A1 (en) Notification message display method and terminal device
WO2020215982A1 (en) Desktop icon management method and terminal device
CN110795021B (en) Information display method and device and electronic equipment
CN110990172A (en) Application sharing method, first electronic device and computer-readable storage medium
WO2021115220A1 (en) Information sharing method, electronic device and computer-readable storage medium
WO2019076377A1 (en) Image viewing method and mobile terminal
WO2021078140A1 (en) Message interaction method and electronic device
CN111610903A (en) Information display method and electronic equipment
WO2020211602A1 (en) Application control method and terminal device
WO2020168882A1 (en) Interface display method and terminal device
CN111596876A (en) Information display method and device, electronic equipment and storage medium
CN110929273A (en) Permission setting method and electronic equipment
WO2021012955A1 (en) Interface switching method and terminal device
WO2020192662A1 (en) Operation method and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant