Specific embodiment
In order that the technical problem to be solved in the present invention, technical scheme and beneficial effect become more apparent, below in conjunction with
Drawings and Examples, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used
To explain the present invention, it is not intended to limit the present invention.
Fig. 1 is the schematic diagram of the system that mobile terminal provided in an embodiment of the present invention is constituted with attendance recorder, for the ease of saying
Bright, illustrate only part related to the present embodiment.
As shown in figure 1, the system includes mobile terminal 11 and attendance recorder 12.Wherein, mobile terminal 11 can be notebook
The terminal unit with network access facility such as computer, panel computer or mobile phone.
A kind of transmission method of data is embodiments provided, Fig. 2 is the biography of data provided in an embodiment of the present invention
The flow chart of transmission method, as shown in Fig. 2 the method specifically includes following steps S210 to step S240.
Step S210, mobile terminal receive attendance data.
Attendance data is to be edited and be input into by user mobile terminal, and editor's attendance data needs specified permission, therefore only
There is the mobile terminal for having logged in particular account number can be with the attendance data of receiving user's input.The mobile terminal can be mobile phone, put down
The equipment with mobile office ability such as plate computer and notebook computer.
Step S220, mobile terminal judge whether to be connected with attendance recorder foundation.
According to current communication mechanism, as long as mobile terminal is in connection status with attendance recorder, then receive work attendance number
According to mobile terminal the attendance data can be sent to attendance recorder automatically.Attendance recorder is weak due to storage capacity, upon receipt of new
Attendance data, former attendance data will be covered, but mobile terminal is possible to by user misoperation, it is therefore possible to connecing
The attendance data of mistake is received, in order to avoid the attendance data of mistake is sent to attendance recorder, it is thus necessary to determine that mobile terminal and examine
The connection status of diligent machine, and different operations are arranged according to different connection status.
Specifically, the connection status of mobile terminal and attendance recorder can be judged by way of monitoring.Fig. 3 is the present embodiment
The flow chart of the connection status determination methods of offer.As shown in figure 3, the method is comprised the following steps:
Step S310, mobile terminal read attendance recorder IP address and attendance recorder port numbers.
Mobile terminal is by based on current network condition, reading corresponding IP address and port numbers.If on mobile terminal
The IP of storage attendance recorder and port numbers, then directly read the IP address and port numbers of storage;If it is not, reading user at that time
The IP of input attendance recorder and port numbers.
Step S320, mobile terminal binding attendance recorder IP address and attendance recorder port numbers.
Whether step S330, mobile terminal are connected with attendance recorder according to attendance recorder IP address and the monitoring of attendance recorder port numbers.
By binding, whether real-time monitoring has information to be transmitted by the IP address or port.
Step S230, mobile terminal send attendance data to attendance recorder when determination and attendance recorder are set up and be connected.
Mobile terminal and work attendance interconnection plane, are normal connection status.
In a kind of simple and efficient implementation, attendance data can be sent to attendance recorder.
In another kind of preferred implementation, attendance data can be sent in the following manner.Fig. 4 is the embodiment of the present invention
The flow chart of the transmission attendance data of offer, as illustrated, the method includes:
Step S410, receives the judgement message from attendance recorder, judges that message is used for representing the work attendance that mobile terminal sends
Whether data are consistent with the attendance data that attendance recorder is stored.
Can directly whether consistent by comparing content check data, it is also possible to by spies such as version number or modification times
Levy.
Step S420, when the attendance data that mobile terminal sends is consistent with the attendance data that attendance recorder is stored, by work attendance
Data is activation is to attendance recorder.
Step S430, when the attendance data that mobile terminal sends is inconsistent with the attendance data of attendance recorder storage, initiates
The inquiry of attendance data to attendance recorder whether is sent, and after confirmation is received, attendance data is sent to attendance recorder.
The mechanism of inquiry can prevent maloperation from being sent out by mistake, when user is clicked on really after mobile terminal sends inquiry
Recognize, attendance data just can be sent to attendance recorder by mobile terminal.
In order to determine the safety in attendance data source, after mobile terminal sends attendance data to attendance recorder, attendance recorder
The attendance data is stored can determine whether after judging to manager's identity again.I.e., first, attendance recorder judges movement
Whether terminal has opened administrator right;Then, attendance recorder caches work attendance after determining that mobile terminal opens administrator right
Data.
Errorless in order to confirm attendance data form, attendance recorder can store the attendance data after verification form again.That is, examine
Whether diligent machine verification attendance data meets the requirements;Attendance recorder caches attendance data after verification is completed.
Step S240, when determination is not set up with attendance recorder and is connected, refusal sends attendance data to mobile terminal.
This step can avoid being written into new attendance data for mobile terminal under networking situation, and therefore mobile terminal is not
In the case of being connected with attendance recorder, it is possible to use the attendance data that family is edited on mobile terminals cannot be transmitted.Preferably, mobile
When determination is not set up with attendance recorder and is connected, refusal sends attendance data to terminal.
The embodiment of the present invention executes corresponding behaviour under heterogeneous networks connection by the judgement to network connection situation
Make, it is to avoid impact of the network condition to attendance data so that the mobile terminal of user and attendance recorder to maintain data consistent,
Ensure that the accuracy of attendance management.
The embodiment of the present invention additionally provides a kind of transmitting device of data, and Fig. 5 is data provided in an embodiment of the present invention
The structured flowchart of transmitting device, as shown in figure 5, the device includes receiving unit 510, judging unit 520, the first performance element
530 and second performance element 540.
Receiving unit 510 is used for receiving attendance data.
First judging unit 520 is used for judging whether to set up with attendance recorder being connected.
First performance element 530 is used for, when determination and attendance recorder are set up and be connected, sending attendance data to attendance recorder.
Second performance element 540 is used for when determination is not set up with attendance recorder and is connected, and refusal sends attendance data.
Preferably, the first judging unit 520 includes:Read module, for reading attendance recorder IP address and attendance recorder port
Number;Binding module, for binding attendance recorder IP address and attendance recorder port numbers;Module is monitored, for according to attendance recorder IP address
Monitor with attendance recorder port numbers and whether be connected with attendance recorder.
Preferably, the first performance element 530 includes:Receiver module, for receiving the judgement message from attendance recorder, judges
Message is used for representing whether the attendance data that mobile terminal sends is consistent with the attendance data that attendance recorder is stored;First sends mould
Block, for when the attendance data that mobile terminal sends is consistent with the attendance data that attendance recorder is stored, by attendance data send to
Attendance recorder;Second sending module, the attendance data for sending when mobile terminal are inconsistent with the attendance data that attendance recorder is stored
When, initiate whether to send the inquiry of attendance data to attendance recorder, and after confirmation is received, attendance data is sent to examining
Diligent machine.
Preferably, the device also includes:Second judging unit, for judging whether mobile terminal has opened manager's power
Limit;First buffer unit, for attendance recorder after determining that mobile terminal opens administrator right, caches attendance data.
Preferably, the device also includes:Verification unit, for verifying whether attendance data meets the requirements;Second caching is single
Unit, for, after verification is completed, caching attendance data.
Those skilled in the art can be understood that, for convenience of description and succinctly, only with above-mentioned each work(
The division of energy unit is illustrated, and in practical application, can distribute above-mentioned functions by different functions as desired
Unit is completed, will the internal structure of device be divided into different functional units or module, with complete described above all or
Person's partial function.Each functional unit in embodiment can be integrated in a processing unit, or unit is independent
It is physically present, it is also possible to which two or more units are integrated in a unit, above-mentioned integrated unit can both adopt hard
The form of part is realized, it would however also be possible to employ the form of SFU software functional unit is realized.In addition, the specific name of each functional unit is also
For the ease of mutually differentiation, the protection domain of the application is not limited to.The specific work process of unit in said apparatus, can
With reference to the corresponding process in aforementioned means embodiment, will not be described here.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Unit and algorithm steps, being capable of being implemented in combination in electronic hardware or computer software and electronic hardware.These functions are actually
Executed with hardware or software mode, the application-specific and design constraint depending on technical scheme.Professional and technical personnel
Described function can be realized to each specific application using different device, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device and device, can pass through other
Mode is realized.For example, device embodiment described above is only schematically, for example division of module or unit, only
For a kind of division of logic function, when actually realizing, can there are other dividing mode, for example multiple units or component combine
Or another system is desirably integrated into, or some features can be ignored, or do not execute.Another, shown or discussed phase
Coupling or direct-coupling or communication connection between mutually can be INDIRECT COUPLING or the communication by some interfaces, device or unit
Connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
Part can be or may not be physical location, you can be located at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can be selected according to the actual needs to realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list
Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If integrated unit realized using in the form of SFU software functional unit and as independent production marketing or use when, can
To be stored in a computer read/write memory medium.It is based on such understanding, the technical scheme essence of the embodiment of the present invention
On all or part of part that in other words prior art is contributed or the technical scheme can be with the shape of software product
Formula is embodied, and the computer software product is stored in a storage medium, is used including some instructions so that a calculating
It is real that machine equipment (can be personal computer, server, or network equipment etc.) or processor (processor) execute the present invention
Apply all or part of step of each embodiment device of example.And aforesaid storage medium includes:USB flash disk, portable hard drive, read-only storage
Device (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
Above example only in order to technical scheme to be described, rather than a limitation;Although with reference to the foregoing embodiments
The present invention has been described in detail, it will be understood by those within the art that:Which still can be to aforementioned each enforcement
Technical scheme described in example is modified, or carries out equivalent to which part technical characteristic;And these modification or
Replace, do not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the embodiment of the present invention.
These are only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Any modification, equivalent and improvement for being made within principle etc., should be included within the scope of the present invention.