CN115550453A - Queuing method and queuing system for target operations - Google Patents
Queuing method and queuing system for target operations Download PDFInfo
- Publication number
- CN115550453A CN115550453A CN202211223479.6A CN202211223479A CN115550453A CN 115550453 A CN115550453 A CN 115550453A CN 202211223479 A CN202211223479 A CN 202211223479A CN 115550453 A CN115550453 A CN 115550453A
- Authority
- CN
- China
- Prior art keywords
- queuing
- client
- target operation
- identifier
- server
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域technical field
本公开设计一种用于目标操作的排队方法和排队系统。The present disclosure designs a queuing method and queuing system for target operations.
背景技术Background technique
随着企业信息化的推进,以大数据、机器学习、人工智能为基础的智能化应用正在越来越多地应用于工业领域。工业系统中的工艺单元也越来越多地利用诸如可编程逻辑控制器(PLC)、计算机、智能装置之类的计算设备来控制,以自动灵活地执行大量各种不同的目标操作。With the advancement of enterprise informatization, intelligent applications based on big data, machine learning, and artificial intelligence are increasingly being used in the industrial field. Process units in industrial systems are also increasingly controlled by computing devices such as programmable logic controllers (PLCs), computers, smart devices, etc., to automatically and flexibly perform a large number of different target operations.
然而,普遍存在一个主工艺单元被设计为服务于两个或更多个从工艺单元,但受限于其服务能力同一时间又只能服务于一个从工艺单元的情况。当这两个或更多个从工艺单元所请求的目标操作实现起来有冲突时,有必要对这些目标操作进行排队。However, it is common that a master process unit is designed to serve two or more slave process units, but is limited by its service capability and can only serve one slave process unit at a time. When the two or more target operations requested from the process units are conflicting to implement, it is necessary to queue these target operations.
发明内容Contents of the invention
本公开的一方面提供了一种用于目标操作的排队方法。该方法包括:由多个客户端中的每个客户端,基于所述客户端的预定优先级生成初始的排队标识,并且在检测到对执行目标操作的请求的情况下,基于所述目标操作的预定优先级和检测到所述请求的时间来改变所述排队标识;由与所述多个客户端中的每个客户端相关联的服务端,每预定时间间隔执行:从所述每个客户端获取所述客户端的排队标识,对所获取的排队标识进行排序以生成排队响应,所述排队响应指示被排序到首位的排队标识,以及将所述排队响应广播到所述每个客户端;以及由多个客户端中的每个客户端,在其排队标识不是初始的排队标识的情况下,识别所述客户端是否是与所述排队响应所指示的被排序到首位的排队标识相对应的客户端,以及在识别所述客户端是与所述排队响应所指示的被排序到首位的排队标识相对应的客户端的情况下,控制其目标操作的执行。An aspect of the present disclosure provides a queuing method for target operations. The method includes: generating, by each of a plurality of clients, an initial queuing identifier based on a predetermined priority of the client, and in the case of detecting a request to perform a target operation, based on the Change the queuing identifier by predetermined priority and the time when the request is detected; by the server associated with each client in the plurality of clients, every predetermined time interval: from each client The terminal acquires the queuing IDs of the clients, sorts the acquired queuing IDs to generate a queuing response, the queuing response indicates the queuing ID sorted to the first place, and broadcasts the queuing response to each client; And by each client in a plurality of clients, in the case that its queuing identifier is not the initial queuing identifier, identify whether the client is corresponding to the queue identifier sorted to the first place indicated by the queuing response , and in the case of identifying that the client is the client corresponding to the first-ranked queuing identifier indicated by the queuing response, controlling the execution of its target operation.
根据本公开的另一方面,提供了一种用于目标操作的排队系统。该排队系统包括:多个客户端,其中的每个客户端被配置为基于所述客户端的预定优先级生成初始的排队标识,并且在检测到对执行目标操作的请求的情况下,基于所述目标操作的预定优先级和检测到所述请求的时间来改变所述排队标识;以及服务端,被配置为每预定时间间隔执行:获取与所述服务端关联的所述多个客户端中的每个客户端的排队标识,对所获取的排队标识进行排序以生成排队响应,所述排队响应指示被排序到首位的排队标识,以及将所述排队响应广播到所述每个客户端,其中,所述每个客户端在改变所述排队标识之后还执行:识别所述客户端是否是与所述排队响应所指示的被排序到首位的排队标识相对应的客户端,以及在识别所述客户端是与所述排队响应所指示的被排序到首位的排队标识相对应的客户端的情况下,控制其目标操作的执行。According to another aspect of the present disclosure, a queuing system for object operations is provided. The queuing system includes: a plurality of clients, each of which is configured to generate an initial queuing identifier based on a predetermined priority of the client, and if a request to perform a target operation is detected, based on the The predetermined priority of the target operation and the time when the request is detected to change the queuing identifier; and the server is configured to perform every predetermined time interval: obtain the queuing IDs of each client, sorting the acquired queuing IDs to generate a queuing response, the queuing response indicating the queuing ID sorted to the first place, and broadcasting the queuing response to each client, wherein, Each client further executes after changing the queuing identifier: identifying whether the client is the client corresponding to the queuing identifier that is sorted to the first place indicated by the queuing response, and identifying the client In the case that the client is the client corresponding to the queuing ID indicated by the queuing response and is sorted first, control the execution of its target operation.
本公开的排队方法和排队系统采用客户端编码和服务端排序相结合的方式。由客户端针对目标操作的请求进行编码来生成排队标识,由服务端对排队标识进行排序。在这样的方式下,排队影响因素可容易地通过客户端的编码规则体现到排队标识当中,服务端仅使用简单的排序逻辑对排队标识进行排序而无需考虑这些排队影响因素。当排队影响因素发生变化时,仅需调整客户端的编码而无需服务端做出任何改变。The queuing method and queuing system of the present disclosure adopt a combination of client-side coding and server-side sorting. The client encodes the request for the target operation to generate a queuing ID, and the server sorts the queuing IDs. In this way, the queuing factors can be easily reflected in the queuing identifiers through the encoding rules of the client, and the server only uses simple sorting logic to sort the queuing identifiers without considering these queuing influencing factors. When the queuing factors change, it is only necessary to adjust the encoding of the client without making any changes on the server.
附图说明Description of drawings
通过下面结合附图对实施例的描述,本公开的各方面、特征和优点将变得更加清楚和容易理解,其中:Various aspects, features and advantages of the present disclosure will become clearer and easier to understand through the following description of the embodiments in conjunction with the accompanying drawings, wherein:
图1示出根据本公开实施例的排队系统及其示意性应用场景;FIG. 1 shows a queuing system and a schematic application scenario thereof according to an embodiment of the present disclosure;
图2示出根据本公开实施例的排队方法的示意性流程图;以及FIG. 2 shows a schematic flow chart of a queuing method according to an embodiment of the present disclosure; and
图3示出在其中实施根据本公开实施例的排队方法的示例。FIG. 3 shows an example in which a queuing method according to an embodiment of the present disclosure is implemented.
具体实施例方式Specific embodiments
下面将参考本公开的示例性实施例对本公开进行详细描述。然而,本公开不限于这里所描述的实施例,其可以以许多不同的形式来实施。所描述的实施例仅用于使本公开彻底和完整,并全面地向本领域的技术人员传递本公开的构思。所描述的各个实施例的特征可以互相组合或替换,除非明确排除或根据上下文应当排除。Hereinafter, the present disclosure will be described in detail with reference to exemplary embodiments of the present disclosure. However, the present disclosure is not limited to the embodiments described herein, and it may be embodied in many different forms. The described embodiments are only intended to make the present disclosure thorough and complete, and fully convey the concept of the present disclosure to those skilled in the art. Features of the various described embodiments can be combined or substituted for each other, unless explicitly excluded or should be excluded according to the context.
图1示出根据本公开实施例的排队系统及其示意性应用场景。Fig. 1 shows a queuing system and a schematic application scenario thereof according to an embodiment of the present disclosure.
如前所述,普遍存在一个主工艺单元被设计为服务于两个或更多个从工艺单元,但受限于其服务能力同一时间又只能服务于一个从工艺单元的情况。As mentioned above, it is common that a master process unit is designed to serve two or more slave process units, but is limited by its service capability and can only serve one slave process unit at a time.
参考图1,主工艺单元T被设计服务于6个从工艺单元A1、A2、A3和B1、B2、B3。例如,从工艺单元A1、A2、A3是用于除氮的生物滤池,从工艺单元B1、B2、B3是用于除碳的生物滤池,主工艺单元T配置有用于对各个生物滤池进行冲洗的冲洗水系统。Referring to FIG. 1, the master process unit T is designed to serve 6 slave process units A1, A2, A3 and B1, B2, B3. For example, the slave process units A1, A2, A3 are biofilters for nitrogen removal, the slave process units B1, B2, B3 are biofilters for carbon removal, and the main process unit T is equipped with Flush water system for flushing.
客户端C1、C2、C3、C4、C5、C6是分别托管从工艺单元A1、A2、A3和B1、B2、B3的诸如PLC、计算机、智能装置之类的计算设备。例如,管理员可以在客户端C1上进行生物滤池A1的启动、暂停、停止、工作参数设置、目标操作请求等操作。工作参数设置包括但不限于设置例如工作层填料的粒径与厚度、承托层填料的粒径与厚度等。目标操作请求包括但不限于进料请求、出料请求、冲洗水请求、供氧请求、干燥请求等。下文以冲洗水系统为例来说明本公开,所提及的目标操作应理解为冲洗水相关的目标操作。Clients C1 , C2 , C3 , C4 , C5 , C6 are computing devices such as PLCs, computers, smart devices hosting slave process units A1 , A2 , A3 and B1 , B2 , B3 respectively. For example, the administrator can perform operations such as start, pause, stop, work parameter setting, and target operation request of the biofilter A1 on the client C1. Working parameter settings include but are not limited to settings such as the particle size and thickness of the filler in the working layer, the particle size and thickness of the filler in the supporting layer, and the like. Target operation requests include, but are not limited to, material feed requests, material discharge requests, rinse water requests, oxygen supply requests, drying requests, and the like. The flushing water system is used as an example to illustrate the present disclosure below, and the mentioned target operations should be understood as target operations related to flushing water.
服务端S是托管主工艺单元T的诸如PLC、计算机、智能装置之类的计算设备。服务端S能够通过有线、无线或已知的其他任何通信方式与每个客户端C1~C6通信,以从客户端C1~C6接收数据以及向客户端C1~C6发送数据。例如,服务端S从客户端C1~C6接收排队标识并对排队标识进行排序(如下文描述的)。又例如,服务端S与客户端C1~C6协作来完成冲洗水相关的目标操作。The server S is a computing device such as a PLC, a computer, an intelligent device hosting the main process unit T. The server S can communicate with each of the clients C1-C6 through wired, wireless or any other known communication methods, so as to receive data from the clients C1-C6 and send data to the clients C1-C6. For example, the server S receives the queuing identifiers from the clients C1-C6 and sorts the queuing identifiers (as described below). For another example, the server S cooperates with the clients C1-C6 to complete the target operation related to flushing water.
根据现有技术的排队方法主要由服务端S执行。客户端C1~C6将各自的关于所请求的目标操作的信息和关于其自身的信息传达到服务端S。服务端S考虑各种排队影响因素并使用复杂的排序逻辑来对目标小左进行排序。该排队方法错误率高,不易扩展,且当排队影响因素发生变化时,服务端需要做出较大改变。The queuing method according to the prior art is mainly performed by the server S. The clients C1-C6 communicate to the server S their respective information about the requested target operation and about themselves. The server S considers various queuing factors and uses complex sorting logic to sort the target queues. This queuing method has a high error rate and is not easy to expand, and when factors affecting queuing change, the server needs to make major changes.
根据本公开实施例的排队系统包括服务端S和多个客户端C1~C6。由服务端S和各客户端C1~C6结合来执行根据本公开实施例的排队方法。各客户端C1~C6基于排队影响因素编码生成排队标识,该排队标识中体现各排队影响因素的优先级。服务端S每预定时间间隔获取各客户端C1~C6的排队标识,并对排队标识进行排序以确定轮到哪个客户端执行其目标操作。该排队方法简单、错误率低,当排队影响因素发生变化时,仅需调整客户端的编码而无需服务端做出任何改变。客户端的编码规则也可以设计得透明易读、易于修改和扩展。The queuing system according to the embodiment of the present disclosure includes a server S and multiple clients C1-C6. The queuing method according to the embodiment of the present disclosure is implemented by the combination of the server S and the clients C1-C6. Each client C1-C6 generates a queuing identifier based on the encoding of the queuing influencing factor, and the queuing identifier reflects the priority of each queuing influencing factor. The server S acquires the queuing identifiers of the clients C1-C6 every predetermined time interval, and sorts the queuing identifiers to determine which client is its turn to perform its target operation. The queuing method is simple and has a low error rate. When factors affecting queuing change, it is only necessary to adjust the encoding of the client without making any changes on the server. The client's coding rules can also be designed to be transparent, easy to read, easy to modify and expand.
虽然根据本公开的排队系统是结合图1以冲洗水系统为例来介绍的,但本公开不限于此,在不脱离本公开发明构思和精神范围的情况下,经过适当修改和调整,本公开的排队系统也同样适用于其他工业场景。Although the queuing system according to the present disclosure is introduced by taking the flushing water system as an example in conjunction with FIG. 1 , the present disclosure is not limited thereto. The queuing system is also applicable to other industrial scenarios.
图2示出根据本公开实施例的排队方法的示意性流程图。Fig. 2 shows a schematic flowchart of a queuing method according to an embodiment of the present disclosure.
为便于理解,在说明该排队方法之前,先介绍冲洗水系统中的排队规则。For ease of understanding, before explaining the queuing method, first introduce the queuing rules in the flushing water system.
根据冲洗水系统的工艺需求,除氮生物滤池A1、A2、A3中的每一个可能无请求,也可能请求以下目标操作中的一个:除氮强制冲洗、除氮阻塞值冲洗和除氮定时冲洗。除碳生物滤池B1、B2、B3中的每一个可能无请求,也可能请求以下目标操作中的一个:除碳强制冲洗、除碳阻塞值冲洗和除碳定时冲洗。其中,除氮类目标操作优先于除氮类目标操作,强制冲洗类目标操作优先于阻塞值冲洗类目标操作,阻塞值冲洗类目标操作优先于定时冲洗类目标操作。强制冲洗指的是若不被及时执行可能会产生较严重的负面后果的冲洗操作。阻塞值冲洗指的是当阻塞值达到一定程度后需要执行的冲洗操作。定时冲洗指的是惯例性地、周期性的(例如,每数个小时或数天冲洗一次等)或不太紧急的冲洗操作。因此,针对目标操作的类型的预定优先级从高到低的顺序依次为:除氮强制冲洗、除碳强制冲洗、除氮阻塞值冲洗、除碳阻塞值冲洗、除氮定时冲洗、除碳定时冲洗、无请求。According to the technological requirements of the flushing water system, each of the nitrogen removal biofilters A1, A2, and A3 may have no request, or may request one of the following target operations: nitrogen removal forced flushing, nitrogen removal blocking value flushing, and nitrogen removal timing rinse. Each of the carbon removal biological filters B1, B2, and B3 may have no request, or may request one of the following target operations: carbon removal forced flushing, carbon removal blocking value flushing, and carbon removal timing flushing. Among them, the nitrogen removal target operation has priority over the nitrogen removal target operation, the forced flushing target operation has priority over the blocking value flushing target operation, and the blocking value flushing target operation has priority over the timing flushing target operation. Mandatory flushing refers to flushing operations that may have serious negative consequences if not performed in a timely manner. Blocking value flushing refers to the flushing operation that needs to be performed when the blocking value reaches a certain level. Timed flushing refers to routine, periodic (eg, flushing every few hours or days, etc.) or less urgent flushing operations. Therefore, the order of predetermined priority for the type of target operation from high to low is: nitrogen removal forced flushing, carbon removal forced flushing, nitrogen removal blocking value flushing, carbon removal blocking value flushing, nitrogen removal timing flushing, carbon removal timing Flush, no request.
在实践中可能发生几个生物滤池请求相同目标操作的情况,在这种情况下,期望按照请求的时间先后顺序对相应生物滤池执行目标操作。例如,在一个实例中,生物滤池A1和A2都请求执行除氮强制冲洗,但生物滤池A1在时间上更早产生该请求,则期望先对生物滤池A1执行除氮强制冲洗。In practice it may happen that several biofilters request the same target operation, in which case it is desirable to perform the target operation on the respective biofilters in the chronological order of the requests. For example, in one instance, both biofilters A1 and A2 request to perform nitrogen removal forced flushing, but biofilter A1 generates the request earlier in time, and it is expected that biofilter A1 performs nitrogen removal forced flushing first.
在实践中还可能发生几个生物滤池在同一时间请求相同目标操作的情况,在这种情况下,期望按照提前制定的生物滤池的预定优先级对相应生物滤池执行目标操作。例如,针对除氮生物滤池A1、A2和A3制定的预定优先级按从高到低的顺序依次是A1、A2、A3,针对除碳生物滤池B1、B2和B3制定的预定优先级按从高到低的顺序依次是B1、B2、B3。例如,在一个实例中,生物滤池A1、A2和A3在同一时间都请求执行除氮定时冲洗,则依次对生物滤池A1、A2和A3执行除氮定时冲洗。并且,除氮优先于除碳,A1、A2、A3总体上优先于B1、B2、B3。由于客户端与生物滤池一一对应,客户端的预定优先级从高到低排序依次是C1、C2、C3、C4、C5、C6。In practice, it may also happen that several biofilters request the same target operation at the same time, in this case, it is desired to perform the target operation on the corresponding biofilter according to the predetermined priority of the biofilter established in advance. For example, the predetermined priorities for nitrogen removal biological filters A1, A2 and A3 are A1, A2 and A3 in descending order, and the predetermined priorities for carbon removal biological filters B1, B2 and B3 are in order The order from high to low is B1, B2, B3. For example, in one instance, the biofilters A1, A2 and A3 all request nitrogen removal timing flushing at the same time, then the nitrogen removal timing flushing is performed on the biofilters A1, A2 and A3 in sequence. Moreover, nitrogen removal is prior to carbon removal, and A1, A2, and A3 are generally prior to B1, B2, and B3. Since there is a one-to-one correspondence between the clients and the biofilters, the predetermined priorities of the clients are C1, C2, C3, C4, C5, and C6 from high to low.
总而言之,以上介绍的排队规则是通过依次考虑目标操作的类型、请求目标操作的时间和滤池本身的优先级作为排队影响因素来进行排队的。All in all, the queuing rules introduced above perform queuing by sequentially considering the type of the target operation, the time when the target operation is requested, and the priority of the filter itself as queuing influencing factors.
参考图2,根据本公开实施例的排队方法200包括步骤S201至S204。其中,步骤S201、S202和S204由客户端C1~C6中的一个或多个执行,步骤S203由服务端执行。此处的参考标号S203并不这意味着步骤S203在步骤S201和S202之后执行。在本公开中,步骤S203是贯穿整个排队方法按预定时间间隔ΔT循环执行的。Referring to FIG. 2 , a queuing method 200 according to an embodiment of the present disclosure includes steps S201 to S204. Wherein, steps S201, S202 and S204 are performed by one or more of the clients C1-C6, and step S203 is performed by the server. The reference number S203 here does not mean that step S203 is performed after steps S201 and S202. In the present disclosure, step S203 is cyclically executed at predetermined time intervals ΔT throughout the entire queuing method.
在步骤S201,由多个客户端C1~C6中的每个客户端,基于该客户端的预定优先级生成初始的排队标识。例如,每个客户端C1~C6可以在相应的生物滤池A1、A2、A3、B1、B2、B3初始化时(例如,上电时)生成初始的排队标识。由于此时各生物滤池A1~A3、B1~B3还没有产生执行任何目标操作的请求,因此该初始的排队标识中仅体现该客户端自身的信息而不体现任何目标操作的信息。也即,该初始的排队标识表示无请求。In step S201, each of the multiple clients C1-C6 generates an initial queuing identifier based on the predetermined priority of the client. For example, each client C1-C6 can generate an initial queuing identifier when the corresponding biological filter A1, A2, A3, B1, B2, B3 is initialized (for example, when powered on). Since the biofilters A1-A3 and B1-B3 have not generated any request for target operation at this time, the initial queuing identifier only reflects the information of the client itself and does not reflect any target operation information. That is, the initial queuing identifier indicates no request.
在步骤S202,由多个客户端C1~C6中的每个客户端,在检测到对执行目标操作的请求的情况下,基于目标操作的预定优先级和检测到请求的时间来改变排队标识。例如,客户端C1检测到针对生物滤池A1产生了除氮强制冲洗的请求,则基于除氮强制冲洗的预定优先级和检测到该请求的时间来生成新的排队标识以取代初始的排队标识。目标操作的请求可以例如由管理员在客户端上输入相应命令而产生、响应于生物滤池的相应传感器(例如,阻塞值传感器)的值而产生等等。除了关于客户端自身的信息之外,新的排队标识还包含目标操作的类型信息和检测到请求的时间信息。也即,改变后的排队标识表示特定客户端在特定时间请求执行特定目标操作。In step S202, each of the plurality of clients C1-C6 changes the queuing identifier based on the predetermined priority of the target operation and the time when the request is detected when a request for executing the target operation is detected. For example, client C1 detects a request for forced flushing of nitrogen removal for biofilter A1, and generates a new queuing identifier to replace the initial queuing identifier based on the predetermined priority of forced flushing of nitrogen removal and the time when the request is detected . The request for the target operation may be generated, for example, by an administrator entering a corresponding command on the client, in response to a value of a corresponding sensor (eg, a blockage value sensor) of the biofilter, and so on. In addition to information about the client itself, the new queue ID also contains information about the type of operation targeted and when the request was detected. That is, the changed queuing identifier indicates that a specific client requests to perform a specific target operation at a specific time.
在步骤S203,由服务端S每预定时间间隔ΔT执行:从客户端C1~C6中的每个客户端获取该客户端的排队标识,对所获取的排队标识进行排序以生成排队响应,该排队响应指示被排序到首位的排队标识,并且服务端S将排队响应广播到每个客户端。In step S203, executed by the server S every predetermined time interval ΔT: obtain the queuing ID of the client from each of the clients C1-C6, sort the acquired queuing IDs to generate a queuing response, the queuing response Indicates the queuing ID that is sorted to the first place, and the server S broadcasts the queuing response to each client.
如前所述,步骤S203贯穿整个排队方法按预定时间间隔ΔT循环地执行。服务端S可以从其初始化时(例如,上电时)就开始执行步骤S203。由于每个客户端C1~C6的排队标识因目标操作请求的产生而改变且该请求的产生是不定时,因而服务端S通过每时间间隔ΔT获取一次所有客户端C1~C6的排队标识,便能及时知晓每个客户端的请求的产生并及时做出排队和处理。该预定时间间隔ΔT可以是例如0.5秒、1秒等。此外,为节省算力,服务端S的排序逻辑可设计为仅排序出首位的排队标识,而无需生成完整的排序队列。As mentioned above, step S203 is cyclically executed at predetermined time intervals ΔT throughout the entire queuing method. The server S may start to execute step S203 when it is initialized (for example, when powered on). Since the queuing ID of each client C1~C6 changes due to the generation of the target operation request and the generation of the request is irregular, the server S obtains the queuing IDs of all clients C1~C6 once every time interval ΔT, which is convenient It can know the generation of each client's request in time and make queuing and processing in time. The predetermined time interval ΔT may be, for example, 0.5 second, 1 second or the like. In addition, in order to save computing power, the sorting logic of the server S can be designed to only sort out the first queue identifier without generating a complete sorting queue.
此外,在步骤S203中,服务端S对获取的排队标识进行排序以生成排队响应可以进一步包括:比较所获取的各个客户端的排队标识与在前一个预定时间间隔获取的对应客户端的排队标识是否相同,并且在至少一个客户端的排队标识与其在前一个预定时间间隔的排队标识不相同的情况下,对所获取的排队标识进行重新排序。换言之,在比较出至少一个客户端的排队标识发生变化的情况下才进行重新排序。这样,可进一步节省服务端S的算力,从而避免在所有客户端C1~C6的排队标识长时间保持不变的情况下重复执行没必要的排序。In addition, in step S203, the server S sorting the acquired queuing IDs to generate a queuing response may further include: comparing whether the acquired queuing IDs of each client are the same as the corresponding client's queuing IDs acquired in the previous predetermined time interval , and if the queuing ID of at least one client is different from its queuing ID in the previous predetermined time interval, the obtained queuing IDs are reordered. In other words, the reordering is performed only when the queuing identifier of at least one client has changed. In this way, the computing power of the server S can be further saved, thereby avoiding repeated unnecessary sorting when the queuing identifiers of all clients C1-C6 remain unchanged for a long time.
在步骤S204,由多个客户端C1~C6中的每个客户端,在其排队标识不是初始的排队标识的情况下,识别该客户端是否是与排队响应所指示的被排序到首位的排队标识相对应的客户端,以及在识别该客户端是与排队响应所指示的被排序到首位的排队标识相对应的客户端的情况下,控制其目标操作的执行。In step S204, each client in the plurality of clients C1-C6, in the case that its queuing identifier is not the initial queuing identifier, identifies whether the client is the queue that is sorted to the first place indicated by the queuing response. The corresponding client is identified, and in the case of identifying that the client is the client corresponding to the first-ordered queuing identification indicated by the queuing response, the execution of its target operation is controlled.
此步骤中,只有排队标识已不是初始的排队标识的客户端才会识别该客户端是否是排队响应所指示的被排序到首位的排队标识相对应的客户端。换言之,只有已经产生了目标操作的请求的客户端才进行该识别操作。这有利于节省客户端C1~C6算力,因为对于无请求的客户端,没必要进行该识别操作,在所有客户端C1~C6都无请求的情况下,服务端S生成的排队响应是无意义。In this step, only the client whose queuing ID is not the initial queuing ID will identify whether the client is the client corresponding to the queued ID indicated by the queuing response. In other words, only the client that has generated a request for the target operation performs the identification operation. This is beneficial to save the computing power of clients C1~C6, because for clients without requests, it is not necessary to carry out this identification operation. When all clients C1~C6 have no requests, the queuing response generated by server S significance.
此步骤中,客户端控制目标操作包括客户端与服务端协作来执行目标操作。例如,客户端识别出其自身是与排队响应所指示的被排序到首位的排队标识相对应的客户端之后,向服务端发送执行目标操作的令牌,该令牌被包括在排队响应中且被设计为只能由与排队响应所指示的被排序到首位的排队标识相对应的客户端解密,服务端验证令牌后对相应滤池执行冲洗水操作。在冲洗水过程中,客户端监控并向服务端反馈滤池的状态,服务端根据所反馈的状态调整例如水冲强度、水冲时间等冲洗参数。In this step, the client controlling the target operation includes the cooperation between the client and the server to execute the target operation. For example, after the client recognizes that it is the client corresponding to the queuing ID indicated by the queuing response and is sorted first, it sends a token for performing the target operation to the server, and the token is included in the queuing response and It is designed so that it can only be decrypted by the client corresponding to the first queue ID indicated by the queue response, and the server verifies the token and executes the flushing operation on the corresponding filter. During the flushing process, the client monitors and feeds back the status of the filter to the server, and the server adjusts flushing parameters such as flushing intensity and flushing time according to the feedback status.
下面结合图3,用一个示例进一步说明排队方法200。An example is used to further illustrate the queuing method 200 below in conjunction with FIG. 3 .
图3示出在其中实施根据本公开实施例的排队方法的示例。FIG. 3 shows an example in which a queuing method according to an embodiment of the present disclosure is implemented.
参考图3,排队方法200从预定时间间隔ΔT1开始执行,在ΔT1期间,客户端C1~C6初始化,并执行步骤S201,即基于各自的预定优先级生成初始的排队标识NR1~NR6。此时还各客户端都尚未检测到目标操作的请求,NR1~NR6均代表无请求。Referring to FIG. 3 , the queuing method 200 is executed from a predetermined time interval ΔT1. During the period ΔT1, the clients C1-C6 initialize and execute step S201, that is, generate initial queuing identifiers NR1-NR6 based on respective predetermined priorities. At this time, each client has not detected the request for the target operation, and NR1-NR6 all represent no request.
服务端S初始化,并执行步骤S203,即获取每个客户端C1~C6的排队标识NR1~NR6,并对它们进行排序。由于初始的排队标识NR1~NR6是仅考虑各客户端的预定优先级这一个排队因素而编码生成的,因而,NR1~NR6的排序与各客户端的预定优先级的排序一致。根据前述排队规则,各客户端的预定优先级从高到低依次是C1、C2、C3、C4、C5、C6,因此服务端S将通其排序逻辑确定NR1被排在首位(如图3中圆圈所示)。若排序逻辑被设计为形成完整队列,则该队列将是NR1、NR2、NR3、NR4、NR5、NR6。服务端S生成指示NR1的排队响应,并将该排队响应广播到客户端C1~C6中的每一个。The server S initializes, and executes step S203, that is, acquires the queuing identifiers NR1-NR6 of each client C1-C6, and sorts them. Since the initial queuing identifiers NR1-NR6 are coded and generated considering only the queuing factor of the predetermined priority of each client, the ordering of NR1-NR6 is consistent with the ordering of the predetermined priority of each client. According to the aforementioned queuing rules, the predetermined priorities of each client are C1, C2, C3, C4, C5, and C6 from high to low, so the server S will determine that NR1 is ranked first through its sorting logic (as shown in the circle in Figure 3 shown). If the ordering logic were designed to form a complete queue, the queue would be NR1, NR2, NR3, NR4, NR5, NR6. The server S generates a queuing response indicating NR1, and broadcasts the queuing response to each of the clients C1-C6.
由于客户端C1~C6的排队标识都还是初始的排队标识,即客户端C1~C6都尚未检测到目标操作的请求,客户端C1~C6都不进行识别其自身是否是与排队响应所指示的被排在首位的排队标识相对应的客户端的操作。Since the queuing identifiers of the clients C1~C6 are still the initial queuing identifiers, that is, the clients C1~C6 have not yet detected the request for the target operation, and the clients C1~C6 do not identify whether they are the ones indicated by the queuing response. The operation of the client corresponding to the first queued ID.
在预定时间间隔ΔT2期间,所有生物滤池都仍未产生目标操作的请求,客户端C1~C6的排队标识保持NR1~NR6不改变。NR1仍被排在首位(如图3中圆圈所示)。服务端S生成的排队响应仍然指示NR1。客户端C1~C6仍不进行识别操作。During the predetermined time interval ΔT2, none of the biofilters has generated a target operation request, and the queuing identifiers of the clients C1-C6 remain unchanged NR1-NR6. NR1 is still ranked first (as circled in Figure 3). The queued response generated by server S still indicates NR1. The clients C1-C6 still do not perform the identification operation.
替代地,服务端S也可以将所获取的排队标识NR1~NR6与在上一次预定时间间隔ΔT1获取的排队标识NR1~NR6对应地进行比较。根据比较得出各客户端的排队标识均无变化,则不使用排序逻辑重新排序以节省算力。Alternatively, the server S may also correspondingly compare the acquired queuing identifiers NR1 - NR6 with the queuing identifiers NR1 - NR6 acquired in the last predetermined time interval ΔT1 . According to the comparison, it is found that the queuing identifiers of each client have not changed, so the sorting logic is not used to reorder to save computing power.
在预定时间间隔ΔT3期间,针对生物滤池A2、A3和B1产生了目标操作的请求。例如,生物滤池A2请求执行除氮定时冲洗,生物滤池A3请求执行除氮阻塞值冲洗,生物滤池B1请求执行除碳阻塞值冲洗。During the predetermined time interval ΔT3, a request for a target operation is generated for the biofilters A2, A3 and B1. For example, biofilter A2 requests to perform nitrogen removal timing flushing, biofilter A3 requests to perform nitrogen removal blocking value flushing, and biofilter B1 requests to perform carbon removal blocking value flushing.
客户端C2、C3和C4执行步骤S202,基于相应目标操作的预定优先级和检测到请求的时间来改变排队标识,分别生成新的排队标识R2、R3和R4以分别取代初始的排队标识NR2、NR3和NR4。Clients C2, C3, and C4 perform step S202, change the queuing ID based on the predetermined priority of the corresponding target operation and the time when the request is detected, and generate new queuing IDs R2, R3, and R4 to replace the initial queuing IDs NR2, NR2, and R4 respectively. NR3 and NR4.
服务端S执行步骤S203,获取到客户端C1~C6的排队标识依次为NR1、R2、R3、R4、NR5、NR6。根据前述排队规则,R3所体现的除氮阻塞值冲洗优先于R4所体现的除碳阻塞值冲洗,R4所体现的除碳阻塞值冲洗优先于R2所体现的除氮定时冲洗,R2所体现的除氮定时冲洗优先于无请求,因此,服务端S通过排序逻辑将确定排队标识R3被排序到首位(如图3中圆圈所示)。若服务端S的排序逻辑被设计为生成完整队列,该队列将是R3、R4、R2、NR1、NR5、NR6。服务端S生成指示排队标识R3的排队响应,并将该排队响应广播到客户端C1~C6中的每一个。The server S executes step S203, and obtains that the queuing identifiers of the clients C1-C6 are NR1, R2, R3, R4, NR5, and NR6 in sequence. According to the aforementioned queuing rules, the nitrogen removal blocking value flushing represented by R3 is prior to the carbon removal blocking value flushing represented by R4, and the carbon removal blocking value flushing represented by R4 is prior to the nitrogen removal timing flushing represented by R2. Nitrogen removal timing flushing is prior to no request, therefore, the server S will determine that the queue identifier R3 is sorted to the first place through the sorting logic (as shown by the circle in FIG. 3 ). If the ordering logic of server S is designed to generate a complete queue, the queue will be R3, R4, R2, NR1, NR5, NR6. The server S generates a queuing response indicating the queuing identifier R3, and broadcasts the queuing response to each of the clients C1-C6.
客户端C2~C4的排队标识已不是初始的排队标识,它们将执行步骤S204,识别其自身是否是与排队响应所指示的排队标识R3相对应的客户端。例如,客户端C2~C4可通过比较接收到排队响应所指示的排队标识R3与自身当前的排队标识是否相同来执行该识别。因此,客户端C3将识别出其自身是与排队响应所指示的排队标识R3相对应的客户端,从而控制其目标操作(即,除氮阻塞值冲洗)开始执行。目标操作的执行可以是客户端C3与服务端S协作完成的,为避免模糊本公开,对此不做详细描述。客户端C2和C4将识别其自身不是与排队响应所指示的排队标识R3对应的客户端,则继续等待,不采取任何动作。The queuing identifiers of the clients C2-C4 are no longer the initial queuing identifiers, and they will perform step S204 to identify whether they are clients corresponding to the queuing identifier R3 indicated by the queuing response. For example, the clients C2-C4 may perform the identification by comparing whether the queuing identifier R3 indicated by the received queuing response is the same as its own current queuing identifier. Therefore, the client C3 will recognize itself as the client corresponding to the queuing identifier R3 indicated by the queuing response, so as to control its target operation (ie, nitrogen removal blocking value flushing) to start executing. The execution of the target operation may be completed by the cooperation of the client C3 and the server S, which will not be described in detail in order to avoid obscuring the present disclosure. The clients C2 and C4 will recognize that they are not clients corresponding to the queuing identifier R3 indicated by the queuing response, and continue to wait without taking any action.
如此,根据本公开实施例的排队方法,由客户端根据目标操作的类型、检测到目标操作的请求的时间、客户端的预定优先级等排队影响因素来生成排队标识。服务端仅每预定时间间隔获取一次客户端的排队标识,再使用简单的排序逻辑对排队标识进行排序。相比现有技术,简化了服务端的操作。当某客户端发生变化时,只需在发生变化的客户端做相应调整无需服务端做任何改变。In this way, according to the queuing method of the embodiment of the present disclosure, the client generates the queuing identifier according to the type of the target operation, the time when the request for the target operation is detected, the predetermined priority of the client, and other queuing influencing factors. The server only obtains the queuing identifiers of the client every predetermined time interval, and then uses simple sorting logic to sort the queuing identifiers. Compared with the prior art, the operation of the server is simplified. When a client changes, it only needs to make corresponding adjustments on the changed client without making any changes on the server.
参考回图2,排队方法200还可以包括步骤S205和S206。Referring back to FIG. 2, the queuing method 200 may further include steps S205 and S206.
在步骤S205,由多个客户端中的每个客户端,一旦其目标操作开始执行便再次改变排队标识,使得再次改变后的排队标识将被服务端排序到首位。In step S205, each of the multiple clients changes the queuing identifier again once its target operation starts to be executed, so that the re-changed queuing identifier will be sorted to the first place by the server.
继续以图3的示例来说明该步骤。Continue to use the example in FIG. 3 to illustrate this step.
在预定时间间隔ΔT3期间,客户端C3一旦开始执行除氮阻塞值冲洗,就执行步骤S205,即生成新的排队标识OR3来取代排队标识R3。排队标识OR3被编码成使得其被服务端S获取后被排序到首位(如图3中圆圈所示)。对此,具体实现方式取决于客户端C1~C6的编码规则和服务端S的排队逻辑,后文将举例说明。During the predetermined time interval ΔT3, once the client C3 starts to flush the blocking value for nitrogen removal, step S205 is executed, that is, a new queue identifier OR3 is generated to replace the queue identifier R3. The queuing identifier OR3 is coded such that it is sorted to the first place after being acquired by the server S (as shown by the circle in FIG. 3 ). In this regard, the specific implementation method depends on the encoding rules of the clients C1-C6 and the queuing logic of the server S, which will be described with examples later.
在预定时间间隔ΔT4期间,生物滤池A1请求执行除氮强制冲洗。客户端C1检测到该请求而执行步骤S202,生成新的排队标识R1来取代其初始的排队标识NR1。During the predetermined time interval ΔT4, the biofilter A1 requests to perform a nitrogen removal forced flushing. The client C1 detects the request and executes step S202, generating a new queuing identifier R1 to replace its initial queuing identifier NR1.
服务端S执行步骤S203获取每个客户端C1~C6的排队标识:R1、R2、OR3、R4、NR5、NR6。由于排队标识OR3被编码成被服务端S排序到首位(如图3中圆圈所示),因此服务端S生成的排队响应仍指示排队标识OR3。由此,客户端C3正在执行的除氮阻塞值冲洗不会被中断。由于R1所体现的除氮强制冲洗的预定优先级高于R4所体现的除碳阻塞值冲洗的预定优先级,若服务端S的排序逻辑被设计为生成完整队列,该队列将是:OR3、R1、R4、R2、NR5、NR6。The server S executes step S203 to acquire the queuing identifiers of each client C1-C6: R1, R2, OR3, R4, NR5, NR6. Since the queuing identifier OR3 is encoded to be sorted to the first place by the server S (as shown by the circle in FIG. 3 ), the queuing response generated by the server S still indicates the queuing identifier OR3. Thus, the flushing of the blocking value of nitrogen removal being performed by the client C3 will not be interrupted. Since the predetermined priority of the forced flushing of nitrogen removal represented by R1 is higher than the predetermined priority of the flushing of the blocking value of carbon removal represented by R4, if the sorting logic of the server S is designed to generate a complete queue, the queue will be: OR3, R1, R4, R2, NR5, NR6.
以这种方式,在预定时间间隔ΔT5至ΔTn-1之间,只要客户端C3的排队标识保持为OR3,无论其他客户端C1、C2、C4、C5的排队标识如何变化,服务端S始终将客户端C3的排队标识OR3确定为排在首位(如图3中圆圈所示)。如此,生物滤池A3的除氮阻塞值冲洗不会被中断。In this way, during the predetermined time interval ΔT5 to ΔTn-1, as long as the queuing identifier of the client C3 remains OR3, no matter how the queuing identifiers of other clients C1, C2, C4, and C5 change, the server S will always The queuing identifier OR3 of the client C3 is determined to be the first in the queue (shown as a circle in FIG. 3 ). In this way, the flushing of the nitrogen removal blocking value of the biofilter A3 will not be interrupted.
在步骤S206,由多个客户端中的每个客户端,一旦其目标操作完成执行,就将其排队标识改变回初始的排队标识。In step S206, each of the plurality of clients changes its queuing identifier back to the initial queuing identifier once its target operation is executed.
继续以图3的示例来说明该步骤。Continue to use the example in FIG. 3 to illustrate this step.
在预定时间间隔ΔTn,生物滤池A3的除氮阻塞值冲洗执行完毕,客户端C3便将其排队标识OR3改变回初始的排队标识NR3。In the predetermined time interval ΔTn, the flushing of the nitrogen removal blocking value of the biofilter A3 is completed, and the client C3 changes its queuing identifier OR3 back to the initial queuing identifier NR3.
服务端S获取每个客户端C1~C6的排队标识:R1、R2、NR3、R4、R5、R6。R5和R6所体现的目标操作类型都是除氮定时冲洗,并且请求时间都是2022年9月20日12时00分。根据前述排队规则,R1所体现的除氮强制冲洗优先于R4所体现的除碳阻塞值冲洗,R4所体现的除碳阻塞值冲洗优先于R2所体现的除氮定时冲洗,R2所体现的除氮定时冲洗优先于R5和R6所体现的除氮定时冲洗,R5和R6的请求时间相同,但客户端C5的优先级高于客户端C6的优先级。因此,服务端S将R1排在首位(如图3中圆圈所示),并且,若服务端S的排序逻辑被设计为生成完整队列,该队列将是:R1、R4、R4、R5、R6、NR3。之后客户端C1执行其目标操作除氮强制冲洗。The server S obtains the queuing identifiers of each client C1-C6: R1, R2, NR3, R4, R5, R6. The target operation types embodied by R5 and R6 are both nitrogen removal and regular flushing, and the request time is both at 12:00 on September 20, 2022. According to the aforementioned queuing rules, the forced flushing of nitrogen removal embodied by R1 has priority over the flushing of carbon removal blockage value represented by R4, the flushing of carbon removal blockage value represented by R4 has priority over the timing flushing of nitrogen removal represented by R2, and the flushing of nitrogen removal represented by R2 Nitrogen timing flushing has priority over nitrogen removal timing flushing embodied by R5 and R6. The request time of R5 and R6 is the same, but the priority of client C5 is higher than that of client C6. Therefore, the server S ranks R1 first (as indicated by the circle in Figure 3), and if the sorting logic of the server S is designed to generate a complete queue, the queue will be: R1, R4, R4, R5, R6 , NR3. Client C1 then performs its target operation to remove nitrogen and force flushing.
以上结合图3的示例详细描述了排队方法200的过程,下面描述客户端用来生成排队标识的示例编码规则。The process of the queuing method 200 has been described in detail above with reference to the example in FIG. 3 , and an example encoding rule used by the client to generate the queuing identifier is described below.
作为一种示例,客户端C1~C6可以采用二进制编码来生成二进制数作为排队标识。该二进制数的二进制位从高到低依次包括表示请求是否正在执行的第一组二进制位、表示目标操作的预定优先级的第二组二进制位、表示检测到请求的时间的第三组二进制位、以及表示客户端的预定优先级的第四组二进制位。As an example, the clients C1-C6 may use binary encoding to generate binary numbers as queuing identifiers. The bits of the binary number, from high to low, include the first set of bits indicating whether the request is being executed, the second set of bits indicating the predetermined priority of the target operation, and the third set of bits indicating when the request was detected , and a fourth set of binary bits representing the predetermined priority of the client.
下面的表1示出示例64位二进制编码规则,其中bit 62用作表示请求是否正在执行的第一组二进制位,bit42-bit39用作表示目标操作的预定优先级第二组二进制位,bit38-bit32和bit27-bit8用作表示检测到请求的时间的第三组二进制位,bit7-bit0用作表示客户端的预定优先级的第四组二进制位,剩余的bit63、bit61-bit43、bit31-bit28用作保留位以备将来扩展时使用。Table 1 below shows an example 64-bit binary encoding rule, where
表1Table 1
客户端C1~C6采用该编码规则将优先级越高的请求编码成越小的二进制数,服务端S则采用将二进制数从小到大排序的排序逻辑(例如,冒泡算法)对这些二进制数进行排序。但本公开不限于此,例如,也可以将优先级越高的请求编码成越大的二进制数,服务端S则相应采用二进制数从大到小排序的排序逻辑。由此,具有最高优先级的请求的客户端所生成的排队标识将被服务端S排到首位。Clients C1~C6 use this encoding rule to encode requests with higher priority into smaller binary numbers, and server S uses sorting logic (for example, bubble algorithm) to sort these binary numbers from small to large. put in order. But the present disclosure is not limited thereto. For example, requests with higher priority may be encoded into larger binary numbers, and the server S correspondingly adopts a sorting logic of sorting binary numbers from large to small. Thus, the queuing identifier generated by the client with the highest priority request will be ranked first by the server S.
下面的表2是表示目标操作的预定优先级的第二组二进制位bit42-bit39的对应编码。Table 2 below is the corresponding encoding of the second group of binary bits bit42-bit39 representing the predetermined priority of the target operation.
表2Table 2
下面的表3是表示客户端的预定优先级的第四组二进制位的对应编码。Table 3 below is the corresponding encoding of the fourth group of binary bits representing the predetermined priority of the client.
表3table 3
参考回图3,将以上编码规则应用于图3的示例,在预定时间间隔ΔT1期间,客户端C1~C6初始化,生成的各初始排队标识。具体地,将第一组二进制位和第二组二进制位分别编码为相应的最大值,将第四组二进制位编码为表示客户端的预定优先级的值。初始化时间都按2022年9月20日00点00分来编码,表示检测到请求的时间的第三组二进制位bit38-bit32和bit27-bit8被分别编码成10110和1001-10100-00000-000000。为简便起见,表4中省略了表示时间的第三组二进制位的编码结果。Referring back to FIG. 3 , applying the above coding rules to the example in FIG. 3 , during the predetermined time interval ΔT1 , the clients C1 - C6 are initialized to generate initial queuing identifiers. Specifically, the first group of binary bits and the second group of binary bits are respectively encoded as corresponding maximum values, and the fourth group of binary bits is encoded as a value representing a predetermined priority of the client. The initialization time is encoded at 00:00 on September 20, 2022, and the third group of binary bits bit38-bit32 and bit27-bit8 representing the time when the request is detected are encoded as 10110 and 1001-10100-00000-000000 respectively. For the sake of brevity, the encoding result of the third group of binary digits representing time is omitted in Table 4.
表4Table 4
服务端S对各排队标识从小到大排序的结果是:NR1、NR2、NR3、NR4、NR5、NR6。服务端S向客户端广播的排队响应指示NR1。The server S sorts the queuing IDs in ascending order: NR1, NR2, NR3, NR4, NR5, NR6. The queuing response broadcast by the server S to the client indicates NR1.
在预定时间间隔ΔT2期间,各排队标识不变。During the predetermined time interval ΔT2, the respective queuing identifiers remain unchanged.
在预定时间间隔ΔT3期间,客户端C2、C3和C4分别基于除氮定时冲洗、除氮阻塞值冲洗和除碳阻塞值冲洗编码生成新的排队标识R2、R3和R4以分别取代NR2、NR3、NR4。客户端C1~C6的排队标识的编码如表5。与表4相比,将各第二组二进制位改变为表示相应目标操作的预定优先级的值,将各第三组二进制位改变为表示检测到相应请求的时间的值。为简便起见,表5中省略了表示时间的第三组二进制位的编码结果。During the predetermined time interval ΔT3, the clients C2, C3 and C4 respectively generate new queuing identifiers R2, R3 and R4 to replace NR2, NR3, NR4. The codes of the queuing identifiers of the clients C1-C6 are shown in Table 5. Compared with Table 4, each second group of bits is changed to a value representing the predetermined priority of the corresponding target operation, and each third group of bits is changed to a value representing the time at which the corresponding request was detected. For the sake of brevity, the encoding result of the third group of binary digits representing time is omitted in Table 5.
表5table 5
服务端S对各排队标识从小到大排序的结果是:R3、R4、R2、NR1、NR5、NR6。服务端S向客户端广播的排队响应指示R3。The result of the server S sorting the queuing IDs from small to large is: R3, R4, R2, NR1, NR5, NR6. The queuing response indication R3 broadcast by the server S to the client.
在预定时间间隔ΔT4期间,客户端C3基于其请求的目标操作正在执行,将其排队标识中的第一组二进制位bit 62编码为最小值0,以生成新的排队标识OR3以取代排队标识R3。客户端C1基于除氮强制冲洗编码生成新的排队标识R1以取代排队标识NR1。客户端C1~C6的排队标识的编码如表6。为了简便起见,表6中省略了表示时间的第三组二进制位的编码结果。During the predetermined time interval ΔT4, the client C3 encodes the first group of binary bits bit 62 in its queuing identifier to the minimum value 0 based on the target operation requested by it, so as to generate a new queuing identifier OR3 to replace the queuing identifier R3 . The client C1 generates a new queuing identifier R1 to replace the queuing identifier NR1 based on the nitrogen removal forced flushing code. The codes of the queuing identifiers of the clients C1-C6 are shown in Table 6. For the sake of brevity, the encoding result of the third group of binary digits representing time is omitted in Table 6.
表6Table 6
服务端S对六个排队标识从小到大排序的结果是:OR3、R1、R4、R2、NR5、NR6。服务端S向客户端广播的排队响应指示OR3。The server S sorts the six queuing IDs from small to large: OR3, R1, R4, R2, NR5, NR6. The queuing response indication OR3 broadcast by the server S to the client.
在预定时间间隔ΔT4至ΔTn-1期间,客户端C5基于目标操作除碳定时冲洗和请求发生时间例如2022年9月20日12时00分编码生成了排队标识R5来取代排队标识NR5。客户端C6基于与C4相同的目标操作除碳定时冲洗和相同的请求发生时间2022年9月20日12时00分编码生成了排队标识R6来取代排队标识NR6。但无论这些客户端的排队标识如何变化,只有客户端C3的排队标识OR3的bit 62为0,因此OR3始终是所有排队标识中最小的二进制数,OR3始终被排在首位(如图3中圆圈所示)。服务端S向客户端广播的排队响应始终指示OR3。During the predetermined time interval ΔT4 to ΔTn-1, the client C5 encodes and generates the queuing identifier R5 to replace the queuing identifier NR5 based on the target operation decarbonization timing flushing and request occurrence time, for example, at 12:00 on September 20, 2022. Client C6 coded and generated queue identifier R6 to replace queue identifier NR6 based on the same target operation as C4, carbon removal timing flushing and the same request occurrence time at 12:00 on September 20, 2022. But no matter how the queuing identifiers of these clients change, only the
直到预定时间间隔ΔTn,客户端C3基于其请求的目标操作执行完毕将其排队标识从OR3改变回NR3。客户端C1~C6的排队标识的编码如表7。为简便起见,表7中省略了第三组二进制位的编码结果。Until the predetermined time interval ΔTn, the client C3 changes its queuing identifier from OR3 back to NR3 based on the execution of the target operation requested by it. The encodings of the queuing identifiers of the clients C1-C6 are shown in Table 7. For simplicity, the encoding results of the third group of binary bits are omitted in Table 7.
表7Table 7
服务端S对各排队标识从小到大排序的结果是:R1、R4、R2、R5、R6、NR3。服务端S向客户端广播的排队响应指示R1。之后客户端C1执行其目标操作除氮强制冲洗。The server S sorts the queuing IDs from small to large: R1, R4, R2, R5, R6, NR3. The queuing response indication R1 broadcast by the server S to the client. Client C1 then performs its target operation to remove nitrogen and force flushing.
以上描述的编码规则仅作为示例,能够实现排队方法200的用于客户端的编码规则都是可能的。以上描述服务端S从小到大的排序逻辑也是示例性的,能与客户端的编码规则配合来实现排队方法200的排序逻辑都是可能的。The encoding rules described above are only examples, and any encoding rules for clients that can implement the queuing method 200 are possible. The above description of the ordering logic of the server S from small to large is also exemplary, and it is possible to implement the ordering logic of the queuing method 200 in cooperation with the encoding rules of the client.
本领域技术人员应该理解,上述的具体实施例仅是示例而非限制,可以根据设计需求和其它因素对本公开的实施例进行各种修改、组合、部分组合和替换,只要它们在所附权利要求或其等同的范围内,即属于本公开所要保护的权利范围。Those skilled in the art should understand that the above-mentioned specific embodiments are only examples and not limiting, and various modifications, combinations, partial combinations and replacements can be made to the embodiments of the present disclosure according to design requirements and other factors, as long as they are described in the appended claims or its equivalent scope, that is, it belongs to the scope of rights to be protected by the present disclosure.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211223479.6A CN115550453B (en) | 2022-10-08 | 2022-10-08 | Queuing method and queuing system for target operation |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211223479.6A CN115550453B (en) | 2022-10-08 | 2022-10-08 | Queuing method and queuing system for target operation |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115550453A true CN115550453A (en) | 2022-12-30 |
| CN115550453B CN115550453B (en) | 2025-03-25 |
Family
ID=84732577
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211223479.6A Active CN115550453B (en) | 2022-10-08 | 2022-10-08 | Queuing method and queuing system for target operation |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115550453B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9514170B1 (en) * | 2013-05-15 | 2016-12-06 | Amazon Technologies, Inc. | Priority queue using two differently-indexed single-index tables |
| CN106257893A (en) * | 2016-08-11 | 2016-12-28 | 浪潮(北京)电子信息产业有限公司 | Storage server task response method, client, server and system |
| CN111988241A (en) * | 2020-08-20 | 2020-11-24 | 恒生电子股份有限公司 | Message queuing method, system, device and storage medium |
| CN114915663A (en) * | 2022-03-21 | 2022-08-16 | 北京沃东天骏信息技术有限公司 | Request response method, device, system, electronic equipment and medium |
-
2022
- 2022-10-08 CN CN202211223479.6A patent/CN115550453B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9514170B1 (en) * | 2013-05-15 | 2016-12-06 | Amazon Technologies, Inc. | Priority queue using two differently-indexed single-index tables |
| CN106257893A (en) * | 2016-08-11 | 2016-12-28 | 浪潮(北京)电子信息产业有限公司 | Storage server task response method, client, server and system |
| CN111988241A (en) * | 2020-08-20 | 2020-11-24 | 恒生电子股份有限公司 | Message queuing method, system, device and storage medium |
| CN114915663A (en) * | 2022-03-21 | 2022-08-16 | 北京沃东天骏信息技术有限公司 | Request response method, device, system, electronic equipment and medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115550453B (en) | 2025-03-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104915407B (en) | A kind of resource regulating method based under Hadoop multi-job environment | |
| CN111984426B (en) | Task scheduling method and device, electronic equipment and storage medium | |
| CN106874100B (en) | Computing resource allocation method and device | |
| US20090113434A1 (en) | Apparatus, system and method for rapid resource scheduling in a compute farm | |
| CN104111867B (en) | A kind of virtual machine (vm) migration device and method | |
| CN116483546B (en) | Distributed training task scheduling method, device, equipment and storage medium | |
| CN109788325B (en) | Video task allocation method and server | |
| CN109491775B (en) | Task processing and scheduling method used in edge computing environment | |
| US9535743B2 (en) | Data processing control method, computer-readable recording medium, and data processing control device for performing a Mapreduce process | |
| CN1455437A (en) | Semiconductor Wafer Manufacturing Execution System with Recipe Allocation Management Database | |
| EP4370981B1 (en) | Method and system for generating user specific engineering programs in a multi-user engineering environment | |
| US8924676B1 (en) | Efficient storage load redistribution | |
| CN110135967A (en) | Collection data processing method and system | |
| CN106295927B (en) | Method and device for allocating tasks to operator | |
| CN115934362A (en) | Server-less perception computing cluster scheduling method and product for deep learning | |
| EP3018581A1 (en) | Data staging management system | |
| CN115550453A (en) | Queuing method and queuing system for target operations | |
| CN107168788B (en) | Method and device for scheduling resources in distributed system | |
| CN106406990B (en) | A kind of job stacking-reso urce matching method and system with security constraint | |
| CN105824699A (en) | Distributed task scheduling apparatus and method | |
| CN110502347B (en) | Task load scheduling method and device | |
| CN103765336A (en) | A method and a system for online and dynamic schedule configuration of control applications in a distributed control system | |
| CN1273910C (en) | Bus type inter-process communication method | |
| CN111078397A (en) | Load balancing task allocation method and system suitable for server cluster | |
| CN117370014A (en) | Method and device for distributing containerized ClickHouse Pod |
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 | ||
| CB02 | Change of applicant information |
Country or region after: China Address after: 3101, 27th Floor, Building 1, Yard 38, East 3rd Ring North Road, Chaoyang District, Beijing, 100026 Applicant after: Suez Environmental Technology (Beijing) Co.,Ltd. Address before: 100026 31 / F, Taikang financial building, building 1, courtyard 38, East Third Ring Road North, Chaoyang District, Beijing Applicant before: Suez Water Treatment Co,.Ltd. Country or region before: China |
|
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |






