CN107704489A - Read and write processing method, device and the computer-readable recording medium of time-out - Google Patents

Read and write processing method, device and the computer-readable recording medium of time-out Download PDF

Info

Publication number
CN107704489A
CN107704489A CN201710720127.4A CN201710720127A CN107704489A CN 107704489 A CN107704489 A CN 107704489A CN 201710720127 A CN201710720127 A CN 201710720127A CN 107704489 A CN107704489 A CN 107704489A
Authority
CN
China
Prior art keywords
read
write
write operation
time period
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710720127.4A
Other languages
Chinese (zh)
Other versions
CN107704489B (en
Inventor
赵大昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710720127.4A priority Critical patent/CN107704489B/en
Publication of CN107704489A publication Critical patent/CN107704489A/en
Application granted granted Critical
Publication of CN107704489B publication Critical patent/CN107704489B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Electric Clocks (AREA)

Abstract

The disclosure is directed to a kind of processing method, device and computer-readable recording medium for reading and writing time-out.This method includes:Obtain all read-write operations occurred in preset time period, when the terminal time preset duration in preset time period, determine whether all read-write operation complete by read-write, when at least one read-write operation does not read and write completion in read-write operation, first timer sets the read-write operation time-out in preset time period, resets second timer.Above-mentioned technical proposal, conventional each read-write operation is required for setting once overtime operation optimization to the replacement that a timer can be only carried out in certain period of time.Due in the case of big data quantity, not being that each communication is required for setting read-write time-out, by the way that timer logic is peeled away, the performance loss for setting time-out to bring can be greatly reduced, the effect of performance optimization is played.

Description

Read and write processing method, device and the computer-readable recording medium of time-out
Technical field
This disclosure relates to Internet technical field, more particularly to a kind of processing method, device and computer for reading and writing time-out Readable storage medium storing program for executing.
Background technology
At present, with the development of network technology, the internet information resources huge as one, turn into people and obtain information Most convenient, efficiently approach.At present, user accesses network usually using personal computer, and by pacifying in personal computer The browser (Browser) of dress accesses webpage, obtains the information of needs.
In correlation technique, connection is established between server and client often using socket (socket) services, institute It is client and a kind of exchange way of server in network to call socket, is connected and carries out when server will be established with client , it is necessary to which server and the client (destination client) for needing to establish connection are docked when data transmit, and socket can To regard as " docking number " of this docking, only server is identical with " docking number " of destination client, can be connected Connect to transmit data.And sockets services are exactly that the docking service of confession is connect for server and client side.
The content of the invention
To overcome problem present in correlation technique, the embodiment of the present disclosure provides a kind of processing method for reading and writing time-out, dress Put and computer-readable recording medium.The technical scheme is as follows:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of processing method for reading and writing time-out, including:
Obtain all read-write operations occurred in preset time period;
When the terminal time preset duration in the preset time period, determine whether the read-write operation is all read and write Complete;
When at least one read-write operation does not read and write completion in the read-write operation, when first timer sets described default Between read-write operation time-out in section, reset second timer.
In one embodiment, methods described may also include:
It is the first value by the read-write mark position of the read-write operation when read-write operation occurs;
It is described when the terminal time preset duration in the preset time period, determine the read-write operation whether all Read-write is completed, including:
When the terminal time preset duration in the preset time period, the read-write mark of the read-write operation is detected The state of position;
When the read-write marker bit of the read-write operation is still worth for first, determine that the read-write operation does not read and write completion.
In one embodiment, methods described may also include:
It is second value by mark position is read and write corresponding to the read-write operation when the read-write operation, which is read and write, to be completed.
It is described when the terminal time preset duration in the preset time period, determine the read-write operation whether all Read-write is completed, including:
When the terminal time preset duration in the preset time period, the read-write marker bit of the read-write operation is During second value, determine that the read-write operation read-write is completed.
In one embodiment, described when at least one read-write operation does not read and write completion in the read-write operation, if After putting the read-write operation time-out in the preset time period, methods described may also include:
Read-write mark position by the read-write operation of time-out is second value.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of processing unit for reading and writing time-out, including:
Acquisition module, for obtaining all read-write operations occurred in preset time period;
Determining module, for when the terminal time preset duration in the preset time period, determining the read-write All whether read-write is completed for operation;
Reset module, for when at least one read-write operation does not read and write completion in the read-write operation, first timer Read-write operation time-out in the preset time period is set, resets second timer.
In one embodiment, described device may also include:
First mark module, for being first by the read-write mark position of the read-write operation when read-write operation occurs Value;
The determining module, including:
Detection sub-module, for when the terminal time preset duration in the preset time period, detecting the reading The state of the read-write marker bit of write operation;
First determination sub-module, for when the read-write marker bit of the read-write operation is still worth for first, determining the reading Write operation does not read and write completion.
In one embodiment, described device may also include:
Second mark module, for that when the read-write operation reads and writes completion, will read and write and mark corresponding to the read-write operation Note position is second value.
The determining module, including:
Second determination sub-module, for when the terminal time preset duration in the preset time period, the reading When the read-write marker bit of write operation is second value, determine that the read-write operation read-write is completed.
In one embodiment, described device may also include:
3rd mark module, for being second value by the read-write mark position of the read-write operation of time-out.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of processing unit for reading and writing time-out, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Obtain all read-write operations occurred in preset time period;
When the terminal time preset duration in the preset time period, determine whether the read-write operation is all read and write Complete;
When at least one read-write operation does not read and write completion in the read-write operation, when first timer sets described default Between read-write operation time-out in section, reset second timer.
According to the fourth aspect of the embodiment of the present disclosure, there is provided a kind of computer-readable recording medium, be stored thereon with calculating The step of machine instructs, and any one embodiment methods described in above-mentioned first aspect is realized in the instruction when being executed by processor.
The technical scheme provided by this disclosed embodiment can include the following benefits:
Above-mentioned technical proposal, by obtaining all read-write operations occurred in preset time period, when apart from preset time period In terminal time preset duration when, determine read-write operation whether all read-write complete, when in read-write operation it is at least one read-write behaviour When not reading and writing completion, first timer sets the read-write operation time-out in preset time period, resets second timer.So will Conventional each read-write operation is required for setting once overtime operation optimization only to carry out once regularly in certain period of time The replacement of device.Due in the case of big data quantity, not being that each communication is required for setting read-write time-out, by by timer Logic is peeled away, and the performance loss for setting time-out to bring can be greatly reduced, and plays the effect of performance optimization.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is the flow chart of the processing method of the read-write time-out according to an exemplary embodiment.
Fig. 2 is the flow chart of the processing method of another read-write time-out according to an exemplary embodiment.
Fig. 3 is the flow chart of the processing method of another read-write time-out according to an exemplary embodiment.
Fig. 4 is the flow chart of the processing method of another read-write time-out according to an exemplary embodiment.
Fig. 5 is a kind of flow chart of the processing method of read-write time-out according to an exemplary embodiment.
Fig. 6 is the structural representation of the processing unit of the read-write time-out according to an exemplary embodiment.
Fig. 7 is the structural representation of the processing unit of another read-write time-out according to an exemplary embodiment.
Fig. 8 is the structural representation of the processing unit of another read-write time-out according to an exemplary embodiment.
Fig. 9 is the structural representation of the processing unit of another read-write time-out according to an exemplary embodiment.
Figure 10 is the structured flowchart of the processing unit for being applied to read-write time-out according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
In correlation technique, traditional socket communications, it is required for setting read-write time-out for the transmission packet in communication. Read-write time-out is a kind of mechanism for detecting network linking and disconnecting.In the case of big data quantity, because system is for read-write time-out An independent timer will be produced, frequently sets read-write time-out to cause no small expense to system resource.In order to solve This problem, the embodiment of the present disclosure propose a kind of processing method for reading and writing time-out, and the method set by optimizing time-out can be with The performance loss for setting time-out to bring is greatly reduced in the case of network high concurrent, reaches the purpose for saving resource.
Fig. 1 is a kind of flow chart of the processing method of read-write time-out according to an exemplary embodiment, such as Fig. 1 institutes Show, the processing method of read-write time-out comprises the following steps 101-103:
In a step 101, all read-write operations occurred in preset time period are obtained.
Preset time period can be configured according to actual conditions, for example, preset time period may be configured as 5S, that is, obtain 5S All read-write operations of interior generation.
In a step 102, when the terminal time preset duration in preset time period, determine read-write operation whether all Read-write is completed.
Preset time period is, for example, 5S, then the terminal time in preset time period is 5S, and preset duration is, for example, 4S, when During terminal time preset duration in preset time period, that is to say, that in 9S, determine all read-writes in 0S-5S All whether read-write is completed for operation.
In step 103, when at least one read-write operation does not read and write completion in read-write operation, first timer sets pre- If the read-write operation time-out in the period, resets second timer.
If in all read-write operations occurred in 0S-5S, there is unfinished read-write operation in 9S fashion, then set Read-write time-out, the second timer of bottom set of laying equal stress on layer, second timer again feedback error to upper strata.
The present embodiment is linked for each socket, and a timer is individually established when starting connection, i.e., first is fixed When device, when read-write operation occurs, first timer can be directed to certain period of time in read-write operation set read-write time-out, without It is that each read-write operation sets once time-out, after setting time-out, reset the second timer of bottom.That is, first The cycle of operation of timer is preset time period (such as 0S-5S), and the triggering cycle of second timer is preset time period (such as 0S- 5S)+preset duration (such as 4S).
The above method of the embodiment of the present disclosure, by obtaining all read-write operations occurred in preset time period, work as distance During terminal time preset duration in preset time period, determine whether all read-write operation complete by read-write, when in read-write operation at least When one read-write operation does not read and write completion, first timer sets the read-write operation time-out in preset time period, and it is fixed to reset second When device.So conventional each read-write operation is required for setting once overtime operation optimization in certain period of time can only enter The replacement of timer of row.Due in the case of big data quantity, not being that each communication is required for setting read-write time-out, lead to Cross and peel away timer logic, the performance loss for setting time-out to bring can be greatly reduced, play the effect of performance optimization.
In one embodiment, as shown in Fig. 2 the processing method of read-write time-out can also include the steps of 104:
At step 104, it is the first value by the read-write mark position of read-write operation when read-write operation occurs.
Step 102 may be implemented as step 1021-1022:
In step 1021, when the terminal time preset duration in preset time period, the reading of read-write operation is detected Write the state of marker bit.
In step 1022, when the read-write marker bit of read-write operation is still worth for first, determine that the read-write operation is not read and write Complete.
In one embodiment, the first value is 1, is 1 by read flag position when read operation occurs;When generation write operation When, it is 1 by mark position.At regular intervals (when being 9S in above-described embodiment), first timer can detect current read-write The state of marker bit, if current read flag position is 1, then think read operation time-out, if current marker bit of writing is 1, write Operation overtime.
In the present embodiment, the state of marker bit is read and write by detecting, can accurately determine the reading occurred in a period of time Whether write operation is overtime.
In one embodiment, as shown in figure 3, the processing method of read-write time-out can also include the steps of 105:
In step 105, when read-write operation, which is read and write, to be completed, it is second that mark position will be read and write corresponding to read-write operation Value.
Step 102 may be implemented as step 1023:
In step 1023, when the terminal time preset duration in preset time period, the read-write mark of read-write operation When note position is second value, determine that read-write operation read-write is completed.
In one embodiment, the first value is 1, second value 0.It is 1 by read flag position when read operation occurs;When It is 1 by mark position during generation write operation.It is 0 by read flag position when read operation is completed;When write operation is completed, will mark It is 0 to remember position.At regular intervals (when being 9S in above-described embodiment), first timer can detect current read-write marker bit State, if current read flag position is 1, then think read operation time-out, if current marker bit of writing is 1, write operation time-out. If current read flag position is 0, then thinks that read operation is completed, if current marker bit of writing is 0, write operation is completed.
In the present embodiment, by the way that in the terminal time preset duration in preset time period, marker bit is read and write in detection State, when read-write operation read-write marker bit still for first value when, it is determined that read-write time-out, when for second value when, it is determined that read-write Operation has been completed.So as to accurately determine whether the read-write operation of generation in a period of time is overtime.
In one embodiment, as shown in figure 4, after step 103, the read-write time-out processing method may also include as Lower step 106:
In step 106, it is second value by the read-write mark position of the read-write operation of time-out.
In the present embodiment, in order to avoid network generation blocking, it is necessary to after first timer sets time-out, by corresponding mark Note position is second value.
Implementation process is discussed in detail below by specific embodiment.
Fig. 5 is a kind of flow chart of the processing method of read-write time-out according to an exemplary embodiment, and this method should In the case of for network high concurrent, wherein, the first value is 1, second value 0, preset time period 5S, preset duration 4S. As shown in figure 5, the processing method of read-write time-out comprises the following steps 501 to step 508:
In step 501, it is the first value by the read-write mark position of read-write operation when read-write operation occurs.
In step 502, when read-write operation, which is read and write, to be completed, it is second that mark position will be read and write corresponding to read-write operation Value.
In step 503, all read-write operations occurred in preset time period are obtained.
In step 504, when the terminal time preset duration in preset time period, sent out in detection preset time period The state of the read-write marker bit of raw all read-write operations.
In step 505, when the read-write marker bit of read-write operation is still worth for first, determine that the read-write operation has not been read and write Into.
In step 506, when the read-write marker bit of read-write operation is second value, determine that read-write operation read-write is completed.
In step 507, when at least one read-write operation does not read and write completion in read-write operation, first timer sets pre- If the read-write operation time-out in the period, resets second timer.
In step 508, it is second value by the read-write mark position of the read-write operation of time-out.
Due in the case of big data quantity, not being that each communication is required for setting read-write time-out., will in the present embodiment Caused repeatedly time-out sets the pattern for being optimized to time set under big data quantity, significantly reduces the performance for setting time-out to bring Loss, play the effect of performance optimization.Test by exploitation, in the case of unit 24w request per second, calculated for cpu Resource can save 15% loss.1 millisecond is asked with primary network, time-out is calculated for 1 second, and the replacement number of timer subtracts 1000 times are lacked.
Following is embodiment of the present disclosure, can be used for performing embodiments of the present disclosure.
Fig. 6 be according to an exemplary embodiment a kind of read-write time-out processing unit structural representation, the dress Putting can be implemented in combination with as some or all of of electronic equipment by software, hardware or both.As shown in fig. 6, should The processing unit of read-write time-out includes:
Acquisition module 61, it is configured as obtaining all read-write operations occurred in preset time period;
Determining module 62, when being configured as the terminal time preset duration in preset time period, it is determined that read-write behaviour Make whether all read-write to complete;
Module 63 is reset, when being configured as that at least one read-write operation does not read and write completion in read-write operation, the first timing Device sets the read-write operation time-out in preset time period, resets second timer.
The present embodiment is linked for each socket, and a timer is individually established when starting connection, i.e., first is fixed When device, when read-write operation occurs, first timer can be directed to certain period of time in read-write operation set read-write time-out, without It is that each read-write operation sets once time-out, after setting time-out, reset the second timer of bottom.That is, first The cycle of operation of timer is preset time period (such as 0S-5S), and the triggering cycle of second timer is preset time period (such as 0S- 5S)+preset duration (such as 4S).
The said apparatus of the embodiment of the present disclosure, by obtaining all read-write operations occurred in preset time period, work as distance During terminal time preset duration in preset time period, determine whether all read-write operation complete by read-write, when in read-write operation at least When one read-write operation does not read and write completion, first timer sets the read-write operation time-out in preset time period, and it is fixed to reset second When device.So conventional each read-write operation is required for setting once overtime operation optimization in certain period of time can only enter The replacement of timer of row.Due in the case of big data quantity, not being that each communication is required for setting read-write time-out, lead to Cross and peel away timer logic, the performance loss for setting time-out to bring can be greatly reduced, play the effect of performance optimization.
In one embodiment, as shown in fig. 7, the processing unit of read-write time-out may also include:
First mark module 64, it is the by the read-write mark position of read-write operation when being configured as occurring read-write operation One value;
Determining module 62, including:
Detection sub-module 621, when being configured as the terminal time preset duration in preset time period, detection read-write The state of the read-write marker bit of operation;
First determination sub-module 622, when the read-write marker bit for being configured as read-write operation is still the first value, it is determined that read-write Completion is not read and write in operation.
In one embodiment, the first value is 1, is 1 by read flag position when read operation occurs;When generation write operation When, it is 1 by mark position.At regular intervals (when being 9S in above-described embodiment), first timer can detect current read-write The state of marker bit, if current read flag position is 1, then think read operation time-out, if current marker bit of writing is 1, write Operation overtime.
In the present embodiment, the state of marker bit is read and write by detecting, can accurately determine the reading occurred in a period of time Whether write operation is overtime.
In one embodiment, as shown in figure 8, the processing unit of read-write time-out may also include:
Second mark module 65, when being configured as read-write operation read-write completion, it will read and write and mark corresponding to read-write operation Position is second value.
Determining module 62, including:
Second determination sub-module 623, when being configured as the terminal time preset duration in preset time period, read-write When the read-write marker bit of operation is second value, determine that read-write operation read-write is completed.
In one embodiment, the first value is 1, second value 0.It is 1 by read flag position when read operation occurs;When It is 1 by mark position during generation write operation.It is 0 by read flag position when read operation is completed;When write operation is completed, will mark It is 0 to remember position.At regular intervals (when being 9S in above-described embodiment), first timer can detect current read-write marker bit State, if current read flag position is 1, then think read operation time-out, if current marker bit of writing is 1, write operation time-out. If current read flag position is 0, then thinks that read operation is completed, if current marker bit of writing is 0, write operation is completed.
In the present embodiment, by the way that in the terminal time preset duration in preset time period, marker bit is read and write in detection State, when read-write operation read-write marker bit still for first value when, it is determined that read-write time-out, when for second value when, it is determined that read-write Operation has been completed.So as to accurately determine whether the read-write operation of generation in a period of time is overtime.
In one embodiment, as shown in figure 9, the processing unit of read-write time-out may also include:
3rd mark module 66, it is second value to be configured as the read-write mark position of the read-write operation of time-out.
In the present embodiment, in order to avoid network generation blocking, it is necessary to after first timer sets time-out, by corresponding mark Note position is second value.
The embodiment of the present disclosure also provides a kind of processing unit for reading and writing time-out, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Obtain all read-write operations occurred in preset time period;
When the terminal time preset duration in the preset time period, determine whether the read-write operation is all read and write Complete;
When at least one read-write operation does not read and write completion in the read-write operation, when first timer sets described default Between read-write operation time-out in section, reset second timer.
Above-mentioned processor is additionally configured to:
It is the first value by the read-write mark position of the read-write operation when read-write operation occurs;
When the terminal time preset duration in the preset time period, the read-write mark of the read-write operation is detected The state of position;
When the read-write marker bit of the read-write operation is still worth for first, determine that the read-write operation does not read and write completion.
Above-mentioned processor is additionally configured to:
It is second value by mark position is read and write corresponding to the read-write operation when the read-write operation, which is read and write, to be completed.
When the terminal time preset duration in the preset time period, the read-write marker bit of the read-write operation is During second value, determine that the read-write operation read-write is completed.
Above-mentioned processor is additionally configured to:
Read-write mark position by the read-write operation of time-out is second value.
Figure 10 be according to an exemplary embodiment it is a kind of be used for read and write time-out processing unit block diagram, the device Suitable for terminal device.For example, device 1200 can be mobile phone, and computer, digital broadcast terminal, messaging devices, Game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
Device 1200 can include following one or more assemblies:Processing component 1202, memory 1204, power supply module 1206, multimedia groupware 1208, audio-frequency assembly 1210, the interface 1212 of input/output (I/O), sensor cluster 1214, and Communication component 1216.
The integrated operation of the usual control device 1200 of processing component 1202, such as communicated with display, call, data, The operation that camera operation and record operation are associated.Processing component 1202 can include one or more processors 1220 to perform Instruction, to complete all or part of step of above-mentioned method.In addition, processing component 1202 can include one or more moulds Block, the interaction being easy between processing component 1202 and other assemblies.For example, processing component 1202 can include multi-media module, To facilitate the interaction between multimedia groupware 1208 and processing component 1202.
Memory 1204 is configured as storing various types of data to support the operation in device 1200.These data Example includes being used for the instruction of any application program or method operated on device 1200, contact data, telephone book data, Message, picture, video etc..Memory 1204 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), it is erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash memory Reservoir, disk or CD.
Power supply module 1206 provides electric power for the various assemblies of device 1200.Power supply module 1206 can include power management System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 1200.
Multimedia groupware 1208 is included in the screen of one output interface of offer between described device 1200 and user. In some embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch and passed Sensor is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or slip be dynamic The border of work, but also detect the duration and pressure related to the touch or slide.In certain embodiments, it is more Media component 1208 includes a front camera and/or rear camera.When device 1200 is in operator scheme, mould is such as shot When formula or video mode, front camera and/or rear camera can receive outside multi-medium data.Each preposition shooting Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio-frequency assembly 1210 is configured as output and/or input audio signal.For example, audio-frequency assembly 1210 includes a wheat Gram wind (MIC), when device 1200 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone quilt It is configured to receive external audio signal.The audio signal received can be further stored in memory 1204 or via communication Component 1216 is sent.In certain embodiments, audio-frequency assembly 1210 also includes a loudspeaker, for exports audio signal.
I/O interfaces 1212 provide interface, above-mentioned peripheral interface module between processing component 1202 and peripheral interface module Can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and Locking press button.
Sensor cluster 1214 includes one or more sensors, and the state for providing various aspects for device 1200 is commented Estimate.For example, sensor cluster 1214 can detect opening/closed mode of device 1200, the relative positioning of component, such as institute The display and keypad that component is device 1200 are stated, sensor cluster 1214 can be with detection means 1200 or device 1,200 1 The position of individual component changes, the existence or non-existence that user contacts with device 1200, the orientation of device 1200 or acceleration/deceleration and dress Put 1200 temperature change.Sensor cluster 1214 can include proximity transducer, be configured in no any physics The presence of object nearby is detected during contact.Sensor cluster 1214 can also include optical sensor, as CMOS or ccd image are sensed Device, for being used in imaging applications.In certain embodiments, the sensor cluster 1214 can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1216 is configured to facilitate the communication of wired or wireless way between device 1200 and other equipment.Dress The wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof can be accessed by putting 1200.It is exemplary at one In embodiment, communication component 1216 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, the communication component 1216 also includes near-field communication (NFC) module, to promote short distance Communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 1200 can be by one or more application specific integrated circuits (ASIC), numeral Signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 1204 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 1220 of device 1200.Example Such as, the non-transitorycomputer readable storage medium can be ROM, it is random access memory (RAM), CD-ROM, tape, soft Disk and optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of device 1200 When device performs so that device 1200 is able to carry out the processing method of above-mentioned read-write time-out, and methods described includes:
Obtain all read-write operations occurred in preset time period;
When the terminal time preset duration in the preset time period, determine whether the read-write operation is all read and write Complete;
When at least one read-write operation does not read and write completion in the read-write operation, when first timer sets described default Between read-write operation time-out in section, reset second timer.
In one embodiment, methods described may also include:
It is the first value by the read-write mark position of the read-write operation when read-write operation occurs;
It is described when the terminal time preset duration in the preset time period, determine the read-write operation whether all Read-write is completed, including:
When the terminal time preset duration in the preset time period, the read-write mark of the read-write operation is detected The state of position;
When the read-write marker bit of the read-write operation is still worth for first, determine that the read-write operation does not read and write completion.
In one embodiment, methods described may also include:
It is second value by mark position is read and write corresponding to the read-write operation when the read-write operation, which is read and write, to be completed.
It is described when the terminal time preset duration in the preset time period, determine the read-write operation whether all Read-write is completed, including:
When the terminal time preset duration in the preset time period, the read-write marker bit of the read-write operation is During second value, determine that the read-write operation read-write is completed.
In one embodiment, described when at least one read-write operation does not read and write completion in the read-write operation, if After putting the read-write operation time-out in the preset time period, methods described may also include:
Read-write mark position by the read-write operation of time-out is second value.
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice disclosure disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledges in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the precision architecture that the disclosure is not limited to be described above and is shown in the drawings, and And various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (10)

  1. A kind of 1. processing method for reading and writing time-out, it is characterised in that including:
    Obtain all read-write operations occurred in preset time period;
    When the terminal time preset duration in the preset time period, determine whether the read-write operation has all been read and write Into;
    When at least one read-write operation does not read and write completion in the read-write operation, first timer sets the preset time period Interior read-write operation time-out, resets second timer.
  2. 2. according to the method for claim 1, it is characterised in that methods described also includes:
    It is the first value by the read-write mark position of the read-write operation when read-write operation occurs;
    It is described when the terminal time preset duration in the preset time period, determine whether the read-write operation is all read and write Complete, including:
    When the terminal time preset duration in the preset time period, the read-write marker bit of the read-write operation is detected State;
    When the read-write marker bit of the read-write operation is still worth for first, determine that the read-write operation does not read and write completion.
  3. 3. according to the method for claim 2, it is characterised in that methods described also includes:
    It is second value by mark position is read and write corresponding to the read-write operation when the read-write operation, which is read and write, to be completed;
    It is described when the terminal time preset duration in the preset time period, determine whether the read-write operation is all read and write Complete, including:
    When the terminal time preset duration in the preset time period, the read-write marker bit of the read-write operation is second During value, determine that the read-write operation read-write is completed.
  4. 4. according to the method in claim 2 or 3, it is characterised in that at least one reading in working as the read-write operation When write operation does not read and write completion, after setting the read-write operation time-out in the preset time period, methods described also includes:
    Read-write mark position by the read-write operation of time-out is second value.
  5. A kind of 5. processing unit for reading and writing time-out, it is characterised in that including:
    Acquisition module, for obtaining all read-write operations occurred in preset time period;
    Determining module, for when the terminal time preset duration in the preset time period, determining the read-write operation Whether all read-write is completed;
    Module is reset, for when at least one read-write operation does not read and write completion in the read-write operation, first timer to be set Read-write operation time-out in the preset time period, resets second timer.
  6. 6. device according to claim 5, it is characterised in that described device also includes:
    First mark module, for being the first value by the read-write mark position of the read-write operation when read-write operation occurs;
    The determining module, including:
    Detection sub-module, for when the terminal time preset duration in the preset time period, detecting the read-write behaviour The state of the read-write marker bit of work;
    First determination sub-module, for when the read-write marker bit of the read-write operation is still worth for first, determining the read-write behaviour Completion is not read and write.
  7. 7. device according to claim 6, it is characterised in that described device also includes:
    Second mark module, for when the read-write operation reads and writes completion, marker bit will to be read and write corresponding to the read-write operation It is set to second value.
    The determining module, including:
    Second determination sub-module, for when the terminal time preset duration in the preset time period, the read-write to be grasped When the read-write marker bit of work is second value, determine that the read-write operation read-write is completed.
  8. 8. the device according to claim 6 or 7, it is characterised in that described device also includes:
    3rd mark module, for being second value by the read-write mark position of the read-write operation of time-out.
  9. A kind of 9. processing unit for reading and writing time-out, it is characterised in that including:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    Obtain all read-write operations occurred in preset time period;
    When the terminal time preset duration in the preset time period, determine whether the read-write operation has all been read and write Into;
    When at least one read-write operation does not read and write completion in the read-write operation, first timer sets the preset time period Interior read-write operation time-out, resets second timer.
  10. 10. a kind of computer-readable recording medium, is stored thereon with computer instruction, it is characterised in that the instruction is processed The step of device realizes method any one of Claims 1-4 when performing.
