CN104601655B - The control method and device of smart jack - Google Patents

The control method and device of smart jack Download PDF

Info

Publication number
CN104601655B
CN104601655B CN201410742764.8A CN201410742764A CN104601655B CN 104601655 B CN104601655 B CN 104601655B CN 201410742764 A CN201410742764 A CN 201410742764A CN 104601655 B CN104601655 B CN 104601655B
Authority
CN
China
Prior art keywords
smart jack
command
client
external command
command buffer
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.)
Active
Application number
CN201410742764.8A
Other languages
Chinese (zh)
Other versions
CN104601655A (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.)
DONGGUAN ORIENT ELECTRONICS & METAL Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410742764.8A priority Critical patent/CN104601655B/en
Publication of CN104601655A publication Critical patent/CN104601655A/en
Application granted granted Critical
Publication of CN104601655B publication Critical patent/CN104601655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R13/00Details of coupling devices of the kinds covered by groups H01R12/70 or H01R24/00 - H01R33/00
    • H01R13/66Structural association with built-in electrical component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1671Details of the supervisory signal the supervisory signal being transmitted together with control information
    • H04L1/1678Details of the supervisory signal the supervisory signal being transmitted together with control information where the control information is for timing, e.g. time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to electronic technology field, and in particular to a kind of control method and device of smart jack.The control method of smart jack, step 1, smart jack determine whether that client sends an external command to smart jack;Step 2, smart jack judges whether external command is subjected to, if not, smart jack produces a status information, client resends external command, repeat step 1 after postponing setting time according to status information;Step 3, external command is inserted into a command buffer alignment;Step 4, the order according to command buffer alignment performs the order in command buffer alignment successively.The present invention performs remote command by consulting with client, on the one hand prevents socket from causing buffer overflow due to ordering excessive;On the other hand the pressure for performing in the socket short time and excessively ordering is mitigated;Be smart jack perform from the remote command of client when, there is provided more efficient solution.

Description

