A software data interaction method and system
By combining data processing middleware and NoSql database, data interaction between different operating system software is achieved, and the problems of compatibility, security and low efficiency are solved to ensure data integrity and real-time.
Patent Information
- Application Number
- CN202110993200.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-08-26
AI Technical Summary
There are problems of compatibility, security and low efficiency in data interactions between software of different operating systems. Traditional methods communicate unstable, data verification is missing, file form reading efficiency is low, and concurrency problems exist.
Connect to the NoSql database through data processing middleware. The software sends mac address and version information, generates a key and binds it to the database, performs data update request checksum encryption processing, and uses the AES algorithm to update data to achieve compatibility and security of data interaction. Improved sex and efficiency.
It improves the data interaction compatibility and security of software between different operating systems, improves data interaction efficiency, ensures data integrity and real-timeness, and solves the concurrency and verification problems of data interaction in traditional methods.
Smart Images

Figure CN113792268B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database technology, and in particular to a software data interaction method and system. Background Art
[0002] With the advancement of technology, a variety of electronic devices have emerged, such as laptops, tablets, mobile phones, etc. People's work and life depend on these electronic devices, and different electronic devices run different operating systems and different software. Since different software can achieve different functions and different operating systems have different advantages, there is a need for data interaction between different software in different operating systems, or between different software in the same operating system.
[0003] However, the communication connection between software of different operating systems is cumbersome, unstable, or even impossible to communicate; and the interactive data is traditionally not recorded, making it difficult to troubleshoot when problems arise; the interactive data is traditionally not verified, and incomplete data often occurs; traditionally, the interactive data is in the form of ini or config files. When the file is opened by one software, other software can no longer operate on it, that is, there is a concurrency problem, and the reading efficiency in the form of files is low.
[0004] Therefore, how to provide a software data interaction method and system to improve the compatibility, security and efficiency of data interaction has become an urgent problem to be solved. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a software data interaction method and system to improve the compatibility, security and efficiency of data interaction.
[0006] In a first aspect, the present invention provides a software data interaction method, comprising the following steps:
[0007] Step S10, each software sends the MAC address of the running electronic device and the software version information to the data processing middleware;
[0008] Step S20, the data processing middleware creates a key with a validity period for each software, sends the key to each software, and binds the key with the mac address and software version information and stores it in the NoSql database;
[0009] Step S30, each software performs DM5 calculation on the data to be updated to obtain a first MD5 value, and generates a data update request based on the data to be updated, the first MD5 value, the key, the mac address and the software version information and sends it to the data processing middleware;
[0010] Step S40: The data processing middleware receives and parses the data update request to obtain the data to be updated, the first MD5 value, the key, the mac address and the software version information, and verifies the key and the data to be updated;
[0011] Step S50: the data processing middleware backs up the current data of the NoSql database based on the mac address and software version information;
[0012] Step S60: The data processing middleware encrypts the data to be updated using the AES algorithm and then updates it to the NoSql database;
[0013] Step S70: Each software accesses the NoSql database through the data processing middleware to perform data interaction.
[0014] Furthermore, the step S10 is specifically as follows:
[0015] Each software running on different operating systems or the same operating system sends the MAC address and software version information of the running electronic device to the data processing middleware via Ethernet;
[0016] The data processing middleware is used to connect the NoSql database and various software, create a key, verify the key and the data to be updated, and back up the current data.
[0017] Furthermore, in step S20, the NoSql database is MongoDB, Cassandra, Redis or Memcached.
[0018] Furthermore, in step S40, the verification of the key and the data to be updated is specifically as follows:
[0019] Determine whether the binding relationship between the key, mac address and software version information is stored in the NoSql database. If not, end the process; if yes, then:
[0020] Determine whether the validity period carried by the key has expired. If so, it means that the key verification has failed and the process ends; if not, it means that the key verification has succeeded and:
[0021] Perform DM5 calculation on the data to be updated to obtain a second MD5 value, and determine whether the first MD5 value is consistent with the second MD5 value. If not, it means that the verification of the data to be updated has failed and the process ends; if so, it means that the verification of the data to be updated has succeeded.
[0022] Furthermore, the step S70 is specifically as follows:
[0023] Each software accesses the NoSql database through the data processing middleware to perform data interaction including adding, deleting, modifying, and querying.
[0024] In a second aspect, the present invention provides a software data interaction system, comprising the following modules:
[0025] The mac and version sending module is used for each software to send the mac address of the electronic device it is running and the software version information to the data processing middleware;
[0026] The key generation and binding module is used for the data processing middleware to create a key with a validity period for each software, send the key to each software, and bind the key with the mac address and software version information and store it in the NoSql database;
[0027] A data update request sending module is used for each software to perform DM5 calculation on the data to be updated to obtain a first MD5 value, and generate a data update request based on the data to be updated, the first MD5 value, the key, the mac address and the software version information and send it to the data processing middleware;
[0028] The key and data verification module is used for the data processing middleware to receive and parse the data update request to obtain the data to be updated, the first MD5 value, the key, the mac address and the software version information, and to verify the key and the data to be updated;
[0029] A data backup module is used for the data processing middleware to back up the current data of the NoSql database based on the mac address and software version information;
[0030] A data update module is used for the data processing middleware to encrypt the data to be updated using the AES algorithm and then update it to the NoSql database;
[0031] The data interaction module is used for various software to access the NoSql database through the data processing middleware for data interaction.
[0032] Furthermore, the mac and version sending module is specifically:
[0033] Each software running on different operating systems or the same operating system sends the MAC address and software version information of the running electronic device to the data processing middleware via Ethernet;
[0034] The data processing middleware is used to connect the NoSql database and various software, create a key, verify the key and the data to be updated, and back up the current data.
[0035] Furthermore, in the key generation binding module, the NoSql database is MongoDB, Cassandra, Redis or Memcached.
[0036] Furthermore, in the key and data verification module, the verification of the key and the data to be updated is specifically as follows:
[0037] Determine whether the binding relationship between the key, mac address and software version information is stored in the NoSql database. If not, end the process; if yes, then:
[0038] Determine whether the validity period carried by the key has expired. If so, it means that the key verification has failed and the process ends; if not, it means that the key verification has succeeded and:
[0039] Perform DM5 calculation on the data to be updated to obtain a second MD5 value, and determine whether the first MD5 value is consistent with the second MD5 value. If not, it means that the verification of the data to be updated has failed and the process ends; if so, it means that the verification of the data to be updated has succeeded.
[0040] Furthermore, the data interaction module is specifically:
[0041] Each software accesses the NoSql database through the data processing middleware to perform data interaction including adding, deleting, modifying, and querying.
[0042] The advantages of the present invention are:
[0043] 1. By setting up data processing middleware to connect NoSql databases with various software, software on different operating systems (Windows, Linux, PLC, macOS, HarmonyOS, etc.) can directly access NoSql databases through the data processing middleware, and then interact with NoSql databases, which greatly improves the compatibility of data interaction.
[0044] 2. After verifying the key carried in the data update request and the data to be updated, the current data is backed up, and then the data to be updated is encrypted using the AES algorithm and updated to the NoSql database. That is, before updating the data, first verify whether the key has been bound (authorized), and then verify whether the data to be updated is complete. After all verifications are passed, the data is backed up for later tracing, and finally the data is updated, which greatly improves the security of data interaction.
[0045] 3. By adopting NoSql database (non-relational database), the efficiency of data interaction is greatly improved compared with the traditional file form because NoSql database has the advantages of high availability, support for multi-concurrency, high data reading and writing performance, high query efficiency, support for distribution, easy expansion, and scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0047] Figure 1 The present invention is a flowchart of a software data interaction method.
[0048] Figure 2 It is a structural schematic diagram of a software data interaction system of the present invention. DETAILED DESCRIPTION
[0049] The technical solution in the embodiments of the present application has the following overall idea: by setting up a data processing middleware for connecting the NoSql database with various software, the compatibility of data interaction is improved; by verifying the key carried by the data update request and the data to be updated, the current data is backed up, and then the data to be updated is encrypted using the AES algorithm and updated to the NoSql database to improve the security of data interaction; by adopting the NoSql database, the efficiency of data interaction is improved.
[0050] Please refer to Figure 1 to Figure 2 As shown, a preferred embodiment of a software data interaction method of the present invention comprises the following steps:
[0051] Step S10, each software sends the MAC address of the running electronic device and the software version information to the data processing middleware;
[0052] Step S20, the data processing middleware creates a unique key with a validity period for each software, sends the key to each software, and binds the key with the mac address and software version information and stores it in a NoSql database (non-relational database); the NoSql database runs on one of the electronic devices, and the software of the other electronic devices interacts through the NoSql database;
[0053] Step S30: Each software performs DM5 calculation on the data to be updated to obtain a first MD5 value, and generates a data update request in JSON format based on the data to be updated, the first MD5 value, the key, the mac address and the software version information, and sends it to the data processing middleware; the data update request is exemplified as follows:
[0054] {"data":[{"name":"voltage","value":344.5},{"name":"temp","value":20.33}],"key":"nebula","mac":"10-5B-AD-A0-DE-D1","soft":"nebula Soft V0.01"};
[0055] Step S40: The data processing middleware receives and parses the data update request to obtain the data to be updated, the first MD5 value, the key, the mac address and the software version information, and verifies the key and the data to be updated;
[0056] Step S50: the data processing middleware backs up the current data of the NoSql database based on the mac address and the software version information, that is, backs up the data of the previous version;
[0057] Step S60: the data processing middleware encrypts the data to be updated by using the AES algorithm and then updates it to the NoSql database in real time; since each software updates the data to be updated to the NoSql database in real time, each time the software accesses the NoSql database, the data is the latest, thereby greatly improving the real-time performance of data interaction;
[0058] Step S70: Each software accesses the NoSql database through the data processing middleware to perform data interaction.
[0059] The step S10 is specifically as follows:
[0060] Each software running on different operating systems or the same operating system sends the MAC address and software version information of the running electronic device to the data processing middleware via Ethernet;
[0061] The data processing middleware is used to connect the NoSql database and various software, create a key, verify the key and the data to be updated, and back up the current data; record the backup time when backing up data, and set the backup time limit; setting the backup time is convenient for later tracing, and setting the backup time limit avoids the waste of storage space caused by long-term storage of meaningless data; the backup time limit can be set as needed; the data processing middleware solves the cache problem that the software of different electronic devices cannot interact.
[0062] In step S20, the NoSql database is MongoDB, Cassandra, Redis or Memcached. The memory data of the NoSql database supports 100,000 reads and writes per second, while the traditional relational database is limited by disk io, and the pressure will be doubled in high concurrency.
[0063] In the step S40, the verification of the key and the data to be updated is specifically as follows:
[0064] Determine whether the binding relationship between the key, mac address and software version information is stored in the NoSql database. If not, end the process; if yes, it means that the key is legal, then:
[0065] Determine whether the validity period carried by the key has expired. If so, it means that the key verification has failed and the process ends; if not, it means that the key verification has succeeded and:
[0066] Perform DM5 calculation on the data to be updated to obtain a second MD5 value, and determine whether the first MD5 value is consistent with the second MD5 value. If not, it means that the verification of the data to be updated has failed and the process ends; if so, it means that the verification of the data to be updated has succeeded.
[0067] The step S70 is specifically as follows:
[0068] Each software accesses the NoSql database through the data processing middleware to perform data interaction including adding, deleting, modifying, and querying.
[0069] A preferred embodiment of a software data interaction system of the present invention includes the following modules:
[0070] The mac and version sending module is used for each software to send the mac address of the electronic device it is running and the software version information to the data processing middleware;
[0071] A key generation and binding module is used for the data processing middleware to create a unique key with a validity period for each software, send the key to each software, and bind the key with the mac address and software version information and store it in a NoSql database (non-relational database); the NoSql database runs on one of the electronic devices, and the software of the other electronic devices interacts through the NoSql database;
[0072] The data update request sending module is used for each software to perform DM5 calculation on the data to be updated to obtain the first MD5 value, and generate a data update request in JSON format based on the data to be updated, the first MD5 value, the key, the mac address and the software version information and send it to the data processing middleware; the data update request is exemplified as follows:
[0073] {"data":[{"name":"voltage","value":344.5},{"name":"temp","value":20.33}],"key":"nebula","mac":"10-5B-AD-A0-DE-D1","soft":"nebula Soft V0.01"};
[0074] The key and data verification module is used for the data processing middleware to receive and parse the data update request to obtain the data to be updated, the first MD5 value, the key, the mac address and the software version information, and to verify the key and the data to be updated;
[0075] A data backup module is used for the data processing middleware to back up the current data of the NoSql database based on the mac address and software version information, that is, to back up the data of the previous version;
[0076] The data update module is used for the data processing middleware to encrypt the data to be updated using the AES algorithm and then update it to the NoSql database in real time; since each software updates the data to be updated to the NoSql database in real time, each software accesses the NoSql database with the latest data each time, thereby greatly improving the real-time nature of data interaction;
[0077] The data interaction module is used for various software to access the NoSql database through the data processing middleware for data interaction.
[0078] The mac and version sending module is specifically:
[0079] Each software running on different operating systems or the same operating system sends the MAC address and software version information of the running electronic device to the data processing middleware via Ethernet;
[0080] The data processing middleware is used to connect the NoSql database and various software, create a key, verify the key and the data to be updated, and back up the current data; record the backup time when backing up data, and set the backup time limit; setting the backup time is convenient for later tracing, and setting the backup time limit avoids the waste of storage space caused by long-term storage of meaningless data; the backup time limit can be set as needed; the data processing middleware solves the cache problem that the software of different electronic devices cannot interact.
[0081] In the key generation binding module, the NoSql database is MongoDB, Cassandra, Redis or Memcached. The memory data of the NoSql database supports 100,000 reads and writes per second, while the traditional relational database is limited by disk io, and the pressure will be doubled in high concurrency.
[0082] In the key and data verification module, the verification of the key and the data to be updated is specifically as follows:
[0083] Determine whether the binding relationship between the key, mac address and software version information is stored in the NoSql database. If not, end the process; if yes, it means that the key is legal, then:
[0084] Determine whether the validity period carried by the key has expired. If so, it means that the key verification has failed and the process ends; if not, it means that the key verification has succeeded and:
[0085] Perform DM5 calculation on the data to be updated to obtain a second MD5 value, and determine whether the first MD5 value is consistent with the second MD5 value. If not, it means that the verification of the data to be updated has failed and the process ends; if so, it means that the verification of the data to be updated has succeeded.
[0086] The data interaction module is specifically:
[0087] Each software accesses the NoSql database through the data processing middleware to perform data interaction including adding, deleting, modifying, and querying.
[0088] In summary, the advantages of the present invention are:
[0089] 1. By setting up data processing middleware to connect NoSql databases with various software, software on different operating systems (Windows, Linux, PLC, macOS, HarmonyOS, etc.) can directly access NoSql databases through the data processing middleware, and then interact with NoSql databases, which greatly improves the compatibility of data interaction.
[0090] 2. After verifying the key carried in the data update request and the data to be updated, the current data is backed up, and then the data to be updated is encrypted using the AES algorithm and updated to the NoSql database. That is, before updating the data, first verify whether the key has been bound (authorized), and then verify whether the data to be updated is complete. After all verifications are passed, the data is backed up for later tracing, and finally the data is updated, which greatly improves the security of data interaction.
[0091] 3. By adopting NoSql database (non-relational database), the efficiency of data interaction is greatly improved compared with the traditional file form because NoSql database has the advantages of high availability, support for multi-concurrency, high data reading and writing performance, high query efficiency, support for distribution, easy expansion, and scalability.
[0092] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A software data interaction method, characterized in that: The steps include: Step S10, each software sends the MAC address of the running electronic device and the software version information to the data processing middleware; Step S20, the data processing middleware creates a key with a validity period for each software, sends the key to each software, and binds the key with the mac address and software version information and stores it in the NoSql database; Step S30, each software performs DM5 calculation on the data to be updated to obtain a first MD5 value, and generates a data update request based on the data to be updated, the first MD5 value, the key, the mac address and the software version information and sends it to the data processing middleware; Step S40: The data processing middleware receives and parses the data update request to obtain the data to be updated, the first MD5 value, the key, the mac address and the software version information, and verifies the key and the data to be updated; Step S50: the data processing middleware backs up the current data of the NoSql database based on the mac address and software version information; Step S60: The data processing middleware encrypts the data to be updated using the AES algorithm and then updates it to the NoSql database; Step S70: each software accesses the NoSql database through the data processing middleware to perform data interaction; The step S10 is specifically as follows: Each software running on different operating systems or the same operating system sends the MAC address and software version information of the running electronic device to the data processing middleware via Ethernet; The data processing middleware is used to connect the NoSql database and various software, create a key, verify the key and the data to be updated, and back up the current data.
2. A software data interaction method according to claim 1, characterized in that: In step S20, the NoSql database is MongoDB, Cassandra, Redis or Memcached.
3. A software data interaction method according to claim 1, characterized in that: In the step S40, the verification of the key and the data to be updated is specifically as follows: Determine whether the binding relationship between the key, mac address and software version information is stored in the NoSql database. If not, end the process; if yes, then: Determine whether the validity period carried by the key has expired. If so, it means that the key verification has failed and the process ends; if not, it means that the key verification has succeeded and: Perform DM5 calculation on the data to be updated to obtain a second MD5 value, and determine whether the first MD5 value is consistent with the second MD5 value. If not, it means that the verification of the data to be updated has failed and the process ends; if so, it means that the verification of the data to be updated has succeeded.
4. A software data interaction method according to claim 1, characterized in that: The step S70 is specifically as follows: Each software accesses the NoSql database through the data processing middleware to perform data interaction including adding, deleting, modifying, and querying.
5. A software data interaction system, characterized in that: Includes the following modules: The mac and version sending module is used for each software to send the mac address of the electronic device it is running and the software version information to the data processing middleware; The key generation and binding module is used for the data processing middleware to create a key with a validity period for each software, send the key to each software, and bind the key with the mac address and software version information and store it in the NoSql database; A data update request sending module is used for each software to perform DM5 calculation on the data to be updated to obtain a first MD5 value, and generate a data update request based on the data to be updated, the first MD5 value, the key, the mac address and the software version information and send it to the data processing middleware; The key and data verification module is used for the data processing middleware to receive and parse the data update request to obtain the data to be updated, the first MD5 value, the key, the mac address and the software version information, and to verify the key and the data to be updated; A data backup module is used for the data processing middleware to back up the current data of the NoSql database based on the mac address and software version information; A data update module is used for the data processing middleware to encrypt the data to be updated using the AES algorithm and then update it to the NoSql database; Data interaction module, used for each software to access NoSql database through data processing middleware for data interaction; The mac and version sending module is specifically: Each software running on different operating systems or the same operating system sends the MAC address and software version information of the running electronic device to the data processing middleware via Ethernet; The data processing middleware is used to connect the NoSql database and various software, create a key, verify the key and the data to be updated, and back up the current data.
6. A software data interaction system as claimed in claim 5, characterized in that: In the key generation and binding module, the NoSql database is MongoDB, Cassandra, Redis or Memcached.
7. A software data interaction system as claimed in claim 5, characterized in that: In the key and data verification module, the verification of the key and the data to be updated is specifically as follows: Determine whether the binding relationship between the key, mac address and software version information is stored in the NoSql database. If not, end the process; if yes, then: Determine whether the validity period carried by the key has expired. If so, it means that the key verification has failed and the process ends; if not, it means that the key verification has succeeded and: Perform DM5 calculation on the data to be updated to obtain a second MD5 value, and determine whether the first MD5 value is consistent with the second MD5 value. If not, it means that the verification of the data to be updated has failed and the process ends; if so, it means that the verification of the data to be updated has succeeded.
8. A software data interaction system as claimed in claim 5, characterized in that: The data interaction module is specifically: Each software accesses the NoSql database through the data processing middleware to perform data interaction including adding, deleting, modifying, and querying.
