CN113823025B - Command retry method, system, device and storage medium - Google Patents

Command retry method, system, device and storage medium Download PDF

Info

Publication number
CN113823025B
CN113823025B CN202110973580.2A CN202110973580A CN113823025B CN 113823025 B CN113823025 B CN 113823025B CN 202110973580 A CN202110973580 A CN 202110973580A CN 113823025 B CN113823025 B CN 113823025B
Authority
CN
China
Prior art keywords
command
issuing
retry
failed
commands
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
CN202110973580.2A
Other languages
Chinese (zh)
Other versions
CN113823025A (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.)
Ralid Information System Co ltd
Original Assignee
Ralid Information System 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 Ralid Information System Co ltd filed Critical Ralid Information System Co ltd
Priority to CN202110973580.2A priority Critical patent/CN113823025B/en
Publication of CN113823025A publication Critical patent/CN113823025A/en
Application granted granted Critical
Publication of CN113823025B publication Critical patent/CN113823025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/30Individual registration on entry or exit not involving the use of a pass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The invention discloses a command retry method, a system, equipment and a storage medium, wherein the command retry method is applied to an access control system and specifically comprises the following steps of S1: acquiring a command with failed issuing, and time ordering the command with failed issuing; step S2: and checking each command which fails to be issued in sequence, judging whether the command meets the retry condition, and re-issuing the command meeting the retry condition. The invention judges the retry condition of the command which fails to be issued, and leads the command which meets the retry condition to be issued again, thereby improving the final consistency of software and hardware data; the command retry method is applied to the field of the access control system, is embedded into a command issuing flow of the access control core service, ensures that the authorization information of the access control software is kept consistent with the information of the access control controller, and reduces the error rate of the operation of the access control system.

Description

