Software data interaction method and system

文档序号:1963894 发布日期:2021-12-14 浏览:30次 中文

阅读说明:本技术 一种软件数据交互方法及系统 (Software data interaction method and system ) 是由 李有财 罗子彬 陈冬冬 王磊 熊刚 陈禹 陈方平 于 2021-08-26 设计创作,主要内容包括:本发明提供了数据库技术领域的一种软件数据交互方法及系统,方法包括:步骤S10、软件将运行设备的mac、软件版本发给数据处理中间件;步骤S20、数据处理中间件创建密钥发给软件,将密钥与mac、软件版本绑定后存至NoSql;步骤S30、软件对待更新数据进行DM5计算得到第一MD5值,并基于待更新数据、第一MD5值、密钥、mac、软件版本生成数据更新请求发给数据处理中间件;步骤S40、数据处理中间件解析数据更新请求,并对密钥、待更新数据进行校验;步骤S50、数据处理中间件进行数据备份;步骤S60、数据处理中间件将待更新数据加密后更新至NoSql;步骤S70、各软件通过数据处理中间件访问NoSql进行数据交互。本发明的优点在于:极大的提升了数据交互的兼容性、安全性以及效率。(The invention provides a software data interaction method and a system in the technical field of databases, wherein the method comprises the following steps: step S10, the software sends the mac and the software version of the running equipment to the data processing middleware; step S20, the data processing middleware creates a key and sends the key to software, and the key is bound with mac and the software version and then stored in NoSql; step S30, performing DM5 calculation on data to be updated by software to obtain a first MD5 value, generating a data updating request based on the data to be updated, the first MD5 value, a key, mac and a software version, and sending the data updating request to a data processing middleware; step S40, the data processing middleware analyzes the data updating request and verifies the key and the data to be updated; step S50, the data processing middleware performs data backup; step S60, the data processing middleware encrypts the data to be updated and then updates the data to NoSql; and step S70, each software accesses the NoSql through the data processing middleware to perform data interaction. The invention has the advantages that: the compatibility, the safety and the efficiency of data interaction are greatly improved.)

1. A software data interaction method is characterized in that: the method comprises the following steps:

step S10, each software respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware;

step S20, the data processing middleware respectively creates a key carrying an expiration date for each software, sends the key to each software, binds the key with a mac address and software version information and stores the bound key in a NoSql database;

step S30, performing DM5 calculation on data to be updated by each software to obtain a first MD5 value, generating a data updating request based on the data to be updated, the first MD5 value, a key, a mac address and software version information, and sending the data updating request to a data processing middleware;

step S40, the data processing middleware receives and analyzes the data updating request to obtain data to be updated, a first MD5 value, a key, a mac address and 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 the software version information;

step S60, the data processing middleware encrypts the data to be updated by using an AES algorithm and updates the data to the NoSql database;

and step S70, each software accesses the NoSql database through the data processing middleware to perform data interaction.

2. The software data interaction method of claim 1, wherein: the step S10 specifically includes:

each piece of software running in different operating systems or the same operating system respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware through the Ethernet;

the data processing middleware is used for connecting the NoSql database with each software, creating a key, verifying the key and the data to be updated and backing up the current data.

3. The software data interaction method of claim 1, wherein: in the step S20, the NoSql database is MongoDB, Cassandra, Redis, or Memcached.

4. The software data interaction method of claim 1, wherein: in step S40, the verifying the key and the data to be updated specifically includes:

judging whether the NoSql database stores the binding relationship between the key and the mac address and the software version information, if not, ending the process; if yes, then:

judging whether the validity period carried by the secret key is expired, if so, indicating that the verification of the secret key fails, and ending the process; if not, the key verification is successful, and:

performing DM5 calculation on the data to be updated to obtain a second MD5 value, judging whether the first MD5 value is consistent with the second MD5 value, if not, indicating that the data to be updated fails to be checked, and ending the process; if yes, the verification of the data to be updated is successful.

5. The software data interaction method of claim 1, wherein: the step S70 specifically includes:

each software accesses the NoSql database through data processing middleware for data interaction including addition, deletion, modification, and querying.

6. A software data interaction system, characterized by: the system comprises the following modules:

the mac and version sending module is used for sending the mac address and the software version information of the operated electronic equipment to the data processing middleware by each software;

the key generation and binding module is used for respectively creating a key with an expiration date for each software by the data processing middleware, sending the key to each software, binding the key with a mac address and software version information and then storing the bound key in a NoSql database;

the data updating request sending module is used for performing DM5 calculation on data to be updated by each software to obtain a first MD5 value, generating a data updating request based on the data to be updated, the first MD5 value, a key, a mac address and software version information, and sending the data updating request to the data processing middleware;

the key and data verification module is used for receiving and analyzing the data updating request by the data processing middleware to obtain data to be updated, a first MD5 value, a key, a mac address and software version information, and verifying the key and the data to be updated;

the data backup module is used for backing up the current data of the NoSql database by the data processing middleware based on the mac address and the software version information;

the data updating module is used for the data processing middleware to encrypt the data to be updated by using an AES algorithm and then update the data to the NoSql database;

and the data interaction module is used for accessing the NoSql database by each software through the data processing middleware to perform data interaction.

7. A software data interaction system as claimed in claim 6, wherein: the mac and version sending module specifically comprises:

each piece of software running in different operating systems or the same operating system respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware through the Ethernet;

the data processing middleware is used for connecting the NoSql database with each software, creating a key, verifying the key and the data to be updated and backing up the current data.

8. A software data interaction system as claimed in claim 6, wherein: in the key generation binding module, the NoSql database is MongoDB, Cassandra, Redis or Memcached.

9. A software data interaction system as claimed in claim 6, wherein: in the key and data verification module, the verification of the key and the data to be updated specifically includes:

judging whether the NoSql database stores the binding relationship between the key and the mac address and the software version information, if not, ending the process; if yes, then:

judging whether the validity period carried by the secret key is expired, if so, indicating that the verification of the secret key fails, and ending the process; if not, the key verification is successful, and:

performing DM5 calculation on the data to be updated to obtain a second MD5 value, judging whether the first MD5 value is consistent with the second MD5 value, if not, indicating that the data to be updated fails to be checked, and ending the process; if yes, the verification of the data to be updated is successful.

10. A software data interaction system as claimed in claim 6, wherein: the data interaction module is specifically as follows:

each software accesses the NoSql database through data processing middleware for data interaction including addition, deletion, modification, and querying.

Technical Field

The invention relates to the technical field of databases, in particular to a software data interaction method and a software data interaction system.

Background

With the advancement of technology, various electronic devices, such as notebook computers, tablet computers, mobile phones, etc., have appeared, and people need to rely on these electronic devices for work and life, and different electronic devices run different operating systems and different software. Because different software can realize different functions and different operating systems have different advantages, there is a need for data interaction between different software of different operating systems or between different software of the same operating system.

However, the communication connection between the software of different operating systems is complicated and unstable, and even communication cannot be performed; in addition, interactive data are not recorded in the prior art, and the difficulty of troubleshooting is high when problems occur; interactive data are not checked in the prior art, and the condition of incomplete data often occurs; conventionally, interactive data is in a file form of ini or config, when a file is opened by one piece of software, other pieces of software cannot operate the file, that is, a concurrency problem exists, and reading efficiency through the file form is low.

Therefore, how to provide a software data interaction method and system to improve the compatibility, security and efficiency of data interaction becomes a problem to be solved urgently.

Disclosure of Invention

The technical problem to be solved by the invention is to provide a software data interaction method and system, so that the compatibility, safety and efficiency of data interaction are improved.

In a first aspect, the present invention provides a software data interaction method, including the following steps:

step S10, each software respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware;

step S20, the data processing middleware respectively creates a key carrying an expiration date for each software, sends the key to each software, binds the key with a mac address and software version information and stores the bound key in a NoSql database;

step S30, performing DM5 calculation on data to be updated by each software to obtain a first MD5 value, generating a data updating request based on the data to be updated, the first MD5 value, a key, a mac address and software version information, and sending the data updating request to a data processing middleware;

step S40, the data processing middleware receives and analyzes the data updating request to obtain data to be updated, a first MD5 value, a key, a mac address and 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 the software version information;

step S60, the data processing middleware encrypts the data to be updated by using an AES algorithm and updates the data to the NoSql database;

and step S70, each software accesses the NoSql database through the data processing middleware to perform data interaction.

Further, the step S10 is specifically:

each piece of software running in different operating systems or the same operating system respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware through the Ethernet;

the data processing middleware is used for connecting the NoSql database with each software, creating a key, verifying the key and the data to be updated and backing up the current data.

Further, in the step S20, the NoSql database is MongoDB, Cassandra, Redis, or Memcached.

Further, in step S40, the verifying the key and the data to be updated specifically includes:

judging whether the NoSql database stores the binding relationship between the key and the mac address and the software version information, if not, ending the process; if yes, then:

judging whether the validity period carried by the secret key is expired, if so, indicating that the verification of the secret key fails, and ending the process; if not, the key verification is successful, and:

performing DM5 calculation on the data to be updated to obtain a second MD5 value, judging whether the first MD5 value is consistent with the second MD5 value, if not, indicating that the data to be updated fails to be checked, and ending the process; if yes, the verification of the data to be updated is successful.

Further, the step S70 is specifically:

each software accesses the NoSql database through data processing middleware for data interaction including addition, deletion, modification, and querying.

In a second aspect, the present invention provides a software data interaction system, which includes the following modules:

the mac and version sending module is used for sending the mac address and the software version information of the operated electronic equipment to the data processing middleware by each software;

the key generation and binding module is used for respectively creating a key with an expiration date for each software by the data processing middleware, sending the key to each software, binding the key with a mac address and software version information and then storing the bound key in a NoSql database;

the data updating request sending module is used for performing DM5 calculation on data to be updated by each software to obtain a first MD5 value, generating a data updating request based on the data to be updated, the first MD5 value, a key, a mac address and software version information, and sending the data updating request to the data processing middleware;

the key and data verification module is used for receiving and analyzing the data updating request by the data processing middleware to obtain data to be updated, a first MD5 value, a key, a mac address and software version information, and verifying the key and the data to be updated;

the data backup module is used for backing up the current data of the NoSql database by the data processing middleware based on the mac address and the software version information;

the data updating module is used for the data processing middleware to encrypt the data to be updated by using an AES algorithm and then update the data to the NoSql database;

and the data interaction module is used for accessing the NoSql database by each software through the data processing middleware to perform data interaction.

Further, the mac and version sending module specifically includes:

each piece of software running in different operating systems or the same operating system respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware through the Ethernet;

the data processing middleware is used for connecting the NoSql database with each software, creating a key, verifying the key and the data to be updated and backing up the current data.

Further, in the key generation and binding module, the NoSql database is MongoDB, Cassandra, Redis, or Memcached.

Further, in the key and data verification module, the verifying the key and the data to be updated specifically includes:

judging whether the NoSql database stores the binding relationship between the key and the mac address and the software version information, if not, ending the process; if yes, then:

judging whether the validity period carried by the secret key is expired, if so, indicating that the verification of the secret key fails, and ending the process; if not, the key verification is successful, and:

performing DM5 calculation on the data to be updated to obtain a second MD5 value, judging whether the first MD5 value is consistent with the second MD5 value, if not, indicating that the data to be updated fails to be checked, and ending the process; if yes, the verification of the data to be updated is successful.

Further, the data interaction module specifically includes:

each software accesses the NoSql database through data processing middleware for data interaction including addition, deletion, modification, and querying.

The invention has the advantages that:

1. the data processing middleware is arranged to be used for connecting the NoSql database with each software, so that the software between different operating systems (windows, Linux, PLC, macOS, HarmonyOS and the like) can directly access the NoSql database through the data processing middleware, and then the NoSql database is used for interaction, and the compatibility of data interaction is greatly improved.

