Drawing data storage method and device, storage medium and computer equipment

By cached data when users edit drawings in the backend server, determining the data type according to the editing behavior, and writing the drawings when receiving the save instruction, the problem of frequent data storage on the backend server due to frequent data storage when users edit drawings is solved, and storage efficiency is improved.

CN119691208APending Publication Date: 2025-03-25ZWCAD SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411860533.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

When users edit drawings, the front-end needs to frequently store data, which puts great pressure on the storage performance of the back-end server, which in turn affects the storage efficiency.

Method used

By receiving the drawing data sent by the front end, the data type is determined based on the editing behavior of the target user, and the data is stored in the cache. When a save instruction is received, the cached data is written to the drawing.

Benefits of technology

It effectively reduces the storage pressure of the backend server, improves storage efficiency, and reduces network transmission and cache pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691208A_ABST
    Figure CN119691208A_ABST
Patent Text Reader

Abstract

According to the drawing data storage method and device, the storage medium and the computer equipment provided by the invention, after the drawing data generated when the target user edits the drawing and sent by the front end is received, the data type of the drawing data can be determined according to the editing behavior of the target user, and the data type comprises but is not limited to addition / modification / deletion / readdition; then, based on the editing behavior of the target user and the data type of the drawing data, storing the drawing data into a cache; and after a saving instruction which is sent by the front end and clicked by the target user when the drawing is saved is received, writing the drawing data which are stored in the cache and correspond to the saving instruction into the dwg drawing file. In the process, when the user edits the drawing, the back-end server does not directly store the received drawing data into the drawing, but updates the data in the cache according to the key information after extracting the key information, and writes the data into the drawing when needed, so that the storage pressure of the back-end server can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage technology, and in particular to a drawing data storage method, device, storage medium and computer equipment. Background Art

[0002] Currently, when users edit drawings, the front end collects the data edited by the users and sends it to the back end server, which stores the data generated by the users in a timely manner. In this process, the front end needs to store data frequently, which will put a lot of pressure on the storage performance of the back end server, thus affecting the storage efficiency. Summary of the invention

[0003] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect in the prior art that when users edit drawings, the front end needs to frequently store data, which will put great pressure on the storage performance of the back-end server and thus affect the storage efficiency.

[0004] The present application provides a drawing data storage method, the method comprising:

[0005] After receiving the drawing data generated by the target user when editing the drawing sent by the front end, determining the data type of the drawing data according to the editing behavior of the target user;

[0006] Based on the editing behavior of the target user and the data type of the drawing data, storing the drawing data in a cache;

[0007] After receiving the save instruction sent by the front end when the target user clicks when saving the drawing, the drawing data corresponding to the save instruction stored in the cache is written into the drawing.

[0008] Optionally, determining the data type of the drawing data according to the editing behavior of the target user includes:

[0009] When the editing behavior of the target user is a new adding behavior, determining that the data type of the drawing data is new adding data;

[0010] When the editing behavior of the target user is a modification behavior, determining that the data type of the drawing data is modification data;

[0011] When the editing behavior of the target user is a deletion behavior, determining that the data type of the drawing data is deletion data;

[0012] When the editing behavior of the target user is a re-addition behavior, the data type of the drawing data is determined to be re-added data.

[0013] Optionally, when the editing behavior of the target user is a new adding behavior, and the data type of the drawing data is new adding data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes:

[0014] Adding the object identifier of the target user to the end of the sequence list in the cache;

[0015] Determining a new identifier corresponding to the new behavior of the target user;

[0016] The newly added identifier and the binary data corresponding to the newly added data are written into the nested map of the cache.

[0017] Optionally, when the editing behavior of the target user is a modification behavior, and the data type of the drawing data is modification data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes:

[0018] Querying whether the object identifier of the target user exists in the cached sequential list;

[0019] If it exists, then the binary data corresponding to the modified data is updated into the nested map of the cache;

[0020] If it does not exist, then the object identifier is added to the end of the sequence list, and after determining the modification identifier corresponding to the modification behavior of the target user, the modification identifier and the binary data corresponding to the modification data are written into the nested map.

[0021] Optionally, when the editing behavior of the target user is a deletion behavior, and the data type of the drawing data is deletion data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes:

[0022] Querying whether the object identifier of the target user exists in the cached sequential list;

[0023] If it exists, and the data type cached in the cached nested map is new data, then delete the object identifier in the sequence list and the corresponding binary data in the nested map;

[0024] If it exists, and the data type cached in the nested map of the cache is modified data, the data type in the nested map is set as a deletion flag, and the corresponding binary data is deleted;

[0025] If it does not exist, the object identifier is added to the end of the sequence list, and after determining the deletion identifier corresponding to the deletion behavior of the target user, the deletion identifier is written into the nested map.

[0026] Optionally, when the editing behavior of the target user is a re-addition behavior, and the data type of the drawing data is re-added data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes:

[0027] Querying whether the object identifier of the target user exists in the cached sequential list;

[0028] If it exists, after determining the re-addition mark corresponding to the re-addition behavior of the target user, the binary data corresponding to the re-addition data is updated to the nested map of the cache, and the mark corresponding to the binary data in the nested map is changed to the re-addition mark;

[0029] If not, the object identifier is added to the end of the sequence list, and after determining the re-addition identifier corresponding to the re-addition behavior of the target user, the re-addition identifier and the binary data corresponding to the re-addition data are written into the nested map.

[0030] Optionally, when there are multiple target users, based on the editing behavior of the target users and the data type of the drawing data, storing the drawing data in a cache includes:

[0031] After recording the editing order of each target user in the cache, based on the editing behavior of each target user and the data type of the edited drawing data, the corresponding drawing data is stored in the cache.

[0032] The present application also provides a drawing data storage device, comprising:

[0033] A data receiving module, configured to determine the data type of the drawing data according to the editing behavior of the target user after receiving the drawing data generated by the target user when editing the drawing sent by the front end;

[0034] A data cache module, used for storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data;

[0035] The data storage module is used to write the drawing data corresponding to the save instruction stored in the cache into the drawing after receiving the save instruction sent by the front end when the target user clicks on the drawing when saving the drawing.

[0036] The present application also provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the drawing data storage method described in any one of the above embodiments.

[0037] The present application also provides a computer device, comprising: one or more processors, and a memory;

[0038] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the drawing data storage method described in any one of the above embodiments are performed.

[0039] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0040] The drawing data storage method, device, storage medium and computer equipment provided by the present application can determine the data type of the drawing data according to the editing behavior of the target user when editing the drawing after receiving the drawing data sent by the front end, and then store the drawing data in the cache based on the editing behavior of the target user and the data type of the drawing data; after receiving the save instruction clicked by the target user when saving the drawing sent by the front end, the drawing data corresponding to the save instruction stored in the cache is written into the drawing. In this process, when the user is editing the drawing, the back-end server does not directly store the received drawing data in the drawing, but extracts the key information, updates the data in the cache based on the key information, and writes it into the drawing when necessary, which can effectively reduce the storage pressure of the back-end server and thus improve storage efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 A schematic diagram of a flow chart of a drawing data storage method provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of a process for storing drawing data edited by a user provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the architecture for storing data using multi-layer nested maps provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a structure for storing drawing data in the order in which the drawing data is edited by the user provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of the structure of a drawing data storage device provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] In one embodiment, Figure 1 As shown, Figure 1 A schematic diagram of a process flow of a drawing data storage method provided in an embodiment of the present application; the present application provides a drawing data storage method, which may include:

[0050] S110: After receiving the drawing data generated by the target user when editing the drawing sent by the front end, the data type of the drawing data is determined according to the editing behavior of the target user.

