License processing method, device, system and equipment for seismic data processing software
By sorting and generating queue sequences in the earthquake data processing software and dynamically allocating licenses, the problems of long waiting time and low license utilization efficiency under the floating license mode are solved, and more efficient utilization and monitoring of license resources are achieved.
Patent Information
- Application Number
- CN202311695496.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-06-13
AI Technical Summary
The existing floating licensing method causes users to wait for a long time and have low license utilization efficiency in the machine cluster environment, and there is a situation where users occupy the license but are not actually used.
By obtaining the number of system licenses for the earthquake data processing software and the number of current job request users, it is determined whether it is necessary to sort and generate a queue sequence, and the licenses are allocated in the queue sequence order. When a user job ends or an error occurs, the license is retried and assigned to the next user.
It reduces the waiting time for users, improves the utilization efficiency of licenses, reduces the idleness of licenses, and realizes the licensing resource scheduling and monitoring of earthquake data processing software.
Smart Images

Figure CN120145333A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of software license distribution, and particularly to a license processing method, device, system, computer device, and computer-readable storage medium for seismic data processing application software. Background Art
[0002] Seismic data processing is a process in seismic exploration where a series of processes are performed on the collected original seismic records to improve the signal-to-noise ratio, resolution, and fidelity of the seismic data, facilitating interpreters to obtain more intuitive geological information from it. Seismic data processing usually involves a series of seismic data processing application software for processing. Seismic data application software generally requires a paid license to use. For some enterprises, it is extremely costly for everyone to purchase licenses, and it also seems unrealistic. Therefore, it usually involves license sharing within the enterprise. The enterprise purchases a certain number of licenses, and users with needs can use the relevant software within the framework of the license quantity.
[0003] Flexlm is a software license management software developed by Macrovision Corporation and is also a widely used license management system in the industry. Its biggest feature is that it supports floating license management. According to whether a license server is required in license management, the license management model can be divided into a server license management model and a serverless license management model. In the server license management model, the license management server provides license management services, and the software provider provides the license file; in the serverless license management model, the application program supporting Flexlm directly reads the license file. The server license management model consists of four major parts: an application program supporting Flexlm, a license management daemon process, a software provider daemon process, and a license file. There are also other optional components (such as a debug log file, a management selection file, etc.). The license management daemon process and the software provider process together constitute the license server. The Flexlm license manager lmgrd processes the initial connection with the application program, forwards the connection to the corresponding software provider process, and is responsible for starting or restarting the software provider process. The software provider process is responsible for managing the number of Checkout licenses and recording the application programs using these licenses. The license information is saved in the license file, which contains the relevant information of the license server and the software provider process. The application program is linked with the program module of the Flexlm client library, and the client library provides the communication function with the license server. Commercial software for seismic data processing such as omega and paradigm all use the Flexlm license server for license authorization.
[0004] CN116055567A discloses a floating license scheduling system and method for seismic data processing. The system includes: a client for submitting, monitoring, modifying, and deleting jobs; a job server for providing batch processing services, communicating with the client; a node executor which is a daemon process running on each computing node, each node executor communicating with the job server and the job scheduler respectively; a job scheduler for scheduling system resources according to the usage of node resources and the queuing situation of jobs, and the job server and the job scheduler communicating with the license server respectively. By dynamically monitoring and collecting the status of each node in the system and the usage of various resources, the present invention reasonably schedules the operation of user jobs, thereby reducing the length of the waiting queue and achieving the purpose of improving the resource utilization rate and throughput of the cluster system.
[0005] However, in the current enterprise floating license mode, in a cluster environment, users use seismic data processing software with software licenses. Multiple user jobs in the same time period may apply to use the same software, thus forming a situation where multiple users of the same software are queuing up in the cluster system waiting for permission to run. And running one software instance must obtain at least one license. If the software license is missing, it may cause user jobs to wait in the backup queue for a long time, thereby increasing the average waiting time and turnaround time of the jobs. In other words, the existing floating license mode has the problem of long user waiting time due to limited license quantity, and there is also a situation of low utilization efficiency when users are allocated licenses, that is, occupying the license but not actually using it. Summary of the Invention
[0006] Based on this, it is necessary to provide a license processing method, device, system, computer device, and computer-readable storage medium for seismic data processing application software that can reduce the user waiting time and improve the actual utilization efficiency of the license.
[0007] In a first aspect, the present application provides a license processing method for seismic data processing application software, including the following steps:
[0008] Obtain the number of system licenses corresponding to the seismic data processing software and the number of current job-requesting users;
[0009] Judge whether the number of system licenses is less than the number of current job-requesting users. If so, sort the user job requests to generate a queuing sequence, and allocate licenses to users in turn according to the queuing sequence order of the number of system licenses;
[0010] Obtain the running result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the running result is running end or running error, revoke the license permission of this user and allocate it to the next user in the queuing sequence.
[0011] In one embodiment, in the queuing sequence, the queuing sequence is generated according to the order of user job requests.
[0012] In one embodiment, in the queuing sequence, the queuing sequence is generated according to the job priorities and the order of user job requests.
[0013] In one embodiment, the step of allocating licenses of the system license quantity to users in sequence according to the queuing sequence includes:
[0014] Allocating licenses of the system license quantity to users in sequence according to the queuing sequence for a preset time; after the preset time, revoking the license usage rights of the corresponding user and allocating them to the next user according to the queuing sequence.
[0015] In one embodiment, the preset time for allocating licenses to users is set respectively according to the priorities and job categories of user job requests.
[0016] In one embodiment, the license processing method further includes the following steps:
[0017] Obtaining the job request time of the user;
[0018] The preset time is set according to the job request time.
[0019] In one embodiment, the time when the license is allocated to the user, the user information, and the time when the permission is revoked are recorded one by one.
[0020] In a second aspect, the present application provides a license processing device for an earthquake data processing application software, and the device includes:
[0021] An obtaining device, configured to obtain the system license quantity corresponding to the earthquake data processing software and the number of current job request users;
[0022] A judgment and license allocation module, configured to judge whether the system license quantity is less than the number of current job request users. If so, sort the user job requests to generate a queuing sequence, and allocate licenses of the system license quantity to users in sequence according to the queuing sequence;
[0023] A license monitoring and reallocation module, configured to obtain the operation result of the earthquake data processing application software corresponding to the user to whom the license is allocated; when the operation result is that the operation ends or an operation error occurs, revoke the license permission of this user and allocate it to the next user in the queuing sequence.
[0024] In a third aspect, the present application provides a license allocation system for seismic data processing application software, including: a client, a job server, a node executor, and a job scheduler. A computer program is stored on the job scheduler, and when the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0025] In a fourth aspect, the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method described in any of the above embodiments are implemented.
[0026] In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0027] For the above license processing method of seismic data processing application software, by obtaining the operation result of the seismic data processing application software corresponding to the user who is allocated the license; when the operation result is the end of operation or operation error, the license permission of this user is taken back and allocated to the next user in the queuing sequence. In this way, after the user occupies the licensed job ends, the license can be recycled for redistribution, which can avoid the situation that the user occupies the license but does not actually use it, reduce the idleness of the license, improve the utilization efficiency of the license, and reduce the waiting time of subsequent users. Reduce the length of the job waiting queue, and realize the license resource scheduling and monitoring of seismic data processing software. Description of the Drawings
[0028] Figure 1 It is a flowchart of the steps of the license processing method of seismic data processing application software in an embodiment;
[0029] Figure 2 It is a schematic diagram of the module structure of the license processing device of seismic data processing application software in an embodiment;
[0030] Figure 3 It is a schematic diagram of the module structure of the license allocation system of seismic data processing application software in an embodiment;
[0031] Figure 4 It is a schematic diagram of the structure of a computer device in an embodiment. Detailed Embodiments
[0032] For the convenience of understanding the present application, in order to make the above-mentioned objects, features and advantages of the present application more obvious and understandable, the following will describe the specific embodiments of the present application in detail with reference to the accompanying drawings. Many specific details are set forth in the following description to fully understand the present application, and the preferred embodiments of the present application are given in the accompanying drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive. The present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present application. Therefore, the present application is not limited by the specific embodiments disclosed below. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined. In the description of the present application, "several" means at least one, such as one, two, etc., unless otherwise specifically defined. When an element is considered to be "connected" to another element, it may be directly connected to the other element or there may be intervening elements present. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0033] Embodiment 1
[0034] In a first aspect, the present application provides a license processing method for seismic data processing application software. Please refer to Figure 1 , the license processing method for seismic data processing application software includes the following steps:
[0035] S110: Obtain the number of system licenses corresponding to the seismic data processing software and the number of current job request users;
[0036] In this embodiment, the number of system licenses corresponding to the seismic data processing software is obtained respectively, and the number of current job request users who need to use the seismic data processing software for their jobs is obtained. License allocation is performed based on the number of licenses and the number of current job request users. In specific applications, the number of system licenses corresponding to the seismic data processing software and the number of current job request users can also be obtained separately for different categories of seismic data processing software.
[0037] S120: Determine whether the number of system licenses is less than the number of users of the current job request. If so, sort the user job requests to generate a queuing sequence, and allocate licenses to users in sequence according to the queuing sequence order for the number of system licenses.
[0038] In this embodiment, by determining whether the number of system licenses is less than the number of users of the current job request, if the current number of system licenses is greater than or equal to the number of users of the current job request, a license is allocated to each user. If the current number of system licenses is less than the number of users of the current job request, the user job requests are generated into a queuing sequence, and licenses for the number of system licenses are allocated to users in sequence according to the queuing sequence order, realizing the allocation of licenses.
[0039] In one of the embodiments, in the queuing sequence, the queuing sequence is generated according to the order of user job requests. In this way, the first-come-first-served scheduling algorithm can be combined. When this scheduling algorithm is used in job scheduling, each scheduling selects one or more jobs that enter the queue first from the backup job queue, and allocates computing nodes and licenses to the jobs. That is, the first to come is allocated first.
[0040] In one of the embodiments, in the queuing sequence, the queuing sequence is generated according to the job priority and the order of user job requests. In this way, the queuing sequence can be generated by combining the job priority and the order at the same time, which is convenient for license allocation. Specifically, multiple job ready queues are set, and different priorities are assigned to each job ready queue. Among them, the first queue has the highest priority, the second queue has the second highest priority, and the priorities of the remaining queues decrease one by one, and so on. The last queue has the lowest priority. Of course, in practical applications, when obtaining user job requests, the priority can also be set according to the type and level of the user, and at the same time, the priority can also be set according to the user's job type and job time to ensure that important jobs can call licenses in time for processing.
[0041] In one embodiment, the allocation of licenses and the recovery of license permissions can be implemented based on Flexlm software.
[0042] S130: Obtain the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is operation end or operation error, recover the license permission of this user and allocate it to the next user in the queuing sequence.
[0043] In this embodiment, by monitoring the running result of the seismic data processing application software corresponding to the user to whom the license is allocated, the vacancy of the seismic data processing application software after license allocation is reduced. When the running result is end of operation or operation error, the license permission of this user is taken back and allocated to the next user in the queue sequence. In specific applications, the running result of the seismic data processing application software can be monitored by monitoring the application process of the seismic data processing application software or through a software interface. When the running result is end of operation or operation error, the license permission of this user is taken back and allocated to the next user in the queue sequence. When the user needs to reapply the seismic data application software, a new job request can be issued, and then enter the queue sequence according to the new job request, and be allocated according to the situation of the queue sequence.
[0044] In one embodiment, the Flexlm software implements the following license recycling mechanism when recycling licenses:
[0045] 1. Automatic license release: Set the license release policy to ensure that the license is automatically released after the job or task is completed. This is achieved by configuring the parameter for releasing the license when the task is completed in the job scheduler. In this way, the license will be returned to the license pool in a timely manner for other tasks to use.
[0046] 2. Intelligent license allocation: Implement a dynamic license adjustment mechanism in the job scheduler to adjust the license allocation in real time according to the requirements of the tasks and the system load. According to factors such as the dependencies between tasks and the execution time of tasks, adjust the priority of license allocation to ensure that the license allocation can meet these dependencies to avoid task blocking or waiting for licenses.
[0047] 3. License timeout setting: Set the timeout time of the license in the license management tool. At the same time, divide the job queue into multiple generations according to the running duration of the job, including the young generation and the old generation.
[0048] License recycling for the young generation: The young generation is the job with a newly allocated license. Adopt a passive method to take back the license when the communication of the job is interrupted within a short time.
[0049] Garbage collection for the old generation: The old generation is the job that has survived for a long time. Here, a more time-consuming but more efficient recycling algorithm is adopted to actively explore the usage of the job system resources to judge whether the job is running normally. When there are unused system resources, the license permission is taken back in a timely manner.
[0050] The license processing method of the above seismic data processing application software obtains the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is the end of operation or an operation error, the license permission of this user is taken back and allocated to the next user in the queuing sequence. In this way, after the user's licensed job ends, the license can be recycled and redistributed, which can avoid the situation where the user occupies the license but does not actually use it, reduce the idle of the license, improve the utilization efficiency of the license, and reduce the waiting time of subsequent users. Reduce the length of the job waiting queue and realize the license resource scheduling and monitoring of the seismic data processing software.
[0051] In one of the embodiments, the step of allocating licenses of the system license quantity to users in sequence according to the queuing sequence includes:
[0052] Allocate licenses of the system license quantity to users in sequence according to the queuing sequence for a preset time; after the preset time, take back the license usage permission of the corresponding user and allocate it to the next user according to the queuing sequence. In this way, by setting a preset time for the user, it is restricted that the user has to complete the corresponding job within the preset time, thereby improving the usage efficiency of the license by the user. After the preset time, by taking back the license usage permission, the subsequent queuing time of the user is reduced.
[0053] In one embodiment, the license preset time assigned to the user is set according to the priority of the user job request and the job category respectively. In other words, different preset times can be set for users with different priorities. The time for each job process in each queue to obtain a license is also different. For example, in the queue with a higher priority, the time for each job process to obtain a license is smaller. Preferably, the time for the latter queue to obtain a license is twice as long as that of the previous queue. For example, the time slice of the second queue is twice as long as that of the first queue,..., and the time slice of the (i + 1)-th queue is twice as long as that of the i-th queue. That is to say, the queuing sequence is set according to the priority level, multiple job ready queues are set, and different priorities are assigned to each job ready queue. Among them, the first queue has the highest priority, the second queue has the second highest priority, and the priorities of the remaining queues decrease one by one, and so on. The last queue has the lowest priority. The time for each job process in each queue to obtain a license is also different. In the queue with a higher priority, the time for each job process to obtain a license is smaller. Preferably, the time for the latter queue to obtain a license is twice as long as that of the previous queue. For example, the time slice of the second queue is twice as long as that of the first queue,..., and the time slice of the (i + 1)-th queue is twice as long as that of the i-th queue. When a new job process enters the queue, it is first placed at the end of the first queue and waits for scheduling in the first-come, first-served principle. When it is the turn of the job process to execute, if it can be completed within the time slice, it can be ready to withdraw from the system; if it is not completed at the end of a time slice, the job process is transferred to the end of the second queue and waits for scheduling and execution in the same first-come, first-served principle; if it is still not completed after running for a time slice in the second queue, it is placed in the third queue in turn,..., and so on. When a long job process drops from the first queue to the n-th queue in turn, it runs in a time slice rotation manner in the n-th queue. Only when the first queue is idle, the job process in the second queue is scheduled; only when the first to (i - 1)-th queues are all empty, the job process in the i-th queue will be scheduled. If a new job process enters a queue with a higher priority than the i-th queue (i.e., any one of the first to (i - 1) queues) when the computing node is serving a job process in the i-th queue, the running job process is placed back at the end of the i-th queue, and the license is assigned to the newly arrived high-priority job process.
[0054] In one embodiment, the license processing method further includes the following steps:
[0055] Obtain the job request time of the user;
[0056] The preset time is set according to the job request time.
[0057] In this embodiment, the preset time can be set in combination with the user's job request time to ensure that the license allocation time can meet the user's job requirements. Of course, within the allocated preset time, if the operation result of the seismic data processing application software corresponding to the user who obtains the allocated license; when the operation result is operation end or operation error, the license permission of this user is taken back and allocated to the next user in the queuing sequence.
[0058] In specific applications, the corresponding reference time can be preset according to the jobs of seismic data processing according to the data volume and job type. If the job request time of the user's requested job is within the reference time, the preset time is set according to the user's job request time, otherwise the preset time is set according to the reference time, so as to ensure the utilization efficiency of the software license and reduce the waiting time of other users.
[0059] In one of the embodiments, the time when the license is allocated to the user, the user information, and the time when the permission is taken back are recorded one by one. In other words, in the processing steps of the license processing method of the seismic data processing application software of the present application, the relevant information can be written into the relevant log file for future reference and subsequent investigation, and the next job in the processing queue is processed in turn. To achieve comprehensive monitoring of all seismic data processing software, accurately master the usage of license resources and the application peak and valley rules. Based on the monitoring data, the probability and statistics principle can be used to quickly predict the demand quantity of each module, making the scientific research software configuration plan more reasonable.
[0060] In one of the embodiments, in the step of obtaining the operation result of the seismic data processing application software corresponding to the user who obtains the allocated license; when the operation result is operation end or operation error, taking back the license permission of this user and allocating it to the next user in the queuing sequence, the following steps are further included:
[0061] Monitor and obtain the communication connection record of the seismic data processing application software corresponding to the user who obtains the allocated license, and when the communication is interrupted, take back the license permission of this user and allocate it to the next user in the queuing sequence.
[0062] For example, monitor whether the user uses the seismic data processing application software or runs the seismic data processing application software within the second preset time from the time of license allocation. If within the second preset time, the seismic data processing application software is not running, or the seismic data processing application software is not performing operations, then the license permission of this user is recovered and allocated to the next user in the queuing sequence. In this way, the situation where the user does not use the license in time after the user is allocated can be further avoided. For example, the second preset time is less than the preset time for the aforementioned license allocation. Of course, the preset time for the aforementioned license allocation can also be understood as the first preset time.
[0063] The license processing method for the above seismic data processing application software obtains the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is the end of operation or an operation error, the license permission of this user is recovered and allocated to the next user in the queuing sequence. In this way, after the user's license occupation operation ends, the license can be recovered and redistributed, which can avoid the situation where the user occupies the license but does not actually use it, reduce the idle of the license, improve the utilization efficiency of the license, and reduce the waiting time of subsequent users. Reduce the length of the job waiting queue and realize the license resource scheduling and monitoring of the seismic data processing software.
[0064] Embodiment 2
[0065] In a second aspect, the present application provides a license processing device for a seismic data processing application software. Please refer to Figure 2 , the device includes:
[0066] An acquisition device for acquiring the number of system licenses corresponding to the seismic data processing software and the number of current job request users;
[0067] A judgment and license allocation module for judging whether the number of system licenses is less than the number of current job request users. If so, sort the user job requests to generate a queuing sequence, and allocate the licenses with the number of system licenses to the users in sequence according to the queuing sequence;
[0068] A license monitoring and redistribution module for obtaining the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is the end of operation or an operation error, recover the license permission of this user and allocate it to the next user in the queuing sequence.
[0069] In one embodiment, the judgment and license allocation module is further configured to separately obtain the number of system licenses corresponding to the seismic data processing software and the number of current job request users for different categories of seismic data processing software.
[0070] In one embodiment, in the queuing sequence generated by the judgment and license allocation module, the queuing sequence is generated according to the order of the user job requests. In this way, the first-come-first-served scheduling algorithm can be combined. When this scheduling algorithm is used in job scheduling, each scheduling selects one or more of the jobs that first enter the queue from the backup job queue, and allocates computing nodes and licenses for the jobs. That is to say, first come, first served for allocation.
[0071] In one embodiment, in the queuing sequence generated by the judgment and license allocation module, the queuing sequence is generated according to the job priorities and the order of the user job requests. In this way, the queuing sequence can be generated by combining the job priorities and the order, which is convenient for license allocation. Specifically, multiple job ready queues are set, and different priorities are assigned to each job ready queue. Among them, the first queue has the highest priority, the second queue has the second highest priority, and the priorities of the remaining queues decrease one by one, and so on. The last queue has the lowest priority. Of course, in practical applications, when obtaining the user job request, the priority can also be set according to the user type and level. At the same time, the priority can also be set according to the user job type and job time to ensure that important jobs can call licenses in time for processing.
[0072] In one embodiment, both the judgment and license allocation module and the license monitoring and reallocation module can implement license allocation and license permission recovery based on the Flexlm software.
[0073] In one embodiment, the judgment and license allocation module is further configured to allocate licenses to users in sequence according to the queuing sequence for a preset time for the number of system licenses;
[0074] The license monitoring and reallocation module is further configured to, after the preset time, reclaim the license usage permission of the corresponding user and allocate it to the next user according to the queuing sequence. In this way, by setting a preset time for the user, the user is restricted to complete the corresponding job within the preset time, thereby improving the user's license usage efficiency. After the preset time, by reclaiming the license usage permission, the subsequent queuing time of the user is reduced.
[0075] In one embodiment, the preset time for allocating licenses to users is set respectively according to the priority and job category of the user job request.
[0076] In one embodiment, the obtaining module is further configured to obtain the job request time of the user;
[0077] The judgment and permission allocation module is further configured to set a preset time according to the job request time. In this embodiment, the preset time can be set in combination with the user's job request time to ensure that the license allocation time can meet the user's job requirements. Of course, within the allocated preset time, if the operation result of the seismic data processing application software corresponding to the user who obtains the allocated license is obtained; when the operation result is operation end or operation error, the license permission of this user is taken back and allocated to the next user in the queuing sequence. In specific applications, the corresponding reference time can be preset according to the jobs of seismic data processing according to the data volume and job type. If the job request time of the user's requested job is within the reference time, the preset time is set according to the user's job request time, otherwise the preset time is set according to the reference time, so as to ensure the utilization efficiency of the software license and reduce the waiting time of other users.
[0078] In one of the embodiments, the device further includes a recording module, which is configured to record one by one the time when the license is allocated to the user, the user information, and the time when the permission is taken back. In other words, in the processing steps of the license processing method of the seismic data processing application software of the present application, the relevant information can be written into the relevant log files for future reference and subsequent investigation, and the subsequent job in the processing queue is processed in turn. To achieve comprehensive monitoring of all seismic data processing software, accurately master the usage of license resources and the application peak and valley rules. Based on the monitoring data, the probability and statistics principle can be used to quickly predict the required quantity of each module, making the scientific research software configuration plan more reasonable.
[0079] In one of the implementations, the license monitoring and reallocation module is further configured to monitor and obtain the communication connection record of the seismic data processing application software corresponding to the user to whom the license is allocated, and when the communication is interrupted, the license permission of this user is taken back and allocated to the next user in the queuing sequence. For example, the license monitoring and reallocation module is further configured to monitor whether the user uses the seismic data processing application software or runs the seismic data processing application software within a second preset time from when the license is allocated. If within the second preset time, the seismic data processing application software is not running, or the seismic data processing application software is not performing a job, the license permission of this user is recovered and allocated to the next user in the queuing sequence. In this way, the situation where the user does not use the license in time after the user is allocated can be further avoided. For example, the second preset time is less than the preset time for allocating the license mentioned above. Of course, the preset time for allocating the license mentioned above can also be understood as the first preset time.
[0080] The license processing device of the above seismic data processing application software obtains the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is the end of operation or an operation error, the license permission of this user is taken back and allocated to the next user in the queuing sequence. In this way, after the user's license occupation operation ends, the license can be recycled and redistributed, which can avoid the situation where the user occupies the license but does not actually use it, reduce the idleness of the license, improve the utilization efficiency of the license, and reduce the waiting time of subsequent users. Reduce the length of the job waiting queue and realize the scheduling and monitoring of the license resources of the seismic data processing software.
[0081] Embodiment 3
[0082] In a third aspect, the present application provides a license allocation and deployment system for a seismic data processing application software. Please refer to Figure 3 , the license allocation and deployment system includes: a client, a job server, a node executor, and a job scheduler. A computer program is stored on the job scheduler, and when the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0083] In this embodiment, the client is used to submit, monitor, modify, and delete jobs. The job server is responsible for providing basic batch processing services. The client and other daemon processes communicate with the job server through the network. A computer program is stored on the job scheduler, and when the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0084] The node executor is a daemon process running on each computing node. Each node executor communicates with the job server and the job scheduler respectively. The node executor is responsible for loading job operations and feeding back the usage of node resources to the job scheduler, and returning the job operation result to the job server.
[0085] The job scheduler allocates system resources according to the usage of node resources, the queuing situation of jobs, and the scheduling algorithm, and selects appropriate jobs from the backup queue for scheduling and running.
[0086] The above four major components work together to jointly implement functions such as job management, job scheduling, and load balancing.
[0087] In one embodiment, the license allocation system further includes a license server, which is an existing one provided by a software provider and includes a license management daemon, a software provider process, etc. Its main functions are license encryption verification, anti-piracy, etc. The license server has a Flexlm license manager and a seismic geography software process. The seismic geography software process refers to the main software module. The licenses required for some interactive modules can be directly obtained from the license server through the license manager. This is prior art and will not be elaborated here. The license file in the figure is the license.
[0088] Specifically, the job scheduler sequentially obtains job requests through the job server and the client and obtains the current number of users of the job requests. The job server obtains the operation results of the seismic data processing application software corresponding to the users to whom licenses are allocated through the job server, the client, and the node executor. After the client issues a corresponding job request, it aggregates the requests to the job server. The job scheduler then obtains the job requests through the job server, obtains the current number of users of the job requests, and obtains the operation results of the seismic data processing application software corresponding to the users to whom licenses are allocated.
[0089] The job scheduler obtains the number of system licenses corresponding to the seismic data processing software through the license server and allocates licenses to users or recovers license permissions together with the license server. The job scheduler is also used to determine whether the number of system licenses is less than the current number of users of the job requests. If so, it sorts the user job requests to generate a queuing sequence, allocates licenses to users in the order of the queuing sequence according to the number of system licenses, and obtains the operation results of the seismic data processing application software corresponding to the users to whom licenses are allocated; when the operation result is end of operation or operation error, it recovers the license permission of this user and allocates it to the next user in the queuing sequence.
[0090] The scheduling algorithm of the present invention can adopt two scheduling algorithms. It is only necessary to specify which scheduling algorithm to adopt according to requirements. Specifically as follows:
[0091] The first one: First-Come-First-Served (FCFS) scheduling algorithm: When this scheduling algorithm is adopted in job scheduling, each scheduling selects one or more jobs that enter the queue first from the backup job queue, allocates computing nodes and licenses to the jobs, transfers the input data to each computing node, and then puts the job into the ready queue. The job keeps running until it is completed or blocked due to an event and then gives up the license.
[0092] The second one: Multilevel Feedback Queue (MLFQ) scheduling algorithm:
[0093] (1) The job first performs preparatory work, that is, performs the following work:
[0094] ① Split the job process;
[0095] ②Allocate computing nodes;
[0096] ③Transmit the input data to each computing node;
[0097] ④Enter the job process into the job ready queue according to the system default priority.
[0098] (2) Set up multiple job ready queues and assign different priorities to each job ready queue.
[0099] Among them, the first queue has the highest priority, the second queue has the second highest priority, and the priorities of the remaining queues decrease one by one. By analogy, the last queue has the lowest priority. The time for each job process in each queue to obtain permission is also different. In the queue with a higher priority, the time specified for each job process to obtain permission is smaller. Preferably, the time for the latter queue to obtain permission is twice as long as that of the previous queue. For example, the time slice of the second queue is twice as long as that of the first queue,..., and the time slice of the (i + 1)-th queue is twice as long as that of the i-th queue.
[0100] (3) When a new job process enters the queue, first place it at the end of the first queue and queue up for scheduling according to the first-come, first-served principle. When it is the turn of this job process to execute, if it can be completed within this time slice, it can be ready to withdraw from the system; if it has not been completed at the end of a time slice, then transfer this job process to the end of the second queue and wait for scheduling and execution in the same first-come, first-served principle; if it still has not been completed after running for a time slice in the second queue, then place it in the third queue in turn,..., and so on. When a long job process drops from the first queue to the n-th queue in turn, it runs in a time slice rotation manner in the n-th queue.
[0101] (4) Only when the first queue is idle, will the job process in the second queue be scheduled; only when the 1st to (i - 1)-th queues are all empty, will the job process in the i-th queue be scheduled. If a new job process enters a queue with a higher priority than the i-th queue (that is, any one of the 1st to (i - 1)-th queues) when the computing node is serving the job process in the i-th queue, then place the running job process back to the end of the i-th queue and allocate the permission to the newly arrived high-priority job process.
[0102] The signals transmitted in the figure are specifically as follows:
[0103] The client provides the management of scheduling and the submission channel for users to submit jobs.
[0104] 1. The two arrows between the client and the job server respectively represent submitting a job and returning the job completion value, that is, the client sends a job submission to the job server, and the job server returns the job completion value to the client.
[0105] 2. The two arrows between the job server and the scheduler respectively represent requesting scheduling and scheduling cancellation (the job exits the ready queue), that is, the job server sends a request for scheduling to the job scheduler, and the job scheduler sends a scheduling cancellation to the job server.
[0106] 3. The two arrows between the license server and the scheduler respectively represent obtaining a license and returning a license. The job scheduler sends a request to obtain a license to the license server, and the license server returns a license to the job scheduler.
[0107] 4. The two arrows between the job server and the node executor respectively represent job distribution and job recycling, that is, the job server sends job distribution to the node executor, and the node executor sends job recycling to the job server.
[0108] 5. The two arrows between the job scheduler and the node executor respectively represent occupation of various licenses and recycling of various licenses, that is, the job scheduler sends occupation of various licenses to the node executor, and the node executor sends recycling of various licenses to the job scheduler.
[0109] (1) After a job is submitted from the client to the job server, the job enters the waiting queue (the job server first performs preparatory work on the job, that is, ① splitting the job process, ② allocating computing nodes, ③ transmitting input data to each computing node, and ④ entering the job process into the ready queue according to the system default priority. Request the job scheduler to schedule the jobs in the ready queue;
[0110] (2) The job scheduler performs job scheduling as follows
[0111] a. Set up multiple job ready queues and assign different priorities to each queue. The first queue has the highest priority, the second queue has the second highest priority, and the priorities of the remaining queues decrease one by one. The time for each job process in the queue to obtain a license is also different. In the queue with a higher priority, the time specified for each job process to obtain a license is smaller. For example, the time slice of the second queue is twice as long as that of the first queue,..., and the time slice of the (i + 1)-th queue is twice as long as that of the i-th queue.
[0112] b. When a new job process enters the queue, it is first placed at the end of the first queue and waits for scheduling in a first-come, first-served manner. When it is the turn of this job process to execute, if it can be completed within this time slice, it can be prepared to withdraw from the system; if it is not completed at the end of a time slice, the scheduler will transfer this job process to the end of the second queue and wait for scheduling and execution in the same first-come, first-served manner; if it is still not completed after running for a time slice in the second queue, it will be placed in the third queue in turn, and so on. When a long job process descends from the first queue to the nth queue in turn, it will run in a time-slice rotation manner in the nth queue.
[0113] c. Only when the first queue is idle will the scheduler schedule the job processes in the second queue to run; only when the first to (i - 1) queues are all empty will the scheduler schedule the job processes in the i-th queue to run. If a new job process enters a queue with a higher priority (any one of the first to (i - 1) queues) while the computing node is serving a job process in the i-th queue, then at this time the scheduler puts the running job process back to the end of the i-th queue and assigns the permission to the newly arrived high-priority job process.
[0114] (3) Write the scheduling information (this information includes the job and time occupied by the permission, which is convenient for billing) into the relevant log file, and process the next job in the ready queue in turn.
[0115] Through the above steps (1) to (3), the job scheduler periodically schedules the jobs in the waiting queue.
[0116] The job scheduler of the present invention calls the license using an existing method, which is briefly introduced as follows: Before job scheduling, according to the feature key parameters provided by the user job (including job priority, modules required by the job), through the API provided by the license server, query whether there is a license available for the software running the job currently. If not, no scheduling will be performed; the user job can only wait in the backup queue. If the job scheduler queries that there is a license available for the corresponding application software, it will verify a license from the license manager through the API and register the user job using this license; when the job runs normally to the end, return the license to the license server. The job scheduler checks whether there is a job in the backup state waiting for this license. If so, schedule this job to run; if the job server finds that the job ends abnormally, delete the job and give the software license it holds to the license management server. The specific steps are as follows:
[0117] (1) When the system starts running, call the lc_init() API to initialize the license server and create a software license job;
[0118] (2) The job scheduler queries whether the license is available by calling the lc_status() API, and the license server returns the current status of the feature key.
[0119] (3) The job scheduler calls lc_checkout() to apply for a license for a specified feature key, and the license server returns the execution result to the job scheduler.
[0120] (4) The job scheduler calls lc_checkin() to apply for a license for a specified feature key from the license pool.
[0121] (5) The job scheduler can call lc_disconn() to disconnect from the license management daemon. For user jobs that abort due to errors, after the job server deletes the job, it registers the license held by the job with the license server.
[0122] In one embodiment, the license recycling mechanism of the present application is as follows:
[0123] 1. Automatic license release: Set the license release policy to ensure that the license is automatically released after the job or task is completed. This is achieved by configuring the parameter to release the license when the task is completed in the job scheduler. In this way, the license will be returned to the license pool in a timely manner for other tasks to use.
[0124] 2. Intelligent license allocation: Implement a dynamic license adjustment mechanism in the job scheduler to adjust the license allocation in real time according to the task requirements and system load. According to factors such as the dependencies between tasks and the execution time of tasks, adjust the priority of license allocation to ensure that the license allocation can meet these dependencies and avoid task blocking or waiting for licenses.
[0125] 3. License timeout setting: Set the timeout period of the license in the license management tool. At the same time, divide the job queue into multiple generations according to the running duration of the job, including the young generation and the old generation.
[0126] License recycling for the young generation: The young generation is the job with a newly allocated license. Adopt a passive method to reclaim the license when the job's communication is interrupted within a short time.
[0127] Garbage collection for the old generation: The old generation is the job that has survived for a long time. Here, adopt a more time-consuming but efficient recycling algorithm to actively probe the usage of the job's system resources to determine whether the job is running normally. When there are unused system resources, the license permission is reclaimed in a timely manner.
[0128] Embodiment 4
[0129] The following presents an example of a license processing method and system for an earthquake data processing application software that combines the Flexlm license management software and applies this application.
[0130] The license management algorithm is as follows: LAvailable is the system license resource vector, and LAvailable(m) represents the number of the m-th type of software licenses available in the cluster system. LRequest is the job license resource requirement matrix. LRequest(i, m) represents the number of the m-th type of software licenses required by job i. CAvailable is the system available computing resource vector, and CAvailable(n) represents the number of the n-th type of computing resources currently available in the system. CRequest is the job computing resource requirement matrix, and CRequest(I, n) represents the number of the n-th type of computing resources required by job i. (1) After the user submits a job to the system, the job enters the waiting queue, and requests the job scheduler to schedule the jobs in the job queue; (2) When user job i finishes running or aborts due to an error, the resources allocated to the job are reclaimed: for each type of license resource m used by job i, execute LAvailable(m) = LAvailable(m) + LRequest(i, m); for each type of computing resource n, execute CAvailable(n) = CAvailable(n) + CRequest(i, n). Start the job scheduler to schedule the jobs in the resource waiting queue; (3) The job scheduler schedules jobs according to the following principles: 1) If for each type of software license m required by job i in the waiting queue, LAvailable(m) ≥ LRequest(i, m), then allocate the software license, and for each type of software license m, execute LAvailable(m) = LAvailable(m) - LRequest(i, m); otherwise, hang the job in the resource waiting queue; 2) If for each type of computing resource n required by job i, CAvailable(n) ≥ CRequest(i, n), then allocate the computing resources. For each type of computing resource n required by the job: CAvailable(n) = CAvailable(n) - CRequest(i, n); otherwise, hang job i in the resource waiting queue and release the licenses it has been allocated. For the license resource m allocated to job i, LAvailable(m) = LAvailable(m) + LRequest(i, m); 3) Write the scheduling information to the relevant log file and process the next job in the queue in turn. (4) The job scheduler periodically schedules the jobs in the waiting queue.
[0131] Example 5
[0132] Fourthly, the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method described in any of the foregoing embodiments are implemented.
[0133] In one embodiment, a computer device is provided. The internal structure diagram of the computer device may be as Figure 4 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with a server through a network connection. When the computer program is executed by the processor, a license processing method for a seismic data processing application software is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0134] Those skilled in the art can understand that Figure 4 the structure shown in
[0135] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0135] In one embodiment, when the processor executes the program to implement the license processing method for the seismic data processing application software, the following steps are included:
[0136] Obtain the number of system licenses corresponding to the seismic data processing software and the number of users of the current job request;
[0137] Judge whether the number of system licenses is less than the number of users of the current job request. If so, sort the user job requests to generate a queuing sequence, and allocate the licenses with the number of system licenses to the users in sequence according to the queuing sequence;
[0138] Obtain the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is operation end or operation error, revoke the license permission of this user and allocate it to the next user in the queuing sequence.
[0139] In one embodiment, when the processor executes the program to implement the steps of the license processing method of the seismic data processing application software, in the queuing sequence, the queuing sequence is generated according to the order of user job requests.
[0140] In one embodiment, in the queuing sequence, the queuing sequence is generated according to the job priority and the order of user job requests.
[0141] In one embodiment, the step of sequentially allocating licenses of the system license quantity to users according to the queuing sequence includes:
[0142] Allocating licenses of the system license quantity to users in sequence according to the queuing sequence for a preset time; after the preset time, revoking the license usage right of the corresponding user and allocating it to the next user according to the queuing sequence.
[0143] In one embodiment, the preset time for allocating licenses to users is set respectively according to the priority and job category of the user job request.
[0144] In one embodiment, when the processor executes the program to implement the license processing method of the seismic data processing application software, the following steps are further included:
[0145] Obtaining the job request time of the user;
[0146] The preset time is set according to the job request time.
[0147] Embodiment 6
[0148] Fifthly, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the above embodiments are implemented.
[0149] In one embodiment, when the processor executes the program to implement the license processing method of the seismic data processing application software, the following steps are included:
[0150] Obtaining the system license quantity corresponding to the seismic data processing software and the current number of users with job requests;
[0151] Judging whether the system license quantity is less than the current number of users with job requests. If so, sorting the user job requests to generate a queuing sequence, and sequentially allocating licenses of the system license quantity to users according to the queuing sequence;
[0152] Obtaining the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is operation end or operation error, revoking the license right of this user and allocating it to the next user in the queuing sequence.
[0153] In one embodiment, when the processor executes the program to implement the steps of the license processing method of the seismic data processing application software, in the queuing sequence, the queuing sequence is generated according to the order of user job requests.
[0154] In one embodiment, in the queuing sequence, the queuing sequence is generated according to the job priority and the order of user job requests.
[0155] In one embodiment, the step of sequentially allocating licenses of the system license quantity to users according to the queuing sequence order includes:
[0156] Allocating licenses of the system license quantity to users in sequence according to the queuing sequence for a preset time; after the preset time, taking back the license usage rights of the corresponding user and allocating them to the next user according to the queuing sequence.
[0157] In one embodiment, the preset time for allocating licenses to users is set respectively according to the priority and job category of the user job request.
[0158] In one embodiment, when the processor executes the program to implement the steps of the license processing method of the seismic data processing application software, the following steps are further included:
[0159] Obtaining the job request time of the user;
[0160] The preset time is set according to the job request time.
[0161] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0162] The above license processing method, device, system, equipment, and medium for seismic data processing application software obtain the operation result of the seismic data processing application software corresponding to the user to whom the license is allocated; when the operation result is the end of operation or an operation error, the license permission of this user is taken back and allocated to the next user in the queuing sequence. In this way, after the user's licensed job ends, the license can be recycled for redistribution, which can avoid the situation where the user occupies the license but does not actually use it, reduce the idleness of the license, improve the utilization efficiency of the license, and reduce the waiting time of subsequent users. Reduce the length of the job waiting queue and realize the scheduling and monitoring of the license resources of the seismic data processing software.
[0163] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification. It should be noted that phrases such as "in one embodiment of the present application", "for example", "again, for example", etc. are intended to illustrate the present application rather than limit it. The above-described embodiments only express several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for license processing of an earthquake data processing application software, characterized in that, it includes the following steps: Obtain the number of system licenses corresponding to the earthquake data processing software and the number of users of the current job request; Judge whether the number of system licenses is less than the number of users of the current job request. If so, sort the user job requests to generate a queuing sequence, and allocate the licenses with the number of system licenses to users in sequence according to the queuing sequence; Obtain the running result of the earthquake data processing application software corresponding to the user to whom the license is allocated; When the running result is end of running or running error, revoke the license permission of this user and allocate it to the next user in the queuing sequence.
2. The license processing method according to claim 1, characterized in that, in the queuing sequence, a queuing sequence is generated according to the order of user job requests.
3. The license processing method according to claim 2, characterized in that, in the queuing sequence, a queuing sequence is generated according to the job priority and order of user job requests.
4. The license processing method according to claim 3, characterized in that, the step of allocating the licenses with the number of system licenses to users in sequence according to the queuing sequence includes: Allocate the licenses with the number of system licenses to users in sequence according to the queuing sequence for a preset time; after the preset time, revoke the license usage permission of the corresponding user and allocate it to the next user according to the queuing sequence.
5. The license processing method according to claim 4, characterized in that, The preset time for allocating licenses to users is set respectively according to the priority and job category of user job requests.
6. The license processing method according to claim 4, characterized in that, the license processing method further includes the following steps: Obtain the job request time of the user; The preset time is set according to the job request time.
7. A license processing device for an earthquake data processing application software, characterized in that, the device includes: An obtaining device, used to obtain the number of system licenses corresponding to the earthquake data processing software and the number of users of the current job request; A judgment and license allocation module, used to judge whether the number of system licenses is less than the number of users of the current job request. If so, sort the user job requests to generate a queuing sequence, and allocate the licenses with the number of system licenses to users in sequence according to the queuing sequence; A license monitoring and reallocation module, used to obtain the running result of the earthquake data processing application software corresponding to the user to whom the license is allocated; when the running result is end of running or running error, revoke the license permission of this user and allocate it to the next user in the queuing sequence.
8. A license allocation system for an earthquake data processing application software, characterized in that, it includes: A client, a job server, a node executor, and a job scheduler. The job scheduler stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.
9. A computer device, including 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 the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.