CN112351070A - File transmission method and device, storage medium and electronic equipment - Google Patents

File transmission method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112351070A
CN112351070A CN202011070127.2A CN202011070127A CN112351070A CN 112351070 A CN112351070 A CN 112351070A CN 202011070127 A CN202011070127 A CN 202011070127A CN 112351070 A CN112351070 A CN 112351070A
Authority
CN
China
Prior art keywords
internet
things
server
socket connection
message
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.)
Withdrawn
Application number
CN202011070127.2A
Other languages
Chinese (zh)
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.)
Shenzhen Kuyuan Digital Technology Co ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN202011070127.2A priority Critical patent/CN112351070A/en
Publication of CN112351070A publication Critical patent/CN112351070A/en
Withdrawn legal-status Critical Current

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/14Session management
    • H04L67/141Setup of application sessions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application discloses a file transmission method, a file transmission device, a storage medium and electronic equipment, and belongs to the technical field of communication. The file transmission method comprises the following steps: the method comprises the steps that the Internet of things equipment receives a firmware upgrading message sent by an Internet of things server, analyzes the firmware upgrading message to obtain first software version information, creates a socket connection between the Internet of things server and the Internet of things server when judging that an upgrading condition is met based on current software version information and the first software version information, downloads an upgrading packet of the first software version information from the Internet of things server based on the socket connection, and reports downloading progress information of the upgrading packet to the Internet of things server. Therefore, the Internet of things equipment can effectively improve the transmission efficiency and ensure the reliability of file transmission by establishing Socket connection with the Internet of things server.

Description

File transmission method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of communication, in particular to a file transmission method, a file transmission device, a storage medium and electronic equipment.
Background
Over-The-Air (FOTA) software upgrade of a mobile terminal refers to a device with a networking function, such as: the mobile phone, the tablet personal computer, the portable media player, the mobile internet and other devices provide firmware upgrading services, a user obtains an intelligent terminal system upgrading package in an on-demand and easily-extensible mode through a network, cloud upgrading is carried out through the FOTA, and system repair and optimization are completed. The FOTA can effectively and reliably upgrade the equipment of the user in an over-the-air downloading mode. In this way, device manufacturers can more quickly launch devices with new functionality into the market and thereby increase user satisfaction with their devices. In the prior art, when an internet of things device supporting a Message Queue Telemetry Transport (MQTT) performs firmware upgrade or log transmission by using an MQTT protocol, the MQTT protocol is designed for communication between a remote sensor and a control device working at a low bandwidth and unreliable network, and the file size and reliability requirements for firmware download and log transmission are high, which may cause transmission failure.
Disclosure of Invention
The embodiment of the application provides a file transmission method and device, a storage medium and electronic equipment, and the transmission efficiency can be improved and the reliability of file transmission can be ensured by establishing Socket connection. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a file transmission method, including:
receiving a firmware upgrading message sent by an Internet of things server; the firmware upgrading message carries first software version information;
analyzing the firmware upgrading message to obtain the first software version information;
when judging that the upgrading condition is met based on the current software version information and the first software version information, establishing socket connection with the Internet of things server;
downloading an upgrade package of the first software version information from the Internet of things server based on the socket connection, and reporting download progress information of the upgrade package to the Internet of things server.
In a second aspect, an embodiment of the present application provides a file transmission method, including:
sending a firmware upgrading message to the Internet of things equipment;
receiving a Socket connection request from the Internet of things equipment;
establishing Socket connection based on the Socket connection request;
sending an upgrade package to the Internet of things equipment based on the Socket connection, and receiving download progress information of the upgrade package reported by the Internet of things equipment.
In a third aspect, an embodiment of the present application provides a file transfer apparatus, where the apparatus includes:
the receiving module is used for receiving a firmware upgrading message sent by the Internet of things server; the firmware upgrading message carries first software version information;
the analysis module is used for analyzing the firmware upgrading message to obtain the first software version information;
the connection module is used for establishing socket connection with the Internet of things server when judging that the upgrade condition is met based on the current software version information and the first software version information;
and the downloading module is used for downloading the upgrading packet of the first software version information from the Internet of things server based on the socket connection and reporting the downloading progress information of the upgrading packet to the Internet of things server.
In a fourth aspect, an embodiment of the present application provides a file transfer apparatus, where the apparatus includes:
the sending module is used for sending the firmware upgrading message to the Internet of things equipment;
the receiving module is used for receiving a Socket connection request from the Internet of things equipment;
the connection module is used for establishing Socket connection based on the Socket connection request;
and the transmission module is used for sending an upgrade package to the Internet of things equipment based on the Socket connection and receiving the downloading progress information of the upgrade package reported by the Internet of things equipment.
In a fifth aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a sixth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
when the file transmission method, the file transmission device, the storage medium and the electronic equipment work, the Internet of things equipment receives a firmware upgrading message sent by an Internet of things server, analyzes the firmware upgrading message to obtain first software version information, establishes socket connection with the Internet of things server when judging that an upgrading condition is met based on current software version information and the first software version information, downloads an upgrading packet of the first software version information from the Internet of things server based on the socket connection, and reports downloading progress information of the upgrading packet to the Internet of things server. The method comprises the steps that an Internet of things server sends a firmware upgrading message to Internet of things equipment, receives a Socket connection request from the Internet of things equipment, establishes Socket connection based on the Socket connection request, sends an upgrading packet to the Internet of things equipment based on the Socket connection, and receives downloading progress information of the upgrading packet reported by the Internet of things equipment. The Internet of things equipment is connected with the Internet of things server through Socket, so that the transmission efficiency can be effectively improved, and the reliability of file transmission is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a communication system architecture provided in an embodiment of the present application;
fig. 2 is a first flowchart of a file transfer method according to an embodiment of the present application;
fig. 3 is a second flowchart of a file transfer method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a document transmission device according to an embodiment of the present application;
fig. 5 is a third flow chart of a file transmission method according to an embodiment of the present application;
fig. 6 is another schematic structural diagram of a reporting apparatus for log files according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following description refers to the accompanying drawings in which like numerals refer to the same or similar elements throughout the different views, unless otherwise specified. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The embodiment of the present application can be applied to a wireless communication system, and it should be noted that the wireless communication system mentioned in the embodiment of the present application includes, but is not limited to, a fourth generation Mobile communication (4G) Mobile communication system and an Enhanced Mobile broadband (eMBB) of a next generation Mobile communication system, a URLLC (Massive Machine-Type Communications, mtc).
Fig. 1 is a schematic diagram of a communication system architecture provided in the present application.
Referring to fig. 1, a communication system 01 includes a network device 101, an Internet of Things (IOT) server 103, and an Internet of Things (IOT) device 102; when the communication system 01 includes a core network, the network device 101 may also be connected to the core network. The network device 101 may also communicate with an Internet Protocol (IP) network 200, such as the Internet (Internet), a private IP network, or other data network. The network equipment provides services for the terminal equipment within the coverage area.
The network device 101 may be a device for communicating with a terminal device. The network device may be a relay station, an access point, a vehicle-mounted device, etc. In a terminal-to-terminal (D2D) communication system, the network Device may also be a terminal Device that functions as a base station. The terminal devices may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication capability, as well as various forms of User Equipment (UE), Mobile Stations (MS), and the like.
The internet of things device 102 includes, but is not limited to, a Mobile Station (MS), a Mobile Terminal device (Mobile Terminal), a Mobile phone (Mobile phone), a handset (handset), a portable device (portable equipment), and the like, and the internet of things device may communicate with one or more core networks via a Radio Access Network (RAN), for example, the internet of things device may be a Mobile phone (or referred to as a "cellular" phone), a computer with a wireless communication function, and the Terminal device may also be a portable, pocket, hand-held, computer-embedded, or vehicle-mounted Mobile device or device. The internet of things device 102 is an application or device using MQTT protocol and Socket protocol, and may establish a network connection to a server, where the network connection may be: publishing information that other clients may subscribe to; subscribing the messages published by other clients; unsubscribe or delete messages for the application; the connection with the server is disconnected.
The internet of things server 103 is also called a cloud platform, and refers to a device that provides computing, networking, and storage capabilities based on services of hardware resources and software resources. The internet of things servers can be divided into 3 types: the cloud computing platform comprises a storage server taking data storage as a main part, a computing server taking data processing as a main part and a comprehensive cloud computing server platform taking computing and data storage processing into consideration. The internet of things server is an application program or device which can use an MQTT protocol and a Socket protocol, and can establish a network connection to the server, and the internet of things server can: publishing information that other clients may subscribe to; subscribing the messages published by other clients; unsubscribe or delete messages for the application; the connection with the server is disconnected.
In the following method embodiments, for convenience of description, only the execution subject of each step is described as the internet of things device.
The following describes in detail a file transfer method provided in an embodiment of the present application with reference to fig. 2 to 3.
Referring to fig. 2, a flowchart of a file transfer method is provided in an embodiment of the present application. The method may comprise the steps of:
s201, receiving a firmware upgrading message sent by an Internet of things server; and the firmware upgrading message carries first software version information.
Generally, a firmware upgrade message refers to a message sent by an internet of things server to indicate program upgrade of an internet of things device, where the firmware upgrade message carries first software version information, first software upgrade packet data volume, and the like, for example: the firmware upgrading message is the message of 50M of upgrading packet data volume of the Internet of things equipment display module V3.0 version. The method comprises the steps that a Transmission Control Protocol (TCP) connection is established between the Internet of things equipment and a message queue telemetry transmission protocol (MQTT) server, a login request is sent to the MQTT server based on the TCP connection, wherein the login request is used for logging in the MQTT server, and after the MQTT server is successfully logged in, the firmware upgrading message sent by the Internet of things equipment through the MQTT server is received.
S202, analyzing the firmware upgrading message to obtain the first software version information.
Generally, the first software version information refers to version information of software that needs to be upgraded. The internet of things device receives the firmware upgrade message, and analyzes the firmware upgrade message to obtain the first software version information, for example: and determining that the first software version information of the upgrade package of the data operation program software is V4.1 for the firmware upgrade message.
S203, when judging that the upgrading condition is met based on the current software version information and the first software version information, establishing socket connection with the Internet of things server.
Generally, after the internet of things device analyzes the firmware upgrading message to obtain the first software version information, the current software version information of the software in the internet of things device needs to be detected, the current software version information and the first software version information are compared, and if the current software version information and the first software version information are the same, it is determined that an upgrading package does not need to be downloaded for upgrading; if not, determining that the upgrade package needs to be downloaded, for example: and obtaining first software version information as V2019, detecting that the current software version information of the corresponding software is V2018, and determining that the upgrade package needs to be downloaded. The method comprises the steps that an Internet of things device establishes a terminal node EndPoint object based on a port of the Internet of things device and an Internet Protocol (IP) of an Internet of things server, establishes a Socket object, sends a connection request to the Internet of things server based on the EndPoint object through the Socket object, receives a response message returned by the Internet of things server based on the connection request, analyzes the response message, and determines to establish Socket connection with the Internet of things server.
S204, downloading the upgrade package of the first software version information from the Internet of things server based on the socket connection, and reporting the downloading progress information of the upgrade package to the Internet of things server.
Generally, the internet of things device analyzes the firmware upgrade message to determine a data volume of the upgrade package, receives a data packet from the internet of things server based on the Socket connection, counts the data packet to determine a current download volume, determines the download progress information based on the current download volume and the data volume, and sends the download progress information to the internet of things device through the MQTT server, for example: analyzing the firmware upgrading message to determine that the upgrading packet data volume is 50M, and if all the received data messages are counted to be 20M, the current downloading progress is 40%; if all the received data messages are counted to be 40M, the current downloading progress is 80%.
In one embodiment, when receiving a log collection message sent by an internet of things server, internet of things equipment determines the data volume of a log file, uploads the log file in a memory to the internet of things server based on Socket connection when the data volume is larger than a data volume threshold value, reports upload progress information to the internet of things server, and clears the memory after the log file is successfully uploaded. Because the data volume of the log file is possibly overlarge, the MQTT protocol is a protocol designed for communication between the remote sensor and the control equipment which work in low bandwidth and are unreliable networks, if the log file is uploaded by using MQTT connection, abnormality may occur, so that the Internet of things equipment cannot timely send the log file to the Internet of things server for abnormality analysis, and the technical problem can be solved by transmitting the Internet of things equipment based on Socket connection.
According to the content, receiving a firmware upgrading message sent by an Internet of things server; the method comprises the steps of acquiring firmware upgrading information, analyzing the firmware upgrading information to obtain the first software version information, establishing socket connection between the firmware upgrading information and an Internet of things server when judging that upgrading conditions are met based on the current software version information and the first software version information, downloading an upgrading packet of the first software version information from the Internet of things server based on the socket connection, and reporting downloading progress information of the upgrading packet to the Internet of things server. The Internet of things equipment is connected with the Internet of things server through Socket, so that the transmission efficiency can be effectively improved, and the reliability of file transmission is ensured.
Referring to fig. 3, a second flow chart of a file transfer method is provided in the present application. The file transmission method can comprise the following steps:
s301, establishing a Transmission Control Protocol (TCP) connection with a message queue telemetry transmission protocol (MQTT) server.
In general, a TCP connection is a transport protocol connection specifically designed to provide a reliable end-to-end byte stream over an unreliable internet network, and TCP is a transport layer protocol in the internet that uses a three-way handshake protocol to establish a connection. After sending a synchronization Sequence number (SYN) connection request to an MQTT server, the internet of things device waits for the other party to answer SYN and an Acknowledgement Character (ACK), and finally performs ACK acknowledgement for the SYN of the other party. This method of establishing a connection prevents the generation of a false connection, and the flow control protocol used by TCP is a sliding window protocol of variable size.
S302, sending a login request to the MQTT server based on the TCP connection.
Generally, after the internet of things device is connected with the MQTT server, a Request is sent to the MQTT server, and if a Response of the MQTT server cannot be received within a period of time, the socket is closed, and a session control session connection is reestablished. After the internet of things equipment determines to establish connection, a login request is sent to the MQTT server, the login request is used for logging in the MQTT server, and the login request contains login information, such as: account admin, password 123456, and the like.
And S303, after the MQTT server is successfully logged in, receiving the firmware upgrading message sent by the Internet of things equipment through the MQTT server.
Generally, after receiving a login request from an internet of things device, an MQTT server performs identity identification and verification and then returns a verification result message, and the internet of things device receives the verification result message and performs analysis to determine a verification result, for example: if the verification condition is met, determining a successful login result; if the authentication condition is not met, determining a failed login result. If the MQTT server is determined to be successfully logged in, the Internet of things equipment sends the firmware upgrading message to the Internet of things server through the MQTT server, for example: communication module software V2 version 20M, display module software V3 version 13.6M, etc.
S304, analyzing the firmware upgrading message to obtain the first software version information.
Generally, the firmware upgrading message includes information such as a software name to be upgraded, a latest version number, and an upgrading packet size, and the internet of things device analyzes the firmware upgrading message to obtain the first software version information.
S305, judging whether the upgrading condition is met or not based on the current software version information and the first software version information.
Generally, after the internet of things device analyzes the firmware upgrade message to obtain the first software version information, it is necessary to detect the current software version information of the corresponding software, and compare the current software version information with the first software version information to judge whether the upgrade condition is met, for example: and for the display module software, obtaining that the first software version information is V5 of the fifth version, and determining that the Internet of things equipment meets the upgrading condition if the current software version information is V4.
And S306, reporting a detection result message to the Internet of things server.
Generally, after the internet of things device judges whether an upgrade condition is met, if the upgrade condition is not met, a detection result message is reported to the internet of things server, wherein the detection result message contains information such as current software tea selling and version number.
S307, establishing a terminal node EndPoint object based on the port of the Internet of things equipment and the Internet protocol IP of the Internet of things server.
Generally, an EndPoint object is mainly used to expose some information running inside a program framework, and usually obtains related information through a request address of the program framework, for example: health examination information, and the like. The internet of things equipment firstly determines a self port and an internet of things server IP address, for example: the port is 2000 and the IP address is 127.0.0.1.
S308, sending a connection request to the Internet of things server through the Socket object based on the EndPoint object.
Generally, after an internet of things device establishes an EndPoint object, a connection request is sent to the internet of things server through the Socket object based on the EndPoint object, the connection request is used for connecting the internet of things server, and the connection request includes connection information, for example: the account admin, the password 123456, the Internet of things device IP and other information.
S309, receiving a response message returned by the Internet of things server based on the connection request.
Generally, after sending a connection request to an internet of things server, an internet of things device receives a response message returned by the internet of things server based on the connection request, where the response message includes a result of the connection request.
S310, analyzing the response message to determine that Socket connection is established with the Internet of things server.
Generally, after receiving a response message, the internet of things device needs to parse the response message, for example: and if the connection is determined to be agreed, a Socket connection is successfully established with the Internet of things server, and then a Send () method of a Socket object can be used for sending information to the Internet of things server.
S311, analyzing the firmware upgrading message to determine the data volume of the upgrading packet, and receiving the data message from the Internet of things server based on the Socket connection.
Generally, the internet of things device parses the firmware upgrade message to determine the data size of the upgrade package, for example: and the data volume of the upgrade package is determined to be 35M through analysis. The Internet of things equipment receives the data message from the Internet of things server, the data message comprises a fixed head, a variable head and a message body, and the Internet of things equipment can record the data volume of each data message.
S312, counting the data message to determine the current downloading amount, and determining the downloading progress information based on the current downloading amount and the data amount.
Generally, the internet of things device counts the data packet to determine a current download amount, and determines the download progress information based on the current download amount and the data amount, for example: and determining that the data volume of the upgrade package is 40M, the data volume of the first 10 data messages is 10M, determining that the downloading progress is 25%, and if the data volume of the first 30 data messages is 30M, determining that the downloading progress is 75%.
S313, the downloading progress information is sent to the Internet of things equipment through the MQTT server.
Generally, the internet of things device can send the downloading progress information to the internet of things device through the MQTT server.
When the scheme of the embodiment of the application is executed, a Transmission Control Protocol (TCP) connection is established with a message queue telemetry transmission protocol (MQTT) server, a login request is sent to the MQTT server based on the TCP connection, after the MQTT server is successfully logged in, the firmware upgrading message sent by the MQTT server from the Internet of things equipment is received, the firmware upgrading message is analyzed to obtain the first software version information, whether an upgrading condition is met or not is judged based on the current software version information and the first software version information, and if the upgrading condition is not met, a detection result message is reported to the Internet of things server; if the request is met, establishing a terminal node EndPoint object based on a port of the Internet of things equipment and an Internet Interconnection Protocol (IP) of the Internet of things server, sending a connection request to the Internet of things server based on the EndPoint object through a Socket object, receiving a response message returned by the Internet of things server based on the connection request, analyzing the response message to determine to establish Socket connection with the Internet of things server, analyzing the firmware upgrading message to determine the data volume of the upgrading packet, receiving a data message from the Internet of things server based on the Socket connection, counting the data message to determine the current download volume, determining the download progress information based on the current download volume and the data volume, and sending the download progress information to the Internet of things equipment through the MQTT server. The Internet of things equipment is connected with the Internet of things server through Socket, so that the transmission efficiency can be effectively improved, and the reliability of file transmission is ensured.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 4, a schematic structural diagram of a document transmission device according to an exemplary embodiment of the present application is shown, and hereinafter referred to as a transmission device 4. The transmission means 4 may be implemented as all or part of a terminal by software, hardware or a combination of both. The method comprises the following steps:
a receiving module 401, configured to receive a firmware upgrade message sent by an internet of things server; the firmware upgrading message carries first software version information;
an analyzing module 402, configured to analyze the firmware upgrade message to obtain the first software version information;
a connection module 403, configured to create a socket connection with the internet of things server when it is determined that an upgrade condition is met based on the current software version information and the first software version information;
a downloading module 404, configured to download, based on the socket connection, an upgrade package of the first software version information from the internet of things server, and report download progress information of the upgrade package to the internet of things server.
Optionally, the receiving module 401 further includes:
the login unit is used for establishing a Transmission Control Protocol (TCP) connection with a message queue telemetry transmission protocol (MQTT) server; sending a login request to the MQTT server based on the TCP connection; wherein, the login request is used for logging in the MQTT server; and after the MQTT server is successfully logged in, receiving the firmware upgrading message sent by the Internet of things equipment through the MQTT server.
The system comprises an uploading unit, a log file processing unit and a log file processing unit, wherein the uploading unit is used for determining the data volume of a log file when receiving a log collection message sent by an Internet of things server; uploading the log file in a memory to the Internet of things server based on the Socket connection when the data volume is larger than a data volume threshold value; reporting uploading progress information to the Internet of things server; and clearing the memory after the log file is successfully uploaded.
Optionally, the connection module 403 further includes:
the request unit is used for establishing a terminal node EndPoint object based on a port of the Internet of things equipment and an Internet Protocol (IP) of the Internet of things server; establishing a Socket object; sending a connection request to the Internet of things server through the Socket object based on the EndPoint object; receiving a response message returned by the Internet of things server based on the connection request; and analyzing the response message to determine that Socket connection is established with the Internet of things server.
Optionally, the downloading module 404 further includes:
the determining unit is used for analyzing the firmware upgrading message to determine the data volume of the upgrading packet; receiving a data message from the Internet of things server based on the Socket connection; counting the data messages to determine the current downloading amount; determining the downloading progress information based on the current downloading amount and the data amount; and sending the downloading progress information to the Internet of things equipment through the MQTT server.
The embodiment of the present application and the method embodiments of fig. 2 to 3 are based on the same concept, and the technical effects brought by the embodiment are also the same, and the specific process may refer to the description of the method embodiments of fig. 2 to 3, and will not be described again here.
The device 4 may be a field-programmable gate array (FPGA), an application-specific integrated chip, a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit, a Micro Controller Unit (MCU), or a Programmable Logic Device (PLD) or other integrated chips.
When the scheme of the embodiment of the application is executed, a Transmission Control Protocol (TCP) connection is established with a message queue telemetry transmission protocol (MQTT) server, a login request is sent to the MQTT server based on the TCP connection, after the MQTT server is successfully logged in, the firmware upgrading message sent by the MQTT server from the Internet of things equipment is received, the firmware upgrading message is analyzed to obtain the first software version information, whether an upgrading condition is met or not is judged based on the current software version information and the first software version information, and if the upgrading condition is not met, a detection result message is reported to the Internet of things server; if the request is met, establishing a terminal node EndPoint object based on a port of the Internet of things equipment and an Internet Interconnection Protocol (IP) of the Internet of things server, sending a connection request to the Internet of things server based on the EndPoint object through a Socket object, receiving a response message returned by the Internet of things server based on the connection request, analyzing the response message to determine to establish Socket connection with the Internet of things server, analyzing the firmware upgrading message to determine the data volume of the upgrading packet, receiving a data message from the Internet of things server based on the Socket connection, counting the data message to determine the current download volume, determining the download progress information based on the current download volume and the data volume, and sending the download progress information to the Internet of things equipment through the MQTT server. The Internet of things equipment is connected with the Internet of things server through Socket, so that the transmission efficiency can be effectively improved, and the reliability of file transmission is ensured.
In the following method embodiments, for convenience of description, only the execution subject of each step is taken as an internet of things server for description.
The following describes in detail a file transfer method provided in an embodiment of the present application with reference to fig. 5.
Referring to fig. 5, a third flow chart of a file transfer method according to an embodiment of the present application is provided. The method may comprise the steps of:
s501, sending a firmware upgrading message to the Internet of things equipment.
Generally, an internet of things server and an MQTT server establish a Transmission Control Protocol (TCP) connection, and a login request is sent to the MQTT server based on the TCP connection; the login request is used for logging in the MQTT server, and after the MQTT server is successfully logged in, the firmware upgrading message is sent to the Internet of things equipment through the MQTT server.
S502, receiving a Socket connection request from the Internet of things equipment.
Generally, the internet of things server receives a Socket connection request from the internet of things device, and parses the connection request, for example: obtaining information such as a connection account number, a password and the like, judging whether connection conditions are met, and if so, determining to establish Socket connection; and if not, determining that the Socket connection is failed to be established.
S503, establishing Socket connection based on the Socket connection request.
Generally, when the internet of things server determines that the connection request meets the connection condition, the internet of things server accepts the Socket connection request, and creates a new Socket object for communicating with the requested internet of things device by using an Accept () method of the Socket object.
S504, an upgrade package is sent to the Internet of things equipment based on the Socket connection, and downloading progress information of the upgrade package reported by the Internet of things equipment is received.
Generally, an internet of things server packages an upgrade package to obtain a plurality of data messages, wherein each data message carries a number, the data messages are sent to the internet of things device according to the number sequence, and the sending progress can be determined by determining the numbers of the data messages. And the Internet of things server can receive the downloading progress information of the upgrade package reported by the Internet of things equipment through the MQTT server.
According to the content, the internet of things server sends a firmware upgrading message to the internet of things equipment, receives a Socket connection request from the internet of things equipment, establishes Socket connection based on the Socket connection request, sends an upgrading packet to the internet of things equipment based on the Socket connection, and receives downloading progress information of the upgrading packet reported by the internet of things equipment. The Internet of things server establishes Socket connection with the Internet of things equipment, so that transmission efficiency can be effectively improved, and reliability of file transmission is guaranteed.
The following is another apparatus embodiment of the present application that may be used to perform method embodiments of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 6, another schematic structural diagram of a document transportation device according to an exemplary embodiment of the present application is shown, which is hereinafter referred to as a transportation device 6. The transmission means 6 may be implemented as all or part of the terminal by software, hardware or a combination of both. The method comprises the following steps:
a sending module 601, configured to send a firmware upgrade message to an internet of things device;
a receiving module 602, configured to receive a Socket connection request from the internet of things device;
a connection module 603, configured to establish Socket connection based on the Socket connection request;
a transmission module 604, configured to send an upgrade package to the internet of things device based on the Socket connection, and receive download progress information of the upgrade package reported by the internet of things device.
Optionally, the sending module 601 further includes:
the login unit is used for establishing a Transmission Control Protocol (TCP) connection with the MQTT server; sending a login request to the MQTT server based on the TCP connection; wherein, the login request is used for logging in the MQTT server; and after the MQTT server is successfully logged in, the firmware upgrading message is sent to the Internet of things equipment through the MQTT server.
The embodiment of the present application and the embodiment of the method in fig. 5 are based on the same concept, and the technical effects brought by the embodiment are also the same, and the specific process may refer to the description of the embodiment of the method in fig. 5, and will not be described again here.
The device 6 may be a field-programmable gate array (FPGA), an application-specific integrated chip, a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit, a Micro Controller Unit (MCU), or a Programmable Logic Device (PLD) or other integrated chips.
When the scheme of the embodiment of the application is executed, the internet of things server sends a firmware upgrading message to the internet of things device, receives a Socket connection request from the internet of things device, establishes Socket connection based on the Socket connection request, sends an upgrading packet to the internet of things device based on the Socket connection, and receives downloading progress information from the upgrading packet reported by the internet of things device. The Internet of things server establishes Socket connection with the Internet of things equipment, so that transmission efficiency can be effectively improved, and reliability of file transmission is guaranteed.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and performing the above method steps, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 2, fig. 3, or fig. 5, which are not described herein again.
The present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the template control method according to the above embodiments.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 7, the electronic device 7 may include: at least one processor 701, at least one network interface 704, a user interface 703, memory 705, at least one communication bus 702.
Wherein a communication bus 702 is used to enable connective communication between these components.
The user interface 703 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 703 may also include a standard wired interface and a standard wireless interface.
The network interface 704 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 701 may include one or more processing cores, among other things. The processor 701 connects various parts within the overall terminal 700 using various interfaces and lines, and performs various functions of the terminal 700 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 705, as well as calling data stored in the memory 705. Optionally, the processor 701 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 701 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 701, and may be implemented by a single chip.
The Memory 705 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 705 includes a non-transitory computer-readable medium. The memory 705 may be used to store instructions, programs, code sets, or instruction sets. The memory 705 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 705 may optionally be at least one memory device located remotely from the processor 701. As shown in fig. 7, the memory 705, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a file transfer application program.
In the electronic device 700 shown in fig. 7, the user interface 703 is mainly used as an interface for providing input for a user to obtain data input by the user; the processor 701 may be configured to call the file transfer application stored in the memory 705, and specifically perform the following operations:
receiving a firmware upgrading message sent by an Internet of things server; the firmware upgrading message carries first software version information;
analyzing the firmware upgrading message to obtain the first software version information;
when judging that the upgrading condition is met based on the current software version information and the first software version information, establishing socket connection with the Internet of things server;
downloading an upgrade package of the first software version information from the Internet of things server based on the socket connection, and reporting download progress information of the upgrade package to the Internet of things server.
In one embodiment, the processor 701 performs the receiving of the firmware upgrade message sent from the internet of things server, including:
establishing a Transmission Control Protocol (TCP) connection with a message queue telemetry transmission protocol (MQTT) server;
sending a login request to the MQTT server based on the TCP connection; wherein, the login request is used for logging in the MQTT server;
and after the MQTT server is successfully logged in, receiving the firmware upgrading message sent by the Internet of things equipment through the MQTT server.
In one embodiment, the processor 701 performs the creating of the socket connection with the internet of things server, including:
establishing a terminal node EndPoint object based on the port of the Internet of things equipment and an Internet Protocol (IP) of the Internet of things server;
establishing a Socket object;
sending a connection request to the Internet of things server through the Socket object based on the EndPoint object;
receiving a response message returned by the Internet of things server based on the connection request;
and analyzing the response message to determine that Socket connection is established with the Internet of things server.
In one embodiment, the downloading, by the processor 701, the upgrade package of the first software version information from the internet of things server based on the socket connection, and reporting the downloading progress information of the upgrade package to the internet of things server include:
analyzing the firmware upgrading message to determine the data volume of the upgrading packet;
receiving a data message from the Internet of things server based on the Socket connection;
counting the data messages to determine the current downloading amount;
determining the downloading progress information based on the current downloading amount and the data amount;
and sending the downloading progress information to the Internet of things equipment through the MQTT server.
In one embodiment, the processor 701 performs the operations further comprising:
when receiving a log collection message sent by an Internet of things server, determining the data volume of a log file;
uploading the log file in a memory to the Internet of things server based on the Socket connection when the data volume is larger than a data volume threshold value;
reporting uploading progress information to the Internet of things server;
and clearing the memory after the log file is successfully uploaded.
In one embodiment, the processor 701 performs operations comprising:
sending a firmware upgrading message to the Internet of things equipment;
receiving a Socket connection request from the Internet of things equipment;
establishing Socket connection based on the Socket connection request;
sending an upgrade package to the Internet of things equipment based on the Socket connection, and receiving download progress information of the upgrade package reported by the Internet of things equipment.
In one embodiment, the processor 701 executes the sending of the firmware upgrade message to the internet of things device, including:
establishing a Transmission Control Protocol (TCP) connection with an MQTT server;
sending a login request to the MQTT server based on the TCP connection; wherein, the login request is used for logging in the MQTT server;
and after the MQTT server is successfully logged in, the firmware upgrading message is sent to the Internet of things equipment through the MQTT server.
The technical concept of the embodiment of the present application is the same as that of fig. 2, 3, or 5, and the specific process may refer to the method embodiment of fig. 2, 3, or 5, which is not described herein again.
In the embodiment of the application, a Transmission Control Protocol (TCP) connection is established with a message queue telemetry transmission protocol (MQTT) server, a login request is sent to the MQTT server based on the TCP connection, after the MQTT server is successfully logged in, a firmware upgrading message sent by the Internet of things equipment through the MQTT server is received, the firmware upgrading message is analyzed to obtain first software version information, whether an upgrading condition is met or not is judged based on the current software version information and the first software version information, and if the upgrading condition is not met, a detection result message is reported to the Internet of things server; if the request is met, establishing a terminal node EndPoint object based on a port of the Internet of things equipment and an Internet Interconnection Protocol (IP) of the Internet of things server, sending a connection request to the Internet of things server based on the EndPoint object through a Socket object, receiving a response message returned by the Internet of things server based on the connection request, analyzing the response message to determine to establish Socket connection with the Internet of things server, analyzing the firmware upgrading message to determine the data volume of the upgrading packet, receiving a data message from the Internet of things server based on the Socket connection, counting the data message to determine the current download volume, determining the download progress information based on the current download volume and the data volume, and sending the download progress information to the Internet of things equipment through the MQTT server. The Internet of things equipment is connected with the Internet of things server through Socket, so that the transmission efficiency can be effectively improved, and the reliability of file transmission is ensured.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (11)

1. A method for file transfer, the method comprising:
receiving a firmware upgrading message sent by an Internet of things server; the firmware upgrading message carries first software version information;
analyzing the firmware upgrading message to obtain the first software version information;
when judging that the upgrading condition is met based on the current software version information and the first software version information, establishing socket connection with the Internet of things server;
downloading an upgrade package of the first software version information from the Internet of things server based on the socket connection, and reporting download progress information of the upgrade package to the Internet of things server.
2. The method of claim 1, wherein the receiving a firmware upgrade message sent from an internet of things server comprises:
establishing a Transmission Control Protocol (TCP) connection with a message queue telemetry transmission protocol (MQTT) server;
sending a login request to the MQTT server based on the TCP connection; wherein, the login request is used for logging in the MQTT server;
and after the MQTT server is successfully logged in, receiving the firmware upgrading message sent by the Internet of things equipment through the MQTT server.
3. The method of claim 2, wherein the creating a socket connection with the internet of things server comprises:
establishing a terminal node EndPoint object based on the port of the Internet of things equipment and an Internet Protocol (IP) of the Internet of things server;
establishing a Socket object;
sending a connection request to the Internet of things server through the Socket object based on the EndPoint object;
receiving a response message returned by the Internet of things server based on the connection request;
and analyzing the response message to determine that Socket connection is established with the Internet of things server.
4. The method of claim 3, wherein the downloading the upgrade package of the first software version information from the IOT server based on the socket connection and reporting the download progress information of the upgrade package to the IOT server comprises:
analyzing the firmware upgrading message to determine the data volume of the upgrading packet;
receiving a data message from the Internet of things server based on the Socket connection;
counting the data messages to determine the current downloading amount;
determining the downloading progress information based on the current downloading amount and the data amount;
and sending the downloading progress information to the Internet of things equipment through the MQTT server.
5. The method of claim 1, further comprising:
when receiving a log collection message sent by an Internet of things server, determining the data volume of a log file;
uploading the log file in a memory to the Internet of things server based on the Socket connection when the data volume is larger than a data volume threshold value;
reporting uploading progress information to the Internet of things server;
and clearing the memory after the log file is successfully uploaded.
6. A method for file transfer, the method comprising:
sending a firmware upgrading message to the Internet of things equipment;
receiving a Socket connection request from the Internet of things equipment;
establishing Socket connection based on the Socket connection request;
sending an upgrade package to the Internet of things equipment based on the Socket connection, and receiving download progress information of the upgrade package reported by the Internet of things equipment.
7. The method of claim 6, wherein sending the firmware upgrade message to the internet of things device comprises:
establishing a Transmission Control Protocol (TCP) connection with an MQTT server;
sending a login request to the MQTT server based on the TCP connection; wherein, the login request is used for logging in the MQTT server;
and after the MQTT server is successfully logged in, the firmware upgrading message is sent to the Internet of things equipment through the MQTT server.
8. A file transfer apparatus, comprising:
the receiving module is used for receiving a firmware upgrading message sent by the Internet of things server; the firmware upgrading message carries first software version information;
the analysis module is used for analyzing the firmware upgrading message to obtain the first software version information;
the connection module is used for establishing socket connection with the Internet of things server when judging that the upgrade condition is met based on the current software version information and the first software version information;
and the downloading module is used for downloading the upgrading packet of the first software version information from the Internet of things server based on the socket connection and reporting the downloading progress information of the upgrading packet to the Internet of things server.
9. A file transfer apparatus, comprising:
the sending module is used for sending the firmware upgrading message to the Internet of things equipment;
the receiving module is used for receiving a Socket connection request from the Internet of things equipment;
the connection module is used for establishing Socket connection based on the Socket connection request;
and the transmission module is used for sending an upgrade package to the Internet of things equipment based on the Socket connection and receiving the downloading progress information of the upgrade package reported by the Internet of things equipment.
10. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
11. An electronic device, comprising: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
CN202011070127.2A 2020-09-30 2020-09-30 File transmission method and device, storage medium and electronic equipment Withdrawn CN112351070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011070127.2A CN112351070A (en) 2020-09-30 2020-09-30 File transmission method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011070127.2A CN112351070A (en) 2020-09-30 2020-09-30 File transmission method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112351070A true CN112351070A (en) 2021-02-09

Family

ID=74360504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011070127.2A Withdrawn CN112351070A (en) 2020-09-30 2020-09-30 File transmission method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112351070A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745267A (en) * 2022-03-28 2022-07-12 杭州涂鸦信息技术有限公司 Function updating method and related device
CN115174389A (en) * 2022-07-07 2022-10-11 国网浙江省电力有限公司物资分公司 Upgrading method, device, equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304699A1 (en) * 2011-12-09 2014-10-09 Motorola Mobility Llc Methods and apparatus to trigger firmware update request in response to a failure event
CN104580434A (en) * 2014-12-26 2015-04-29 深圳市兰丁科技有限公司 Method and system for downloading firmware
CN105279001A (en) * 2015-11-20 2016-01-27 杭州云柚科技有限公司 Software remote upgrading method for network terminal devices
CN107239302A (en) * 2017-05-10 2017-10-10 努比亚技术有限公司 A kind of firmware upgrade method, terminal and server
CN108182075A (en) * 2017-12-29 2018-06-19 成都三零凯天通信实业有限公司 A kind of program by the automatic escalation target software of socket communication modes
CN109905409A (en) * 2019-04-10 2019-06-18 上海上实龙创智慧能源科技股份有限公司 Things-internet gateway real time bidirectional communication system based on Socket.IO

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304699A1 (en) * 2011-12-09 2014-10-09 Motorola Mobility Llc Methods and apparatus to trigger firmware update request in response to a failure event
CN104580434A (en) * 2014-12-26 2015-04-29 深圳市兰丁科技有限公司 Method and system for downloading firmware
CN105279001A (en) * 2015-11-20 2016-01-27 杭州云柚科技有限公司 Software remote upgrading method for network terminal devices
CN107239302A (en) * 2017-05-10 2017-10-10 努比亚技术有限公司 A kind of firmware upgrade method, terminal and server
CN108182075A (en) * 2017-12-29 2018-06-19 成都三零凯天通信实业有限公司 A kind of program by the automatic escalation target software of socket communication modes
CN109905409A (en) * 2019-04-10 2019-06-18 上海上实龙创智慧能源科技股份有限公司 Things-internet gateway real time bidirectional communication system based on Socket.IO

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745267A (en) * 2022-03-28 2022-07-12 杭州涂鸦信息技术有限公司 Function updating method and related device
WO2023185322A1 (en) * 2022-03-28 2023-10-05 杭州涂鸦信息技术有限公司 Function updating method and related apparatus
CN115174389A (en) * 2022-07-07 2022-10-11 国网浙江省电力有限公司物资分公司 Upgrading method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN112350850A (en) Log file reporting method and device, storage medium and electronic equipment
CN107395572B (en) Data processing method and Internet of things gateway
CN111314864B (en) Network distribution method, device and equipment
CN110999257B (en) Delivery method selection for delivery of server notifications
CN105100021B (en) Triggering method, device and system for device management session
CN103973421A (en) File transmitting method and device
CN108901079B (en) Timeout time determination method, device, equipment and storage medium
CN112351070A (en) File transmission method and device, storage medium and electronic equipment
CN112346751B (en) Application program installation method and device, electronic equipment and storage medium
CN111629452A (en) Data transmission control method and device, storage medium and electronic equipment
CN104584490A (en) Data transmitting method and device
CN108337308B (en) Data communication method, device and system for LWM2M client and upper computer
US20220171011A1 (en) Positioning method and device, server, storage medium and terminal
CN112333268A (en) Data transmission method and device
CN111541555A (en) Group chat optimization method and related product
CN113238925A (en) Application service test method, medium, device and system
CN112999651B (en) Data processing method based on cloud game and related equipment
CN114071544A (en) Network testing method and device and electronic equipment
CN115004650B (en) Node configuration method, node configuration device, distributed system and computer readable medium
CN113825123A (en) Communication method, communication device, electronic equipment and computer storage medium
CN107431965B (en) Method and device for realizing Transmission Control Protocol (TCP) transmission
CN104168284B (en) A kind of data transmission method and the first electronic equipment
CN115348333A (en) Data transmission method, system and equipment based on UDP (user Datagram protocol) double-end communication interaction
CN114143729B (en) Apparatus, method and computer readable storage medium for data transceiving with IoT devices
CN108990039B (en) Data transmission method and related device

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
TA01 Transfer of patent application right

Effective date of registration: 20210719

Address after: Room 209, north 2 / F, building 23, Yuanxi Industrial Zone, No.1 Kezhi West Road, Nanshan District, Shenzhen, Guangdong 518000

Applicant after: Shenzhen KuYuan Digital Technology Co.,Ltd.

Address before: 7 / F, building B, Bolton Science Park, chaguang Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: YULONG COMPUTER TELECOMMUNICATION SCIENTIFIC (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right
WW01 Invention patent application withdrawn after publication

Application publication date: 20210209

WW01 Invention patent application withdrawn after publication