A kind of wireless data collection methods, electronic equipment, storage medium, systemTechnical field
The present invention relates to the communications field, more particularly to a kind of wireless data collection methods, electronic equipment, storage medium, it isSystem.
Background technology
Subordinate communication system is to be connected by being used as the host of management with directly participating in the slave of control detection, mainMachine controls slave, and from slave collection status information, each slave has a unique address, and host is matched somebody with somebody by the addressCorresponding slave is put and manages, but in actual application, it is hard because of host when host is connected with slave using wired modePart device has extension to limit, when host needs to extend connection, it is necessary to replace host hardware;Host uses wireless mode with slaveDuring connection, such as bluetooth radio connection and 2.4GHz/5GHz wireless radiofrequency connection modes, needed in first line artificialThe line for carrying out a host and slave is set, main before host and the communication of current slave do not stop after host is connected with slaveMachine cannot be attached with other slaves, or because that can not connect more slaves using resources of chip restricting host, and host with fromMachine can not achieve automatic connection.
The content of the invention
For overcome the deficiencies in the prior art, it is an object of the present invention to providing a kind of wireless data collection methods,The slave of connection call request is initiated by host lookup, host distributes ID to slave to be connected, and is carried out with slave to be connectedWireless connection, host collect the communication bag data of slave upload, realize that host is connected automatically with more slaves, hard without host is needed to changePart, more hosts simultaneously even work, and reduce manual operation.
The present invention provides a kind of wireless data collection methods, comprises the following steps:
Slave is searched, host initiates connection call request, and searches the slave for initiating connection call request, obtains and waits to connectSlave;
Connect slave, the host to the slave connect distribution ID, the host with distributed ID wait to be connected fromMachine wireless connection;
Data are collected, the host collects the communication bag data for having connected slave upload.
Further, step connection slave further includes generation allocation list, the host according to it is described be connected fromThe link information generation allocation list of machine, the host are attached according to the configuration table search slave with slave.
Further, the step connection slave further includes distribution host id, when the host lookup is waited to connect to someDuring host, the host is to the host assignment host id to be connected.
Further, the step connection slave further includes connection and checks, slave to be connected described in the host inspectionID, when described when the ID for connecting slave is repeated, the host distributes new ID to the slave to be connected for repeating ID.
Further, the step connection slave further includes verification communication bag, slave to be connected described in the host verificationThe effective length of the communication bag of upload, form, check code, are verified, then the host is connected with the slave to be connectedConnect, verify not by the way that then the host is disconnected with the slave to be connected.
Further, it is specially that the communication of slave upload has been connected described in the host obtains that the step, which collects data,Bag, parses the communication bag, obtains parsing communication bag, extracts the data of the parsing communication bag, and by the number of extractionAccording to being uploaded to Cloud Server.
A kind of electronic equipment, including:Processor;
Memory;And program, wherein described program is stored in the memory, and is configured to by processorPerform, described program includes being used to perform a kind of above-mentioned wireless data collection methods.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processorA kind of above-mentioned wireless data collection methods of row.
A kind of wireless data collection system, including host, slave, Cloud Server, the slave initiate connection call request;The host includes searching slave module, connection slave module, collects data module, and the host initiates connection call request,The slave module of searching searches the slave for initiating connection call request, obtains slave to be connected;It is described connection slave module toThe slave distribution ID to be connected, the host and the slave wireless connection to be connected for having distributed ID;It is described to collect data moduleCollect the communication bag data for having connected slave upload.
Further, the connection slave module further includes generation allocation list module, distribution host id module, connection inspectionModule, the generation allocation list module generates allocation list according to the host with the link information for being connected slave, describedHost is attached according to the configuration table search slave with slave;The distribution host id module is divided to host to be connectedWith host id;The communication bag that the ID of slave to be connected and the slave to be connected described in the connection inspection module inspection uploadEffective length, form, check code.
Compared with prior art, the beneficial effects of the present invention are:
The present invention provides a kind of wireless data collection methods, including step searches slave, connects slave, collects data, leads toCross host and initiate connection call request, and search the slave for initiating connection call request, obtain slave to be connected, host is to the company for the treatment ofSlave distribution ID is met, host and the slave wireless connection to be connected for having distributed ID, host collect the communication for having connected slave uploadBag data;The present invention relates to a kind of wireless data collection system;The invention further relates to electronic equipment and readable storage medium storing program for executing, is used forPerform a kind of wireless data collection methods;The present invention realizes host and more slave wireless connections, without host hardware is needed to change, realizesHost collects the data that different types of slave uploads, and the data collected are uploaded to Cloud Server, Cloud Server generation by hostReport, by generating allocation list according to the link information of host and slave, host is according to configuration table search slave, realization and slaveAutomatic connection and synchronization parameter are set, and reduce manual operation, when host lookup to some when host is connected, host is to waiting to connectHost assignment host id, realizes more hosts and even works, and the communication bag uploaded by verifying slave ID and slave, solves and loseBag, error checking, line abnormal problem.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,And can be practiced according to the content of specification, below with presently preferred embodiments of the present invention and coordinate attached drawing describe in detail as after.The embodiment of the present invention is shown in detail by following embodiments and its attached drawing.
Brief description of the drawings
Attached drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hairBright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is a kind of wireless data collection methods flow chart of the present invention;
Fig. 2 is a kind of wireless data collection system structure diagram of the present invention.
Embodiment
In the following, with reference to attached drawing and embodiment, the present invention is described further, it is necessary to which explanation is, notUnder the premise of afoul, new implementation can be formed between various embodiments described below or between each technical characteristic in any combinationExample.
A kind of wireless data collection methods, as shown in Figure 1, comprising the following steps:
Slave is searched, host initiates connection call request, and searches the slave for initiating connection call request, obtains and waits to connectSlave;
Connect slave, host according to slave request signal power, at random from trend slave connect distribution ID, host andThe slave wireless connection to be connected of ID is distributed;Preferably, step connection slave further includes distribution host id, when host lookup arrivesIt is some when host is connected, host to host assignment host id to be connected, initiate connection and exhale by the host lookup for having distributed host idBe the slave of request, obtain slave to be connected, and ID is distributed to slave to be connected, host with distributed the slave to be connected of ID withoutLine connects, and host and slave can initiate chain rupture request.
In one embodiment, it is preferable that step connection slave further includes generation allocation list, and host is according to being connected slaveLink information generation allocation list, host and is connected according to configuration table search slave automatically with slave, without match again again fromMachine, improves the Connection Time.Preferably, step connection slave further includes connection and checks, after host is connected with slave, host is examined and treatedThe ID of slave is connected, when when the ID for connecting slave is repeated, host distributes new ID to the slave to be connected for repeating ID.It is preferred thatGround, step connection slave further include verification communication bag, and when host lookup is to the slave for initiating connection call request, host verification is treatedThe effective length for the communication bag that connection slave uploads, form, check code, are verified, then host is connected with slave to be connectedConnect, verification is by the way that then host initiates chain rupture request, and host is disconnected with slave to be connected, when host receives abnormal mistakeDuring code, host is disconnected with slave and communicated to connect, and is reconnected.
Data are collected, host collects the communication bag data for having connected slave upload.Preferably, step collects data and is speciallyHost obtains the communication bag for having connected slave upload, and communication bag is parsed, and obtains parsing communication bag, extraction parsing communication bagData, and the data of extraction are uploaded to Cloud Server, Cloud Server is spliced the data that host extracts, and generates reportTable.
In one embodiment, the first host is used to collect blood pressure detecting data, and the second host is used to collect blood sugar test numberAccording to the first host and the second host initiate connection call request respectively, and total host lookup is divided to the first host and the second hostIt is not attached to the first host and the second host assignment host id, total host with the first host and the second host, the first hostThe slave for initiating connection call request, and the power to the slave found according to slave request signal are searched, at random from trendSlave to be connected distributes slave ID, the effective length for the communication bag that the first host verification slave is sent, form, check code, verificationBy the way that then host is attached with slave to be connected, and generates allocation list, the slave record connection letter being connected with the first hostCeasing, in follow-up connection procedure, the first host is connected automatically according to allocation list with slave, if after the first host is connected with slave, theOne host examines the ID to slave to repeat, and the first host redistributes ID to the ID slaves repeated, and the first host is collected on slaveCommunication bag is passed, communication bag is parsed, extracts blood pressure detecting data, and blood pressure detecting data are uploaded to Cloud Server, phaseWith ground, the second host lookup initiates the slave of connection call request, and to the slave found according to the strong of slave request signalIt is weak, at random from trend slave distribution slave ID to be connected, the effective length for the communication bag that the second host verification slave is sent, latticeFormula, check code, are verified, then host is attached with slave to be connected, and generates allocation list, be connected with the second host fromMachine records link information, and in follow-up connection procedure, the second host is connected automatically according to allocation list with slave, if the second host and fromAfter machine connection, the second host examines the ID to slave to repeat, and the second host redistributes ID, the second host to the ID slaves repeatedCollect slave and upload communication bag, communication bag is parsed, extract blood sugar test data, and blood sugar test data are uploaded to cloudServer, Cloud Server are spliced monitoring of blood pressure data and blood sugar test data, generate blood pressure and blood sugar examining report.
A kind of electronic equipment, including:Processor;Memory;And program, its Program are stored in memory, andAnd be configured to be performed by processor, program includes being used to perform a kind of above-mentioned wireless data collection methods;A kind of computer canStorage medium is read, is stored thereon with computer program, computer program is executed by processor a kind of above-mentioned wireless data side of collectingMethod.
A kind of wireless data collection system, as shown in Fig. 2, including host, slave, Cloud Server, slave is initiated connection and is exhaledCry request;Host includes searching slave module, connection slave module, collects data module, and host is initiated connection call request, looked intoLook for slave module to search the slave for initiating connection call request, obtain slave to be connected;Slave module is connected to slave to be connectedDistribute ID, host and the slave wireless connection to be connected for having distributed ID;Preferably, connection slave module further includes generation allocation listModule, distribution host id module, connection inspection module, generation allocation list module is according to host and the link information for being connected slaveAllocation list is generated, host is connected automatically according to configuration table search slave with slave;Host id module is distributed to host to be connectedDistribute host id;Connection inspection module examines the ID of slave connect, if slave ID is repeated, connects slave module again to treatingConnecting slave distribution ID, connection inspection module examines the effective length of the communication bag of slave connect upload, form, check code,It is verified, then host is attached with slave to be connected, and verification is by the way that then host initiates chain rupture request, host and the company for the treatment ofSlave is connect to disconnect.Collect data module and collect the communication bag data for having connected slave upload.
The present invention provides a kind of wireless data collection methods, including step searches slave, connects slave, collects data, leads toCross host and initiate connection call request, and search the slave for initiating connection call request, obtain slave to be connected, host is to the company for the treatment ofSlave distribution ID is met, host and the slave wireless connection to be connected for having distributed ID, host collect the communication for having connected slave uploadBag data;The present invention relates to a kind of wireless data collection system;The invention further relates to electronic equipment and readable storage medium storing program for executing, is used forPerform a kind of wireless data collection methods;The present invention realizes host and more slave wireless connections, without host hardware is needed to change, realizesHost collects the data that different types of slave uploads, and the data collected are uploaded to Cloud Server, Cloud Server generation by hostReport, by generating allocation list according to the link information of host and slave, host is according to configuration table search slave, realization and slaveAutomatic connection and synchronization parameter are set, and reduce manual operation, when host lookup to some when host is connected, host is to waiting to connectHost assignment host id, realizes more hosts and even works, and the communication bag uploaded by verifying slave ID and slave, solves and loseBag, error checking, line abnormal problem.
More than, it is only presently preferred embodiments of the present invention, not makees limitation in any form to the present invention;All one's own professionsThe those of ordinary skill of industry can swimmingly implement the present invention shown in by specification attached drawing and above;But all to be familiar with sheet specialThe technical staff of industry without departing from the scope of the present invention, is made a little using disclosed above technology contentsThe equivalent variations of variation, modification and evolution, are the equivalent embodiment of the present invention;Meanwhile all substantial technologicals according to the present inventionVariation, modification and evolution of any equivalent variations made to above example etc., still fall within technical schemeWithin protection domain.