Task scheduling method, system, equipment and medium
Through the combination of distributed locking mechanism and priority rules, the data inconsistency and repetitive operation problems of electronic table cards in the collaborative management of conference resources are solved, the system's concurrent processing capabilities and data consistency are improved, the timely execution of high-priority tasks is ensured, and the meeting efficiency is improved.
Patent Information
- Application Number
- CN202510426732.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-18
AI Technical Summary
In modern conference scenarios, electronic table cards have problems such as data inconsistency, repeated operations and resource competition in resource collaborative management, resulting in inefficiency in conferences.
The distributed lock mechanism is used to control the concurrent application operation of shared resources and perform task scheduling based on priority rules to ensure that only one node is allowed to modify resources at the same time, and high-priority tasks can seize low-priority tasks.
It effectively solves the problems of data inconsistency and repeated operations, improves the system's concurrent processing capabilities and data consistency, ensures the timely execution of high-priority tasks, and improves the efficiency and response speed of collaborative management of conference resources.
Smart Images

Figure CN120335964A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and particularly relates to a task scheduling method, system, device, and medium. Background Art
[0002] In modern conference scenarios, electronic nameplates are increasingly widely used, providing many conveniences for the efficient development of conferences. However, they also face a series of problems. Currently, there are obvious deficiencies in the collaborative work of conference resources for electronic nameplates. In terms of seat information display, due to the lack of effective concurrency control, when multiple nodes modify seat arrangements simultaneously, the information displayed on the electronic nameplates is prone to chaos and cannot accurately reflect the actual seat adjustment, making it difficult for participants to quickly find their seats.
[0003] In the file push link, when multiple nodes trigger push tasks simultaneously, the electronic nameplates will receive a large number of duplicate files, which not only wastes system resources but also interferes with participants' access to key information. Moreover, there is a lack of a collaborative scheduling mechanism between the electronic nameplates and other conference resources. When multiple tasks compete for display resources simultaneously, the electronic nameplates cannot display important information in a timely manner. These problems seriously affect the smooth progress of the conference and the participation experience, and there is an urgent need for a new technical solution to optimize the performance of electronic nameplates in conference resource collaboration and achieve accurate and efficient information transmission. Summary of the Invention
[0004] This application proposes a task scheduling method, system, device, and medium to solve the problems of data inconsistency, duplicate operations, and resource competition when multiple nodes concurrently operate shared resources.
[0005] In the first aspect of this application, a task scheduling method is provided. The method includes:
[0006] Receiving a task request sent by a regional control node, where the task request is sent to the regional control node by one or more electronic nameplate terminals;
[0007] Controlling the concurrent application operations of shared resources through a distributed lock mechanism according to different operation requirements of the task request;
[0008] Based on tasks of different application operation types, performing task scheduling according to a preset priority rule.
[0009] This application controls the concurrent application operations of shared resources by introducing a distributed lock mechanism, effectively solving the problems of data inconsistency, duplicate operations, and resource competition caused by multiple nodes operating on shared resources simultaneously in the prior art. It ensures that only one node can modify the shared resource at the same time, thus avoiding data conflicts and duplicate operations. At the same time, by adopting a preset priority rule, it realizes the effective preemption of high-priority tasks over low-priority tasks, improves the concurrent processing ability and data consistency of the system, and provides more efficient and reliable collaborative support for different operations such as seat arrangement, file push, and screen display during the meeting process.
[0010] In the embodiment of the first aspect, after task scheduling is performed according to the preset priority rule for tasks of different application operation types, it further includes:
[0011] Feedback the execution result of the task scheduling to the central control platform and the regional control node.
[0012] In the embodiment of the first aspect, the controlling the concurrent application operations of shared resources by the distributed lock mechanism specifically includes:
[0013] When the electronic nameplate terminal needs to operate on the shared resource, send a lock application request to the lock service;
[0014] If the lock application is successful, the electronic nameplate terminal holds the lock and performs operations according to different requirements, and only allows one electronic nameplate terminal to modify the shared resource at the same time;
[0015] If the lock application fails, the electronic nameplate terminal enters the waiting state and retries to obtain the lock within a preset time until the lock is released or times out;
[0016] After the lock application operation is completed, verify the identity of the lock holder and release the lock.
[0017] In the embodiment of the first aspect, the distributed lock mechanism is implemented based on the Redis (Remote Dictionary Server), including:
[0018] Use the value of the lock as the unique identifier for applying for the lock, and dynamically set the expiration time of the lock according to the operation type;
[0019] Release the lock after verifying the identity of the lock holder through a Lua (a lightweight scripting language) script.
[0020] In the embodiment of the first aspect, the preset priority rule includes:
[0021] Users can customize the priority assignment for tasks of different application operation types;
[0022] High-priority tasks preempt low-priority tasks first, and the execution time is allocated in a round-robin manner among tasks of the same priority. The interrupted task is added to the task queue and waits for rescheduling. After the preemption of the high-priority task is completed, the interrupted task is resumed.
[0023] Realtime capture different operation states in the task scheduling and update and synchronize the captured status information to the corresponding electronic table terminal.
[0024] The beneficial technical effects brought by the technical solution provided in the embodiment of the present application include:
[0025] By introducing a distributed lock mechanism implemented based on remote dictionary service, the present application ensures that only one node is allowed to modify resources at the same time, thus avoiding the problem of data inconsistency. At the same time, the system can schedule resources according to the urgency and priority of tasks, ensuring that high-priority tasks can preempt low-priority tasks in time, significantly improving the concurrent processing ability and resource utilization efficiency of the system. During the execution of tasks, the system updates the task status in real time and synchronizes it to the electronic table terminal. After the task is completed, the result is fed back to the central control platform and the regional control node, further enhancing the interactivity and response speed of the system, and providing a strong guarantee for the efficient collaborative management of conference resources.
[0026] The second aspect of the present application provides a task scheduling system, which includes a receiving module, a control module, and a scheduling module:
[0027] The receiving module is used to receive the task request sent by the regional control node;
[0028] The control module is used to control the concurrent application operation of shared resources through a distributed lock mechanism;
[0029] The scheduling module is used to perform task scheduling according to the preset priority rules;
[0030] The feedback module is used to feed back the execution result of the task scheduling to the central control platform and the regional control node.
[0031] The third aspect of the present application provides an electronic device, which includes: An electronic device includes a processor and a memory. The memory stores a computer program, and when the processor executes the computer program, the steps of the task scheduling method described in any one of the embodiments of the present application are implemented.
[0032] The fourth aspect of the present application provides a non-transitory computer-readable storage medium, in which at least one executable instruction is stored, and the executable instruction causes the task scheduling system to execute the operations of the task scheduling method described in any of the above. Description of the Drawings
[0033] To more clearly illustrate the technical solutions of this application, the accompanying drawings required for the implementation will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0034] Figure 1 is a schematic flowchart of a task scheduling method provided by this application;
[0035] Figure 2 is a schematic flowchart of controlling concurrent application operations of shared resources by a distributed lock mechanism in a task scheduling method provided by this application;
[0036] Figure 3 is a schematic structural diagram of a task scheduling system provided by this application;
[0037] Figure 4 is an interaction schematic diagram of an electronic nameplate terminal, a regional control node, and a central control platform in a task scheduling system provided by this application;
[0038] Figure 5 is a schematic structural diagram of an electronic device provided by this application. Specific Embodiments
[0039] In order to make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0040] Embodiment 1
[0041] Please refer to Figure 1 as shown, a task scheduling method provided by an embodiment of this application is specifically as follows:
[0042] Receive a task request sent by a regional control node, where the task request is sent by one or more electronic nameplate terminals to the regional control node;
[0043] According to different operation requirements of the task request, control concurrent application operations of shared resources through a distributed lock mechanism;
[0044] Based on tasks of different application operation types, perform task scheduling according to a preset priority rule.
[0045] In a preferred embodiment, the meeting is divided into multiple regions, and each region is equipped with a regional control node. All electronic nameplate terminals are connected to the central control system through a network or Bluetooth. During the meeting, various operations such as seat arrangement, file pushing, and screen display are involved. It is possible that multiple nodes operate on shared resources simultaneously, which may lead to system lag or stagnation.
[0046] Optionally, the participants perform the above-mentioned various operations on the electronic nameplate terminal. The electronic nameplate terminal sends the task operation request to the regional control node in the region where it is located, and the regional control node then forwards the request to the central control platform.
[0047] In this embodiment, the present application controls the concurrent application operations of shared resources by introducing a distributed lock mechanism, effectively solving the problems of data inconsistency, duplicate operations, and resource competition caused by multiple nodes operating on shared resources simultaneously in the prior art. It ensures that only one node can modify the shared resources at the same time, thus avoiding data conflicts and duplicate operations. At the same time, by adopting a preset priority rule, it realizes the effective preemption of high-priority tasks over low-priority tasks, improves the concurrent processing ability and data consistency of the system, and provides more efficient and reliable collaborative support for different operations such as seat arrangement, file pushing, and screen display during the meeting.
[0048] Further, after task scheduling is performed according to the preset priority rule based on tasks of different application operation types, it further includes:
[0049] Feedback the execution result of the task scheduling to the central control platform and the regional control node.
[0050] Optionally, after the system obtains the lock, it transmits the corresponding task status to the electronic nameplate terminal through the network. After receiving the signal, the electronic nameplate terminal will display "xx (task) is being transmitted" on the screen, so that the participants can know the task progress. If there is a network fluctuation during the process, and the system detects a decrease or interruption in the transmission speed, it will immediately update the status to "xx (task) transmission is abnormal, retrying", and synchronize this status to the electronic nameplate terminal again. The electronic nameplate terminal will accordingly refresh the display content.
[0051] Optionally, the successful result is feedback to the central control platform and the regional control node through the network, and the electronic nameplate terminal sends a transmission success signal to the central control platform and the regional control node. After receiving the transmission success signal, the central control platform will record the task success information and count data such as the transmission success rate and the number of participants covered, so as to evaluate the effect of meeting resource task distribution. After receiving the feedback, the regional control node can understand the task completion situation of the electronic nameplate terminals in its region. If the push fails for some electronic nameplate terminals, it can timely check for network or device problems.
[0052] Further, the introduction of a distributed lock mechanism to control the concurrent application operations of shared resources specifically includes:
[0053] When the electronic nameplate terminal needs to operate on shared resources, it sends a lock application request to the lock service.
[0054] If the lock application is successful, the electronic nameplate terminal holds the lock and performs operations with different requirements, and only allows one electronic nameplate terminal to modify the shared resources at the same time.
[0055] If the lock application fails, the electronic nameplate terminal enters the waiting state and retries to acquire the lock within a preset time until the lock is released or times out.
[0056] After the lock application operation is completed, verify the identity of the lock holder and release the lock.
[0057] Optionally, before the meeting starts, the system dynamically generates a seat layout according to the list of participants and assigns seats according to preset rules (such as department and rank). After the participants sign in, the system automatically updates the seat information and displays it in real time through the electronic nameplate. If the seat layout needs to be adjusted, the system first acquires the distributed lock to ensure that only one modification takes effect at the same time. After the modification is completed, the system synchronizes the new layout to all electronic nameplate terminals.
[0058] Optionally, after the participants sign in, the system automatically matches preset rules (such as department file push and service request), and ensures the uniqueness of tasks through the distributed lock. If it is necessary to push files to a specific department or provide services, the system immediately executes the relevant tasks and displays the relevant information through the electronic nameplate.
[0059] Further, the distributed lock mechanism is implemented based on the remote dictionary service, including:
[0060] Use the value of the lock as the unique identifier for applying for the lock, and dynamically set the expiration time of the lock according to the operation type.
[0061] Release the lock after verifying the identity of the lock holder through the Lua script.
[0062] Figure 2 The flow diagram of the distributed lock mechanism controlling the concurrent application operations of shared resources in a task scheduling method provided by this application is shown as Figure 2 shown.
[0063] Optionally, the remote dictionary service (Redis) is a high-performance key-value pair storage database based on memory. With its efficient read and write performance and rich data structure operation instructions, it provides basic support for the distributed lock mechanism. In this application, a distributed lock mechanism based on the remote dictionary service is implemented to control the concurrent application operations of shared resources, including lock application, lock acquisition, and lock holding and release, etc.
[0064] Optionally, a unique lock identifier (Key) is generated according to specific operation requirements. For example, for seat adjustment corresponding confirmation lock: seat_lock:{id}, for file push corresponding check lock: checkin_push:{id}, for screen display corresponding display lock: screen_display:{id}, etc. Set the value of the lock to the unique identifier of the current request node (such as node ID) for verifying the holder's identity when releasing the lock later. To prevent the lock from being permanently occupied (such as node crash or network failure), a reasonable expiration time (TTL) needs to be set for the lock. Use the SET key value NX PX timeout command to send a lock request to the remote dictionary service server. Among them, NX is used to ensure that the setting is successful only when the lock does not exist, effectively avoiding conflicts caused by multiple nodes competing for the same lock at the same time; PX is used to set the expiration time of the lock. For example: SET seat_lock:3 worker_id_1 NX PX 5000 (worker_id_1 is the unique identifier of the first operation node, and the lock expiration time is 5000 milliseconds).
[0065] Optionally, the lock service refers to a service component that provides lock management functions for a distributed system. In this application, it is mainly responsible for receiving lock application requests from the electronic nameplate terminal, verifying and allocating lock resources, and ensuring concurrent access control of shared resources.
[0066] Optionally, if the remote dictionary service lock service returns successfully, it means that the current node has successfully acquired the lock. At this time, subsequent operations related to the electronic nameplate terminal can be continued. For example, after successfully acquiring the checkin_push:M002 lock, files can be pushed to all electronic nameplate terminals with the meeting ID M002.
[0067] Optionally, if the remote dictionary service lock service returns a failure, it means that the lock is held by another node, and the current node needs to wait for the lock to be released. For example, when a node attempts to acquire the screen_display:M002 lock and fails, it means that another node is using the screen display resource at this time, and the current node cannot perform screen display operations.
[0068] Optionally, during the operation, the lock is held by the current node, and other nodes cannot acquire the same lock, thus avoiding data inconsistency problems caused by concurrent operations. If the operation time is long, it is necessary to ensure that the expiration time of the lock is long enough, and the holding time of the lock can be extended through a renewal mechanism.
[0069] Optionally, first verify the lock holder, that is, when the node completes the update of the database and the adjustment of the display content of the electronic nameplate terminal and is ready to release the lock. At this time, the node will send a query instruction to the remote dictionary service server to obtain the current value of the lock, and compare the obtained lock value with its own node ID to ensure that only the node holding the lock can release the lock and prevent data chaos caused by accidental release.
[0070] Optionally, once it is confirmed that the current node is the lock holder, the system will release the lock by executing a Lua script. The Lua script first checks whether the value of the lock is consistent with the ID of the current node; if it is consistent, it will execute the DEL command to delete the lock; if it is not consistent, it means that the lock has been acquired by another node or has expired, and there is no need to release the lock at this time.
[0071] Optionally, after the lock is successfully released, relevant information will be fed back to the task engine and the database. The task engine can schedule subsequent tasks according to the release situation of the lock, such as continuing to execute the tasks in the waiting queue; the database can update relevant records to ensure that the data status is consistent with the actual operation.
[0072] Furthermore, the preset priority rules include:
[0073] Users can customize the priority assignment for tasks of different application operation types;
[0074] High-priority tasks preempt low-priority tasks first, and the execution time is allocated in a round-robin manner among tasks of the same priority. The interrupted tasks are added to the task queue to wait for rescheduling, and the interrupted tasks are resumed after the high-priority tasks have completed preemption.
[0075] Grab the different operation states in the task scheduling in real time, and update and synchronize the grabbed status information to the corresponding electronic nameplate terminal.
[0076] Optionally, during the meeting, multiple tasks related to the electronic nameplate terminal will be generated, and the system sets priorities according to the nature and urgency of the tasks. Among them, the screen control instruction is given the highest priority and is used for key scenarios such as emergency notifications and speech switching. The one-key projection task (such as pushing files or videos to the electronic nameplate terminal) is dynamically sorted according to the urgency of the files or videos.
[0077] Optionally, during the execution process, if a high-priority task appears, the system will pause the currently executing low-priority task and add it to the waiting task queue. For example: during video playback, it is known that the screen control instruction has a higher priority than video playback. If an emergency screen control instruction is received, the video playback will stop immediately to give up resources for the execution of the screen control instruction. This preemption mechanism ensures the timeliness of key tasks and avoids delaying the transmission of important information due to the continuous execution of low-priority tasks.
[0078] Optionally, for one-key delivery tasks with the same priority, the system uses the round-robin algorithm for processing. Each task with the same priority is assigned a fixed time slice, and the task is executed within the time slice. When the time slice runs out, the system pauses the current task and allocates the CPU resources to the next task with the same priority. When there are multiple file push tasks with the same priority, the system will allocate execution time to each task in a round-robin manner. The length of the time slice can be dynamically adjusted according to the system performance and the average execution time of the tasks, and generally ranges from 100 milliseconds to 1000 milliseconds; in this way, each task can be fairly given the opportunity to execute, avoiding a situation where a certain task occupies resources for a long time and causes other tasks to wait too long.
[0079] Optionally, after the high-priority screen control instruction is executed, the system will retrieve the suspended low-priority tasks from the waiting queue and continue to execute them according to the status of the large screen and the system resources. For example, after the emergency notice display is completed, the previously suspended display task will resume playing from the suspended position, and the display content of the electronic nameplate terminal will also be restored accordingly, ensuring the integrity and coherence of the task.
[0080] In summary, a task scheduling method provided in the embodiments of the present application has the following beneficial effects: By introducing a distributed lock mechanism implemented based on Redis, the present application ensures that only one node is allowed to modify the resources at the same time, thus avoiding the problem of data inconsistency. At the same time, the system can schedule resources according to the urgency and priority of the tasks, ensuring that high-priority tasks can preempt low-priority tasks in a timely manner, significantly improving the concurrent processing ability and resource utilization efficiency of the system. During the execution of tasks, the system updates the task status in real time and synchronizes it to the electronic nameplate terminal, and feeds back the results to the central control platform and the regional control node after the tasks are completed, further enhancing the interactivity and response speed of the system, and providing a strong guarantee for the efficient collaborative management of conference resources.
[0081] Embodiment 2
[0082] Please refer to Figure 3 , a task scheduling system provided in the embodiments of the present application, the system includes a receiving module, a control module, and a scheduling module:
[0083] The receiving module is used to receive the task requests sent by the regional control node;
[0084] The control module is used to control the concurrent application operations of shared resources through a distributed lock mechanism;
[0085] The scheduling module is used to perform task scheduling according to the preset priority rules;
[0086] A feedback module for feeding back the execution result of the task scheduling to the central control platform and the regional control nodes.
[0087] The interaction among the electronic nameplate terminal, the regional control nodes and the central control platform involved in the task scheduling method in the embodiments of the present invention will be specifically described as follows:
[0088] Figure 4 It is a schematic diagram of the interaction among the electronic nameplate terminal, the regional control nodes and the central control platform in a task scheduling system provided by the present application. The electronic nameplate terminal establishes a connection with the regional control nodes by using its own network communication module, and the regional control nodes are connected to the central control platform through high-performance network devices.
[0089] In summary, a task scheduling system provided in the embodiments of the present application has the following beneficial effects: By introducing a distributed lock mechanism to control the concurrent application operations of shared resources, the present application effectively solves the problems of data inconsistency, repeated operations and resource competition caused by multiple nodes operating on shared resources simultaneously in the prior art, ensuring that only one node can modify the shared resources at the same time, thus avoiding data conflicts and repeated operations. At the same time, by adopting a preset priority rule, the present application realizes the effective preemption of high-priority tasks over low-priority tasks, improves the concurrent processing ability and data consistency of the system, and provides more efficient and reliable collaborative support for different operations such as seat arrangement, file pushing, and screen display during the meeting process.
[0090] The above task scheduling system can implement the task scheduling method in the above method embodiments. The optional items in the above method embodiments are also applicable to this embodiment and will not be elaborated here. The remaining content of the embodiments of the present application can refer to the content of the above method embodiments and will not be repeated in some preferred embodiments.
[0091] Embodiment III
[0092] Figure 5 It shows a schematic structural diagram of an embodiment of an electronic device of the present invention. The specific implementation of the device is not limited in the specific embodiments of the present invention. Figure 5 The shown electronic device 4000 includes: a processor 4001 and a memory 4003. Among them, the processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation to the embodiments of the present application.
[0093] The processor 4001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of this application. The processor 4001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0094] The bus 4002 can include a path for transmitting information between the above components. The bus 4002 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0095] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, which is not limited here.
[0096] The memory 4003 is used to store the computer program for implementing the embodiments of this application and is controlled by the processor 4001 for execution. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0097] Among them, the electronic device can be any kind of electronic product that can perform human-computer interaction with an object. For example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.
[0098] The electronic device may further include a network device and / or an object device. Among them, the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.
[0099] The network where the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0100] The embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiment can be implemented. The algorithms or displays provided herein are not inherently related to any specific computer, virtual system, or other device. In addition, the embodiments of the present invention are not directed to any specific programming language.
[0101] The above embodiments are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
[0102] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. Similarly, in order to streamline the present invention and help understand one or more of the various aspects of the present invention, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation mode are hereby expressly incorporated into the specific implementation mode, where each claim itself is a separate embodiment of the present invention.
[0103] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.
[0104] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A task scheduling method, characterized in that, The method includes: Receiving a task request sent by a regional control node, where the task request is sent by one or more electronic nameplate terminals to the regional control node; Controlling the concurrent application operations of shared resources through a distributed lock mechanism according to different operation requirements of the task request; Performing task scheduling according to a preset priority rule based on tasks of different application operation types.
2. The task scheduling method according to claim 1, wherein After performing task scheduling according to a preset priority rule based on tasks of different application operation types, it further includes: Feeding back the execution result of the task scheduling to the central control platform and the regional control node.
3. The task scheduling method according to claim 1, wherein Controlling the concurrent application operations of shared resources through a distributed lock mechanism specifically includes: When the electronic nameplate terminal needs to operate on shared resources, sending a lock application request to the lock service; If the lock application is successful, the electronic nameplate terminal holds the lock and performs operations with different requirements, and only allows one electronic nameplate terminal to modify the shared resources at the same time; If the lock application fails, the electronic nameplate terminal enters a waiting state and retries to obtain the lock within a preset time until the lock is released or times out; After the lock application operation is completed, verifying the identity of the lock holder and releasing the lock.
4. A task scheduling method according to claim 1, characterized in that, The distributed lock mechanism is implemented based on a remote dictionary service and includes: Using the value of the lock as the unique identifier for applying for the lock, and dynamically setting the expiration time of the lock according to the operation type; Releasing the lock after verifying the identity of the lock holder through a Lua script.
5. A task scheduling method according to claim 1, characterized in that The preset priority rule includes: Users can customize the priority assignment for tasks of different application operation types; High-priority tasks preempt low-priority tasks first, and the execution time is allocated in a time slice rotation among tasks of the same priority. The interrupted tasks are added to the task queue to wait for rescheduling, and the interrupted tasks are resumed after the high-priority tasks have completed preemption.
6. A task scheduling method according to claim 5, characterized in that It further includes: Real-time capturing of different operation states in the task scheduling, and updating and synchronizing the captured status information to the corresponding electronic nameplate terminals.
7. A task scheduling system, characterized in that, The system includes a receiving module, a control module, and a scheduling module: The receiving module is used to receive a task request sent by a regional control node; The control module is used to control the concurrent application operations of shared resources through a distributed lock mechanism; The scheduling module is used to perform task scheduling according to a preset priority rule.
8. A task scheduling system according to claim 7, characterized in that, It further includes: A feedback module is used to feed back the execution result of the task scheduling to the central control platform and the regional control node.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a task scheduling method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, where when the computer program is executed by a processor, it implements a task scheduling method according to any one of claims 1 to 6.