Command retry method, system, device and storage medium
Technical Field
The present invention relates to the field of intelligent access control systems, and in particular, to a command retry method, system, device, and storage medium.
Background
At present, an intelligent access control system comprises software and hardware, authorization information and hardware parameter information of the system are input through a software system and are transmitted to hardware equipment after being converted into a series of commands, the process is an asynchronous process, errors occur in any link in the asynchronous process, consistency of software and hardware data can be affected, the software and hardware data cannot be matched, and the situation that the access control system cannot work normally occurs.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a command retry method for retrying a failed command, thereby improving the consistency of software and hardware data.
The second objective of the present invention is to provide a command retry system, which improves the final consistency of software and hardware data.
The third objective of the present invention is to provide an intelligent access controller, which executes the command retry method.
A fourth object of the present invention is to provide a storage medium, which performs the above command retry method.
One of the purposes of the invention is realized by adopting the following technical scheme:
a command retry method is applied to an access control system, and comprises the following steps:
acquiring a command with failed issuing, and time ordering the command with failed issuing;
and checking each command which fails to be issued in sequence, judging whether the command meets the retry condition, and re-issuing the command meeting the retry condition.
Further, the method for acquiring the command with failed issuing comprises the following steps:
periodically inquiring and acquiring a command stored in a database and failed to be issued and acquiring a command executed in a buffer; the database is provided with a failure command buffer area for storing the generated but failed command.
Further, after the command for issuing the failure is obtained, the method further includes:
judging whether the command which fails to be issued is a formatted command or not, if the command which fails to be issued is the formatted command and other commands with the same targets are behind the command, discarding the formatted command and moving the formatted command to an executed table; if the command which fails to be issued is not the formatted command, continuing to execute the retry operation;
judging whether the command with the same identification field exists in the command with the failed issuing, if so, merging the commands with the same identification field; if not, the retry operation is continued.
Further, the method for judging whether the command meets the retry condition is as follows:
judging whether the command is out of date according to the command issuing time;
judging whether the command reaches the preset retry interval time;
judging whether the command is a formatted command or has the same identification field as other commands;
judging whether the command is in a state to be retried;
if the command is judged to be a valid command, the command reaches the retry interval time, the command is different from the command of the emptying device, the same identification field does not exist in other commands, and the command is in a state to be retried and accords with the retry condition; if any condition is not met, the retry operation is abandoned, and the record of the command with failed issuing in the database is reserved.
Further, the method for re-issuing the command meeting the retry condition comprises the following steps:
adding the command meeting the retry condition into the message queue, and sequentially issuing the commands in the message queue according to the queue sequence of the message queue.
Further, before issuing the command in the message queue, the method further comprises:
and packaging the commands according to the equipment type and the service type, and uniformly issuing the packaged commands.
Further, when the command in the message queue is issued, the method further comprises:
updating the command state to the issuing state, and feeding back and displaying the command state.
The second purpose of the invention is realized by adopting the following technical scheme:
a command retry system that performs the command retry method described above, comprising:
the command issuing thread is used for receiving and issuing commands and storing failure commands into the failure command buffer area when the command issuing fails;
the message retry procedure is used for acquiring the failure command in the failure command buffer zone and judging whether the failure command accords with the retry condition;
and the message queue is used for storing the normal command and the failed command meeting the retry condition and issuing the commands in the message queue according to the queue order.
The third purpose of the invention is realized by adopting the following technical scheme:
an intelligent access controller comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the command retry method when executing the computer program.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a storage medium having stored thereon a computer program which when executed implements the command retry method described above.
Compared with the prior art, the invention has the beneficial effects that:
the invention judges the retry condition of the command which fails to be issued, and leads the command which meets the retry condition to be issued again, thereby improving the final consistency of software and hardware data; the command retry method is applied to the field of the access control system, is embedded into a command issuing flow of the access control core service, ensures that the authorization information of the access control software is kept consistent with the information of the access control controller, and reduces the error rate of the operation of the access control system.
Drawings
FIG. 1 is a schematic diagram of a method of command retries according to the present invention;
FIG. 2 is a schematic diagram of the overall flow of the command retry method of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and detailed description, wherein it is to be understood that, on the premise of no conflict, the following embodiments or technical features may be arbitrarily combined to form new embodiments.
Example 1
The embodiment provides a command retry method, which is applied to an access control system, and can improve the final consistency of the authorization information of access control software and the information of an access control controller.
As shown in fig. 1 and 2, the command retry method of the present invention specifically includes the following steps:
step S1: acquiring a command with failed issuing, and time ordering the command with failed issuing;
step S2: and checking each command which fails to be issued in sequence, judging whether the command meets the retry condition, and re-issuing the command meeting the retry condition.
The method comprises the steps that a series of commands can be generated in the access control system through authorization information and hardware parameter information input by a software system, the generated commands are added to a to-be-issued list, and a command issuing thread sequentially issues the commands in the to-be-issued list to hardware equipment of the access control system, namely, issued to an access control controller to perform a series of verification work; when the issuing fails, the generated command which is not successfully issued is stored in a database, and a failure command buffer area is arranged in the database and used for storing the generated command which is not successfully issued.
In this embodiment, the failed issuing command is obtained through the message retry process, where the failed issuing command is mainly divided into a command that has been executed in the buffer and a command that failed issuing in the history record in the database. For executed commands, the executed commands can be directly abandoned, and for unexecuted commands with failed issuing, retry operation is needed.
The command with failed issuing can be obtained by means of timing inquiry, the command which is executed in the timing acquisition buffer and the command with failed issuing stored in the database are inquired and obtained at timing, so that timeliness of command acquisition is ensured.
The access controller can perform formatting operation before normal use, so that all data existing in the access controller are deleted, and reset to an initial value for a new user to use; therefore, after obtaining the command with failed issuing, the command with failed issuing needs to be subjected to formatting judgment, so as to judge whether the command with failed issuing is a formatting command, if so, the command needs to be abandoned.
Because the formatted command has the unique command type, the embodiment obtains whether the command is the formatted command by judging the command type of the command, and gives up the formatted command after judging that the command which is failed to be issued is the formatted command and other commands with the same targets are arranged behind the command, changes the state of the formatted command into giving up and moves the state of the formatted command to an executed table; if the failed command is not the formatted command, the retry operation is continued.
Meanwhile, as different access control clients may operate the same authorization information, the same command corresponding to different devices is generated, after the formatted command is judged, whether the command which fails to be issued conflicts with other commands is also needed to be judged, namely whether the command which fails to be issued has the same Dataid is judged, if so, the commands of the same Dataid are combined to reduce the command transmission quantity; if not, the retry operation is continued.
After the above processing, the formatted commands are deleted, and after the same commands are combined, the retry condition is determined for the remaining commands that have not been issued successfully, in this embodiment, it is determined whether the commands satisfy the retry condition, and the following five conditions are required to be determined, where the five conditions are respectively:
1. judging whether the command is expired; since the expiration time of issuing the command is defaulted to 24 hours when the system configures the command, when the command deadline is judged, whether the issuing time interval of the command exceeds 24 hours or not is judged according to the issuing time of the command, if yes, the command is expired, if not, the command is not expired, and the command is still in a valid state.
2. Judging whether the command reaches the preset retry interval time; the preset retry interval in this embodiment is calculated according to the interval time of the quadratic curve, such as the first interval of 5 seconds, the second timeInterval 2 2 *5 seconds, and so on.
3. Judging whether the command is a command for emptying the device or has the same identification field as other commands; judging whether the command is a command for emptying the device, namely, judging whether the current command is a formatting command again, if so, carrying out formatting operation on the device corresponding to the command to obtain the emptied device, and discarding the command at the moment; and judging whether the command has the same identification field as other commands, namely, judging whether the command has the same command as the Dataid of the command again, and if so, merging the commands with the same identification field.
4. And judging whether the command is in a state to be retried.
5. Judging whether the target equipment is on-line or not, namely judging whether an access controller is on-line or not; the method for judging whether the target equipment is online can judge whether the target equipment makes a corresponding response when receiving the heartbeat packet in a heartbeat packet mode, if the corresponding response is made, the target equipment is online, and if the response is not obtained for a plurality of times, the target equipment is judged to be not online.
If the command is judged to be an effective command, the command reaches the retry interval time, the command is different from the command of the emptying device, the identification field which is not the same as the other commands is not present, the target device corresponding to the command is in an on-line state, and the command is in a state to be retried, the retry condition is met; if any condition is not met, the retry operation is abandoned, and the record of the command with failed issuing in the database is reserved.
In this embodiment, adding a command meeting a retry condition to a message queue, and sequentially issuing the commands in the message queue according to the queue order of the message queue; before issuing the command in the message queue, the command can be packaged according to the equipment type and the service type, and the packaged command is issued uniformly, so that the command transmission times are reduced; at the same time, the command state is updated to be the issuing state, and the command state is fed back and displayed.
In the embodiment, the command with successful retry is issued, and the issued command with successful retry is moved into the issued table, so that software and hardware data are kept consistent as much as possible; commands that do not meet retry conditions or that give up retries are still recorded in the database to repeat the retry process described above to achieve a retry operation of the command again, but commands that fail to retry a preset number of times are discarded to balance system performance.
Example two
The embodiment provides a command retry system, which executes the command retry method according to the first embodiment, wherein the command retry system mainly comprises three parts, namely a command issuing thread, a message queue and a message retry thread; the command issuing process is used for receiving and issuing commands and storing failure commands into a failure command buffer area when the command issuing fails; the message retry procedure is used for acquiring the failure command in the failure command buffer zone and judging whether the failure command accords with the retry condition; the message queue is used for storing normal commands and failed commands meeting retry conditions, and issuing commands in the message queue according to the queue order.
Example III
The embodiment provides an intelligent access controller, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the command retry method in the first embodiment when executing the computer program; in addition, the present embodiment also provides a storage medium having stored thereon a computer program which, when executed, implements the command retry method described above.
The apparatus and the storage medium in this embodiment and the method in the foregoing embodiments are based on two aspects of the same inventive concept, and the detailed description of the method implementation process has been given above, so those skilled in the art can clearly understand the structure and implementation process of the system in this embodiment according to the foregoing description, and the details are not repeated herein for brevity.
The above embodiments are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but any insubstantial changes and substitutions made by those skilled in the art on the basis of the present invention are intended to be within the scope of the present invention as claimed.