CN201710720127.4A 2017-08-21 2017-08-21 Processing method and device for read-write timeout and computer readable storage medium Active CN107704489B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710720127.4A CN107704489B (en) 2017-08-21 2017-08-21 Processing method and device for read-write timeout and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710720127.4A CN107704489B (en) 2017-08-21 2017-08-21 Processing method and device for read-write timeout and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107704489A true CN107704489A (en) 2018-02-16
CN107704489B CN107704489B (en) 2021-04-13

Family

ID=61169666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710720127.4A Active CN107704489B (en) 2017-08-21 2017-08-21 Processing method and device for read-write timeout and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107704489B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108519947A (en) * 2018-04-02 2018-09-11 郑州云海信息技术有限公司 The method and tool of read-write register under a kind of Linux
CN110018789A (en) * 2019-03-26 2019-07-16 记忆科技(深圳)有限公司 The method, apparatus and storage medium of the Tr and Tprom time of dynamic adaptation NAND

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8386667B2 (en) * 2008-08-26 2013-02-26 Sun Management, Llc Techniques for managing the transmission and reception of data fragments
CN103019651A (en) * 2012-08-02 2013-04-03 青岛海信传媒网络技术有限公司 Parallel processing method and device for complex tasks
CN103477331A (en) * 2012-02-20 2013-12-25 松下电器产业株式会社 Initiator apparatus, target apparatus, communication system, timeout detection method, and timeout detection program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8386667B2 (en) * 2008-08-26 2013-02-26 Sun Management, Llc Techniques for managing the transmission and reception of data fragments
CN103477331A (en) * 2012-02-20 2013-12-25 松下电器产业株式会社 Initiator apparatus, target apparatus, communication system, timeout detection method, and timeout detection program
CN103019651A (en) * 2012-08-02 2013-04-03 青岛海信传媒网络技术有限公司 Parallel processing method and device for complex tasks

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108519947A (en) * 2018-04-02 2018-09-11 郑州云海信息技术有限公司 The method and tool of read-write register under a kind of Linux
CN110018789A (en) * 2019-03-26 2019-07-16 记忆科技(深圳)有限公司 The method, apparatus and storage medium of the Tr and Tprom time of dynamic adaptation NAND
CN110018789B (en) * 2019-03-26 2022-03-25 记忆科技(深圳)有限公司 Method, device and storage medium for dynamically adapting Tr and Tprom time of NAND