2. The key carried by the data updating request and the data to be updated are checked, then the current data are backed up, the data to be updated are encrypted by using an AES algorithm and updated to a NoSql database, namely, before the data are updated, whether the key is bound (authorized) or not is verified, whether the data to be updated are complete or not is verified, the data are backed up after the verification is passed so as to trace to the source at the later stage, the data are updated at last, and then the safety of data interaction is greatly improved.

3. By adopting the NoSql database (non-relational database), the NoSql database has the advantages of high availability, multi-concurrency support, high data read-write performance, high query efficiency, distributed support, easiness in expansion, scalability and the like, and compared with the traditional file form, the NoSql database greatly improves the data interaction efficiency.

Drawings

The invention will be further described with reference to the following examples with reference to the accompanying drawings.

FIG. 1 is a flow chart of a software data interaction method of the present invention.

FIG. 2 is a schematic structural diagram of a software data interaction system according to the present invention.

Detailed Description

The technical scheme in the embodiment of the application has the following general idea: the data processing middleware is arranged to be used for connecting the NoSql database with each software, so that the compatibility of data interaction is improved; after a key carried by the data updating request and the data to be updated are checked, the current data are backed up, and the data to be updated are encrypted by using an AES algorithm and updated to a NoSql database so as to improve the safety of data interaction; by adopting the NoSql database, the efficiency of data interaction is improved.

Referring to fig. 1 to fig. 2, a preferred embodiment of a software data interaction method according to the present invention includes the following steps:

step S10, each software respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware;

step S20, the data processing middleware respectively creates a unique key carrying an expiration date for each software, sends the key to each software, binds the key with a mac address and software version information and then stores the bound key in a NoSql database (a non-relational database); the NoSql database runs on one electronic device, and the software of the other electronic devices interacts through the NoSql database;

step S30, performing DM5 calculation on data to be updated by each software to obtain a first MD5 value, generating a data updating request in a JSON format based on the data to be updated, the first MD5 value, a key, a mac address and software version information, and sending the data updating request to a data processing middleware; the data update request is exemplified as follows:

{"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"};

step S40, the data processing middleware receives and analyzes the data updating request to obtain data to be updated, a first MD5 value, a key, a mac address and 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 the software version information, namely backs up the data of the previous version;

step S60, the data processing middleware encrypts the data to be updated by using an AES algorithm and then updates the data to the NoSql database in real time; each software updates the data to be updated to the NoSql database in real time, so that each software is the latest data when accessing the NoSql database, and the real-time performance of data interaction is greatly improved;

and step S70, each software accesses the NoSql database through the data processing middleware to perform data interaction.

The step S10 specifically includes:

each piece of software running in different operating systems or the same operating system respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware through the Ethernet;

the data processing middleware is used for connecting a NoSql database with each software, creating a key, verifying the key and the data to be updated and backing up the current data; recording backup time during data backup, and setting backup time limit; the backup time is set to facilitate the source tracing at the later stage, and the backup time limit is set to avoid the waste of storage space caused by long-term storage of meaningless data; the backup time limit can be set as required; the data processing middleware solves the problem that interaction cannot be carried out among software of different electronic equipment.

In the step S20, the NoSql database is MongoDB, Cassandra, Redis, or Memcached. The memory data of the NoSql database supports 10w times of reading and writing per second, while the traditional relational database is limited by the disc io, and the situation of pressure multiplication can occur under the high concurrency condition.

In step S40, the verifying the key and the data to be updated specifically includes:

judging whether the NoSql database stores the binding relationship between the key and the mac address and the software version information, if not, ending the process; if yes, the secret key is legal, and then:

judging whether the validity period carried by the secret key is expired, if so, indicating that the verification of the secret key fails, and ending the process; if not, the key verification is successful, and:

performing DM5 calculation on the data to be updated to obtain a second MD5 value, judging whether the first MD5 value is consistent with the second MD5 value, if not, indicating that the data to be updated fails to be checked, and ending the process; if yes, the verification of the data to be updated is successful.

The step S70 specifically includes:

each software accesses the NoSql database through data processing middleware for data interaction including addition, deletion, modification, and querying.

The invention discloses a preferred embodiment of a software data interaction system, which comprises the following modules:

the mac and version sending module is used for sending the mac address and the software version information of the operated electronic equipment to the data processing middleware by each software;

the key generation and binding module is used for respectively creating a unique key with an expiration date for each software by the data processing middleware, sending the key to each software, binding the key with the mac address and the software version information, and storing the bound key in a NoSql database (a non-relational database); the NoSql database runs on one electronic device, and the software of the other electronic devices interacts through the NoSql database;

the data updating request sending module is used for performing DM5 calculation on data to be updated by each software to obtain a first MD5 value, generating a data updating request in a JSON format based on the data to be updated, the first MD5 value, a key, a mac address and software version information, and sending the data updating request to the data processing middleware; the data update request is exemplified as follows:

{"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"};

the key and data verification module is used for receiving and analyzing the data updating request by the data processing middleware to obtain data to be updated, a first MD5 value, a key, a mac address and software version information, and verifying the key and the data to be updated;

the data backup module is used for backing up the current data of the NoSql database by the data processing middleware based on the mac address and the software version information, namely backing up the data of the previous version;

the data updating module is used for encrypting the data to be updated by the data processing middleware through an AES algorithm and then updating the data to be updated to the NoSql database in real time; each software updates the data to be updated to the NoSql database in real time, so that each software is the latest data when accessing the NoSql database, and the real-time performance of data interaction is greatly improved;

and the data interaction module is used for accessing the NoSql database by each software through the data processing middleware to perform data interaction.

The mac and version sending module specifically comprises:

each piece of software running in different operating systems or the same operating system respectively sends the mac address and the software version information of the running electronic equipment to the data processing middleware through the Ethernet;

the data processing middleware is used for connecting a NoSql database with each software, creating a key, verifying the key and the data to be updated and backing up the current data; recording backup time during data backup, and setting backup time limit; the backup time is set to facilitate the source tracing at the later stage, and the backup time limit is set to avoid the waste of storage space caused by long-term storage of meaningless data; the backup time limit can be set as required; the data processing middleware solves the problem that interaction cannot be carried out among software of different electronic equipment.

In the key generation binding module, the NoSql database is MongoDB, Cassandra, Redis or Memcached. The memory data of the NoSql database supports 10w times of reading and writing per second, while the traditional relational database is limited by the disc io, and the situation of pressure multiplication can occur under the high concurrency condition.

In the key and data verification module, the verification of the key and the data to be updated specifically includes:

judging whether the NoSql database stores the binding relationship between the key and the mac address and the software version information, if not, ending the process; if yes, the secret key is legal, and then:

judging whether the validity period carried by the secret key is expired, if so, indicating that the verification of the secret key fails, and ending the process; if not, the key verification is successful, and:

performing DM5 calculation on the data to be updated to obtain a second MD5 value, judging whether the first MD5 value is consistent with the second MD5 value, if not, indicating that the data to be updated fails to be checked, and ending the process; if yes, the verification of the data to be updated is successful.

The data interaction module is specifically as follows:

each software accesses the NoSql database through data processing middleware for data interaction including addition, deletion, modification, and querying.

In summary, the invention has the advantages that:

1. the data processing middleware is arranged to be used for connecting the NoSql database with each software, so that the software between different operating systems (windows, Linux, PLC, macOS, HarmonyOS and the like) can directly access the NoSql database through the data processing middleware, and then the NoSql database is used for interaction, and the compatibility of data interaction is greatly improved.

2. The key carried by the data updating request and the data to be updated are checked, then the current data are backed up, the data to be updated are encrypted by using an AES algorithm and updated to a NoSql database, namely, before the data are updated, whether the key is bound (authorized) or not is verified, whether the data to be updated are complete or not is verified, the data are backed up after the verification is passed so as to trace to the source at the later stage, the data are updated at last, and then the safety of data interaction is greatly improved.

3. By adopting the NoSql database (non-relational database), the NoSql database has the advantages of high availability, multi-concurrency support, high data read-write performance, high query efficiency, distributed support, easiness in expansion, scalability and the like, and compared with the traditional file form, the NoSql database greatly improves the data interaction efficiency.

Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:身份验证方法、装置与电子设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类