Method and apparatus for processing writing track based on cloud desktop, and electronic device

By sampling and replacing the writing trajectory of the cloud desktop client, the problem of writing trajectory transmission distortion in the cloud desktop scenario is solved, and the user's writing trajectory can be restored in the cloud desktop scenario, thus improving the user experience.

CN114860108BActive Publication Date: 2025-11-25ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210547626.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2025-11-25
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

In cloud desktop scenarios, the writing trajectory of a stylus is prone to distortion during cross-network transmission, making it impossible to completely or approximately reproduce the user's handwriting. This is especially problematic in scenarios where note-taking is critical, such as signing and design drawing, where satisfactory service cannot be provided.

Method used

By sampling the writing trajectory of the cloud desktop client, a replacement trajectory is generated. Specifically, this involves sampling the changed trajectory points, determining the data offset, and generating a replacement trajectory based on the sampled trajectory points for display, in order to restore the user's writing trajectory.

Benefits of technology

It enables the reproduction of writing trajectories that meet user needs in cloud desktop scenarios, reduces distortion of writing trajectories, and improves the accuracy of writing trajectory display and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860108B_ABST
    Figure CN114860108B_ABST
Patent Text Reader

Abstract

The application provides a writing track processing method and device based on a cloud desktop and electronic equipment, and relates to the technical field of cloud computing. The method comprises the following steps: in response to a first erasing request for a writing track displayed by a cloud desktop client, determining a first erasing track of the writing track; sampling track points of the first erasing track to obtain first sampling track points; and generating a replacement track of the first erasing track based on the first sampling track points, and displaying the replacement track on the cloud desktop client. In the embodiment of the application, the replacement track is generated by sampling the erased writing track, thereby solving the distortion problem caused by the cross-network transmission of the writing track, and restoring the writing track meeting the user demand in the cloud desktop scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and in particular to a writing track processing method and device based on a cloud desktop and electronic equipment. BACKGROUND

[0002] Many touch screen devices or external touch devices support / have a handwriting pen input. Electronic input is formed by sampling the sensing points of the screen / panel. The handwriting pen is indispensable in many office scenarios, such as signing, taking notes, and designing drawings. However, the high-frequency sampling of the handwriting pen and the algorithm optimization of the cloud desktop operating system for handwriting pen sampling points result in a cross-network transmission in the cloud desktop scenario, which cannot completely or approximately restore the writing track, causing a certain degree of distortion. For some signature and design scenarios that require high-quality notes, better services cannot be provided. SUMMARY

[0003] The present application provides a writing track processing method and device based on a cloud desktop and electronic equipment to solve the distortion problem caused by cross-network transmission of the writing track and restore the writing track that meets the user's requirements in the cloud desktop scenario.

[0004] In a first aspect, the present application provides a writing track processing method based on a cloud desktop, comprising:

[0005] In response to a first erasing request for a writing track displayed by a cloud desktop client, a first erasing track of the writing track is determined;

[0006] The track points of the first erasing track are sampled to obtain first sampling track points;

[0007] A replacement track of the first erasing track is generated based on the first sampling track points and displayed on the cloud desktop client.

[0008] In a possible implementation, the sampling of the track points of the first erasing track to obtain the first sampling track points comprises:

[0009] The change track points are sampled between the start point and the end point of the track segment of the first erasing track to obtain the first sampling track points; the change track points are track points where the input data changes;

[0010] The input data includes at least one of the following: the coordinates of the input track points, the pressure value, the inclination and rotation of the track input.

[0011] In a possible implementation, the sampling of the change track points to obtain the first sampling track points comprises:

[0012] Sample the change trajectory points based on the input data of the input change trajectory points in the first time range to obtain first sample trajectory points.

[0013] In a possible implementation, sampling the change trajectory points based on the input data of the input change trajectory points in the first time range to obtain first sample trajectory points comprises:

[0014] Determining data offsets of the change trajectory points based on the input data of the input change trajectory points in the first time range;

[0015] Sampling the change trajectory points based on the data offsets to obtain the first sample trajectory points.

[0016] In a possible implementation, determining data offsets of the change trajectory points based on the input data of the input change trajectory points in the first time range comprises:

[0017] In a case where the input data is coordinates of the input trajectory points, determining average coordinates based on the coordinates of the input change trajectory points in the first time range;

[0018] Determining data offsets of the change trajectory points based on the coordinates of the change trajectory points and the average coordinates.

[0019] In a possible implementation, sampling the change trajectory points based on the data offsets to obtain the first sample trajectory points comprises:

[0020] Determining a change trajectory point with the largest data offset from the change trajectory points, and determining the change trajectory points other than the change trajectory point with the largest data offset as the first sample trajectory points.

[0021] In a possible implementation, sampling the change trajectory points based on the data offsets to obtain the first sample trajectory points comprises:

[0022] Determining a change trajectory point with the smallest data offset from the change trajectory points as the first sample trajectory point.

[0023] In a possible implementation, the method further comprises:

[0024] In response to a second erasing request for the writing trajectory, obtaining second sample trajectory points based on input data of input change trajectory points in a second time range; the second time range is greater than or smaller than the first time range.

[0025] Generating a replacement trajectory of the second erasing trajectory based on the second sample trajectory points, and displaying the replacement trajectory on the cloud desktop client.

[0026] In a possible implementation, the sampling of the track points of the first erasing track comprises:

[0027] In response to a selection operation for one of the at least two preconfigured sampling manners, the sampling of the track points of the first erasing track is performed based on the sampling manner corresponding to the selection operation, to obtain the first sampling track points; the at least two sampling manners are associated with a time range of collecting the changed track points.

[0028] In a second aspect, the embodiments of the present application provide a writing track processing apparatus based on a cloud desktop, comprising:

[0029] The determining module is configured to determine a first erasing track of a writing track in response to a first erasing request for the writing track displayed by a cloud desktop client.

[0030] The sampling module is configured to sample track points of the first erasing track to obtain first sampling track points.

[0031] The replacing module is configured to generate a replacement track of the first erasing track based on the first sampling track points, and display the replacement track on the cloud desktop client.

[0032] In a third aspect, the embodiments of the present application provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method provided by any of the embodiments of the present application when executing the computer program.

[0033] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method provided by any of the embodiments of the present application.

[0034] Compared with the prior art, the present application has the following advantages:

[0035] The writing track processing method, apparatus and electronic device based on a cloud desktop provided by the embodiments of the present application determine a first erasing track of a writing track in response to a first erasing request for the writing track displayed by a cloud desktop client, sample track points of the first erasing track to obtain first sampling track points, and generate a replacement track of the first erasing track based on the first sampling track points and display the replacement track on the cloud desktop client. In the embodiments of the present application, the sampling of the erased writing track is performed to generate a replacement track, thereby solving the distortion problem caused by the cross-network transmission of the writing track, and realizing the restoration of the writing track meeting the user demand in the cloud desktop scenario.

[0036] The above summary is intended to illustrate only and is not intended to be limiting in any way. Further aspects, embodiments and features of the present application will be readily apparent to those skilled in the art from the following detailed description, taken in conjunction with the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0037] In the drawings, like numerals refer to like elements throughout the various drawings. The drawings are not necessarily to scale, the emphasis instead being placed on illustrating principles of the application. It should be understood that the drawings are merely illustrative of certain embodiments of the application and that they, therefore, do not limit the scope of the application.

[0038] Figure 1 A schematic diagram of a system architecture of a method for processing a writing trajectory based on a cloud desktop according to an embodiment of the application;

[0039] Figure 2 A flowchart of a method for processing a writing trajectory based on a cloud desktop according to an embodiment of the application;

[0040] Figure 3 A schematic diagram of a method for processing a writing trajectory based on a cloud desktop according to an embodiment of the application;

[0041] Figure 4 A schematic diagram of a device for processing a writing trajectory based on a cloud desktop according to an embodiment of the application;

[0042] Figure 5 A block diagram of an electronic device for implementing an embodiment of the application. DETAILED DESCRIPTION

[0043] In the following, only certain example embodiments are simply described. As those skilled in the art will recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the application. The drawings and description are therefore to be considered exemplary in nature and not restrictive.

[0044] For the purpose of understanding the technical solutions of the embodiments of the application, the related technologies of the embodiments of the application are described below. The following related technologies can be combined with the technical solutions of the embodiments of the application in any way as optional solutions, and all of them belong to the protection scope of the embodiments of the application.

[0045] In order to more clearly show the method for processing a writing trajectory based on a cloud desktop provided in the embodiments of the application, first, an application scenario that can be used to implement the method is introduced.

[0046] The technical scheme of the present application can be applied to a scenario in which a writing track needs to be converted into electronic data for display on a cloud desktop client, for example, signing a document, taking notes, designing a drawing, etc.

[0047] Figure 1 A schematic diagram of a system architecture of a writing track processing method based on a cloud desktop according to an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, a cloud desktop client is installed on a user terminal, and a cloud desktop is located on a cloud server. After the user terminal obtains a writing track of a user, the writing track is sent to the cloud server. The cloud server caches the writing track data and displays the writing track through the cloud desktop client. If the user terminal receives an erasing request of the user, the data of an erasing track is obtained from the cached writing track data, the track points of the erasing track are resampled, a replacement track is generated, and the replacement track is displayed on the cloud desktop client again.

[0048] The present application provides a writing track processing method based on a cloud desktop, Figure 2 A flowchart of a writing track processing method based on a cloud desktop according to an embodiment of the present application is shown in FIG. 2. The method can be applied to a writing track processing device based on a cloud desktop, which can be deployed in a user terminal, a server, or other processing devices. In some possible implementation manners, the method can also be implemented by a processor calling computer readable instructions stored in a memory. As shown in FIG. 2, the method includes the following steps. Figure 2

[0049] In step S201, a first erasing track of a writing track is determined in response to a first erasing request of the writing track displayed on a cloud desktop client.

[0050] In the present application, a cloud server is taken as an execution subject. The cloud server receives a writing track sent by a user terminal. The writing track includes coordinates of each track point, a pressure value, an inclination and a rotation of track input, etc. The writing track can be a track generated by moving a pen tip of an electronic pen, other input devices, a finger, etc. on a screen or a panel of the user terminal. After receiving the writing track, the cloud server can cache the writing track and display the writing track on a cloud desktop client.

[0051] ​Since the writing track is sent from the operating system of the user terminal to the operating system of the cloud desktop client, the interval of the sampling points of the writing track changes due to the cross-network transmission, and therefore the operating system of the cloud desktop client performs optimization processing, such as smoothing processing, on the writing track. This may cause distortion of the writing track, and the writing track displayed by the cloud desktop client may be different from the actual writing track displayed by the user, and may not meet the needs of the user. The user can erase the track by an erasing request. The server receives the request for erasing the writing track sent by the user terminal, and determines a first erasing track of the writing track corresponding to the erasing request, where the first erasing track can be all or part of the track of the writing track.

[0052] In step S202, the track points of the first erasing track are sampled to obtain first sampling track points.

[0053] The cloud server obtains the first erasing track from the cache, samples the track points of the first erasing track, and obtains first sampling track points.

[0054] In step S203, a replacement track of the first erasing track is generated based on the first sampling track points, and is displayed on the cloud desktop client.

[0055] The cloud server regenerates the track based on the first sampling track points as a replacement track to replace the erased track, and displays the replacement track to the user through the cloud desktop client. In this embodiment, the display of the writing track can be static display or dynamic display. The static display can be direct display of all contents of the track, and the dynamic display can be display of the process of gradually generating the track by the track points of the writing track through dynamic playback.

[0056] The method for processing the writing track based on the cloud desktop provided in this embodiment can solve the distortion problem caused by cross-network transmission of the writing track by sampling the erased writing track to generate a replacement track, so as to restore the writing track meeting the needs of the user in the cloud desktop scenario.

[0057] There are various implementation manners for sampling the track points of the erasing track, and specific implementation manners are shown in the following embodiments.

[0058] In a possible implementation manner, in step S203, the track points of the first erasing track are sampled to obtain first sampling track points, including:

[0059] The changing track points are sampled between the start point and the end point of the track segment of the first erasing track to obtain the first sampling track points, and the changing track points are the track points at which the input data changes.

[0060] The input data includes at least one of the following: coordinates of the input trajectory points, pressure values, inclination and rotation degrees of the input trajectory.

[0061] The first erasing trajectory can include a plurality of trajectory segments. Taking an electronic pen as an example, the start point and the end point of a trajectory segment can be the trajectory points corresponding to the lifting and falling of the pen nib, respectively. When sampling the trajectory points, in order to ensure the similarity between the replaced handwriting and the original handwriting to a certain extent, the trajectory points corresponding to the lifting and falling of the pen nib are not sampled, and the trajectory points between the start point and the end point of the trajectory segment, i.e., the trajectory points where the input data changes, are sampled. The input data includes at least one of the following: coordinates of the input trajectory points, pressure values, inclination and rotation degrees of the input trajectory, etc. The coordinates of the input trajectory points are the position coordinates of the trajectory points in the screen or panel; the pressure values are the pressures acting on the pen nib corresponding to the trajectory points. The inclination of the input trajectory can be the inclination degree of the pen nib corresponding to the trajectory points. The rotation degree of the input trajectory can be the rotation degree of the pen nib corresponding to the trajectory points.

[0062] The specific implementation of sampling the changed trajectory points is shown in the following examples.

[0063] In a possible implementation, the changed trajectory points are sampled to obtain first sampling trajectory points, including:

[0064] The changed trajectory points are sampled based on the input data of the changed trajectory points input within the first time range to obtain the first sampling trajectory points.

[0065] In actual applications, the first time range can be configured according to specific needs. The first time range corresponds to the number of changed trajectory points. The longer the first time range is, the more the number of input changed trajectory points is. According to the input data of the changed trajectory points, at least one of the following: coordinates of the input trajectory points, pressure values, inclination and rotation degrees of the input trajectory, etc., the first sampling trajectory points are obtained.

[0066] The specific implementation of sampling the changed trajectory points based on the input data of the changed trajectory points is shown in the following examples.

[0067] In a possible implementation, the changed trajectory points are sampled based on the input data of the changed trajectory points input within the first time range to obtain the first sampling trajectory points, including:

[0068] Based on the input data of the changed trajectory points input within the first time range, data offsets of a plurality of changed trajectory points are determined.

[0069] The changed trajectory points are sampled based on the plurality of data offsets to obtain the first sampling trajectory points.

[0070] In actual application, since multiple change track points are input in the first time range, the input data based on the change track points are sampled, the data offset of each change track point is calculated according to the input data of each change track point, and the change track points are sampled according to the numerical value of the data offset of each change track point, so as to obtain the first sampling track points. The data offset is used to represent the data offset degree of the current change track point compared with the standard value. The standard value can be calculated according to the input data of the multiple change track points input in the first time range.

[0071] The specific method for calculating the data offset of the change track point is shown in the following embodiments.

[0072] In a possible implementation, the data offset of the multiple change track points is determined based on the input data of the change track points input in the first time range, including:

[0073] In the case that the input data is the coordinates of the input track points, the average coordinates are determined based on the coordinates of the multiple change track points input in the first time range.

[0074] The data offset of the multiple change track points is determined based on the coordinates of the multiple change track points and the average coordinates.

[0075] In actual application, taking the coordinates of the input track points as the input data as an example, the average value of the coordinates of the multiple change track points input in the first time range, i.e. the average coordinates, is calculated, the distance between the coordinates of each change track point and the average coordinates is calculated as the data offset of the change track point, and the data offset of the multiple change track points is obtained in the same way.

[0076] The multiple change track points are sampled based on the multiple data offsets, and the first sampling track points are obtained. There are multiple implementation manners, and the specific implementation manners are shown in the following embodiments.

[0077] In a possible implementation, the multiple change track points are sampled based on the multiple data offsets, and the first sampling track points are obtained, including:

[0078] The change track point with the maximum data offset in the multiple change track points is determined, and the change track points other than the change track point with the maximum data offset are determined as the first sampling track points.

[0079] In actual application, after the data offsets of the multiple change trajectory points input in the first time range are determined, the data offsets are sorted, the change trajectory point with the largest data offset is obtained, the change trajectory point is discarded, and the change trajectory points other than the change trajectory point among the multiple change trajectory points input in the first time range are determined as the first sampling trajectory points. In this way, based on the multiple change trajectory points input in the first time range, the multiple first sampling trajectory points can be obtained, so that the sampling times can be reduced and the sampling efficiency can be improved.

[0080] In a possible implementation, the sampling of the change trajectory points based on the multiple data offsets to obtain the first sampling trajectory points comprises:

[0081] The change trajectory point with the smallest data offset among the multiple change trajectory points is determined as the first sampling trajectory point.

[0082] In actual application, in addition to discarding the change trajectory point with the largest data offset, the change trajectory point with the smallest data offset can also be selected as the first sampling trajectory point. In this way, more accurate data can be obtained, and the generated replacement trajectory based on the first sampling trajectory point obtained in this way has higher similarity with the original writing trajectory.

[0083] In actual application, if the generated replacement trajectory cannot meet the user requirement, the trajectory can also be erased again according to the erasing request, and a new replacement trajectory is generated again through other sampling manners, which will be specifically described in the following embodiments.

[0084] In a possible implementation, the method further comprises:

[0085] In response to a second erasing request for the writing trajectory, second sampling trajectory points are obtained based on input data of change trajectory points input in a second time range; the second time range is greater than or smaller than the first time range.

[0086] A replacement trajectory of a second erasing trajectory is generated based on the second sampling trajectory points, and the replacement trajectory is displayed on the cloud desktop client.

[0087] In actual application, if the generated replacement trajectory cannot meet the user requirement, the user erases again, and in response to a second erasing request for the writing trajectory, sampling is performed again, and a new replacement trajectory is generated.

[0088] Optionally, the second time range is greater than the first time range. Based on the input data of the inputted change trajectory points within the second time range, data offsets of the plurality of change trajectory points are determined; based on the plurality of data offsets, the change trajectory points are sampled to obtain second sampling trajectory points, and a replacement trajectory of the second erasing trajectory is generated based on the second sampling trajectory points. Since the second time range is greater than the first time range, the number of change trajectory points obtained based on the second time range is greater. If the same sampling method as that of the first sampling trajectory points is adopted, for example, the change trajectory point with the largest data offset is discarded to obtain the second sampling trajectory points, more change trajectory points can be retained, so that the new replacement trajectory has a higher similarity with the original writing trajectory.

[0089] Optionally, the second time range is less than the first time range. Based on the input data of the inputted change trajectory points within the second time range, data offsets of the plurality of change trajectory points are determined; based on the plurality of data offsets, the change trajectory points are sampled to obtain second sampling trajectory points, and a replacement trajectory of the second erasing trajectory is generated based on the second sampling trajectory points. Since the second time range is less than the first time range, the number of change trajectory points obtained based on the second time range is less. If the same sampling method as that of the first sampling trajectory points is adopted, for example, the change trajectory point with the largest data offset is discarded to obtain the second sampling trajectory points, fewer change trajectory points are retained, so that the new replacement trajectory is smoother compared with the original writing trajectory, but the similarity with the original writing trajectory is reduced.

[0090] In a possible implementation, in step S203, the trajectory points of the first erasing trajectory are sampled to obtain first sampling trajectory points, including:

[0091] In response to a selection operation on one of the at least two preconfigured sampling methods, the trajectory points of the first erasing trajectory are sampled based on the sampling method corresponding to the selection operation to obtain first sampling trajectory points; the at least two sampling methods are associated with a time range for collecting change trajectory points.

[0092] In actual applications, the at least two sampling methods can be configured for the user to select according to different time ranges for collecting change trajectory points.

[0093] In an exemplary embodiment, three basic styles are provided for the user to select: accurate, moderate, and convenient.

[0094] 1. The sampling method of the accurate style: collect the change trajectory points inputted within 0.08 seconds each time to obtain 8 change trajectory points, discard the change trajectory point with the largest data offset to obtain 7 sampling trajectory points;

[0095] 2. Moderate sampling mode: collect the change trajectory points within 0.05 seconds each time, get 5 change trajectory points, discard the one with the largest data offset, and get 4 sampling trajectory points;

[0096] 3. Convenient sampling mode: collect the change trajectory points within 0.03 seconds each time, get 3 change trajectory points, discard the one with the largest data offset, and get 2 sampling trajectory points;

[0097] The interval of the sampling trajectory points after cross-network transmission often changes, resulting in jitter of the final writing trajectory, which is not smooth enough. If one point is discarded every few points, the physical distance of the input trajectory points is increased, and under the processing of the operating system of the cloud desktop client, the handwriting is often smoother, the more discarded, the smoother, and at the same time, the more deviated from the real handwriting. Therefore, for the above three sampling modes, the similarity between the trajectory and the original writing trajectory is the highest through accurate sampling; the similarity between the trajectory and the original writing trajectory is the lowest through convenient sampling, but the trajectory is the smoothest.

[0098] In order to more clearly present the technical idea of the present application, a specific application example is provided below. Figure 3 The schematic diagram of the processing method of the writing trajectory based on the cloud desktop provided by an embodiment of the present application. In this embodiment, the user terminal is installed with a cloud desktop client or a cloud application client; the cloud desktop or the cloud application is located in a cloud server, and provides a writing trajectory service through the cloud desktop client. The specific implementation process is as follows:

[0099] 1. Start handwriting recording according to the triggering operation of the user on the button on the toolbar of the cloud desktop window (or a floating button is provided in the cloud application scenario) of the cloud desktop client;

[0100] 2. Obtain the writing trajectory of the user signing or drawing on the terminal screen by the handwriting pen;

[0101] 3. Capture the pointer event of the operating system through the cloud desktop client, and obtain the input data of each trajectory point of the writing trajectory, including: coordinates, pressure values, inclination and rotation degrees, etc., and can also include state data such as lifting and falling;

[0102] 4. Transmit to the agent component Agent in the cloud desktop (or cloud application) through the protocol channel;

[0103] 5. The agent component Agent injects the input data into the pointer event of the operating system running in the cloud desktop, and puts the handwriting pen input data into the "recording queue" (Pen points inject queue);

[0104] 6. The handwriting effect will be distorted after cross-network, if the user is not satisfied, then can be erased, in response to the user's selection button on the toolbar of the cloud desktop window (or a floating button is provided in the cloud application scenario) triggered operation, according to the user's selection of style, the track point is sampled, and then redrawn;

[0105] 7. When the redraw is triggered, the cached data is sampled again according to the different styles, and then injected into the operating system of the cloud desktop client. The handwriting algorithm of the operating system will combine the new data to generate different characteristics of the replacement track, and the handwriting playback will be performed;

[0106] 8. According to the user's erasing request, the redraw is continuously erased until the user selects the handwriting that is satisfactory.

[0107] Corresponding to the application scenario and method of the method provided by the embodiments of the present application, the embodiments of the present application also provide a writing track processing device based on a cloud desktop. As shown in Figure 4 The writing track processing device based on a cloud desktop can include:

[0108] The determining module 401 is configured to determine a first erasing track of a writing track in response to a first erasing request for the writing track displayed by a cloud desktop client.

[0109] The sampling module 402 is configured to sample the track points of the first erasing track to obtain first sampling track points.

[0110] The replacement module 403 is configured to generate a replacement track of the first erasing track based on the first sampling track points and display the replacement track in the cloud desktop client.

[0111] The writing track processing device based on a cloud desktop provided by the embodiments of the present application solves the distortion problem caused by cross-network transmission of the writing track by sampling the erased writing track to generate a replacement track, so as to restore the writing track that meets the user's demand in the cloud desktop scenario.

[0112] In a possible implementation, the sampling module 402 is configured to:

[0113] Sample the change track points between the starting point and the ending point of the track segment of the first erasing track to obtain the first sampling track points; the change track points are the track points where the input data changes;

[0114] The input data includes at least one of the following: coordinates of the input track points, pressure values, inclination and rotation of the track input.

[0115] In a possible implementation, the sampling module 402 is configured to:

[0116] The sampling module 402 is configured to sample the change trajectory points based on the input data of the input change trajectory points in the first time range to obtain first sampling trajectory points.

[0117] In a possible implementation, the sampling module 402 includes a determining unit and a sampling unit.

[0118] The determining unit is configured to determine data offsets of the change trajectory points based on the input data of the input change trajectory points in the first time range.

[0119] The sampling unit is configured to sample the change trajectory points based on the data offsets to obtain the first sampling trajectory points.

[0120] In a possible implementation, the determining unit is specifically configured to:

[0121] In a case where the input data is coordinates of the input trajectory points, the determining unit is configured to determine average coordinates based on the coordinates of the input change trajectory points in the first time range.

[0122] The determining unit is configured to determine the data offsets of the change trajectory points based on the coordinates of the change trajectory points and the average coordinates.

[0123] In a possible implementation, the sampling unit is specifically configured to:

[0124] The sampling unit is configured to determine, as the first sampling trajectory points, the change trajectory points other than the change trajectory point with the maximum data offset in the change trajectory points.

[0125] In a possible implementation, the sampling unit is specifically configured to:

[0126] The sampling unit is configured to determine, as the first sampling trajectory points, the change trajectory point with the minimum data offset in the change trajectory points.

[0127] In a possible implementation, the apparatus further includes a generating module configured to:

[0128] In response to a second erasing request for the writing trajectory, the generating module is configured to obtain second sampling trajectory points based on input data of input change trajectory points in a second time range; the second time range is greater than or smaller than the first time range.

[0129] The generating module is configured to generate a replacement trajectory of a second erasing trajectory based on the second sampling trajectory points, and display the replacement trajectory on the cloud desktop client.

[0130] In a possible implementation, the sampling module 402 is configured to:

[0131] In response to a selection operation for one of the at least two preconfigured sampling modes, the track points of the first erasing track are sampled based on the sampling mode corresponding to the selection operation to obtain first sampling track points; the at least two sampling modes are associated with a time range for collecting the change track points.

[0132] The functions of each module in each device of the embodiments of the present application can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be repeated here.

[0133] Figure 5 A block diagram of an electronic device for implementing the embodiments of the present application is shown in FIG. 5. As shown in FIG. 5, the electronic device includes a memory 510 and a processor 520, and the memory 510 stores a computer program executable on the processor 520. The processor 520 implements the method in the above embodiments when executing the computer program. The number of the memory 510 and the processor 520 can be one or more. Figure 5

[0134] The electronic device further includes:

[0135] A communication interface 530 for communicating with external devices and transmitting data.

[0136] If the memory 510, the processor 520 and the communication interface 530 are independently implemented, the memory 510, the processor 520 and the communication interface 530 can be connected to each other through a bus and complete the communication therebetween. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 5 only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0137] Optionally, if the memory 510, the processor 520 and the communication interface 530 are integrated on a chip, the memory 510, the processor 520 and the communication interface 530 can complete the communication therebetween through an internal interface.

[0138] The embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method provided in the embodiments of the present application.

[0139] ​The embodiment of the present application further provides a chip, which comprises a processor, and is used for calling and running instructions stored in a memory, so that a communication device installed with the chip executes the method provided by the embodiment of the present application.

[0140] The embodiment of the present application further provides a chip, which comprises an input interface, an output interface, a processor and a memory, and the input interface, the output interface, the processor and the memory are connected through internal connection paths, and the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the embodiment of the present application.

[0141] It should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processings (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It should be noted that the processor can be a processor supporting an advanced RISC machine (ARM) architecture.

[0142] Further, the aforementioned memory can include a read-only memory, and a random access memory, and can further include a non-volatile random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memory. The non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available. For example, a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a direct Rambus RAM (DR RAM) are available.

[0143] In the above-described embodiments, all or some of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented as software, the embodiments can be implemented in the form of a computer program product including one or more computer instructions. When the computer program instructions are loaded into and executed by a computer, all or some of the procedures or functions according to the present disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or another programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0144] In the description of the application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples. In addition, different embodiments or examples described in the specification and characteristics of different embodiments or examples can be combined and combined by those skilled in the art without contradiction.

[0145] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "multiple" is two or more, unless otherwise specifically limited.

[0146] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing code modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions or other processes. And the various embodiments of the application can include additional or fewer steps or processes in comparison to those shown in the figures.

[0147] The logic and / or steps represented in flow charts or otherwise described herein, for example, can be embodied in computer-readable instructions, which can be used to cause one or more processors to perform the actions indicated in the steps. The computer-readable instructions can be stored on one or more storage media or memory devices associated with the one or more processors.

[0148] It should be understood that parts of the application can be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above-described embodiment method can be instructed by a program to complete the relevant hardware, which can be stored in a computer readable storage medium, and the program includes one or a combination of the steps of the method embodiment when executed.

[0149] In addition, each of the function units in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software function module. When the integrated module is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. The storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various changes or replacements within the technical scope disclosed in the present application, and these should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for processing a writing trajectory based on a cloud desktop, characterized in that, The method comprises: in response to a first erasing request for a writing track displayed by a cloud desktop client, determining a first erasing track of the writing track; the first erasing track is all or part of the track of the writing track; sampling the track points of the first erasing track to obtain first sampling track points; the first sampling track points are track points other than the track points with the maximum data offset between the start point and the end point of the track segment of the first erasing track; generating a replacement track of the first erasing track based on the first sampling track points, erasing and redrawing the writing track, and displaying it on the cloud desktop client.

2. The method of claim 1, wherein, The method further comprises: sampling the track points of the first erasing track to obtain first sampling track points, comprising: sampling the change track points between the start point and the end point of the track segment of the first erasing track to obtain the first sampling track points; the change track points are track points where the input data changes; 3. The method of claim 2, wherein, wherein the input data comprises at least one of the following: the coordinates of the input track points, the pressure value, the inclination and rotation of the track input. The method further comprises:

4. The method of claim 3, wherein, sampling the change track points to obtain the first sampling track points, comprising: sampling the change track points based on the input data of the change track points input within the first time range to obtain the first sampling track points. The method further comprises:

5. The method of claim 4, wherein, sampling the change track points based on the input data of the change track points input within the first time range to obtain the first sampling track points, comprising: determining the data offset of the plurality of change track points based on the input data of the change track points input within the first time range; sampling the change track points based on the plurality of data offsets to obtain the first sampling track points.

6. The method of claim 4, wherein, The method further comprises: determining the data offset of the plurality of change track points based on the input data of the change track points input within the first time range, comprising:

7. The method of claim 4, wherein, in the case that the input data is the coordinates of the input track points, determining the average coordinates based on the coordinates of the plurality of change track points input within the first time range; determining the data offset of the plurality of change track points based on the coordinates of the plurality of change track points and the average coordinates.

8. The method of claim 3, wherein, The method further comprises: sampling the change track points based on the plurality of data offsets to obtain the first sampling track points, comprising: determining the change track point with the maximum data offset among the plurality of change track points, and determining the change track points other than the change track point with the maximum data offset as the first sampling track points. The method further comprises: sampling the change track points based on the plurality of data offsets to obtain the first sampling track points, comprising: determining the change track point with the minimum data offset among the plurality of change track points as the first sampling track points. The method further comprises: in response to a second erasing request for the writing track, obtaining second sampling track points based on the input data of the change track points input within a second time range; the second time range is greater than or less than the first time range; erasing again, generating a new replacement track based on the second sampling track points, and displaying it on the cloud desktop client.

9. The method of claim 2, wherein, The sampling of the track points of the first erasing track comprises: In response to a selection operation for one of preconfigured at least two sampling modes, the track points of the first erasing track are sampled based on the sampling mode corresponding to the selection operation to obtain first sampling track points; the at least two sampling modes are associated with a time range in which the change track points are collected. 10.A writing trajectory processing apparatus based on a cloud desktop, characterized by comprising: The device comprises: A determination module is configured to determine a first erasing track of a writing track in response to a first erasing request of the writing track displayed by a cloud desktop client; the first erasing track is all or part of the writing track; A sampling module is configured to sample track points of the first erasing track to obtain first sampling track points; the first sampling track points are track points other than track points with maximum data offset between start points and end points of track segments of the first erasing track; A replacement module is configured to generate a replacement track of the first erasing track based on the first sampling track points, to erase and redraw the writing track, and to display the writing track on the cloud desktop client. 11.An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method of any one of claims 1-9 when executing the computer program. 12.A computer readable storage medium having a computer program stored therein, wherein the computer program implements the method of any one of claims 1-9 when executed by a processor.

Citation Information

Patent Citations

  • Information Processing Device And Method

    CN107450825A

  • Track generation method based on display screen and related components thereof

    CN112698773A

  • Note processing method, electronic equipment and computer storage medium

    CN114356204A