The control method and device of smart jack
Technical field
The present invention relates to electronic technology field, and in particular to a kind of control method and device of smart jack.
Background technology
Many smart jacks support user to carry out remote control to it by LAN or internet at present.Routinely, Smart jack receives the remote command requests that client is sent, and after order is finished, returns result to client.Such as Simultaneously, or unique user continuously transmits a plurality of order to socket to the multiple users of fruit, then and socket would generally cache these orders, Then perform one by one and return result to client.But the shortcomings that prior art be once remote command be sent to too much it is slotting Seat, excessive pressure will be brought to socket, if processing is not in time, it is easy to cause order to lose.
The content of the invention
It is an object of the present invention to provide a kind of control method of smart jack, solves above technical problem.
The present invention also aims to, there is provided a kind of control device of smart jack, solve above technical problem.
Technical problem solved by the invention can be realized using following technical scheme:
The present invention provides a kind of control method of smart jack, wherein, comprise the following steps:
Step 1, smart jack determines whether that client sends an external command to the smart jack;
Step 2, the smart jack judges whether the external command is subjected to, if not, the smart jack produces One status information, the client resend the external command after postponing setting time according to the status information, repeat Step 1;
Step 3, the external command is inserted into a command buffer alignment;
Step 4, the order according to the command buffer alignment performs the order in the command buffer alignment successively.
The control method of the smart jack of the present invention, the step 2 comprise the following steps that:
Step 21:The smart jack judges whether the command buffer alignment is full, if full, performs step 26;
Step 22, each corresponding timeout value of order waited in line in the command buffer alignment is obtained;
Step 23, all orders in the command buffer alignment are calculated to be finished stand-by period of needs;
Step 24, the stand-by period timeout value corresponding with the external command that active client is sent is calculated Difference;
Step 25, judge whether the difference is more than zero, if not, performing step 3;
Step 26, the smart jack returns to one to the client and refers to delay time value, and the client is according to institute State and resend the external command, repeat step 1 with reference to after delay time value delay setting time.
The present invention also provides a kind of control device of smart jack, for implementing the control method of above-mentioned smart jack, Including,
Interface module, it is connected with the client, for receiving the external command;
Memory module, stores the command buffer alignment, and the command buffer alignment includes the order waited in line successively;
Judge module, judge whether the external command is subjected to according to imposing a condition;
Order add module, to add the external command to the command buffer alignment;
Execution module, sequentially perform the order in the command buffer alignment.
The smart jack control device of the present invention, the memory module also store the corresponding timeout value of each order.
The smart jack control device of the present invention, the judge module includes one and overflows judge module, described to judge Whether command buffer alignment is full.
The smart jack control device of the present invention, the judge module includes the first computing module, to calculate current life All orders waited in line in buffering queue are made to be finished stand-by period of needs.
The smart jack control device of the present invention, the judge module also includes the second computing module, to will be described etc. Treat that time and the timeout value of the external command take difference.
The smart jack control device of the present invention, the interface module connect a local area network or cloud server, connect Receive the external command that the client being connected with the local area network or the cloud server is sent.
Beneficial effect:Due to using above technical scheme, the present invention performs remote command, a side by consulting with client Face prevents socket from causing buffer overflow due to ordering excessive;On the other hand mitigate and perform what is excessively ordered in the socket short time Pressure;Due to the status information that client can return according to socket, order is resend after reasonably postponing setting time, from And improve Consumer's Experience;It is smart jack when performing from the remote command of client, there is provided more efficient solution sees, And realize relatively easy.
Brief description of the drawings
Fig. 1 is the method flow schematic diagram of the present invention;
Fig. 2 is a kind of method flow schematic diagram of embodiment of the step 2 of the present invention;
Fig. 3 is the system framework schematic diagram of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art obtained on the premise of creative work is not made it is all its His embodiment, belongs to the scope of protection of the invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the present invention can phase Mutually combination.
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings, but not as limiting to the invention.
Reference picture 1, the control method of smart jack, wherein, comprise the following steps:
Step 1, smart jack determines whether that client sends an external command to smart jack;
Step 2, smart jack judges whether external command is subjected to, if not, smart jack produces a status information, visitor Family end resends external command after postponing setting time according to status information;
Step 3, external command is inserted into a command buffer alignment;
Step 4, the order according to command buffer alignment performs the order in command buffer alignment successively.
In order to ensure the read-write uniformity of data, smart jack is typically serially to perform these orders one by one, then rearward Order before the client of transmission order just needs to wait until is finished, and could obtain result, and the stand-by period is possible to longer, So as to influence the Consumer's Experience of client.The hardware processing capability of smart jack in itself is limited after all, if this raising hardware Performance, manufacturing cost will be increased.The control method of the smart jack of the present invention is first assessed after long-range external command is received The current processing capabilities of system, if resource allows, just receive external command and be placed into command buffer alignment to wait in line to perform; If it find that system is busy or resource soon reaches critical point, the status information of socket is returned to inform client, state Information can be some reference values, for example suggest when client resends order.
The control method of the smart jack of the present invention, reference picture 2, one kind of step 2 comprise the following steps that:
Step 21:Smart jack judges whether command buffer alignment is full, if full, performs step 26;
Step 22, each corresponding timeout value of order waited in line in command buffer alignment is obtained;
Step 23, all orders in calculation command buffering queue are finished the stand-by period of needs;
Step 24, the difference of the stand-by period timeout value corresponding with the external command that active client is sent is calculated;
Step 25, judge whether difference is more than zero, if not, performing step 3;
Step 26, smart jack returns to one to client and refers to delay time value, and client foundation refers to delay time value External command, repeat step 1 are resend after delay setting time.
Smart jack needs the timeout value (command_timeout) of every order of predefined, and specially sets up one Module carries out system resource assessment.When smart jack receives the external command of client, first the external command is carried out Assess, if external command can receive, be put into queue waiting and perform;Otherwise return a time delay, and by this Time delay is passed back to client, and a reference value of the external command is resend as delay.
The key point of the present invention is how whether accurate evaluation goes out order can be by timely processing.On the one hand, it is more accurate to assess, Socket is higher with the coordinating efficiency of client;But then, assessment can also consume jack system resource, and technology in itself Difficulty also can accordingly increase.So balance will be obtained between the two in accuracy and performance by assessing.The implementation process of step 2 can be with Flexibly selection other modes, it is therefore intended that prevent smart jack is before order is from timely processing, can be by the shape of smart jack State information returns to client, and issues the reference value of a time delay, for example is resend after suggesting client delay 2 seconds outer Portion's order.
Step 2 can be realized by following computer program, and pseudo-code is given below:
The present invention also provides a kind of control device of smart jack, reference picture 3, for implementing the control of above-mentioned smart jack Method processed, including,
Interface module 1, is connected with client, for receiving external command;
Memory module 2, stores command buffer alignment, and command buffer alignment includes the order waited in line successively;
Judge module 3, judges whether external command is subjected to;
Order add module 4, to add external command to command buffer alignment;
Execution module 5, order perform the order in command buffer alignment.
The smart jack control device of the present invention, memory module 2 also store the corresponding timeout value of each order.
The smart jack control device of the present invention, judge module 3 can include one and overflow judge module, described to judge Whether command buffer alignment is full.
The smart jack control device of the present invention, judge module 3 can also include the first computing module, current to calculate All orders waited in line in command buffer alignment are finished stand-by period of needs;
The smart jack control device of the present invention, judge module 3 can with the second computing module, to by the stand-by period with External command timeout value takes difference.
The smart jack control device of the present invention, interface module 1 connect a local area network or cloud server, receive with The external command that local area network or the client of cloud server connection are sent.
The present invention realize it is relatively easy, by with client consult perform remote command, on the one hand prevent socket due to life Order is excessive and causes buffer overflow;On the other hand the pressure for performing in the socket short time and excessively ordering is mitigated;Due to client The status information that can be returned according to socket, reasonably postpones or retransmits order, so as to improve Consumer's Experience;Exist for smart jack Perform from the remote command of client when, there is provided more efficient solution.
Preferred embodiments of the present invention are the foregoing is only, not thereby limit embodiments of the present invention and protection model Enclose, to those skilled in the art, should can appreciate that all with made by description of the invention and diagramatic content Scheme obtained by equivalent substitution and obvious change, should be included in protection scope of the present invention.

Claims (8)

1. the control method of smart jack, it is characterised in that comprise the following steps:
Step 1, smart jack determines whether that client sends an external command to the smart jack;
Step 2, the smart jack judges whether the external command is subjected to, if not, the smart jack produces a shape State information, the client resend the external command, repeat step after postponing setting time according to the status information 1;If it is, perform step 3;
Step 3, the external command is inserted into a command buffer alignment;
Step 4, the order according to the command buffer alignment performs the order in the command buffer alignment successively.
2. the control method of smart jack according to claim 1, it is characterised in that the specific steps of the step 2 are such as Under:
Step 21:The smart jack judges whether the command buffer alignment is full, if full, performs step 26;If Less than execution step 22;
Step 22, each corresponding timeout value of order waited in line in the command buffer alignment is obtained;
Step 23, all orders in the command buffer alignment are calculated to be finished stand-by period of needs;
Step 24, the difference of the stand-by period timeout value corresponding with the external command that active client is sent is calculated Value;
Step 25, judge whether the difference is more than zero, if not, performing step 3;If it is, perform step 26;
Step 26, the smart jack returns to one to the client and refers to delay time value, and the client is according to the ginseng The external command, repeat step 1 are resend after examining delay time value delay setting time.
3. the control device of smart jack, it is characterised in that for implementing the controlling party of the smart jack described in claim 1 Method, including,
Interface module, it is connected with the client, for receiving the external command;
Memory module, stores the command buffer alignment, and the command buffer alignment includes the order waited in line successively;
Judge module, judges whether the external command is subjected to;
Order add module, to add the external command to the command buffer alignment;
Execution module, sequentially perform the order in the command buffer alignment.
4. smart jack control device according to claim 3, it is characterised in that the memory module also stores each life Make corresponding timeout value.
5. smart jack control device according to claim 3, it is characterised in that the judge module includes a spilling and sentenced Disconnected module, to judge whether the command buffer alignment is full.
6. smart jack control device according to claim 4, it is characterised in that the judge module includes first and calculated Module, it is finished stand-by period of needs to calculate all orders waited in line in the current command buffering queue.
7. smart jack control device according to claim 6, it is characterised in that the judge module also includes the second meter Module is calculated, the timeout value of the stand-by period and the external command is taken into difference.
8. smart jack control device according to claim 3, it is characterised in that the interface module connects a local office Domain net or cloud server, receive the institute that the client being connected with the local area network or the cloud server is sent State external command.
CN201410742764.8A 2014-12-05 2014-12-05 The control method and device of smart jack Active CN104601655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410742764.8A CN104601655B (en) 2014-12-05 2014-12-05 The control method and device of smart jack

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410742764.8A CN104601655B (en) 2014-12-05 2014-12-05 The control method and device of smart jack