Also Published As

Publication number Publication date
CN107704489B (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN106951884A (en) Gather method, device and the electronic equipment of fingerprint
CN104184870A (en) Call log marking method and device and electronic equipment
CN103916468B (en) Method for upgrading system, terminal, server and upgrade-system
CN104461304A (en) Application control method and device
CN107608561A (en) Touch-screen control method and device
CN104506443A (en) Router setting interface display method and device
CN104503690A (en) Arrangement method and device for application icons
CN104020924A (en) Label establishing method and device and terminal
CN103942047A (en) User instruction execution method and device
CN106033397A (en) Method and device for adjusting memory buffer, and terminal
CN107239351A (en) Method of attaching and device
CN104461283A (en) Network view screen shooting method and device and electronic device
CN104407924A (en) Method and device for optimizing internal memory
CN106897009A (en) Mobile device time display method and device
CN105335198A (en) Font addition method and device
CN106354878A (en) Page management method and device
CN105975038A (en) Prompt method and device of charging port detection result
CN107562500A (en) Debugging apparatus, method and apparatus
CN107392160A (en) Optical finger print recognition methods and device, computer-readable recording medium
CN104539497B (en) Method for connecting network and device
CN106547705A (en) USB (universal serial bus) operating mode control method and device
CN107704489A (en) Read and write processing method, device and the computer-readable recording medium of time-out
CN104035764A (en) Object control method and relevant device
CN105653186A (en) Terminal control method and device
CN104765686B (en) The method and device of test application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant