Vector data processing method, device and system

文档序号:7616 发布日期:2021-09-17 浏览:29次 中文

1. A vector data processing method is applied to a client, and a plurality of clients are respectively in communication connection with a server, and the method comprises the following steps:

after vector data are modified, sending a data synchronization request to the server, wherein the data synchronization request carries current vector data version information;

receiving server vector data version information sent by the server according to the data synchronization request;

and if the current vector data version information is the same as the server vector data version information, sending modified vector data to the server and updating the current vector data version information.

2. The method of claim 1, wherein after receiving server vector data version information sent by the server according to the data synchronization request, the method further comprises:

if the current vector data version information is different from the server vector data version information, sending a data request to the server;

receiving synchronous data sent by the server according to the data request;

and completing synchronization with the server according to the synchronization data, and updating that the current vector data version information is the same as the server vector data version information.

3. The method of claim 1, wherein if the client disconnects from the server, the method further comprises:

and after the modification vector data are modified, recording modification information into the modification record table.

4. The method of claim 3, wherein after the modification vector data is modified and the modification information is recorded in the modification record table, the method further comprises:

after the client establishes communication with the server, starting an online editing mode;

displaying conflict data according to the modification data in the modification record table and the current data of the server based on the online editing mode;

and responding to the selection operation of the user based on the conflict data, completing data synchronization according to a selection result, and updating the version information of the current vector data.

5. A vector data processing method is applied to a server, wherein the server is respectively in communication connection with a plurality of clients, and the method comprises the following steps:

receiving a data synchronization request sent by the client, wherein the data synchronization request carries current vector data version information;

sending server vector data version information to the client according to the data synchronization request;

and when the current vector data version information is the same as the server vector data version information, the client sends the modified vector data.

6. The method of claim 5, wherein after sending server vector data version information to the client in accordance with the data synchronization request, further comprising:

receiving a data request sent by the client when the current vector data version information is different from the server vector data version information;

and sending synchronous data to the server according to the data request.

7. A vector data processing apparatus, wherein the apparatus is applied to a client, and a plurality of the clients are respectively connected to a server in communication, the apparatus comprising: the device comprises a request module, a first receiving module and an updating module;

the request module is used for sending a data synchronization request to the server after modifying the vector data, wherein the data synchronization request carries the current vector data version information;

the first receiving module is configured to receive server vector data version information sent by the server according to the data synchronization request;

and the updating module is used for sending the modified vector data to the server and updating the version information of the current vector data if the version information of the current vector data is the same as the version information of the vector data of the server.

8. A vector data processing apparatus, wherein the apparatus is applied to a server, and the server is respectively connected to a plurality of clients in communication, the apparatus comprising: the device comprises a second receiving module, a sending module and a third receiving module;

the second receiving module is configured to receive a data synchronization request sent by the client, where the data synchronization request carries current vector data version information;

the sending module is used for sending server vector data version information to the client according to the data synchronization request;

and the third receiving module is used for receiving the modified vector data sent by the client when the current vector data version information is the same as the server vector data version information.

9. A vector data processing system, comprising: a server communicatively coupled to a plurality of clients, the clients configured to perform the method of any of claims 1-4, and the server configured to perform the method of any of claims 5-7.

10. The system of claim 9, wherein the server is communicatively coupled to a plurality of clients in a star topology or a ring topology.

Background

In the process of processing vector data by using mapping software, a plurality of processing terminals are generally required to perform team processing in a labor-sharing manner, and therefore, a method of performing cooperative processing on the vector data is required to complete such work.

In the prior art, generally, in a pipeline operation mode, after each processing end processes data independently, the data is transmitted to the next processing end for processing.

However, this method usually takes a lot of time to transfer data, so the overall processing efficiency is low during the processing.

Disclosure of Invention

The invention aims to provide a vector data processing method, a vector data processing device and a vector data processing system, which can improve the working efficiency of overall processing and reduce the consumed time.

The embodiment of the invention is realized by the following steps:

in one aspect of the embodiments of the present invention, a method for processing vector data is provided, where the method is applied to a client, and multiple clients are respectively in communication connection with a server, and the method includes:

after modifying the vector data, sending a data synchronization request to a server, wherein the data synchronization request carries current vector data version information;

receiving server vector data version information sent by a server according to the data synchronization request;

and if the version information of the current vector data is the same as the version information of the vector data of the server, sending the modified vector data to the server and updating the version information of the current vector data.

Optionally, after receiving the server vector data version information sent by the server according to the data synchronization request, the method further includes:

if the current vector data version information is different from the server vector data version information, sending a data request to a server;

receiving synchronous data sent by a server according to the data request;

and completing synchronization with the server according to the synchronization data, and updating that the version information of the current vector data is the same as the version information of the server vector data.

Optionally, if the client is disconnected from the server, the method further includes:

and after the modification vector data are modified, recording modification information into the modification record table.

Optionally, after the modifying vector data is modified and the modifying information is recorded in the modifying record table, the method further includes:

after the client establishes communication with the server, starting an online editing mode;

displaying the conflict data according to the modification data in the modification record table and the current data of the server based on the online editing mode;

and responding to selection operation of the user based on the conflict data, completing data synchronization according to a selection result, and updating the version information of the current vector data.

In another aspect of the embodiments of the present invention, a vector data processing method is provided, where the method is applied to a server, and the server is in communication connection with a plurality of clients respectively, and the method includes:

receiving a data synchronization request sent by a client, wherein the data synchronization request carries current vector data version information;

sending server vector data version information to a client according to the data synchronization request;

and when the received current vector data version information is the same as the server vector data version information, the client sends the modified vector data.

Optionally, after sending the server vector data version information to the client according to the data synchronization request, the method further includes:

receiving a data request sent by a client when the current vector data version information is different from the server vector data version information;

and sending the synchronous data to the server according to the data request.

Optionally, if the server and the client reestablish communication after communication is interrupted, the method further includes:

and after the server establishes communication with the client, starting an online editing mode.

In another aspect of the embodiments of the present invention, there is provided a vector data processing apparatus, where the apparatus is applied to a client, and a plurality of clients are respectively in communication connection with a server, and the apparatus includes: the device comprises a request module, a first receiving module and an updating module.

And the request module is used for sending a data synchronization request to the server after modifying the vector data, wherein the data synchronization request carries the current vector data version information.

And the first receiving module is used for receiving the server vector data version information sent by the server according to the data synchronization request.

And the updating module is used for sending the modified vector data to the server and updating the version information of the current vector data if the version information of the current vector data is the same as the version information of the vector data of the server.

Optionally, the first receiving module is further configured to:

if the current vector data version information is different from the server vector data version information, sending a data request to a server;

receiving synchronous data sent by a server according to the data request;

and completing synchronization with the server according to the synchronization data, and updating that the version information of the current vector data is the same as the version information of the server vector data.

Optionally, the update module is further configured to:

and if the client is disconnected with the server, recording modification information into a modification record table after the modification vector data is modified.

Optionally, the update module is further configured to: after the modification vector data is modified, recording modification information into a modification record table, and starting an online editing mode after a client establishes communication with a server;

displaying the conflict data according to the modification data in the modification record table and the current data of the server based on the online editing mode;

and responding to selection operation of the user based on the conflict data, completing data synchronization according to a selection result, and updating the version information of the current vector data.

In another aspect of the embodiments of the present invention, there is provided a vector data processing apparatus, where the apparatus is applied to a server, and the server is in communication connection with a plurality of clients respectively, and the apparatus includes: the device comprises a second receiving module, a sending module and a third receiving module.

And the second receiving module is used for receiving a data synchronization request sent by the client, wherein the data synchronization request carries the current vector data version information.

And the sending module is used for sending the server vector data version information to the client according to the data synchronization request.

And the third receiving module is used for receiving the modified vector data sent by the client when the current vector data version information is the same as the server vector data version information.

Optionally, the sending module is further configured to:

receiving a data request sent by a client when the current vector data version information is different from the server vector data version information;

and sending the synchronous data to the server according to the data request.

Optionally, the third receiving module is further configured to: and if the communication between the server and the client is interrupted, the communication is reestablished, and after the communication between the server and the client is established, the online editing mode is started.

In another aspect of the embodiments of the present invention, a vector data processing system is provided, including: the server is in communication connection with the clients, the clients are used for executing the method applied to the clients, and the server is used for executing the method applied to the server.

Optionally, the server is communicatively coupled to a plurality of clients in a star topology or a ring topology.

The embodiment of the invention has the beneficial effects that:

according to the vector data processing method, device and system provided by the embodiment of the invention, the data synchronization request can be sent to the server after the vector data is modified, the data synchronization request carries the current vector data version information, so that the server vector data version information sent by the server according to the data synchronization request can be received, if the current vector data version information is the same as the server vector data version information, the modified vector data can be sent to the server and the current vector data version information can be updated, the vector data information of the server and a plurality of clients can be updated synchronously, and then the plurality of clients can work synchronously, so that the overall working efficiency can be improved, and the consumed time can be reduced.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.

FIG. 1 is a block diagram of a vector data processing system according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of another embodiment of a vector data processing system;

fig. 3 is a schematic flowchart of a vector data processing method applied to a client according to an embodiment of the present invention;

fig. 4 is a schematic flowchart of updating vector data information at a client according to an embodiment of the present invention;

FIG. 5 is a flowchart illustrating updating vector data version information according to a modified record table according to an embodiment of the present invention;

fig. 6 is a schematic flowchart of a vector data processing method applied to a server according to an embodiment of the present invention;

fig. 7 is a schematic flowchart of sending synchronization data by a server according to an embodiment of the present invention;

FIG. 8 is a schematic structural diagram of a vector data processing apparatus applied to a client according to an embodiment of the present invention;

FIG. 9 is a schematic structural diagram of a vector data processing apparatus applied to a server according to an embodiment of the present invention;

fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.

Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that: the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.

Fig. 1 is a schematic structural diagram of a vector data processing system according to an embodiment of the present invention, and fig. 1 shows the vector data processing system, including: the server 100 is connected with the plurality of clients 200 in a communication mode.

It should be noted that the server 100 may be a mapping dedicated server dedicated for interacting with the client 200, or may be a common public server, which is not limited herein; the client 200 may be a communication device such as a mobile phone, a computer, a tablet computer, etc.

The connection mode between the server 100 and the client 200 may include a star topology or a ring topology. The connection mode shown in fig. 1 is a star topology structure, in the star topology structure, each client 200 is directly connected to the same server 100, and when data interaction is performed, each client 200 performs data interaction on data stored in itself and the server 100.

Fig. 2 is another schematic structural diagram of the vector data processing system according to the embodiment of the present invention, please refer to fig. 2, where the connection manner shown in fig. 2 is a ring topology structure, and in the ring topology structure, each client 200 is connected to each other, where one client 200 is used as a host to perform data interaction with the server 100, and each client 200 performs data interaction with the server 100 through the host on data stored in itself.

Fig. 3 is a schematic flowchart of a vector data processing method applied to a client according to an embodiment of the present invention, and please refer to fig. 3, where the method is applied to a client, and a plurality of clients are respectively in communication connection with a server, and the method includes:

s110: and after the vector data is modified, sending a data synchronization request to the server, wherein the data synchronization request carries the current vector data version information.

It should be noted that the vector data is a vector value applied in mapping engineering, and may include: vector data such as vector name, vector size, vector direction and the like, and the specific data type can be selected according to the actual requirements in the mapping process, which is not limited herein. In addition, in the client, the vector data may be stored preferably in the form of a data file. The data synchronization request may be a type of communication signal for requesting data synchronization from the server.

The current vector data version information may be information of a state record, and when the vector data is modified, the current vector data version information may be updated in a state, for example, the current vector data version information is nth version, and when the vector data is modified, the current vector data version information is updated in n +1 th version. The current vector data version information can be recorded in the client in a file form, and when the client sends a data synchronization request to the server, the data synchronization request can be sent to the server together with the current vector data version information.

S120: and receiving server vector data version information sent by the server according to the data synchronization request.

The server vector data version information is vector data version information of corresponding vector data stored in the server, is similar to current vector data version information stored in the client and is state record information, and after the server receives the data synchronization request and the current vector version data, the server can send the vector data version information of the corresponding vector data to the client sending the data synchronization request.

S130: and if the version information of the current vector data is the same as the version information of the vector data of the server, sending the modified vector data to the server and updating the version information of the current vector data.

It should be noted that, two pieces of state information, that is, the current vector data version information and the server vector data version information, are compared, and if the two pieces of state information are the same, that is, the current vector data version information and the server vector data version information are both n-th versions, modified vector data may be sent to the server, that is, a data file with the modified vector data is sent to the server, so that the vector data of the server is updated to the data file of the modified vector data. Meanwhile, the version information of the current vector data can be updated, that is, the nth version is updated to the (n + 1) th version.

For example, if the vector data of one client is modified, the client may send a data synchronization request to the server, the server sends the version information of the vector data of the server to the client according to the data synchronization request, the client compares the two version information, if the two version information are the same, the modified vector data may be sent to the server, the server may update the vector data of the server to the modified vector data, and the client may update the version information of the current vector data.

The vector data processing method provided by the embodiment of the invention can send the data synchronization request to the server after modifying the vector data, the data synchronization request carries the current vector data version information, and then can receive the server vector data version information sent by the server according to the data synchronization request, if the current vector data version information is the same as the server vector data version information, the modified vector data can be sent to the server and the current vector data version information is updated, so that a plurality of clients can synchronously work, the integral working efficiency can be improved, and the consumed time can be reduced.

Fig. 4 is a schematic flow chart of updating vector data information at a client according to an embodiment of the present invention, please refer to fig. 4, S120: after receiving the server vector data version information sent by the server according to the data synchronization request, the method further comprises the following steps:

s121: and if the current vector data version information is different from the server vector data version information, sending a data request to the server.

It should be noted that, in the same manner as the comparison in S130, the two pieces of state information, i.e., the current vector data version information and the server vector data version information, are compared, and if the two pieces of state information are different, which indicates that the two pieces of state information are not synchronous with the server data, a data request may be sent to the server to request the server to send synchronous data, that is, data synchronization is completed with the server first.

S122: and receiving synchronous data sent by the server according to the data request.

It should be noted that, after receiving the data request, the server may send the server vector data to the corresponding client, and the client uses the received data as the synchronization data.

S123: and completing synchronization with the server according to the synchronization data, and updating that the version information of the current vector data is the same as the version information of the server vector data.

It should be noted that, after receiving the synchronization data, the client may use the server vector data as the current server vector data to complete synchronization. Meanwhile, the server vector data version information may be used as the current vector data version information, so that the current vector data version information is the same as the server vector data version information.

Illustratively, the version information of the current vector data of one client is nth version, the version information of the vector data of the server is nth +1 version, and the version information of the two versions are different, the client sends a data request to the server, the server sends the vector data of the server to the client according to the data request, at this time, the modification made by the client is not recorded, but the vector data of the server sent by the server is directly used as the current vector data, namely, synchronous data, which is equivalent to replacing a data file corresponding to the current vector data recorded in the client with a data file corresponding to the vector data of the server, and meanwhile, the version information of the current vector data is updated to nth +1 version to complete the update.

According to the vector data processing method provided by the embodiment of the invention, if the version information of the vector data of the server is different from the version information of the current vector data, synchronous processing is carried out, so that the problem of data conflict in the data interaction process of the server and the client is solved, and the overall working efficiency is improved.

After synchronization is complete, the client may send the modified data to the server so that the server is also synchronized with the client.

Optionally, in an embodiment provided by the present invention, if the client is disconnected from the server, the method further includes:

and after the modification vector data are modified, recording modification information into the modification record table.

It should be noted that the disconnection between the client and the server may be active disconnection or passive disconnection, where the active disconnection refers to disconnection between the client and the server under the operation control of a worker; the passive disconnection refers to disconnection between the client and the server due to offline conditions such as disconnection caused by unknown factors such as networks and equipment. When the disconnection between the client and the server is detected, the client can enter an off-line mode, data interaction is not performed between the client and the server in the off-line mode, and after the data of the client is modified, the modification information can be recorded into a modification record table, and the modification record table can enable a file list stored in the client to represent modification information such as the modification time, the modification content, the modification quantity, a modifier and the like of the record.

Fig. 5 is a schematic flow chart of updating version information of vector data according to a modified record table according to an embodiment of the present invention, please refer to fig. 5, where after modified vector data is modified, the method further includes the following steps:

s140: and after the client establishes communication with the server, starting an online editing mode.

In the off-line process, the modification of the data by the client side may cause the data difference between the client side and the server side to be larger, and after reconnection, the synchronization can be completed through an on-line editing mode.

Optionally, in the process that the client enters the "offline mode", if the client and the server reestablish a communication connection, the online editing mode may be started, where the online editing mode refers to that the client may obtain modification information of the server vector data in the process that the client is in the "offline state", and perform online editing on the modification information and information recorded in the modification record table of the client.

S150: and displaying the conflict data according to the modified data in the modified record table and the current data of the server based on the online editing mode.

It should be noted that, in the online editing mode, the modification information in the modification record table and the modification information in the vector data of the server may be compared to display the conflict data therein, where the conflict data refers to that a certain item of data exists and is different in the vector data modification information of the server and the modification information in the modification record table at the same time, that is, in the previous "offline mode", the item of data may be changed in both the server and the client.

S160: and responding to selection operation of the user based on the conflict data, completing data synchronization according to a selection result, and updating the version information of the current vector data.

It should be noted that, in the online editing mode, the user can clearly see the difference between the data of the client and the data of the server through the client, and the user can directly perform selection at the client, that is, select the data of the client or the server as the final synchronization data. The client can adopt the final synchronous data to complete synchronization according to the selection operation performed by the user, and correspondingly updates the version information of the current vector data after the synchronization is completed.

For example, after a client finishes an "offline mode", an online editing mode may be performed on the client, if version information of vector data of the client is n, and a modification comparison table of the client has modification information of a item of data, and modification information of a item of data also exists in modification information of a server, conflict data is generated about the a item of data, and according to a selection operation of a user, modification information that is relatively more required by the user may be used as data synchronization information, and current vector data in the client is changed to modification information of a selected one of the a items of data, and simultaneously version information of current vector data of the client is updated to n + 1.

Fig. 6 is a schematic flowchart of a vector data processing method applied to a server according to an embodiment of the present invention, and please refer to fig. 6, where the method is applied to a server, and the server is respectively in communication connection with a plurality of clients, and the method includes:

s210: and receiving a data synchronization request sent by a client, wherein the data synchronization request carries current vector data version information.

S220: and sending the server vector data version information to the client according to the data synchronization request.

S230: and when the received current vector data version information is the same as the server vector data version information, the client sends the modified vector data.

Fig. 7 is a schematic flow chart of sending synchronization data by a server according to an embodiment of the present invention, referring to fig. 7, S220: after the server vector data version information is sent to the client according to the data synchronization request, the method further comprises the following steps:

s221: and receiving a data request sent by the client when the current vector data version information is different from the server vector data version information.

S222: and sending the synchronous data to the server according to the data request.

Optionally, if the server and the client reestablish communication after communication is interrupted, the method further includes:

and after the server establishes communication with the client, starting an online editing mode.

The above vector data processing method applied to the server is similar to the vector data processing method applied to the client, and details are not repeated herein.

Fig. 8 is a schematic structural diagram of a vector data processing apparatus applied to a client according to an embodiment of the present invention, please refer to fig. 8, in which the apparatus is applied to the client, a plurality of clients are respectively in communication connection with a server, and the apparatus includes: a request module 10, a first receiving module 20, and an update module 30.

The request module 10 is configured to send a data synchronization request to the server after modifying the vector data, where the data synchronization request carries current version information of the vector data.

The first receiving module 20 is configured to receive server vector data version information sent by the server according to the data synchronization request.

And the updating module 30 is configured to send the modified vector data to the server and update the version information of the current vector data if the version information of the current vector data is the same as the version information of the vector data of the server.

Optionally, the first receiving module 20 is further configured to: if the current vector data version information is different from the server vector data version information, sending a data request to a server; receiving synchronous data sent by a server according to the data request; and completing synchronization with the server according to the synchronization data, and updating that the version information of the current vector data is the same as the version information of the server vector data.

Optionally, if the client is disconnected from the server, the updating module 30 is further configured to: and after the modification vector data are modified, recording modification information into the modification record table.

Optionally, after the modification vector data is modified and the modification information is recorded in the modification record table, the updating module 30 is further configured to: after the client establishes communication with the server, starting an online editing mode; displaying the conflict data according to the modification data in the modification record table and the current data of the server based on the online editing mode; and responding to selection operation of the user based on the conflict data, completing data synchronization according to a selection result, and updating the version information of the current vector data.

Fig. 9 is a schematic structural diagram of a vector data processing apparatus applied to a server according to an embodiment of the present invention, and referring to fig. 9, the apparatus is applied to a server, the server is respectively connected to a plurality of clients in a communication manner, and the apparatus includes: a second receiving module 40, a transmitting module 50, and a third receiving module 60.

The second receiving module 40 is configured to receive a data synchronization request sent by a client, where the data synchronization request carries current vector data version information.

And a sending module 50, configured to send server vector data version information to the client according to the data synchronization request.

And a third receiving module 60, configured to receive the modified vector data sent by the client when the current vector data version information is the same as the server vector data version information.

Optionally, the sending module 50 is further configured to: receiving a data request sent by a client when the current vector data version information is different from the server vector data version information; and sending the synchronous data to the server according to the data request.

Optionally, if the server and the client reestablish communication after communication is interrupted, the third receiving module 60 is further configured to: and after the server establishes communication with the client, starting an online editing mode.

In another aspect of the embodiments of the present invention, a vector data processing system is provided, including: the server is in communication connection with the clients, the clients are used for executing the method applied to the clients, and the server is used for executing the method applied to the server.

Optionally, the server is communicatively coupled to a plurality of clients in a star topology or a ring topology.

According to the vector data processing device and system provided by the embodiment of the invention, the data synchronization request can be sent to the server after the vector data is modified, the data synchronization request carries the current vector data version information, so that the server vector data version information sent by the server according to the data synchronization request can be received, if the current vector data version information is the same as the server vector data version information, the modified vector data can be sent to the server and the current vector data version information can be updated, the vector data information of the server and a plurality of clients can be updated synchronously, the integral working efficiency can be improved, and the consumed time can be reduced.

Fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present invention, and referring to fig. 10, the computer device includes: the vector data processing method comprises a memory 70 and a processor 80, wherein a computer program capable of running on the processor 80 is stored in the memory 70, and the steps of the vector data processing method are realized when the processor 80 executes the computer program.

In another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the vector data processing method.

The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:数据展示方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!