Claims (7)

1. A command retry method, applied in an access control system, comprising:
acquiring a command with failed issuing, judging whether the command with failed issuing is a formatted command, if the command with failed issuing is the formatted command and other commands with the same targets are behind the command, discarding the formatted command, and moving the formatted command to an executed table; judging whether the command with the same identification field exists in the command with the failed issuing, if so, merging the commands with the same identification field;
if the command with failed issuing is not the formatted command or the command with failed issuing does not have the command with the same identification field, time ordering the command with failed issuing; checking each command which fails to issue in sequence, judging whether the failed command meets the retry condition, adding the command meeting the retry condition into a message queue, and issuing the commands in the message queue in sequence according to the queue sequence of the message queue; the method for judging whether the command meets the retry condition comprises the following steps:
judging whether the command is out of date according to the command issuing time;
judging whether the command reaches the preset retry interval time;
judging whether the command is a formatted command or has the same identification field as other commands;
judging whether the command is in a state to be retried;
if the command is judged to be a valid command, the command reaches the retry interval time, the command is different from the command of the emptying device which executes the formatted command, the same identification field does not exist in other commands, and the command is in a state to be retried, so that the retry condition is met; if any condition is not met, the retry operation is abandoned, and the record of the command with failed issuing in the database is reserved; the database is provided with a failure command buffer area for storing the generated but failed command.
2. The method for retrying command according to claim 1, wherein the method for obtaining the command with failed issuing is:
and periodically inquiring and acquiring the command stored in the database and failed to be issued and acquiring the executed command in the buffer area.
3. The method of claim 1, further comprising, prior to issuing the command in the message queue:
and packaging the commands according to the equipment type and the service type, and uniformly issuing the packaged commands.
4. The method for retrying a command according to claim 1, wherein when issuing the command in the message queue, further comprising:
updating the command state to the issuing state, and feeding back and displaying the current command state.
5. A command retry system, wherein the command retry method according to any one of claims 1 to 4 is performed, comprising:
the command issuing thread is used for receiving and issuing commands and storing the failed commands into the failed command buffer area when the command issuing fails;
the message retry thread is used for acquiring the failed command in the failed command buffer zone and judging whether the failed command meets the retry condition;
and the message queue is used for storing the normal command and the failed command meeting the retry condition, and sequentially issuing the commands in the message queue according to the queue sequence of the message queue.
6. An intelligent access controller, characterized in that the intelligent access controller comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the instruction retry method of any one of claims 1-4 is realized when the processor executes the computer program.
7. A storage medium having stored thereon a computer program which, when executed, implements the command retry method of any one of claims 1 to 4.
CN202110973580.2A 2021-08-24 2021-08-24 Command retry method, system, device and storage medium Active CN113823025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110973580.2A CN113823025B (en) 2021-08-24 2021-08-24 Command retry method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110973580.2A CN113823025B (en) 2021-08-24 2021-08-24 Command retry method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN113823025A CN113823025A (en) 2021-12-21
CN113823025B true CN113823025B (en) 2023-04-21

