CN115544049A - Data processing method, electronic device and computer readable storage medium - Google Patents

Data processing method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN115544049A
CN115544049A CN202211504594.0A CN202211504594A CN115544049A CN 115544049 A CN115544049 A CN 115544049A CN 202211504594 A CN202211504594 A CN 202211504594A CN 115544049 A CN115544049 A CN 115544049A
Authority
CN
China
Prior art keywords
data
change
information
client
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211504594.0A
Other languages
Chinese (zh)
Other versions
CN115544049B (en
Inventor
李锦泉
景孟博
徐享
吴波
万正伟
彭思琴
黄彩峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mingdu Zhiyun Zhejiang Technology Co Ltd
Original Assignee
Mingdu Zhiyun Zhejiang Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mingdu Zhiyun Zhejiang Technology Co Ltd filed Critical Mingdu Zhiyun Zhejiang Technology Co Ltd
Priority to CN202211504594.0A priority Critical patent/CN115544049B/en
Publication of CN115544049A publication Critical patent/CN115544049A/en
Application granted granted Critical
Publication of CN115544049B publication Critical patent/CN115544049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, electronic equipment and a computer readable storage medium, and relates to the technical field of data processing. The data processing method comprises the following steps: and after determining the data change information according to the input data change operation, the client determines annotation processing information corresponding to the data type according to the data type aimed at by the data change operation, and sends a data change message to the server. And after receiving the data change message sent by the first client, the server determines the data before and after the change according to the data change message, and processes the data before and after the change according to the annotation processing message to obtain first change difference data. Then, the server side sends the first change difference data to the first client side. And after receiving the first change difference data returned by the server, the first client displays the first change difference data. The data processing method can be used for processing various complex data types.

Description

Data processing method, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, an electronic device, and a computer-readable storage medium.
Background
In industrial production development, strict requirements are placed on data, and operators for data modification, modification time and the like need to be recorded.
In actual industrial production development, after data is recorded into a system, further verification of the data is usually required. At present, only the difference values of simple data types (such as single-row data) can be compared, the difference values of complex data types cannot be compared, and the method is not high in practicability and poor in performance.
Disclosure of Invention
An object of the present invention is to provide a data processing method, an electronic device, and a computer-readable storage medium, so as to implement a data processing method with good performance that can be applied to a complex data structure, in order to overcome the above-mentioned shortcomings in the prior art.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a data processing method, which is applied to a server, and the method includes:
acquiring a data change message sent by a first client, wherein the data change message comprises: data change information and annotation processing information; the data change information is determined by the first client according to input data change operation, and the annotation processing information is determined by the first client according to the data type to which the data change operation is directed and corresponds to the data type;
determining data before and after the change according to the data change information;
processing the data before and after the change according to the annotation processing information to obtain first change difference data;
and sending the first change difference data to the first client so that the first client displays the first change difference data.
Optionally, the data change message further includes: a data change type; the determining the data before and after the change according to the data change information includes:
and determining the data before and after the change according to the data change type and the data change information.
Optionally, the determining the data before and after the change according to the data change type and the data change information includes:
if the data change type is data adding operation, determining a new value in the data change information as changed data, and determining a preset null value as data before changing; or, if the data change type is a data modification operation, determining that a new and old value in the data change information is data before and after the change; or if the data change type is data deletion operation, determining that the old value in the data change information is data before change, and determining that the preset null value is data after change.
Optionally, the data change message further includes: the identification of the business template corresponding to the data change information and the identification of the personnel for data change operation;
after the data change information is processed by using the annotation processing information to obtain first change difference data, the method further includes:
and storing the first change difference data, the identification of the business module and the identification of the personnel for data change operation.
Optionally, the method further includes:
receiving a query request sent by a second client, wherein the query request comprises: the identification of the target business module and the identification of the target personnel;
inquiring second change difference data of the target business module operated by the target personnel according to the identification of the target business module and the identification of the target personnel;
sending the second change difference data to the second client to enable the second client to display the second change difference data.
Optionally, the processing the data change information by using the data processing method corresponding to the annotation processing information to obtain change difference data includes:
if the annotation processing information is first annotation information, respectively converting the data before and after change into a mapping set before change and a mapping set after change; the mapping before change comprises at least one first key value and data before change corresponding to each first key value; the mapping before change comprises at least one second key value and changed data corresponding to each second key value; the data processing method is a data processing method corresponding to a data exchange format;
comparing key values in the mapping set before change and the mapping set after change to determine the same key value;
respectively determining target before-change data and target after-change data of the same key value in the before-change mapping set and the after-change mapping set;
and if the target data before the change is different from the target data after the change, adopting a preset first data structure to package the same key value, the target data before the change and the target data after the change, so as to obtain the change difference data.
Optionally, if the data change message further includes: if the data change type and the identifier of the service template corresponding to the data change information are the same, the data processing method corresponding to the annotation processing information is adopted to process the data change information to obtain change difference data, and the method comprises the following steps:
if the annotation processing information is second annotation information, determining that the data before and after the change are respectively a data list before the change and a data list after the change;
processing the data list before the change and the data list after the change according to the set processing method corresponding to the data change type to obtain a difference data list;
and adopting a preset second data structure to package the identifier of the service module and the difference data list to obtain the change difference data.
In a second aspect, an embodiment of the present application further provides a data processing method, which is applied to a client, where the method includes:
determining data change information according to the input data change operation;
determining annotation processing information corresponding to the data type according to the data type aimed by the data change operation;
sending a data change message to a server, wherein the data change message comprises: the data change information and the annotation processing information; the data change information is used for enabling the server to adopt the annotation processing information to process the data change information to obtain first change difference data;
receiving the first change difference data returned by the server;
and displaying the first change difference data.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, the processor and the storage medium communicate with each other through the bus when the electronic device runs, and the processor executes the program instructions to execute the steps of the data processing method according to the first aspect or execute the steps of the data processing method according to the second aspect.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the data processing method according to any one of the first aspect or the steps of the data processing method according to the second aspect.
The beneficial effect of this application is: the embodiment of the application provides a data processing method, and after determining data change information according to input data change operation, a client determines annotation processing information corresponding to a data type according to the data type to which the data change operation is directed, and sends a data change message to a server. And after receiving the data change message sent by the first client, the server determines the data before and after the change according to the data change message, and processes the data before and after the change according to the annotation processing message to obtain first change difference data. Then, the server side sends the first change difference data to the first client side. And after receiving the first change difference data returned by the server, the first client displays the first change difference data. Therefore, the first change difference data can be obtained by determining the data before and after the change and processing the data according to the annotation processing information. The data processing method can process various complex data types only by expanding the annotation processing information, and greatly improves the practicability of the data processing method.
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 schematic diagram of an implementation architecture of a data processing method according to an embodiment of the present application;
fig. 2 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a data processing method according to another embodiment of the present application;
fig. 4 is a flowchart of a data processing method according to another embodiment of the present application;
fig. 5 is a flowchart of a data processing method according to yet another embodiment of the present application;
fig. 6 is a flowchart of a data processing method according to yet another embodiment of the present application;
fig. 7 is a schematic view of an electronic device according to an embodiment of the present application.
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.
In this application, unless explicitly stated or limited otherwise, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one feature. In the description of the present invention, "a plurality" means at least two, for example, two, three, unless specifically defined otherwise. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
In industrial production development, strict requirements are imposed on data (for example, if the data of a drug experiment is in a problem, a drug safety problem may be caused), and it is necessary to record when and by whom data are modified. In actual industrial production research and development, need artifically to carry out the record to data then to record to the system, nevertheless through manual handling, not only loaded down with trivial details and work load are huge, and data accuracy does not obtain certain guarantee moreover, can't form a complete dataflow moreover, and the data of being inconvenient for is traceed back to bring the inaccuracy of data.
In addition, currently, data checking can only achieve difference values of simple data types (for example, single-line data), and difference values of complex data types cannot be compared, so that practicability is not high and performance is poor.
At present, the problems of low practicability, poor performance and the like in experimental data proofreading are solved, and the embodiment of the application provides multiple possible implementation modes so as to realize a good-performance data processing method which can be applied to a complex data structure. The following is explained by way of a number of examples in connection with the drawings.
The data processing method is realized by matching at least one server and at least one client. Fig. 1 is a schematic diagram of an implementation architecture of a data processing method according to an embodiment of the present application, and as shown in fig. 1, a server 100 is in communication connection with a client 300. The server 100 may perform data processing and the like according to the data received from the client 300, and the specific functions that the server and the client can implement are not limited in this application. In addition, each server may correspond to multiple clients in the data processing method implementation architecture, and each client may also have communication connection with multiple servers.
In the present application, the server 100 may be, for example, a terminal device, a server, or the like, and the present application is not limited thereto. The first client is an experimental data recording device of an experimenter, and the first client may be, for example, a Personal Digital Assistant (PDA), a desktop computer, a notebook computer, a smart television, a smart phone, or other computer devices capable of implementing experimental data entry and experimental record operation confirmation.
A data processing method applied to a server and a client in the present application is described below, and fig. 2 is a flowchart of a data processing method provided in an embodiment of the present application; as shown in fig. 2, the method includes (3 of the steps at the beginning is a method executed by a client (first client), and 1 of the steps at the beginning is a method executed by a server):
step 310: and determining data change information according to the input data change operation.
It should be noted that the first client may be any client 300, which is not limited in this application.
Experimenters can input data change operation in the first client side through interface input, data import and other modes. And the first client determines data change information according to the data change operation input by the experimenter. The data change information is related to specific experimental data input by an experimenter, and the data change information further includes data before change and/or data after change (i.e. new value and/or old value).
Step 320: and determining annotation processing information corresponding to the data type according to the data type aimed by the data change operation.
The first client determines annotation processing information corresponding to the data type according to the data type (namely, the data type designed by the data change operation) targeted by the data change operation, wherein the annotation processing information specifically indicates a data processing method of the server.
Step 330: sending a data change message to a server, wherein the data change message comprises: data change information and annotation processing information; the data change information is used for enabling the server to adopt annotation processing information to process the data change information to obtain change difference data.
The client sends a data change message to the server, wherein the data change message comprises: data change information and annotation processing information.
Step 110: acquiring a data change message sent by a first client, wherein the data change message comprises: data change information and annotation processing information; the data change information is determined by the first client according to the input data change operation, and the annotation processing information is annotation processing information corresponding to the data type determined by the first client according to the data type aimed at by the data change operation.
Step 120: and determining data before and after the change according to the data change information.
And after the server side acquires the data change message sent by the first client side, determining the data before and after the change according to the data change message. The present application does not limit the specific determination method of the data before and after the change.
Step 130: and processing the data before and after the change according to the annotation processing information to obtain first change difference data.
The annotation processing information is annotation processing information corresponding to the data type determined by the first client according to the data type targeted by the data change operation, namely the information indicates a specific processing mode, so that the data before and after the change can be processed according to the annotation processing information to obtain first change difference data. It should be noted that the first change difference data in the present application is data that can represent differences between data before and after the change, and is not a single numerical value, and further, according to the annotation processing information, the first change difference data may have different formats or forms, which is not limited in the present application.
In a possible implementation manner, after the client obtains the data change message sent by the first client through the annotation processing information corresponding to the data type determined by the different data types, the server may execute a tangent plane method corresponding to the annotation processing information, and the tangent plane method may determine data before and after the change according to the data change information before and after the change, so as to obtain the first change difference data.
Step 140: and sending the first change difference data to the first client so that the first client displays the first change difference data.
And after the server side obtains the first change difference data, the first change difference data is sent to the first client side.
Step 340: and receiving first change difference data returned by the server.
Step 350: the first change difference data is presented.
The first client receives the first change difference data and displays the first change difference data.
In summary, an embodiment of the present application provides a data processing method, in which a client determines data change information according to an input data change operation, determines annotation processing information corresponding to a data type according to the data type targeted by the data change operation, and sends a data change message to a server. And after receiving the data change message sent by the first client, the server determines the data before and after the change according to the data change message, and processes the data before and after the change according to the annotation processing message to obtain first change difference data. Then, the server side sends the first change difference data to the first client side. And after receiving the first change difference data returned by the server, the first client displays the first change difference data. Therefore, the first change difference data can be obtained by determining the data before and after the change and processing the data according to the annotation processing information. The data processing method can process various complex data types only by expanding the annotation processing information, and greatly improves the practicability of the data processing method.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of the data processing method, where the data change message further includes: a data change type; the determining data before and after the change according to the data change information includes:
and determining the data before and after the change according to the data change type and the data change information.
In a possible implementation manner, the data change information may be data missing or the like according to the data change operation input by the experimenter at the first client, so that the data before and after the change can be determined according to the data change type and the data change information.
The data change type may be, for example, new, deleted, changed, and the like, which is not limited in this application.
Optionally, on the basis of the foregoing embodiment, the present application further provides a possible implementation manner of a data processing method, and fig. 3 is a flowchart of a data processing method provided in another embodiment of the present application; as shown in fig. 3, the determining data before and after the change according to the data change type and the data change information includes:
step 121: if the data change type is data adding operation, determining a new value in the data change information as changed data, and determining a preset null value as data before changing;
step 122: or if the data change type is data modification operation, determining that the new and old values in the data change information are data before and after the change;
step 123: or if the data change type is data deletion operation, determining that the old value in the data change information is data before change, and determining that the preset null value is data after change.
In a possible implementation manner, if the data change operation is a new addition operation, the data before being changed is a preset null value (may be a null value, or may also be zero or another numerical value, which is not limited in this application, and a user may set the null value according to an actual situation), and the new value in the data change information is the changed data; if the data change operation is modification, determining that a new value in the data change information is changed data, and determining that an old value in the data change information is data before change; if the data change operation is deletion, the old value in the data change information is the data before the change, and the changed data is a preset null value (may be a null value, or may be zero or other numerical value, which is not limited in the present application, and the user may set the data according to the actual situation).
The above description is only an example, and in an actual implementation, there may be other determination methods, which are not limited in this application.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of the data processing method, where the data change message further includes: the identification of the business template corresponding to the data change information and the identification of the personnel for data change operation;
after the data change information is processed by using the annotation processing information to obtain first change difference data, the method further includes:
and storing the first change difference data, the identification of the business module and the identification of the personnel for data change operation.
In a possible implementation manner, after the first change difference data is obtained, the first change difference data, the identifier of the service module, and the identifier of the person performing the data change operation are stored. The identifier of the service module is an identifier of a service type and/or a name of a module to which the service belongs, wherein the service type may be, for example, a material module, an electronic experiment record, and the like, and the module to which the service belongs is a specific service in each service type. The specific service corresponding to the first change difference data can be determined through the identifier of the service module (when the service type is an experiment record, the specific experiment corresponding to the first change difference data can be determined through the identifier of the service module). The personnel identifier of the data change operation is an experimenter (for example, an experiment operator, a data inspector, and the like, which is not limited in this application) corresponding to the first change difference data.
In a specific implementation manner, a table may be created in a database of the server, and the first change difference data, the identifier of the service module, and the identifier of the person performing the data change operation are stored in the database by consuming messages in a message queue (e.g., a rabbitmq message queue).
In another possible implementation manner, the operation time, the data change type, the new value, the old value, and the like may also be stored, and the application does not limit the type and definition of the specific data stored in the database.
Optionally, on the basis of the foregoing embodiment, the present application further provides a possible implementation manner of a data processing method, and fig. 4 is a flowchart of a data processing method provided in another embodiment of the present application; as shown in fig. 4, the method further includes:
step 150: receiving a query request sent by a second client, wherein the query request comprises: identification of the target business module and identification of the target personnel.
The experimenter may send a query request on the second client, the query request including: identification of the target business module and identification of the target personnel. The identification of the target business module indicates the business module corresponding to the query request, and the identification of the target person indicates the person corresponding to the query request.
It should be noted that the second client may be any client 300, and the second client may be the same client as the first client or different clients, which is not limited in this application.
Step 160: and inquiring second change difference data of the target business module operated by the target personnel according to the identification of the target business module and the identification of the target personnel.
Step 170: and sending the second change difference data to the second client so that the second client displays the second change difference data.
And the server side inquires (or inquires in a database) second change difference data of the target business module operated by the target personnel according to the identification of the target business module and the identification of the target personnel. And sending the second change difference data to the second client. The second client may present (e.g., via a browser) the second change difference data, e.g., may present when the target person performed an operation on those data, or the target person performed all operations on the target business module, etc. The foregoing is merely an example, and in an actual implementation, the second client may also present other information, which is not limited in this application.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of a data processing method, and fig. 5 is a flowchart of a data processing method according to yet another embodiment of the present application; as shown in fig. 5, the step 130 of processing the data change information by using the data processing method corresponding to the annotation processing information to obtain the change difference data includes:
step 131: if the annotation processing information is first annotation information, converting the data before and after the change into a mapping set before the change and a mapping set after the change respectively; the mapping before change comprises at least one first key value and data before change corresponding to each first key value; the mapping before change comprises at least one second key value and changed data corresponding to each second key value; the data processing method is a data processing method corresponding to the data exchange format.
In one possible implementation manner, if the annotation processing information is the first annotation information, the data before and after the change is converted into the mapping set before the change and the mapping set after the change respectively. The first annotation information may be annotation processing information for a data exchange format (e.g., a book of a type such as JSON (JavaScript Object Notation)). The mapping before change comprises at least one first key value and data before change corresponding to each first key value; the mapping before change comprises at least one second key value and changed data corresponding to each second key value; the data processing method is a data processing method corresponding to the data exchange format.
In a specific implementation manner, if the first annotation information is directed to a lightweight data interchange format JSON, two JSON data before and after the change are respectively converted into a mapping set map < key1, value1> before the change and a mapping set map < key2, value2> after the change. Namely, the mapping before change comprises at least one first key value key1 and data value1 before change corresponding to each first key value; that is, the changed mapping includes at least one second key value key2 and a changed data value2 corresponding to each second key value.
The above is merely an example, and in an actual implementation, there may be other mapping set expressions, which is not limited in the present application.
Step 132: and comparing the key values in the mapping set before change and the mapping set after change to determine the same key value.
In a possible implementation manner, if the first annotation information is for a lightweight data interchange format JSON, after key1 and value1 of the mapping set map < key1, value1> before change are acquired, each key2 equal to key1 is determined in the mapping set map < key2, value2> after change, so as to determine the same key value.
Step 133: and respectively determining target before-change data and target after-change data of the same key value in the before-change mapping set and the after-change mapping set.
In a possible implementation manner, if the first annotation information is for a lightweight data interchange format JSON, after key2 is determined in step 132, value2 (target changed data) in the map < key2, value2> object corresponding to key2 is determined. And determines value1 (target data before change) corresponding to key1 in the mapping set map < key1, value1> before change.
Step 134: and if the data before the target change is different from the data after the target change, adopting a preset first data structure to package the same key value, the data before the target change and the data after the target change to obtain change difference data.
In one possible implementation, if the first annotation information is for a lightweight data interchange format JSON, after the specific implementation of step 133, it is compared whether the data before the target change is different from the data after the target change (i.e., value1 and value 2) are the same. If the data before the target change is different from the data after the target change (namely, value1 is different from value 2), a preset first data structure is adopted to encapsulate the same key value, the data before the target change and the data after the target change, and change difference data { "key" { "newValue": value1"," oldValue ": value2" } is obtained.
For example: aiming at the common JSON object, the mapping set before change is as follows: { "key": value2"};
the mapping set after the change is { "key": value1"};
the change difference data is:
{"key":{"newValue":"value1","oldValue":"value2"}}。
the foregoing is merely an example, and in an actual implementation, other cyclic comparison manners or packaging manners may be available, which is not limited in this application.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of a data processing method, and fig. 6 is a flowchart of a data processing method according to yet another embodiment of the present application; as shown in fig. 6, if the data change message further includes: if the data change type and the identifier of the service template corresponding to the data change information are the same, step 130 processes the data change information by using the data processing method corresponding to the annotation processing information to obtain change difference data, including:
step 135: if the annotation processing information is second annotation information, determining that the data before and after the change are respectively a data list before the change and a data list after the change;
in one possible implementation manner, if the annotation processing information is the first annotation information, the data before and after the change is determined to be a data list before the change and a data list after the change respectively. Wherein the second annotation information may be annotation processing information for a list (list) format, for example.
In a specific implementation manner, the data before and after the change are determined to be a data list before the change _ a < T > and a data list after the change _ b < T >, respectively.
Step 136: and processing the data list before the change and the data list after the change according to the set processing method corresponding to the data change type to obtain a difference data list.
As explained in the above embodiments, the data change types may include, for example: adding, deleting and modifying, on the basis of the above specific implementation manner, processing the data list before the change and the data list after the change according to the set processing method corresponding to the data change type, and obtaining the difference data list may be, for example:
taking the intersection X of the pre-change data list _ a < T > and the post-change data list _ b < T >, wherein the intersection X is data which are not modified in the pre-change data list and the post-change data list;
taking a difference set Y of a list _ a < T > of data before change and an intersection X, wherein the difference set Y is deleted data;
and taking a difference set Z of the changed data list _ b < T > and the intersection X, wherein the difference set Z is newly added data, and the difference set Z can also be modified data.
The above is merely an example, and in actual implementation, other calculation methods may be available, and the present application is not limited to this.
Step 137: and packaging the identifier of the service module and the difference data list by adopting a preset second data structure to obtain the change difference data.
And packaging the identifier of the service module and the difference data list by adopting a preset second data structure to obtain change difference data, for example:
{"Z":{"newValue":["status_b":"value_b"}],"oldValue":[{"status_a":" value_a"}]}};
wherein "Z" is an identifier of the service module, for example, it may be "reactant", etc., and the identifier of the service module may be different according to a specific usage scenario, which is not limited in the present application. newValue is a changed data list, status _ b is the position of changed data in the changed data list, and value _ b is a specific numerical value at the position of status _ b in the changed data list; oldValue is a data list before change, status _ a is the position of changed data in the data list before change, and value _ a is a specific value at the position of status _ a in the data list before change.
For example, the change variance data in a chemical experiment application scenario may be:
{ "reactants":
{"newValue":["status":"0"}],"oldValue":[{"status":"1"}]}
}。
the foregoing is merely an example, and in an actual implementation, other implementation manners may also be available, which is not limited in this application.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of the data processing method, and the step 130 processes the data change information by using a data processing method corresponding to the annotation processing information to obtain change difference data, including:
if the annotation processing information is third annotation information, converting the data before and after the change into an image before the change and an image after the change respectively; the data processing method is a data processing method corresponding to the image format.
And comparing the image before the change with the image after the change to determine whether the image before the change is the same as the image after the change.
In a specific implementation, whether the 2 pictures are the same or not can be obtained by comparing the byte streams of the image before the change and the image after the change.
In the following description, specific implementation procedures and technical effects of the electronic device, the storage medium, and the like provided by the present application are described above, and are not described in detail below.
Embodiments of the present application provide a possible implementation example of an electronic device, where the electronic device may be a server-side electronic device and/or a client-side electronic device, and may be capable of executing the data processing method provided in the foregoing embodiments. Fig. 7 is a schematic diagram of an electronic device according to an embodiment of the present application, where the electronic device may be integrated in a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
The electronic device includes: the data processing system comprises a processor 801, a storage medium 802 and a bus, wherein the storage medium stores program instructions executable by the processor, when the control device runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the data processing method of the server or the client. The specific implementation and technical effects are similar, and are not described herein again.
The embodiments of the present application provide possible implementation examples of a computer-readable storage medium, which can execute the data processing method of the server or the client provided in the foregoing embodiments, where the storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the data processing method.
A computer program stored in a storage medium may include instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (which may be a processor) to perform some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A data processing method is applied to a server side, and the method comprises the following steps:
acquiring a data change message sent by a first client, wherein the data change message comprises: data change information and annotation processing information; the data change information is determined by the first client according to input data change operation, and the annotation processing information is determined by the first client according to the data type to which the data change operation is directed and corresponds to the data type;
determining data before and after the change according to the data change information;
processing the data before and after the change according to the annotation processing information to obtain first change difference data;
and sending the first change difference data to the first client so that the first client displays the first change difference data.
2. The method of claim 1, wherein the data change message further comprises: a data change type; the determining data before and after the change according to the data change information includes:
and determining the data before and after the change according to the data change type and the data change information.
3. The method of claim 2, wherein said determining data before and after said change based on said data change type and said data change information comprises:
if the data change type is data adding operation, determining a new value in the data change information as changed data, and determining a preset null value as data before changing; or,
if the data change type is data modification operation, determining that a new and old value in the data change information is data before and after the change; or,
and if the data change type is data deletion operation, determining that the old value in the data change information is data before change, and determining that the preset null value is changed data.
4. The method of claim 1, wherein the data change message further comprises: the identification of the business template corresponding to the data change information and the identification of the personnel for data change operation;
after the data change information is processed by using the annotation processing information to obtain first change difference data, the method further includes:
and storing the first change difference data, the identification of the business module and the identification of the personnel for data change operation.
5. The method of claim 4, wherein the method further comprises:
receiving a query request sent by a second client, wherein the query request comprises: the identification of the target business module and the identification of the target personnel;
inquiring second change difference data of the target business module operated by the target personnel according to the identification of the target business module and the identification of the target personnel;
sending the second change difference data to the second client to enable the second client to display the second change difference data.
6. The method of claim 1, wherein the processing the data change information using the data processing method corresponding to the annotation processing information to obtain change difference data comprises:
if the annotation processing information is first annotation information, converting the data before and after the change into a mapping set before the change and a mapping set after the change respectively; the before-change mapping comprises at least one first key value and before-change data corresponding to each first key value; the mapping before change comprises at least one second key value and changed data corresponding to each second key value; the data processing method is a data processing method corresponding to a data exchange format;
comparing the key values in the mapping set before change and the mapping set after change to determine the same key value;
respectively determining target before-change data and target after-change data of the same key value in the before-change mapping set and the after-change mapping set;
and if the target data before the change is different from the target data after the change, adopting a preset first data structure to package the same key value, the target data before the change and the target data after the change, so as to obtain the change difference data.
7. The method of claim 1, wherein if the data change message further comprises: if the data change type and the identifier of the business template corresponding to the data change information are adopted, the data change information is processed by using the data processing method corresponding to the annotation processing information to obtain change difference data, and the method comprises the following steps:
if the annotation processing information is second annotation information, determining that the data before and after the change are respectively a data list before the change and a data list after the change;
processing the data list before the change and the data list after the change according to the set processing method corresponding to the data change type to obtain a difference data list;
and packaging the identification of the service module and the difference data list by adopting a preset second data structure to obtain the change difference data.
8. A data processing method is applied to a client, and the method comprises the following steps:
determining data change information according to the input data change operation;
determining annotation processing information corresponding to the data type according to the data type aimed by the data change operation;
sending a data change message to a server, wherein the data change message comprises: the data change information and the annotation processing information; the data change information is used for enabling the server to adopt the annotation processing information to process the data change information to obtain first change difference data;
receiving the first change difference data returned by the server;
and displaying the first change difference data.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the data processing method according to any one of claims 1 to 7 or to perform the steps of the data processing method according to claim 8.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the data processing method according to one of claims 1 to 7 or carries out the steps of the data processing method according to claim 8.
CN202211504594.0A 2022-11-29 2022-11-29 Data processing method, electronic device and computer readable storage medium Active CN115544049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211504594.0A CN115544049B (en) 2022-11-29 2022-11-29 Data processing method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211504594.0A CN115544049B (en) 2022-11-29 2022-11-29 Data processing method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115544049A true CN115544049A (en) 2022-12-30
CN115544049B CN115544049B (en) 2023-03-21

Family

ID=84722053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211504594.0A Active CN115544049B (en) 2022-11-29 2022-11-29 Data processing method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115544049B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020099727A1 (en) * 2001-01-24 2002-07-25 Kadyk Donald J. Accounting for update notifications in synchronizing data that may be represented by different data structures
CN107766554A (en) * 2017-11-02 2018-03-06 山东浪潮通软信息科技有限公司 A kind of data processing method, apparatus and system
CN109064345A (en) * 2018-08-14 2018-12-21 中国平安人寿保险股份有限公司 Message treatment method, system and computer readable storage medium
US20210303652A1 (en) * 2020-03-30 2021-09-30 Microsoft Technology Licensing, Llc Optimizing annotation reconciliation transactions on unstructured text content updates
CN115168166A (en) * 2022-06-24 2022-10-11 平安消费金融有限公司 Method, device and equipment for recording business data change and storage medium
CN115357590A (en) * 2022-08-10 2022-11-18 中信建投证券股份有限公司 Recording method and device for data change, electronic device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020099727A1 (en) * 2001-01-24 2002-07-25 Kadyk Donald J. Accounting for update notifications in synchronizing data that may be represented by different data structures
CN107766554A (en) * 2017-11-02 2018-03-06 山东浪潮通软信息科技有限公司 A kind of data processing method, apparatus and system
CN109064345A (en) * 2018-08-14 2018-12-21 中国平安人寿保险股份有限公司 Message treatment method, system and computer readable storage medium
US20210303652A1 (en) * 2020-03-30 2021-09-30 Microsoft Technology Licensing, Llc Optimizing annotation reconciliation transactions on unstructured text content updates
CN115168166A (en) * 2022-06-24 2022-10-11 平安消费金融有限公司 Method, device and equipment for recording business data change and storage medium
CN115357590A (en) * 2022-08-10 2022-11-18 中信建投证券股份有限公司 Recording method and device for data change, electronic device and storage medium

Also Published As

Publication number Publication date
CN115544049B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN110019279B (en) Online document collaborative updating method, device, equipment and storage medium
CN110597595B (en) Method for providing multi-language information, method for configuring multi-language information, device, equipment and medium
US10291704B2 (en) Networked solutions integration using a cloud business object broker
WO2019134340A1 (en) Salary calculation method, application server, and computer readable storage medium
CN112162965A (en) Log data processing method and device, computer equipment and storage medium
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN113626223A (en) Interface calling method and device
CN115544049B (en) Data processing method, electronic device and computer readable storage medium
CN112433783A (en) Configuration method and related equipment
CN111488386A (en) Data query method and device
CN114143308A (en) File uploading information processing method and device, computer equipment and storage medium
JP2024002548A (en) Contract management program, information processing apparatus, information processing system, information processing method, and information processing terminal
CN111784376B (en) Method and device for processing information
US11681572B2 (en) Extensible workflow access
CN110196832A (en) For obtaining the method and device of SNAPSHOT INFO
CN111104409A (en) Database processing method and device, storage medium and electronic equipment
CN111626802A (en) Method and apparatus for processing information
CN109710673B (en) Work processing method, device, equipment and medium
CN112835866B (en) Database implementation method and device, electronic equipment and storage medium
CN117097599B (en) Network service detection method, device, computer equipment and storage medium
CN113220760B (en) Data processing method, device, server and storage medium
CN112291329B (en) Information display method, device and equipment
CN112965946B (en) Method, device, equipment and computer readable medium for processing document
JP2023102624A (en) Program, information processing apparatus, and information processing method
CN116862604A (en) Data processing method, device, electronic equipment and storage medium

Legal Events

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