Publications (2)

Publication Number Publication Date
CN104601655A CN104601655A (en) 2015-05-06
CN104601655B true CN104601655B (en) 2018-02-13

Family

ID=53127149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410742764.8A Active CN104601655B (en) 2014-12-05 2014-12-05 The control method and device of smart jack

Country Status (1)

Country Link
CN (1) CN104601655B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027341A (en) * 2016-06-21 2016-10-12 杭州古北电子科技有限公司 Control method of smart home device
CN112769895B (en) * 2020-12-18 2023-10-13 杭州涂鸦信息技术有限公司 Group or scene control method and related device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6810437B1 (en) * 1999-05-25 2004-10-26 Mitsubishi Denki Kabushiki Kaisha Peripheral unit for a programmable controller
CN101751291A (en) * 2009-12-30 2010-06-23 广东威创视讯科技股份有限公司 Method of sharing one serial port by application programs and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6810437B1 (en) * 1999-05-25 2004-10-26 Mitsubishi Denki Kabushiki Kaisha Peripheral unit for a programmable controller
CN101751291A (en) * 2009-12-30 2010-06-23 广东威创视讯科技股份有限公司 Method of sharing one serial port by application programs and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于电力线载波的智能插座设计》;刘迎澍;《电子设计工程》;20140430;第22卷(第7期);全文 *

Also Published As

Publication number Publication date
CN104601655A (en) 2015-05-06

Similar Documents

Publication Publication Date Title
WO2022116323A1 (en) Federated learning scheduling method, device, and system
CN109918205B (en) Edge equipment scheduling method, system, device and computer storage medium
CN103685309B (en) The method for building up of Asynchronous Request queue towards map visualization tile service access
CN114548426B (en) Asynchronous federal learning method, business service prediction method, device and system
CN107257363B (en) Method and system for responding request of request terminal
CN110806928A (en) Job submitting method and system
CN104601655B (en) The control method and device of smart jack
CN114564435A (en) Inter-core communication method, device and medium for heterogeneous multi-core chip
CN107454136B (en) Calculation unloading method and device based on end-to-end P2P and control equipment
US10044833B2 (en) Data processing method and apparatus used for terminal application
CN113839998B (en) Image data transmission method, apparatus, device, storage medium, and program product
CN103049215B (en) The method of IO command process and solid state hard disc thereof
CN112948081B (en) Method, device, equipment and storage medium for processing tasks in delayed mode
WO2018133651A1 (en) Data loading method and device, storage medium and electronic device
CN107797870A (en) A kind of cloud computing data resource dispatching method
CN113641688B (en) Node updating method, related device and computer program product
CN103745399A (en) Auction processing system and method
CN107689979B (en) method and equipment for processing download request
CN110769272A (en) Node adjusting method and related equipment thereof
US11134116B2 (en) System and method for dynamically loading a webpage
CN115529186A (en) SSL certificate unloading method, device and system based on soft load balancing
CN110868330A (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
US20230188538A1 (en) Communication Systems and Methods for Validation of a Transaction Via Consensus in A Distributed Network Environment
CN114090247A (en) Method, device, equipment and storage medium for processing data
CN106790634B (en) A kind of method and apparatus for being used to determine whether to initiate backup request

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201104

Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee after: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Guangfulin road 4855 Lane 20

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210127

Address after: 523460 building A2, Zhigu Science Park, Gekeng Industrial Zone, Hengli Town, Dongguan City, Guangdong Province

Patentee after: DONGGUAN ORIENT ELECTRONICS & METAL Co.,Ltd.

Address before: 318015 no.2-3167, area a, nonggangcheng, 2388 Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee before: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right