Family

ID=78913518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110973580.2A Active CN113823025B (en) 2021-08-24 2021-08-24 Command retry method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN113823025B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100461882C (en) * 2005-07-04 2009-02-11 中兴通讯股份有限公司 Method for retesting net-element in shortmessage system
CN102237993A (en) * 2011-07-20 2011-11-09 中兴通讯股份有限公司 MMS (multimedia message) receiving/transmission retry method and device
CN103517225B (en) * 2012-06-27 2018-01-02 中兴通讯股份有限公司 Multimedia message retries method and device
CN108932157B (en) * 2017-05-22 2021-04-30 北京京东尚科信息技术有限公司 Method, system, electronic device and readable medium for distributed processing of tasks
CN110704121B (en) * 2018-06-25 2021-07-20 北京嘀嘀无限科技发展有限公司 Operation retry method, system and computer device
CN111479334B (en) * 2020-03-20 2023-08-11 深圳赛安特技术服务有限公司 Network request retry method and device and terminal equipment
CN112565418B (en) * 2020-12-04 2022-11-15 平安科技(深圳)有限公司 Message retransmission method and device for service cluster, computer equipment and storage medium
CN112835688A (en) * 2021-02-01 2021-05-25 北京星网锐捷网络技术有限公司 Distributed transaction processing method, device and storage medium

Also Published As

Publication number Publication date
CN113823025A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
JPH04157541A (en) Multiple data processing method of decentralized processing system
US5325528A (en) Distributed computation recovery management system and method
US8171475B2 (en) Intelligent retry method using remote shell
US5371889A (en) Journalling optimization system and method for distributed computations
US7328213B2 (en) Transaction processing method, transaction control apparatus and program thereof
US8868874B2 (en) Managing remote data replication
CN102664950B (en) Data communication method between welding power sources and computers
CN110046166B (en) Timing task scheduling method and device based on block chain
US20190253356A1 (en) Control device, control system, control method, and non-transitory computer-readable storage medium
JP2019139631A (en) Control device, control system, control method, and control program
CN113823025B (en) Command retry method, system, device and storage medium
US9298447B2 (en) Method and device for the management of software updates of a set of equipment of a system such as an aircraft system
CN112835598B (en) Automobile ECU (electronic control Unit) refreshing method and system and computer readable storage medium thereof
US20050096957A1 (en) System and method for manufacturing job rescheduling
CN116414540A (en) Method, device, system, equipment and medium for scheduling distributed tasks
CN109741153A (en) Overtime transaction processing method, device, computer equipment and storage medium
CN110764697B (en) Data management method and device
US8255738B2 (en) Recovery from medium error on tape on which data and metadata are to be stored by using medium to medium data copy
CN113206891B (en) Scheduling method, storage system, scheduling device and storage medium for metadata reporting
JP5325827B2 (en) Job schedule system, job schedule management method and program.
CN111752786A (en) Data storage method, data summarization method, equipment and medium in pressure test process
CN111130896A (en) NFS fault switching method and system and dual-control storage system
JP2005526328A (en) Automatic data import
CN113682964B (en) Equipment parameter management and recovery method, platform, device, crane and system
JP2000267703A (en) Programmable controller

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