CN112468544A - Express delivery data transmission method based on middleware and middleware - Google Patents

Express delivery data transmission method based on middleware and middleware Download PDF

Info

Publication number
CN112468544A
CN112468544A CN202011258980.7A CN202011258980A CN112468544A CN 112468544 A CN112468544 A CN 112468544A CN 202011258980 A CN202011258980 A CN 202011258980A CN 112468544 A CN112468544 A CN 112468544A
Authority
CN
China
Prior art keywords
middleware
bargun
express delivery
gun
delivery data
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
CN202011258980.7A
Other languages
Chinese (zh)
Other versions
CN112468544B (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.)
Dongpu Software Co Ltd
Original Assignee
Dongpu Software 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 Dongpu Software Co Ltd filed Critical Dongpu Software Co Ltd
Priority to CN202011258980.7A priority Critical patent/CN112468544B/en
Publication of CN112468544A publication Critical patent/CN112468544A/en
Application granted granted Critical
Publication of CN112468544B publication Critical patent/CN112468544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Power Engineering (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides an express delivery data transmission method and middleware based on middleware, the middleware comprises a middleware bargun end installed on each bargun and a middleware server end installed on a server, and the method comprises the following steps: the middleware bargun end generates the unique identification of each bargun and sends the unique identification to the middleware server end, generates the private key and the public key of each bargun and sends the public key of each bargun to the middleware server end, when the bargun is used for uploading data, whether the bargun equipment is legal or not is verified by comparing the identification to be verified and the unique identification which are generated in real time, the data safety transmission between the middleware bargun end and the middleware server end is ensured by encrypting the private key and decrypting the public key, and data interaction is carried out between the bargun and the server in a mode of calling the middleware, so that functions of legal authentication of the bargun equipment and safe transmission of express data are provided, and express data are prevented from being uploaded by unauthorized bargun equipment.

Description

Express delivery data transmission method based on middleware and middleware
Technical Field
The application relates to the technical field of logistics express data security, in particular to an express data transmission method based on middleware, the middleware, electronic equipment and a computer-readable storage medium.
Background
With the development of mobile internet and the progress of communication technology, smart terminal gun equipment in express logistics becomes an indispensable part in collecting, dispatching and delivering, and the communication security between the gun equipment and a server is more and more emphasized. On one hand, the vulnerable characteristic of the intelligent terminal enables the intelligent terminal to become a source for leakage of user data and privacy information, and on the other hand, part of large customers forge bargun devices to upload illegal profit-making of express data, and normal operation of express companies is disturbed.
Therefore, it is necessary to establish a secure communication method between the bargun and the server to enhance the validity and security of data uploading.
Disclosure of Invention
The application aims to provide an express data transmission method based on a middleware, the middleware, electronic equipment and a computer readable storage medium, so that a large client is prevented from counterfeiting express bargun information, legality of bargun equipment is guaranteed, and safe uploading of express data is achieved.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides an express delivery data transmission method based on middleware, where the middleware includes a middleware bargun end installed on each bargun and a middleware server end installed on a server, and the method includes: the middleware bargun end respectively generates a unique identifier of each bargun and sends the unique identifier to the middleware server end, and respectively generates a private key and a public key of each bargun and sends the public key of each bargun to the middleware server end; receiving a data uploading request sent by a first gun, generating an identifier to be verified of the first gun in real time, encrypting the identifier to be verified by using a private key of the first gun, and sending the encrypted identifier to be verified to the middleware server; the middleware server side decrypts the encrypted identification to be verified by using the public key of the first rifle; if the decryption is successful, detecting whether a unique identifier consistent with the identifier to be verified exists in all the unique identifiers; if the first bus gun at the bus gun end of the middleware is legal, prompting that the first bus gun at the bus gun end of the middleware is legal; the middleware bargun end receives express delivery data sent by the first bargun and sends the express delivery data to the middleware server end; and the middleware server side stores the express delivery data to the server. The technical scheme has the advantages that the unique identification and the public key of all legal bargun devices are stored at a middleware server, when the bargun is used for uploading data, whether the bargun devices are legal or not is verified by comparing the identification to be verified and the unique identification which are generated in real time, the data safety transmission between the intermediate bargun terminal and the middleware server is ensured by encrypting a private key and decrypting a public key, the data interaction is not directly carried out between the bargun and the server, but the data interaction is carried out by calling the middleware, so that the functions of legal authentication of the bargun devices and safe transmission of express data are provided, the phenomenon that express data and illegal benefits are uploaded by an unauthorized bargun device at an alliance provider network point in a supply chain is avoided, a safe and effective data environment is provided for an express company data warehouse, and the middleware is used as a bottom layer integration technology of the bargun devices and data transmission, the good cooperative relationship among large customers, network companies and express companies is ensured.
In some optional embodiments, the generating, by the middleware bargun terminal, the unique identifier of each bargun and sending the unique identifier to the middleware server terminal, and generating, by the middleware bargun terminal, the private key and the public key of each bargun and sending the public key of each bargun to the middleware server terminal respectively includes: the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of each bargun respectively, and generates a unique identifier of each bargun according to the read equipment code, the MAC address and the CPU serial number of each bargun and sends the unique identifier to the middleware server end; the middleware bargun end reads the equipment code, the MAC address, the IP address and the timestamp of each bargun respectively, and generates the private key and the public key of each bargun respectively according to the read equipment code, the MAC address, the IP address and the timestamp of each bargun and sends the public key of each bargun to the middleware server end; the real-time generation of the to-be-verified identifier of the first rifle comprises: and the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of the first bargun, and generates the identification to be verified of the first bargun in real time according to the read equipment code, the MAC address and the CPU serial number of the first bargun. The technical scheme has the advantages that the unique identification of the bargun is generated by using the equipment code, the MAC address and the CPU serial number of the bargun, the private key and the public key pair of the bargun are generated by using the equipment code, the MAC address, the IP address and the timestamp of the bargun, and therefore large customers are prevented from forging the bargun equipment and disturbing normal operation of express companies.
In some optional embodiments, the middleware bargun end receives express delivery data sent by the first bargun and sends the express delivery data to the middleware server end, including: the middleware bargun end receives express data sent by the first bargun, encrypts the express data by using a private key of the first bargun, and sends the encrypted express data to the middleware server end; the middleware server side stores the express delivery data to the server, and the method comprises the following steps: the middleware server side decrypts the encrypted express delivery data by using the public key of the first gun; and if the decryption is successful, storing the express delivery data to the server. The technical scheme has the beneficial effects that the safe transmission of the express data between the middleware bargun end and the middleware server end is ensured through private key encryption and public key decryption.
In some optional embodiments, the method further comprises: if the decryption is unsuccessful, the middleware server end marks the encrypted to-be-verified identifier as abnormal data and prompts the middleware bargun end that the first bargun is illegal. The technical scheme has the beneficial effects that when the decryption is unsuccessful, the public key stored by the middleware server end is not matched with the private key of the encrypted data of the middleware bargun end, so that the possibility of forging the bargun equipment exists.
In some optional embodiments, the method further comprises: if the identification to be verified does not exist, the middleware server end marks the identification to be verified as abnormal data, and prompts that the first gun is illegal at the middleware gun end. The technical scheme has the beneficial effects that if the unique identifier which is consistent with the identifier to be verified of the first bargun does not exist in the unique identifier stored by the middleware server, the fact that the first bargun is not in the legal bargun equipment is indicated, and the possibility of forging the bargun equipment exists.
In some optional embodiments, the middleware bargun end receives express delivery data sent by the first bargun and sends the express delivery data to the middleware server end, including: the middleware bargun end detects whether upgrading is needed, if upgrading is needed, the upgrading is carried out, and if upgrading is not needed, express delivery data sent by the first bargun are received and sent to the middleware server end. The technical scheme has the advantages that the middleware has the characteristics of easiness in use and expandability, and automatic online upgrading can be performed after the new version is released.
In a second aspect, the present application provides a middleware comprising a middleware bargun end mounted on each bargun and a middleware server end mounted on a server; the middleware bargun end is configured to generate a unique identifier of each bargun and send the unique identifier to the middleware server end, and generate a private key and a public key of each bargun and send the public key of each bargun to the middleware server end; receiving a data uploading request sent by a first gun, generating an identifier to be verified of the first gun in real time, encrypting the identifier to be verified by using a private key of the first gun, and sending the encrypted identifier to be verified to the middleware server; the middleware server side is configured to decrypt the encrypted to-be-verified identifier by using the public key of the first rifle; if the decryption is successful, detecting whether a unique identifier consistent with the identifier to be verified exists in all the unique identifiers; if the first bus gun at the bus gun end of the middleware is legal, prompting that the first bus gun at the bus gun end of the middleware is legal; the middleware bargun end is further configured to receive express delivery data sent by the first bargun and send the express delivery data to the middleware server end; the middleware server is further configured to store the express delivery data to the server.
In some optional embodiments, the middleware bargun end is further configured to read the device code, the MAC address, and the CPU serial number of each bargun, generate the unique identifier of each bargun according to the read device code, MAC address, and CPU serial number of each bargun, and send the unique identifier to the middleware server end; the middleware bargun end is further configured to read the device code, the MAC address, the IP address and the timestamp of each bargun respectively, generate the private key and the public key of each bargun respectively according to the read device code, the MAC address, the IP address and the timestamp of each bargun, and send the public key of each bargun to the middleware server end; the middleware bargun end is further configured to read the equipment code, the MAC address and the CPU serial number of the first bargun, and generate the to-be-verified identifier of the first bargun in real time according to the read equipment code, the MAC address and the CPU serial number of the first bargun.
In some optional embodiments, the middleware server is further configured to mark the encrypted to-be-verified identifier as abnormal data if the decryption is unsuccessful, and prompt the middleware bargun end that the first bargun is illegal.
In some optional embodiments, the middleware server is further configured to mark the to-be-verified identifier as abnormal class data if the to-be-verified identifier does not exist, and prompt the middleware bargun end that the first bargun is illegal.
In some optional embodiments, the middleware bargun end is further configured to receive express delivery data sent by the first bargun, encrypt the express delivery data by using a private key of the first bargun, and send the encrypted express delivery data to the middleware server end; the middleware server side is further configured to decrypt the encrypted express delivery data by using the public key of the first gun; and if the decryption is successful, storing the express delivery data to the server.
In some optional embodiments, the middleware bargun terminal is further configured to establish a long connection between the middleware bargun terminal and the middleware server terminal, and send the encrypted express delivery data to the middleware server terminal through the long connection. This technical scheme's beneficial effect lies in, when first rifle is verified legally, can establish long connection for carry out subsequent express delivery data transmission, promote data transmission efficiency.
In some optional embodiments, the middleware bargun end or the middleware server end is further configured to perform heartbeat detection on the long connection between the middleware bargun end and the middleware server end at a time interval T, and disconnect the long connection between the middleware bargun end and the middleware server end if a heartbeat packet is not received by a packet receiving party of the middleware bargun end and the middleware server end within the time interval T. The technical scheme has the advantages that heartbeat detection is carried out on the long connection, if the heartbeat packet is not received overtime, the connection is disconnected, legal verification needs to be carried out again when the bargun is used for data uploading, and the phenomenon that the bargun is forged to upload data is prevented.
In some optional embodiments, the middleware bargun side is further configured to send the express delivery data to the middleware server side using a WebSocket technology protocol. The technical scheme has the advantages that according to the requirements of safety and communication performance, a WebSocket technical protocol is adopted for data information interaction of the two parties, the WebSocket is bidirectional, a full-duplex protocol is used in the scene of communication between the middleware bargun end and the middleware server end, the connection between the middleware bargun end and the middleware server end is kept in an active state until the connection is terminated by any party (the middleware bargun end or the middleware server end), and the connection is terminated from the two ends after the connection is closed by any party.
In some optional embodiments, the middleware bargun terminal is further configured to detect whether an upgrade is needed, perform the upgrade if the upgrade is needed, and receive express delivery data sent by the first bargun and send the express delivery data to the middleware server terminal if the upgrade is not needed.
In a third aspect, the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
Drawings
The present application is further described below with reference to the drawings and examples.
Fig. 1 is a schematic flowchart of an express delivery data transmission method based on middleware according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for automatically upgrading a pistol terminal of a middleware according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of an express delivery data transmission method based on middleware according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an express delivery data transmission method based on middleware according to an embodiment of the present application;
fig. 5 is a schematic flowchart of an express data transmission method at a bargun end of a middleware according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an intermediate piece according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a program product for implementing a method for delivering express delivery data based on middleware according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the present application, the embodiments or technical features described below may be arbitrarily combined to form a new embodiment without conflict.
Referring to fig. 1, an embodiment of the present application provides an express delivery data transmission method based on middleware, where the middleware includes a middleware bargun end installed on each bargun and a middleware server end installed on a server, and the method includes steps S101 to S111. The middleware bargun end and the middleware server end can be Applications (APP) installed on the bargun or the server, can also be web pages or small programs accessed by the bargun and the server, and can also be processes running on the bargun or the server.
Step S101: and the middleware bargun end respectively generates the unique identifier of each bargun and sends the unique identifier to the middleware server end. Specifically, step S101 may include: the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of each bargun respectively, and generates the unique identifier of each bargun according to the read equipment code, the MAC address and the CPU serial number of each bargun and sends the unique identifier to the middleware server end. The device code is a built-in code of the bargun device, is a self-contained identification of the device, and generally cannot be changed. The MAC address is used for confirming the local area network address of the gun equipment, and the local area network address is the self-contained identification of the equipment. The CPU serial number is used for confirming the processor number of the gun device and is the self-carried identification of the device. Therefore, the unique identifier is used for verifying the data information of the data uploading equipment, so that the data information is transmitted in legal equipment, the equipment information cannot be forged, and a large customer is prevented from forging the bargun equipment and disturbing the normal operation of an express company. The large customer refers to a large customer of the express company, and generally speaking, the large customer is an online shop or other customers with large express delivery requirements.
In a specific implementation, step S101 may include: the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of each bargun respectively, random numbers are generated according to the read equipment code, the MAC address and the CPU serial number of each bargun respectively, and the unique identifier of each bargun is generated by using an MD5 algorithm according to the random numbers corresponding to each bargun and is sent to the middleware server end. That is, the MD5 digital signature of the gun device is generated by applying the MD5 algorithm as a unique identification of the gun device. Therefore, the unique identification of each bargun device is generated through the MD5 algorithm, and the method has the advantages of universality, stability and quickness.
Step S102: and the middleware bargun end respectively generates a private key and a public key of each bargun and sends the public key of each bargun to the middleware server end. The private key and the public key of each gun form a key pair, the key pair is respectively stored in a middleware gun end and a middleware server end by half, the middleware gun end stores the private key, and the middleware server end stores the public key, namely, the middleware server end stores a public key list of all gun devices of the express network.
Specifically, step S102 may include: the middleware bargun end reads the equipment code, the MAC address, the IP address and the timestamp of each bargun respectively, and generates the private key and the public key of each bargun respectively according to the read equipment code, the MAC address, the IP address and the timestamp of each bargun and sends the public key of each bargun to the middleware server end. The IP address is a logical address that can mask differences in physical addresses. The timestamp can confirm the real generation time of the private key and the public key pair.
In a specific implementation, step S102 may include: the middleware bargun end reads the equipment code, the MAC address, the IP address and the timestamp of each bargun respectively, random numbers are generated according to the read equipment code, the MAC address, the IP address and the timestamp of each bargun respectively, the private key and the public key of each bargun are generated according to the random numbers corresponding to each bargun, and the public key of each bargun is sent to the middleware server end. The algorithm for generating the private key and the public key is, for example, an RSA algorithm or an SM2 algorithm.
Step S103: the middleware bargun end receives a data uploading request sent by a first bargun.
Step S104: and the middleware bargun end generates the identification to be verified of the first bargun in real time. Specifically, step S104 may include: and the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of the first bargun, and generates the identification to be verified of the first bargun in real time according to the read equipment code, the MAC address and the CPU serial number of the first bargun.
Step S105: and the middleware bargun end encrypts the identifier to be verified by using a private key of the first bargun.
Step S106: and the middleware bargun end sends the encrypted identifier to be verified to the middleware server end.
Step S107: and the middleware server decrypts the encrypted identifier to be verified by using the public key of the first gun. And if the public key of the first gun stored at the middleware server side is matched with the private key used by the encrypted data, the decryption is successful, otherwise, the decryption is unsuccessful.
Step S108: and if the decryption is successful, the middleware server side detects whether the unique identifier consistent with the identifier to be verified exists in all the unique identifiers. The middleware server side stores the unique identifiers of all legal gun devices, so that if the unique identifier consistent with the identifier to be verified exists, the first gun is proved to be legal, and if the unique identifier does not exist, the first gun is proved to be illegal and the possibility of counterfeiting exists.
In some optional embodiments, with continued reference to fig. 1, the method may further include step S112: if the decryption is unsuccessful, the middleware server end marks the encrypted to-be-verified identifier as abnormal data and prompts the middleware bargun end that the first bargun is illegal. When the decryption is unsuccessful, the public key stored at the middleware server end is not matched with the private key of the encrypted data at the middleware bargun end, so that the possibility of forging the bargun equipment exists. And for abnormal data, an alarm mechanism can be triggered to prompt express company personnel to strengthen audit and investigation.
Step S109: and if so, the middleware server end prompts the middleware bargun end that the first bargun is legal.
In some optional embodiments, with continued reference to fig. 1, the method may further include step S113: if the identification to be verified does not exist, the middleware server end marks the identification to be verified as abnormal data, and prompts that the first gun is illegal at the middleware gun end. If the unique identifier which is consistent with the identifier to be verified of the first gun does not exist in the unique identifiers stored in the middleware server, the fact that the first gun is not in the legal gun device is indicated, and the possibility of forging the gun device exists.
Step S110: and the middleware bargun end receives the express delivery data sent by the first bargun and sends the express delivery data to the middleware server end. All scanning acquisition equipment (such as the rifle equipment of express delivery website) all call this middleware rifle end in succession and carry out the data upload function, and each application equipment calls middleware rifle end or middleware server end when uploading and downloading data can.
Specifically, step S110 may include: the middleware bargun end receives the express data sent by the first bargun, the express data are encrypted by using the private key of the first bargun, and the encrypted express data are sent to the middleware server end.
In some alternative embodiments, referring to fig. 2, the step S110 may include steps S1101 to S1104.
Step S1101: and the middleware bargun end detects whether upgrading is needed.
Step S1102: and if the upgrading is needed, upgrading the bargun end of the middleware. In a specific implementation, if the upgrade is successful, the middleware bargun may initialize.
Step S1103: and if the upgrading is not needed, the middleware bargun end receives the express delivery data sent by the first bargun and sends the express delivery data to the middleware server end.
Therefore, the middleware has the characteristics of easy use and expandability, and can be automatically upgraded on line after the new version is released.
Step S111: and the middleware server side stores the express delivery data to the server. Specifically, step S111 may include: the middleware server side decrypts the encrypted express delivery data by using the public key of the first gun; and if the decryption is successful, storing the express delivery data to the server. Therefore, the safe transmission of express data between the middleware bargun end and the middleware server end is ensured through private key encryption and public key decryption.
In some optional embodiments, the method may further comprise: and the middleware server performs log recording on the data sent by the middleware bargun terminal.
The method and the system have the advantages that the unique identification and the public key of all legal bargun devices are stored at the middleware server, when the bargun is used for uploading data, whether the bargun devices are legal or not is verified by comparing the identification to be verified and the unique identification which are generated in real time, the data safety transmission between the middleware bargun terminal and the middleware server terminal is guaranteed through private key encryption and public key decryption, data interaction is not directly conducted between the bargun and the server, but conducted through calling the middleware, the functions of legal authentication of the bargun devices and safe transmission of express data are provided, express data and illegal benefits are uploaded by an unauthorized bargun device through an alliance supplier network in a supply chain are avoided, a safe and effective data environment is provided for an express company data warehouse, the middleware is used as a bargun device and a bottom layer integration technology of data transmission, and the data transmission of a large client is guaranteed, And the network company and the express company have good cooperative relationship.
Referring to fig. 3, an embodiment of the present application further provides an express delivery data transmission method based on a middleware, where the method includes steps S201 to S203.
Step S201: and (5) carrying out gun registration at the gun end of the middleware. The middleware bargun end generates the unique identification of the bargun, the private key and the public key pair of the bargun, sends the unique identification of the bargun to the middleware server end for registration, and sends the public key of the bargun to the middleware server end for storage.
Step S202: and the middleware bargun end performs validity verification on the bargun uploading the data. Specifically, the middleware bargun end generates an identifier to be verified in real time, the identifier is encrypted by using a private key and then is sent to the middleware server end, the middleware server end decrypts by using a public key, if decryption is successful, whether a unique identifier consistent with the identifier to be verified exists is detected, and if yes, the middleware bargun end is prompted that the bargun is legal equipment.
Step S203: for the gun equipment passing the validity verification, long connection is established through the middleware gun end and the middleware server end, and express data are uploaded to the server from the gun. The middleware bargun end can send express data to the middleware server end by using a WebSocket technical protocol.
Referring to fig. 4, an embodiment of the present application further provides an express delivery data transmission method based on a middleware, where the method includes steps S301 to S306.
Step S301: and the intermediate part bargun end reads the equipment code, the MAC address and the CPU serial number of the bargun in real time.
Step S302: and the middleware bargun end generates a dynamic random number according to the read equipment code, the MAC address and the CPU serial number.
Step S303: and the middleware bargun end generates a dynamic signature, namely the to-be-verified identification of the bargun, according to the random number.
Step S304: and the middleware bargun end encrypts the uploaded data (the identifier to be verified at this time).
Step S305: and uploading the encrypted data at the gun end of the middleware.
Step S306: the middleware server side verifies whether unique identification consistent with the identification to be verified exists in the stored unique identifications of all legal barguns; if the bus gun exists, the fact that the bus gun is legal at the bus gun end of the middleware is prompted, and subsequent data uploading can be conducted. When uploading, the middleware bargun end encrypts express data, and the middleware server end decrypts and stores the express data.
Referring to fig. 5, an embodiment of the present application further provides an express delivery data transmission method for a middle part gun end, where the method includes steps S401 to S415.
Step S401: the user clicks on the middleware bargun endpoint to log in.
Step S402: the middleware bargun side is initialized.
Step S403: the middleware bargun end detects whether the bargun is registered or not, namely detects whether the to-be-verified identifier is generated in real time or not, if so, the step S406 is executed, otherwise, the step S404 is executed.
Step S404: the middle part bargun end starts to register, namely, the to-be-verified identifier is generated in real time, and step S405 is executed.
Step S405: the middle part bargun end detects whether the registration is successful, and if the registration is successful, the step S406 is executed.
Step S406: the middle-ware bargun end starts to log in, i.e. performs validity verification, and step S407 is executed.
Step S407: the middle part bargun end detects whether the login is successful, and if the login is successful, the step S408 is executed.
Step S408: and the gun end of the middleware starts to detect and upgrade.
Step S409: the gun end of the middleware detects whether upgrading is needed, if so, step S410 is executed, otherwise, step S412 is executed.
Step S410: the middleware bargun end starts upgrading, and step S411 is executed.
Step S411: and the upgrading of the gun end of the middleware is successful, and the step S402 is executed.
Step S412: the middleware bargun login is completed, and step S413 is executed.
Step S413: and uploading data by the gun end of the middleware.
Step S414: the middle-ware bargun end detects whether uploading is successful, and if uploading is successful, step S415 is executed.
Step S415: and (6) ending.
Referring to fig. 6, the present embodiment also provides a middleware, which includes a middleware bargun end 101 installed on each bargun and a middleware server end 102 installed on a server.
The middleware bargun terminal 101 is configured to generate a unique identifier of each bargun and send the unique identifier to the middleware server terminal 102, and generate a private key and a public key of each bargun and send the public key of each bargun to the middleware server terminal 102; receiving a data uploading request sent by a first rifle, generating an identifier to be verified of the first rifle in real time, encrypting the identifier to be verified by using a private key of the first rifle, and sending the encrypted identifier to be verified to the middleware server 102.
The middleware server 102 is configured to decrypt the encrypted to-be-verified identifier by using the public key of the first rifle; if the decryption is successful, detecting whether a unique identifier consistent with the identifier to be verified exists in all the unique identifiers; if the first bargun is legal, the middle part bargun end 101 is prompted.
The middleware bargun terminal 101 is further configured to receive express delivery data sent by the first bargun and send the express delivery data to the middleware server terminal 102.
The middleware server 102 is further configured to save the courier data to the server.
In some optional embodiments, the middleware bargun end 101 may be further configured to read the device code, the MAC address, and the CPU serial number of each bargun, respectively, generate a unique identifier of each bargun according to the read device code, MAC address, and CPU serial number of each bargun, respectively, and send the unique identifier to the middleware server end 102; the middleware bargun end 101 may be further configured to read the device code, the MAC address, the IP address, and the timestamp of each bargun, generate the private key and the public key of each bargun according to the read device code, MAC address, IP address, and timestamp of each bargun, and send the public key of each bargun to the middleware server end 102; the middleware bargun end 101 may also be configured to read the device code, the MAC address, and the CPU serial number of the first bargun, and generate the to-be-verified identifier of the first bargun in real time according to the read device code, MAC address, and CPU serial number of the first bargun.
In some optional embodiments, the middleware server 102 may be further configured to mark the encrypted to-be-verified identifier as abnormal data if the decryption is unsuccessful, and prompt the middleware bargun 101 that the first bargun is illegal.
In some optional embodiments, the middleware server 102 may be further configured to mark the to-be-verified identifier as abnormal class data if the to-be-verified identifier does not exist, and prompt the middleware bargun 101 that the first bargun is illegal.
In some optional embodiments, the middleware bargun terminal 101 may be further configured to receive express delivery data sent by the first bargun, encrypt the express delivery data using a private key of the first bargun, and send the encrypted express delivery data to the middleware server terminal 102; the middleware server 102 is further configured to decrypt the encrypted express delivery data by using the public key of the first rifle; and if the decryption is successful, storing the express delivery data to the server.
In some optional embodiments, the middleware bargun 101 may be further configured to establish a long connection between the middleware bargun 101 and the middleware server 102, and send the encrypted express delivery data to the middleware server 102 through the long connection. When the first rifle is verified to be legal, long connection can be established for subsequent express delivery data transmission, and the data transmission efficiency is improved.
In some optional embodiments, the middleware bargun end 101 or the middleware server end 102 may be further configured to perform heartbeat detection with a time interval T on a long connection between the middleware bargun end 101 and the middleware server end 102, and disconnect the long connection between the middleware bargun end 101 and the middleware server end 102 if a heartbeat packet is not received by a packet receiving party of the middleware bargun end 101 and the middleware server end 102 within the time interval T. Where T is, for example, 2 minutes, 3 minutes or 10 minutes. Therefore, heartbeat detection is carried out on the long connection, if the heartbeat packet is not received within overtime, the connection is disconnected, legal verification needs to be carried out again when the bargun is used for data uploading, and the phenomenon that the bargun is forged to upload data is prevented.
In some optional embodiments, the middleware bargun 101 is further configured to send the express delivery data to the middleware server 102 using a WebSocket technology protocol. According to the requirements of safety and communication performance, a WebSocket technical protocol is adopted to carry out data information interaction between the two parties, the WebSocket is bidirectional, a full-duplex protocol is used in a scene of communication between the middleware bargun end 101 and the middleware server end 102, the connection between the middleware bargun end 101 and the middleware server end 102 is kept in an active state until the connection is terminated by any party (the middleware bargun end 101 or the middleware server end 102), and after the connection is closed by any party of the middleware bargun end 101 and the middleware server end 102, the connection is terminated from the two ends.
Referring to fig. 7, an embodiment of the present application further provides an electronic device 200, where the electronic device 200 includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.
The memory 210 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)211 and/or cache memory 212, and may further include Read Only Memory (ROM) 213.
The memory 210 further stores a computer program, and the computer program can be executed by the processor 220, so that the processor 220 executes the steps of the middleware-based express delivery data transmission method in the embodiment of the present application (as shown in fig. 1). Memory 210 may also include a program/utility 214 having a set (at least one) of program modules 215, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Accordingly, processor 220 may execute the computer programs described above, as well as may execute programs/utilities 214.
Bus 230 may be a local bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or any other type of bus structure.
The electronic device 200 may also communicate with one or more external devices 240, such as a keyboard, pointing device, Bluetooth device, etc., and may also communicate with one or more devices capable of interacting with the electronic device 200, and/or with any devices (e.g., routers, modems, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
An embodiment of the present application further provides a computer-readable storage medium, which is used for storing a computer program, and when the computer program is executed, the steps of the middleware-based express delivery data transmission method in the embodiment of the present application are implemented (as shown in fig. 1). Fig. 8 shows a program product 300 provided by the present embodiment for implementing the method, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product 300 of the present invention is not so limited, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Program product 300 may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The foregoing description and drawings are only for purposes of illustrating the preferred embodiments of the present application and are not intended to limit the present application, which is, therefore, to the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present application.

Claims (10)

1. A method for express delivery data transmission based on middleware, wherein the middleware comprises a middleware bargun end installed on each bargun and a middleware server end installed on a server, and the method comprises the following steps:
the middleware bargun end respectively generates a unique identifier of each bargun and sends the unique identifier to the middleware server end, and respectively generates a private key and a public key of each bargun and sends the public key of each bargun to the middleware server end; receiving a data uploading request sent by a first gun, generating an identifier to be verified of the first gun in real time, encrypting the identifier to be verified by using a private key of the first gun, and sending the encrypted identifier to be verified to the middleware server;
the middleware server side decrypts the encrypted identification to be verified by using the public key of the first rifle; if the decryption is successful, detecting whether a unique identifier consistent with the identifier to be verified exists in all the unique identifiers; if the first bus gun at the bus gun end of the middleware is legal, prompting that the first bus gun at the bus gun end of the middleware is legal;
the middleware bargun end receives express delivery data sent by the first bargun and sends the express delivery data to the middleware server end;
and the middleware server side stores the express delivery data to the server.
2. The express delivery data transmission method based on the middleware of claim 1, wherein the middleware bargun terminal respectively generates the unique identifier of each bargun and sends the unique identifier to the middleware server terminal, and respectively generates the private key and the public key of each bargun and sends the public key of each bargun to the middleware server terminal, and the method comprises the following steps:
the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of each bargun respectively, and generates a unique identifier of each bargun according to the read equipment code, the MAC address and the CPU serial number of each bargun and sends the unique identifier to the middleware server end;
the middleware bargun end reads the equipment code, the MAC address, the IP address and the timestamp of each bargun respectively, and generates the private key and the public key of each bargun respectively according to the read equipment code, the MAC address, the IP address and the timestamp of each bargun and sends the public key of each bargun to the middleware server end;
the real-time generation of the to-be-verified identifier of the first rifle comprises:
and the middleware bargun end reads the equipment code, the MAC address and the CPU serial number of the first bargun, and generates the identification to be verified of the first bargun in real time according to the read equipment code, the MAC address and the CPU serial number of the first bargun.
3. The express delivery data transmission method based on the middleware of claim 1, wherein the middleware bargun end receives express delivery data sent by the first bargun and sends the express delivery data to the middleware server end, and the method comprises the following steps:
the middleware bargun end receives express data sent by the first bargun, encrypts the express data by using a private key of the first bargun, and sends the encrypted express data to the middleware server end;
the middleware server side stores the express delivery data to the server, and the method comprises the following steps:
the middleware server side decrypts the encrypted express delivery data by using the public key of the first gun; and if the decryption is successful, storing the express delivery data to the server.
4. The middleware-based courier data transmission method of claim 1, further comprising:
if the decryption is unsuccessful, the middleware server end marks the encrypted to-be-verified identifier as abnormal data and prompts the middleware bargun end that the first bargun is illegal.
5. The middleware-based courier data transmission method of claim 1, further comprising:
if the identification to be verified does not exist, the middleware server end marks the identification to be verified as abnormal data, and prompts that the first gun is illegal at the middleware gun end.
6. The express delivery data transmission method based on the middleware of claim 1, wherein the middleware bargun end receives express delivery data sent by the first bargun and sends the express delivery data to the middleware server end, and the method comprises the following steps:
the middleware bargun end detects whether upgrading is needed, if upgrading is needed, the upgrading is carried out, and if upgrading is not needed, express delivery data sent by the first bargun are received and sent to the middleware server end.
7. Middleware characterized in that the middleware comprises a middleware bargun end mounted on each bargun and a middleware server end mounted on a server;
the middleware bargun end is configured to generate a unique identifier of each bargun and send the unique identifier to the middleware server end, and generate a private key and a public key of each bargun and send the public key of each bargun to the middleware server end; receiving a data uploading request sent by a first gun, generating an identifier to be verified of the first gun in real time, encrypting the identifier to be verified by using a private key of the first gun, and sending the encrypted identifier to be verified to the middleware server;
the middleware server side is configured to decrypt the encrypted to-be-verified identifier by using the public key of the first rifle; if the decryption is successful, detecting whether a unique identifier consistent with the identifier to be verified exists in all the unique identifiers; if the first bus gun at the bus gun end of the middleware is legal, prompting that the first bus gun at the bus gun end of the middleware is legal;
the middleware bargun end is further configured to receive express delivery data sent by the first bargun and send the express delivery data to the middleware server end;
the middleware server is further configured to store the express delivery data to the server.
8. The middleware of claim 7, wherein the middleware bargun end is further configured to receive express delivery data sent by the first bargun, encrypt the express delivery data by using a private key of the first bargun, and send the encrypted express delivery data to the middleware server end;
the middleware server side is further configured to decrypt the encrypted express delivery data by using the public key of the first gun; and if the decryption is successful, storing the express delivery data to the server.
9. The middleware of claim 8 wherein the middleware bargun end is further configured to establish a long connection between the middleware bargun end and the middleware server end, and send the encrypted express delivery data to the middleware server end over the long connection.
10. The middleware of claim 9, wherein the middleware bargun end or the middleware server end is further configured to perform heartbeat detection for a long connection between the middleware bargun end and the middleware server end with a time interval T, and disconnect the long connection between the middleware bargun end and the middleware server end if a heartbeat packet is not received by a receiving party of the middleware bargun end and the middleware server end within the time interval T.
CN202011258980.7A 2020-11-12 2020-11-12 Express data transmission method based on middleware and middleware Active CN112468544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011258980.7A CN112468544B (en) 2020-11-12 2020-11-12 Express data transmission method based on middleware and middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011258980.7A CN112468544B (en) 2020-11-12 2020-11-12 Express data transmission method based on middleware and middleware

Publications (2)

Publication Number Publication Date
CN112468544A true CN112468544A (en) 2021-03-09
CN112468544B CN112468544B (en) 2024-02-27

Family

ID=74825059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011258980.7A Active CN112468544B (en) 2020-11-12 2020-11-12 Express data transmission method based on middleware and middleware

Country Status (1)

Country Link
CN (1) CN112468544B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070074027A1 (en) * 2005-09-26 2007-03-29 Tien-Chun Tung Methods of verifying, signing, encrypting, and decrypting data and file
CN103023876A (en) * 2012-11-22 2013-04-03 中国科学院声学研究所 Network terminal, security certification and registration activation methods thereof and server
CN104735065A (en) * 2015-03-16 2015-06-24 联想(北京)有限公司 Data processing method, electronic device and server
CN108989325A (en) * 2018-08-03 2018-12-11 华数传媒网络有限公司 Encryption communication method, apparatus and system
CN111181723A (en) * 2019-09-09 2020-05-19 腾讯科技(深圳)有限公司 Method and device for offline security authentication between Internet of things devices
CN111614619A (en) * 2020-04-17 2020-09-01 深圳市芯链科技有限公司 Block chain code scanning input method, code scanning gun and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070074027A1 (en) * 2005-09-26 2007-03-29 Tien-Chun Tung Methods of verifying, signing, encrypting, and decrypting data and file
CN103023876A (en) * 2012-11-22 2013-04-03 中国科学院声学研究所 Network terminal, security certification and registration activation methods thereof and server
CN104735065A (en) * 2015-03-16 2015-06-24 联想(北京)有限公司 Data processing method, electronic device and server
CN108989325A (en) * 2018-08-03 2018-12-11 华数传媒网络有限公司 Encryption communication method, apparatus and system
CN111181723A (en) * 2019-09-09 2020-05-19 腾讯科技(深圳)有限公司 Method and device for offline security authentication between Internet of things devices
CN111614619A (en) * 2020-04-17 2020-09-01 深圳市芯链科技有限公司 Block chain code scanning input method, code scanning gun and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汪礼臻;张龙军;: "适合物联网环境的混合双向匿名认证协议", 计算机应用研究, no. 01 *

Also Published As

Publication number Publication date
CN112468544B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
US11258792B2 (en) Method, device, system for authenticating an accessing terminal by server, server and computer readable storage medium
JP6009083B2 (en) Method for providing secure app ecosystem with key and data exchange according to corporate information management policy, non-transitory computer readable medium, and mobile computing device
JP4668619B2 (en) Device key
US8874922B2 (en) Systems and methods for multi-layered authentication/verification of trusted platform updates
US8612773B2 (en) Method and system for software installation
CN110519309B (en) Data transmission method, device, terminal, server and storage medium
CN103095457B (en) A kind of login of application program, verification method
US8495383B2 (en) Method for the secure storing of program state data in an electronic device
CN112039826B (en) Login method and device applied to applet end, electronic equipment and readable medium
CN106936588B (en) Hosting method, device and system of hardware control lock
CN101682628A (en) Secure communications
CN101258505A (en) Secure software updates
CN102857408A (en) Stateless application notifier
CN111131416A (en) Business service providing method and device, storage medium and electronic device
CN111614686B (en) Key management method, controller and system
CN113553572A (en) Resource information acquisition method and device, computer equipment and storage medium
US20110154436A1 (en) Provider Management Methods and Systems for a Portable Device Running Android Platform
CN104463584A (en) Method for achieving mobile terminal App safety payment
JP7079528B2 (en) Service provision system and service provision method
CN101645893A (en) Network trading method, device and system
KR101711024B1 (en) Method for accessing temper-proof device and apparatus enabling of the method
CN112468544B (en) Express data transmission method based on middleware and middleware
WO2016009497A1 (en) Data falsification detection device, network service providing device, data falsification detection method, network service providing method, and program
US8499333B2 (en) Secure device feature unlock mechanism third party development
CN112131597A (en) Method and device for generating encrypted information and intelligent equipment

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