[0051] In this step, when the user is editing a drawing, the front end can send the data edited by the user to the back-end server after collecting it. After the back-end server receives the drawing data sent by the front end, it can determine the data type of the drawing data based on the editing behavior of the target user, and then store the drawing data according to the preset storage update rules.

[0052] Specifically, if Figure 2 As shown, Figure 2 A schematic diagram of a process for storing drawing data edited by a user provided in an embodiment of the present application; Figure 2 In the , after the user modifies the drawing data, the front end will have a cache queue to store the drawing data. The storage rules of the data in the cache queue here can be consistent with the cache storage update rules used by the back-end server. After the front end caches the data through the cache queue, the cached data can be sent to the back end, which can compress the amount of transmitted data and reduce the pressure on network transmission and back-end cache.

[0053] For example, in this application, the front end will check every 1 second whether there is data to be sent to the back end. During this process, the user may have added and modified the elements in the dwg drawing multiple times. At this time, the front end can merge these operations into one addition, and then only send one addition operation to the back end. The operations here include but are not limited to adding, deleting, modifying and re-adding. When the user only makes modifications in this operation, the front end can merge multiple modifications into one modification; when the user adds and deletes during this 1 second process, the data can be removed and not sent to the back end; when the user deletes after modification, the deletion mark is sent to the back end to reduce the amount of transmitted data.

[0054] Furthermore, in the present application, there can be multiple target users. When multiple target users perform collaborative editing on the front end, the front end can send the drawing data generated after editing by each target user to the back end. When the back end receives the collaborative data sent by different target users, it can update the data list in the order of the received data, and update it to the cache component for caching according to the storage update rules, thereby reducing the amount of cached data and reducing the storage pressure stored in the dwg drawings.

[0055] S120: Based on the editing behavior of the target user and the data type of the drawing data, the drawing data is stored in a cache.

[0056] In this step, after determining the data type of the drawing data according to the editing behavior of the target user through S110, the present application can store the drawing data in the cache according to the editing behavior of the target user and the data type of the drawing data, thereby reducing the storage pressure of the backend server through the cache.

[0057] Among them, the editing behavior of the target user in this application includes but is not limited to adding behavior, deleting behavior, modifying behavior and re-adding behavior. After the data type of the drawing data is determined according to the editing behavior of the target user, this application can store the editing behavior of the target user and the corresponding type of data in the cache. When writing to the drawing subsequently, the corresponding physical elements in the drawing can be updated according to the editing lines of the target user.

[0058] It is understandable that the cache here can be a memory cache, such as a Redis cache, or a Memcached cache, or a local cache or a distributed cache. The specific choice can be made depending on the actual usage scenario and is not limited here.

[0059] S130: After receiving the save instruction sent by the front end, which is clicked by the target user when saving the drawing, the drawing data corresponding to the save instruction stored in the cache is written into the drawing.

[0060] In this step, after the drawing data is stored in the cache based on the editing behavior of the target user and the data type of the drawing data through S120, the back-end server can continue to monitor the actions of the front-end. Upon receiving the save instruction sent by the front-end when the target user clicks on the drawing, the drawing data corresponding to the save instruction stored in the cache can be written into the drawing.

[0061] In a specific implementation, Figure 2 As shown, when this application selects Redis cache to store data, the backend server can read the data stored in the Redis cache when the user clicks the Save button, and write the read data into the dwg drawing file. It can be understood that the data stored in the Redis cache in this application are all data that are incrementally modified relative to the current dwg. Therefore, when the backend server detects that the user clicks the Save button, it needs to write all the data corresponding to the dwg drawing id in the Redis cache into the drawing file.

[0062] In the above embodiment, after receiving the drawing data generated by the target user when editing the drawing sent by the front end, the data type of the drawing data can be determined according to the editing behavior of the target user, and then based on the editing behavior of the target user and the data type of the drawing data, the drawing data is stored in the cache; after receiving the save instruction clicked by the target user when saving the drawing sent by the front end, the drawing data corresponding to the save instruction stored in the cache is written into the drawing. In this process, when the user is editing the drawing, the back-end server does not directly store the received drawing data in the drawing, but extracts the key information, updates the data in the cache based on the key information, and writes it into the drawing when necessary, which can effectively reduce the storage pressure of the back-end server and thus improve storage efficiency.

[0063] In one embodiment, determining the data type of the drawing data according to the editing behavior of the target user in S110 may include:

[0064] S111: When the editing behavior of the target user is a new adding behavior, determining the data type of the drawing data as new adding data.

[0065] S112: When the editing behavior of the target user is a modification behavior, determining the data type of the drawing data as modification data.

[0066] S113: When the editing behavior of the target user is a deletion behavior, determining that the data type of the drawing data is deletion data.

[0067] S114: When the editing behavior of the target user is a re-addition behavior, determining the data type of the drawing data as re-added data.

[0068] In this embodiment, when the user edits the drawing on the front end, the front end records the current user's editing behavior, which includes but is not limited to adding / modifying / deleting / re-adding, and the front end will write this information into the transmission message when sending. After the back end receives the transmission message, it will perform a preliminary analysis and merge it with the data in the cache.

[0069] Therefore, in this application, after receiving the drawing data generated by the target user when editing the drawing sent by the front end, the back-end server can determine the data type of the corresponding drawing data based on the editing behavior of the target user carried when the front end sends the drawing data.

[0070] For example, when the target user's editing behavior is a new adding behavior, the back-end server parses the data type of the drawing data edited by the target user as new data; when the target user's editing behavior is a modification behavior, the back-end server parses the data type of the drawing data edited by the target user as modification data; when the target user's editing behavior is a deletion behavior, the back-end server parses the data type of the drawing data edited by the target user as deletion data; when the target user's editing behavior is an additional adding behavior, the back-end server parses the data type of the drawing data edited by the target user as additional adding data.

[0071] When the backend server has completed parsing the data types corresponding to all drawing data, the drawing data can be merged into the cache according to the parsing results.

[0072] In one embodiment, Figure 3 As shown, Figure 3 A schematic diagram of an architecture for storing data using a multi-layer nested map provided in an embodiment of the present application; when the editing behavior of the target user is a new addition behavior, and the data type of the drawing data is new addition data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data in S120 may include:

[0073] S121: Add the object identifier of the target user to the end of the sequence list in the cache.

[0074] S122: Determine a new identifier corresponding to the new behavior of the target user.

[0075] S123: Write the newly added identifier and the binary data corresponding to the newly added data into the nested map of the cache.

[0076] In this embodiment, when the editing behavior of the target user is a new behavior, the drawing data edited by the target user is new data. At this time, when the new data is written into the cache, since the new data is new data, the back-end server can first add the object identifier of the target user to the end of the sequential list in the cache, and then determine the new identifier corresponding to the new behavior of the target user, so that the new identifier and the binary data corresponding to the new data can be written into the nested map of the cache.

[0077] It can be understood that a map is a data structure used to store key-value pairs, and a nested map is a data structure in which a map's value is another map. For example, in a nested map representing school information, the key of the outer map can be the grade (such as "first grade" or "second grade"), and the corresponding value is an inner map, the key of this inner map can be the class (such as "first class" or "second class"), and the value can be information such as the number of students in the class.

[0078] Indicatively, Figure 3 As shown, Figure 3 In the , the dwg drawing id is the key of the first layer map, and its corresponding value is an inner layer map. The key of this inner layer map is the entity object id drawn by the user in the drawing, that is, the above-mentioned object identifier, and its corresponding value is another inner layer map. The key of this inner layer map can be the user's editing behavior, and its corresponding value is add / modify / delete / re-add, or it can be the user-drawn object data part, and its corresponding value is binary data, so as to form a multi-layer nested map.

[0079] In one embodiment, when the editing behavior of the target user is a modification behavior, and the data type of the drawing data is modification data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data in S120 may include:

[0080] S211: Query whether the object identifier of the target user exists in the cached sequence list.

[0081] S212: If it exists, the binary data corresponding to the modified data is updated into the nested map of the cache.

[0082] S213: If it does not exist, then add the object identifier at the end of the sequence list, and after determining the modification identifier corresponding to the modification behavior of the target user, write the modification identifier and the binary data corresponding to the modification data into the nested map.

[0083] In this embodiment, when the user's editing behavior is a modification behavior, the drawing data edited by the target user is the modified data. At this time, when the modified data is written into the cache, since the modified data is the modified data, it is possible to first query whether the target user's object identifier exists in the cached sequential list. If so, the binary data corresponding to the modified data is directly updated to the nested map; if not, it means that the data may be newly added and modified data. At this time, the target user's object identifier can be added to the end of the sequential list, and then the modification identifier corresponding to the target user's modification behavior is determined. Then, the modification identifier and the binary data corresponding to the modified data are written into the nested map together to complete the data caching operation.

[0084] In one embodiment, when the editing behavior of the target user is a deletion behavior and the data type of the drawing data is deletion data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data in S120 may include:

[0085] S311: Query whether the object identifier of the target user exists in the cached sequence list.

[0086] S312: If it exists, and the data type cached in the cached nested map is newly added data, the object identifier in the sequence list and the corresponding binary data in the nested map are deleted.

[0087] S313: If it exists, and the data type cached in the cached nested map is modified data, the data type in the nested map is set as a deletion flag, and the corresponding binary data is deleted.

[0088] S314: If it does not exist, then add the object identifier at the end of the sequence list, and after determining the deletion identifier corresponding to the deletion behavior of the target user, write the deletion identifier into the nested map.

[0089] In this embodiment, when the user's editing behavior is a deletion behavior, the drawing data edited by the target user is deleted data. At this time, when writing the deleted data into the cache, since the deleted data is the data to be deleted, it is possible to first query whether the target user's object identifier exists in the cached sequential list. If it exists, and the data type cached in the cached nested map is new data, the object identifier in the sequential list and the corresponding binary data in the cached nested map are directly deleted, and the corresponding entity primitive in the dwg drawing can be deleted according to the data in the nested map; if it exists, and the data type cached in the cached nested map is modified data, the data type in the nested map is set to a deletion identifier, and the corresponding binary data is deleted; if it does not exist, it means that the data may be data deleted after being added, or it may be deleted data generated under other circumstances. At this time, the target user's object identifier can be added to the end of the sequential list, and then the deletion identifier corresponding to the target user's deletion behavior is determined, and then the deletion identifier is written into the nested map. When the dwg drawing is subsequently written, the corresponding entity primitive in the drawing can be deleted according to the deletion identifier.

[0090] In one embodiment, when the editing behavior of the target user is a re-addition behavior, and the data type of the drawing data is re-added data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data in S120 may include:

[0091] S411: Query whether the object identifier of the target user exists in the cached sequence list.

[0092] S412: If it exists, after determining the re-addition identifier corresponding to the re-addition behavior of the target user, the binary data corresponding to the re-added data is updated into the cached nested map, and the identifier corresponding to the binary data in the nested map is changed to the re-addition identifier.

[0093] S413: If it does not exist, then add the object identifier at the end of the sequence list, and after determining the re-addition identifier corresponding to the re-addition behavior of the target user, write the re-addition identifier and the binary data corresponding to the re-addition data into the nested map.

[0094] In this embodiment, when the user's editing behavior is an additional addition behavior, the drawing data edited by the target user is additionally added data. At this time, when the additionally added data is written into the cache, since the additionally added data is data added again, it is possible to first query whether there is an object identifier of the target user in the sequential list of the cache. If so, after determining the additional addition identifier corresponding to the additional addition behavior of the target user, the binary data corresponding to the additionally added data is updated into the nested map, and the identifier corresponding to the binary data in the nested map is changed to the additional addition identifier; if not, an object identifier is added to the end of the sequential list, and after determining the additional addition identifier corresponding to the additional addition behavior of the target user, the additional addition identifier and the binary data corresponding to the additionally added data are written into the nested map. When the dwg drawing is subsequently written, the corresponding entity element is added to the drawing according to the additional addition identifier and the corresponding binary data.

[0095] In one embodiment, Figure 4 As shown, Figure 4 A schematic diagram of a structure for storing drawing data in a user editing order provided in an embodiment of the present application; when there are multiple target users, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data in S120 may include:

[0096] After recording the editing order of each target user in the cache, based on the editing behavior of each target user and the data type of the edited drawing data, the corresponding drawing data is stored in the cache.

[0097] In this embodiment, when multiple target users collaboratively edit drawings on the front end, drawing data edited by multiple target users will be generated. At this time, after the back end receives the drawing data generated by each target user after editing, it can record the editing order of each target user in the cache, and then store the corresponding drawing data in the cache based on the editing behavior of each target user and the data type of the edited drawing data.

[0098] Among them, when the cache of this application is a Redis cache, the data storage structure in Redis is mainly divided into two types, one is the List storage structure, which can record the order in which users of different dwg files draw entity objects; the other is a multi-layer nested map, which records the addition / modification / deletion / re-addition of each drawing entity object and its binary data.

[0099] Therefore, if Figure 4 As shown, when multiple target users collaborate in editing in this application, this application can use a List storage structure to record the drawing order of different entity object IDs, and then write the corresponding drawing data into the drawing according to this order.

[0100] The following is a description of a drawing data storage device provided in an embodiment of the present application. The drawing data storage device described below and the drawing data storage method described above can be referenced to each other.

[0101] In one embodiment, Figure 5 As shown, Figure 5 This is a schematic diagram of a drawing data storage device provided in an embodiment of the present application; the present application also provides a drawing data storage device, which may include a data receiving module 210, a data cache module 220, and a data storage module 230, which specifically includes the following:

[0102] The data receiving module 210 is used to determine the data type of the drawing data according to the editing behavior of the target user after receiving the drawing data generated by the target user when editing the drawing sent by the front end.

[0103] The data cache module 220 is used to store the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data.

[0104] The data storage module 230 is used to write the drawing data corresponding to the save instruction stored in the cache into the drawing after receiving the save instruction sent by the front end when the target user clicks the save instruction when saving the drawing.

[0105] In the above embodiment, after receiving the drawing data generated by the target user when editing the drawing sent by the front end, the data type of the drawing data can be determined according to the editing behavior of the target user, and then based on the editing behavior of the target user and the data type of the drawing data, the drawing data is stored in the cache; after receiving the save instruction clicked by the target user when saving the drawing sent by the front end, the drawing data corresponding to the save instruction stored in the cache is written into the drawing. In this process, when the user is editing the drawing, the back-end server does not directly store the received drawing data in the drawing, but extracts the key information, updates the data in the cache based on the key information, and writes it into the drawing when necessary, which can effectively reduce the storage pressure of the back-end server and thus improve storage efficiency.

[0106] In one embodiment, the present application also provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the drawing data storage method described in any of the above embodiments.

[0107] In one embodiment, the present application also provides a computer device, including: one or more processors, and a memory.

[0108] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the drawing data storage method described in any one of the above embodiments are performed.

[0109] Indicatively, Figure 6 As shown, Figure 6 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 6 The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301 for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the drawing data storage method of any of the above embodiments.

[0110] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.

[0111] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0113] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0114] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A drawing data storage method, characterized in that: The method comprises: After receiving the drawing data generated by the target user when editing the drawing sent by the front end, determining the data type of the drawing data according to the editing behavior of the target user; Based on the editing behavior of the target user and the data type of the drawing data, storing the drawing data in a cache; After receiving the save instruction sent by the front end when the target user clicks when saving the drawing, the drawing data corresponding to the save instruction stored in the cache is written into the drawing.

2. The drawing data storage method according to claim 1, characterized in that: The determining the data type of the drawing data according to the editing behavior of the target user includes: When the editing behavior of the target user is a new adding behavior, determining that the data type of the drawing data is new adding data; When the editing behavior of the target user is a modification behavior, determining that the data type of the drawing data is modification data; When the editing behavior of the target user is a deletion behavior, determining that the data type of the drawing data is deletion data; When the editing behavior of the target user is a re-addition behavior, the data type of the drawing data is determined to be re-added data.

3. The drawing data storage method according to claim 1, characterized in that: When the editing behavior of the target user is a new addition behavior, and the data type of the drawing data is new addition data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes: Adding the object identifier of the target user to the end of the sequence list in the cache; Determining a new identifier corresponding to a new behavior of the target user; The newly added identifier and the binary data corresponding to the newly added data are written into the nested map of the cache.

4. The drawing data storage method according to claim 1, characterized in that: When the editing behavior of the target user is a modification behavior, and the data type of the drawing data is modification data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes: Querying whether the object identifier of the target user exists in the cached sequential list; If it exists, then update the binary data corresponding to the modified data into the nested map of the cache; If it does not exist, then the object identifier is added to the end of the sequence list, and after determining the modification identifier corresponding to the modification behavior of the target user, the modification identifier and the binary data corresponding to the modification data are written into the nested map.

5. The drawing data storage method according to claim 1, characterized in that: When the editing behavior of the target user is a deletion behavior, and the data type of the drawing data is deletion data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes: Querying whether the object identifier of the target user exists in the cached sequential list; If it exists, and the data type cached in the cached nested map is new data, then delete the object identifier in the sequence list and the corresponding binary data in the nested map; If it exists, and the data type cached in the nested map of the cache is modified data, the data type in the nested map is set as a deletion flag, and the corresponding binary data is deleted; If it does not exist, the object identifier is added to the end of the sequence list, and after determining the deletion identifier corresponding to the deletion behavior of the target user, the deletion identifier is written into the nested map.

6. The drawing data storage method according to claim 1, characterized in that: When the editing behavior of the target user is a re-addition behavior, and the data type of the drawing data is re-addition data, storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data includes: Querying whether the object identifier of the target user exists in the cached sequential list; If it exists, after determining the re-addition mark corresponding to the re-addition behavior of the target user, the binary data corresponding to the re-addition data is updated to the nested map of the cache, and the mark corresponding to the binary data in the nested map is changed to the re-addition mark; If not, the object identifier is added to the end of the sequence list, and after determining the re-addition identifier corresponding to the re-addition behavior of the target user, the re-addition identifier and the binary data corresponding to the re-addition data are written into the nested map.

7. The drawing data storage method according to any one of claims 1 to 6, characterized in that: When there are multiple target users, based on the editing behavior of the target users and the data type of the drawing data, storing the drawing data in a cache includes: After recording the editing order of each target user in the cache, based on the editing behavior of each target user and the data type of the edited drawing data, the corresponding drawing data is stored in the cache.

8. A drawing data storage device, characterized in that: include: A data receiving module is used to determine the data type of the drawing data according to the editing behavior of the target user after receiving the drawing data generated by the target user when editing the drawing sent by the front end; A data cache module, used for storing the drawing data in a cache based on the editing behavior of the target user and the data type of the drawing data; The data storage module is used to write the drawing data corresponding to the save instruction stored in the cache into the drawing after receiving the save instruction sent by the front end when the target user clicks on the drawing when saving the drawing.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the drawing data storage method according to any one of claims 1 to 7.

10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the drawing data storage method according to any one of claims 1 to 7 are performed.