CN113296915B - Task generation method and system based on industrial Internet platform - Google Patents

Task generation method and system based on industrial Internet platform Download PDF

Info

Publication number
CN113296915B
CN113296915B CN202110678219.7A CN202110678219A CN113296915B CN 113296915 B CN113296915 B CN 113296915B CN 202110678219 A CN202110678219 A CN 202110678219A CN 113296915 B CN113296915 B CN 113296915B
Authority
CN
China
Prior art keywords
task
processed
server
target user
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110678219.7A
Other languages
Chinese (zh)
Other versions
CN113296915A (en
Inventor
姜林
张磊
陈丹丹
方清
王超
段奇
何渝君
舒忠玲
邬明罡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanyun Technology Co Ltd
Original Assignee
Hanyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hanyun Technology Co Ltd filed Critical Hanyun Technology Co Ltd
Priority to CN202110678219.7A priority Critical patent/CN113296915B/en
Publication of CN113296915A publication Critical patent/CN113296915A/en
Application granted granted Critical
Publication of CN113296915B publication Critical patent/CN113296915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application provides a task generation method and a task generation system based on an industrial Internet platform, wherein the task generation method comprises the following steps: the task management platform acquires the identity information of each user in the industrial Internet platform and the corresponding data source address; the task management platform displays the identity information of the user on a display interface of the task management platform; the task management platform responds to the selection operation of a plurality of identity information on the display interface for each computing task, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; and the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point. According to the generation method and the generation system, unnecessary consumption of threads can be reduced, and meanwhile, calculation pressure of a server is reduced.

Description

Task generation method and system based on industrial Internet platform
Technical Field
The application relates to the technical field of internet platforms, in particular to a task generation method and system based on an industrial internet platform.
Background
After the world economic crisis and economic growth debilitation, a new round of industry revolution in the world is vigorous. The developed countries are reconfiguring the quality assets, a new industrial revolution has come, and the industrial internet will promote the transformation and upgrade of the traditional manufacturing industry, and drive the industrial revolution. The industrial Internet platform is used for calculating and processing data by collecting the data and combining task scheduling on one hand; on the other hand, the service platform product can be monitored, the states of equipment and production are clear at a glance, and the relevant energy loss can be analyzed, and corresponding measures are taken to achieve the effects of saving energy, reducing production cost and reducing environmental pollution. However, in the existing task scheduling scheme, total statistics calculation is generally performed on user data, and because the number of resident users is large, the number of terminal devices is also increased, so that the calculation pressure of a server is increased dramatically, and meanwhile, the normal operation of task scheduling service is affected, and the statistics of each user is also affected.
Disclosure of Invention
In view of this, an object of the present application is to provide a task generating method and system based on an industrial internet platform, which dynamically selects a corresponding target user for each computing task, invokes a corresponding thread to execute the computing task, and dynamically and flexibly configures the thread to reduce unnecessary consumption of the thread and simultaneously reduce computing pressure of a server.
The embodiment of the application provides a task generation method based on an industrial Internet platform, which comprises the following steps:
the task management platform acquires the identity information of each user in the industrial Internet platform and the corresponding data source address; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity;
the task management platform displays the identity information of the user on a display interface of the task management platform;
the task management platform responds to the selection operation of a plurality of identity information on the display interface for each computing task, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm;
And the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point.
Further, after the computing task carrying the task package is sent to the server with the load less than the predetermined threshold at the current time point, the task generating method further includes:
the server receives a plurality of computing tasks carrying task packages and sent by the task management platform, and adds the received computing tasks into a task queue of the server according to time sequence;
the server analyzes a task packet corresponding to each calculation task in the task queue to obtain data source addresses of a plurality of target users corresponding to the calculation task;
the server retrieves threads with the same number as the target users from a preset thread pool, and synchronously executes the calculation task based on the data source address of each target user so as to obtain the calculation result of the industrial data of each target user.
Further, the step of synchronously executing the calculation task based on the data source address of each target user to obtain the calculation result of the industrial data of each target user includes:
The server identifies target users to be processed from a plurality of target users for each thread which is called; the target users comprise target users to be processed and processed target users;
the server acquires industrial data of each target user to be processed according to a data source address corresponding to the target user to be processed;
and the server executes the calculation task based on the industrial data of the target user to be processed to obtain a calculation result of the industrial data of the target user to be processed, and marks the target user to be processed as a processed target user.
Further, after obtaining the calculation result of the industrial data of the target user to be processed, the task generating method further includes:
and the server identifies a database corresponding to the target user to be processed according to the data source address corresponding to the target user to be processed, and stores the calculation result of the industrial data of the target user in a specific position in the database corresponding to the target user to be processed.
Further, the thread pool is preset by the following method:
the server counts the number of threads in the current thread pool and the number of users in the industrial Internet platform;
When the number of threads is smaller than the number of users, the server creates a preset number of threads according to the difference value between the number of threads and the number of users, and stores the created threads into a thread pool.
The embodiment of the application also provides a task generating system based on the industrial Internet platform, which comprises: a task management platform and a server; the task management platform comprises an acquisition module, a display module, a determination module and a generation module;
the acquisition module is used for acquiring the identity information of each user in the industrial Internet platform and the corresponding data source address; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity;
the display module is used for displaying the identity information of the user on a display interface of the task management platform;
the determining module is used for responding to the selection operation of the plurality of identity information on the display interface for each computing task, and determining a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm;
The generation module is used for packaging the determined data source addresses of the plurality of target users, generating a task packet corresponding to the calculation task, and sending the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point.
Further, the server comprises a receiving module, an analyzing module and an executing module;
the receiving module is used for receiving a plurality of computing tasks carrying task packages and sent by the task management platform, and adding the received computing tasks into a task queue of the server according to time sequence;
the analysis module is used for analyzing a task packet corresponding to each calculation task in the task queue to obtain data source addresses of a plurality of target users corresponding to the calculation task;
the execution module is used for calling threads with the same number as the target users from a preset thread pool, and synchronously executing the calculation task based on the data source address of each target user so as to obtain the calculation result of the industrial data of each target user.
Further, the execution module comprises an identification unit, an acquisition unit and an execution unit;
The identifying unit is used for identifying target users to be processed from a plurality of target users aiming at each invoked thread; the target users comprise target users to be processed and processed target users;
the acquisition unit is used for acquiring industrial data of each target user to be processed according to the data source address corresponding to the target user to be processed;
the execution unit is used for executing the calculation task based on the industrial data of the target user to be processed so as to obtain a calculation result of the industrial data of the target user to be processed, and marking the target user to be processed as the processed target user.
Further, the server also comprises a storage module;
the storage module is used for identifying a database corresponding to the target user to be processed according to the data source address corresponding to the target user to be processed, and storing the calculation result of the industrial data of the target user in a specific position in the database corresponding to the target user to be processed.
Further, the execution module further comprises a statistics unit and a creation unit;
the statistics unit is used for counting the number of threads in the current thread pool and the number of users in the industrial Internet platform;
The creation unit is used for creating a preset number of threads according to the difference value between the number of threads and the number of users when the number of threads is smaller than the number of users, and storing the created threads into a thread pool.
The embodiment of the application also provides electronic equipment, which comprises: the system comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory are communicated through the bus when the electronic device runs, and the machine-readable instructions are executed by the processor to execute the steps of the task generating method based on the industrial internet platform.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the industrial internet platform based task generating method as described above.
According to the task generation method and system based on the industrial Internet platform, the identity information of each user in the industrial Internet platform and the corresponding data source address are acquired through the task management platform; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity; the task management platform displays the identity information of the user on a display interface of the task management platform; the task management platform responds to the selection operation of a plurality of identity information on the display interface for each computing task, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm; and the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point. Compared with the method for executing the computing tasks in the whole quantity in the prior art, the method for executing the computing tasks dynamically selects the corresponding target user for each computing task, invokes the corresponding thread to execute the computing task, and reduces unnecessary consumption of the thread and simultaneously reduces computing pressure of a server by dynamically and flexibly configuring the thread.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a flowchart of a task generation method based on an industrial Internet platform according to an embodiment of the present application;
FIG. 2 is a flow chart of a task generation method based on an industrial Internet platform according to another embodiment of the present application;
FIG. 3 is a schematic diagram of a task generating system based on an industrial Internet platform according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a task management platform according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of a server according to an embodiment of the present application;
Fig. 6 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, every other embodiment that a person skilled in the art would obtain without making any inventive effort is within the scope of protection of the present application.
Through researches, after the world economic crisis and economic growth and debilitation, a new round of industry transformation in the world is vigorous. The developed countries are reconfiguring the quality assets, a new industrial revolution has come, and the industrial internet will promote the transformation and upgrade of the traditional manufacturing industry, and drive the industrial revolution. The industrial Internet platform is used for calculating and processing data by collecting the data and combining task scheduling on one hand; on the other hand, the service platform product can be monitored, the states of equipment and production are clear at a glance, and the relevant energy loss can be analyzed, and corresponding measures are taken to achieve the effects of saving energy, reducing production cost and reducing environmental pollution. However, in the existing task scheduling scheme, total statistics calculation is generally performed on user data, and because the number of resident users is large, the number of terminal devices is also increased, so that the calculation pressure of a server is increased dramatically, and meanwhile, the normal operation of task scheduling service is affected, and the statistics of each user is also affected.
Based on the above, the embodiment of the application provides a task generating method based on an industrial internet platform, which reduces unnecessary consumption of threads and reduces calculation pressure of a server through dynamically and flexibly configuring the threads.
Referring to fig. 1, fig. 1 is a flowchart of a task generating method based on an industrial internet platform according to an embodiment of the present application. As shown in fig. 1, the task generating method based on the industrial internet platform provided in the embodiment of the application includes:
step S101, a task management platform acquires identity information of each user in an industrial Internet platform and a corresponding data source address.
In the step, the task management platform can acquire the identity information of each user in the industrial Internet platform and the corresponding data source address thereof by reading the database of the industrial Internet platform; the identity information of the user comprises a name and a unique identity of the enterprise of the user, on an industrial Internet platform, the enterprise becomes the user of the industrial Internet platform through an application account number so as to realize sharing of data resources, one enterprise can apply for an account, or can apply for a plurality of accounts according to a department level in the enterprise, the name of the enterprise is used for identifying the enterprise of the user, the enterprise of the user can be used for distinguishing the users among different enterprises, and the unique identity can further distinguish the different users of the same enterprise and is unique owned by each user; each user corresponds to a data source address that points to a database that the user uses to store industrial data.
Step S102, the task management platform displays the identity information of the user on a display interface of the task management platform.
In this step, the task management platform is configured to perform centralized management on a plurality of computing tasks, define different task logic for each computing task, and preset an execution sequence and an interval time of the plurality of computing tasks. Further, in the embodiment provided by the present application, a visual operation interface may be provided for the task manager, specifically, the obtained identity information of each user may be displayed on the display interface of the task management platform, for example, the identity information of each user may be displayed on the display interface of the task management platform according to the following manner, and the obtained english initials of the names of the enterprises of each user may be sorted, and at the same time, the unique identity identifier corresponding to each user may be displayed after the names of the enterprises of each user.
Step S103, for each computing task, the task management platform responds to a selection operation of a plurality of identity information on the display interface, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task.
In the step, for each calculation task, a task manager can select different target users according to own calculation demands through a visual interface of a task management platform, wherein the calculation task is to calculate specific industrial data according to a preset algorithm. Specifically, for each computing task, the task management platform responds to a selection operation of a plurality of identity information on the display interface, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task.
As an example, in combination with basic operations for a task management platform, a task manager may select a target user for the computing task, first, the task manager logs in to the task management platform, the task management platform displays a preset computing task template, the task manager selects a computing task from the preset task template, the task management platform obtains task logic preset by the computing task, determines a user according to the task logic of the computing task, displays identity information of the user according to the computing task on a display interface of the task management platform, the task manager performs a selection operation on the identity information of the user on the display interface of the identity information of the user, and the task management platform determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task in response to the selection operation on the plurality of identity information.
Step S104, the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with a load smaller than a preset threshold value at the current time point.
In the step, a task management platform identifies data source addresses corresponding to all target users according to the determined multiple target users, packages the data source addresses of all target users to obtain task packages of the computing task, and sends the computing task and the task packages corresponding to the computing task to a server with load of a current time point smaller than a preset threshold value. Because each target user corresponds to one data source address, the data source addresses of the plurality of target users are encapsulated, which is equivalent to the encapsulation of the plurality of target users of the selected computing task.
In addition, in the embodiment provided by the application, cluster deployment is performed by using a plurality of servers, each server provides the same service, the task management platform sends the calculation task carrying the task package to the server with the load smaller than the preset threshold value at the current time point according to the load balancing principle, wherein the preset threshold value can be determined according to the load of each server at the current time point, as an example, the task management platform obtains the number of the calculation tasks of each server at the current time point, determines the load of each server, sorts the loads of each server according to the size, determines the preset threshold value of the load, and sends the calculation task carrying the task package to the server with the load smaller than the preset threshold value at the current time point.
Referring to fig. 2, fig. 2 is a flowchart of a task generating method based on an industrial internet platform according to another embodiment of the present application. As shown in fig. 2, another embodiment of the present application provides a task generating method based on an industrial internet platform, further including:
step 201, the server receives a plurality of computing tasks carrying task packages sent by the task management platform, and adds the received computing tasks to a task queue of the server according to a time sequence.
In the step, the server receives a plurality of computing tasks carrying task packages and sent by the task management platform, adds the computing tasks into a task queue of the server according to the time sequence of receiving the computing tasks, and further, the server sequentially executes the computing tasks according to the sequence of computing tasks in the task queue.
Step S202, the server analyzes a task packet corresponding to each calculation task in the task queue to obtain data source addresses of a plurality of target users corresponding to the calculation task.
In the step, a server selects a calculation task with a task packet in front in time sequence from a task queue, firstly analyzes the task packet of the calculation task to obtain data source addresses of a plurality of target users of the calculation task, and can identify a database of the target users through the data source addresses of the target users, wherein the database also comprises a plurality of data tables which are established according to the association relation among all industrial data, namely, the same type of data is stored in one data table, so that the same type of industrial data can be conveniently obtained.
Step 203, the server retrieves threads having the same number as the target users from a preset thread pool, and synchronously executes the calculation task based on the data source address of each target user, so as to obtain the calculation result of the industrial data of each target user.
In the step, for each calculation task, the server firstly calculates according to the data source address obtained by analysis to obtain the number of target users, and then invokes threads with the same number as the target users from a preset thread pool, namely one thread corresponds to one target user, synchronously opens a plurality of threads, connects to a corresponding database according to the data source address corresponding to the target user, and synchronously executes the calculation tasks so as to realize isolation of the calculation tasks among the target users.
In specific implementation, the thread pool may be preset by the following method:
step 2031, the server counts the number of threads in the current thread pool and the number of users in the industrial internet platform.
In this step, a plurality of threads are pre-stored in the thread pool, and in the embodiment provided in this application, for a computing task, a plurality of threads are synchronously started, so before executing the computing task, the server needs to preset the thread pool in advance, so as to ensure that the number of threads in the thread pool can support the server to execute the computing task. Specifically, the server may preset a thread pool according to a predetermined time interval, and count the number of threads in the current thread pool and the number of users in the industrial internet platform.
Step 2032, when the number of threads is smaller than the number of users, the server creates a predetermined number of threads according to the difference between the number of threads and the number of users, and stores the created threads in a thread pool.
In the step, the maximum value of the number of target users of the calculation task is the number of users in the industrial Internet platform, so that whether a new thread is needed or not can be judged by comparing the number of users with the number of threads, when the number of threads is smaller than the number of users, the new thread is judged, further, the difference value between the number of users and the number of threads is determined as the number of created threads, the threads with the preset number are created, and the created threads are stored in a thread pool. In addition, for each thread, the survival time of the idle thread can be preset by estimating the execution time of each computing task, and when the idle time of the thread is greater than the survival time of the idle thread, the idle thread is recovered.
Further, in the implementation, the computing task may be synchronously executed based on the data source address of each target user, so as to obtain the computing result of the industrial data of each target user:
Step 2033, identifying a target user to be processed from a plurality of target users by the server for each thread of the call; the target users comprise target users to be processed and target users processed.
In this step, the server establishes a connection with each target user through a thread to perform a computing task. The target users comprise processed target users and target users to be processed, the server identifies target users to be processed from a plurality of target users, namely target users which are not executed with calculation tasks, specifically, after the server analyzes a task package to obtain data source addresses corresponding to the plurality of target users, all target users are target users to be processed at the moment, the target users to be processed can be placed into a target user queue to be processed, and the server can select one target user to be processed from the target user queue to be processed to execute the calculation tasks.
Step 2034, for each target user to be processed, the server obtains the industrial data of the target user to be processed according to the data source address corresponding to the target user to be processed.
In the step, for each target user to be processed, a database corresponding to the target user to be processed and a plurality of data tables contained in the database are identified according to the data source address corresponding to the target user to be processed, the data table corresponding to the calculation task is determined, and the industrial data of the target user to be processed is obtained through the determined data table.
Step 2035, the server executes the calculation task based on the industrial data of the target user to be processed, so as to obtain a calculation result of the industrial data of the target user to be processed, and marks the target user to be processed as a processed target user.
In the step, the server executes a calculation task according to the acquired industrial data of the target user to be processed to obtain a calculation result of the industrial data of the target user to be processed, marks the target user to be processed as a processed target user after the calculation task is executed, removes the target user to be processed from the target user queue to be processed, and places the target user queue to be processed so as to prevent the calculation task from being repeatedly executed aiming at the same target user.
Furthermore, the task generating method additionally includes a step (not shown in fig. 1) of storing a calculation result of the industrial data of the target user, specifically, after obtaining the calculation result of the industrial data of the target user to be processed, the task generating method further includes:
and the server identifies a database corresponding to the target user to be processed according to the data source address corresponding to the target user to be processed, and stores the calculation result of the industrial data of the target user in a specific position in the database corresponding to the target user to be processed.
In the step, after obtaining the calculation result of the industrial data of the target user to be processed, the server identifies the database corresponding to the target user to be processed according to the data source address of the target user to be processed, determines the data table corresponding to the calculation task, and stores the calculation result of the industrial data of the target user in the data table corresponding to the target user to be processed, so as to reduce the single-standard data volume and improve the service inquiry performance. In addition, after the server stores the calculation result of the industrial data of the target user, the thread corresponding to the target user to be processed is released back to the thread pool to wait for executing the next calculation task.
According to the task generating method based on the industrial Internet platform, the identity information of each user in the industrial Internet platform and the corresponding data source address are acquired through the task management platform; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity; the task management platform displays the identity information of the user on a display interface of the task management platform; the task management platform responds to the selection operation of a plurality of identity information on the display interface for each computing task, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm; and the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point. Compared with the method for executing the computing tasks in the whole quantity in the prior art, the method for executing the computing tasks dynamically selects the corresponding target user for each computing task, invokes the corresponding thread to execute the computing task, and reduces unnecessary consumption of the thread and simultaneously reduces computing pressure of a server by dynamically and flexibly configuring the thread.
Based on the same inventive concept, the embodiment of the application also provides an industrial internet platform-based task generating system corresponding to the industrial internet platform-based task generating method, and because the principle of solving the problem by the device in the embodiment of the application is similar to that of the method in the embodiment of the application, the implementation of the system can refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, fig. 4, and fig. 5, fig. 3 is a schematic structural diagram of a task generating system based on an industrial internet platform according to an embodiment of the present application. As shown in fig. 3, the task generating system 300 includes: a task management platform 301 and a server 302; fig. 4 is a schematic structural diagram of a task management platform provided in an embodiment of the present application, as shown in fig. 4, where, the task management platform 301 includes an obtaining module 3011, a display module 3012, a determining module 3013, and a generating module 3014;
the acquiring module 3011 is configured to acquire identity information of each user in the industrial internet platform and a corresponding data source address thereof; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity;
the display module 3012 is configured to display the identity information of the user on a display interface of a task management platform;
The determining module 3013 is configured to determine, for each computing task, a plurality of users corresponding to the selected plurality of identity information as target users of the computing task in response to a selection operation on the plurality of identity information on the display interface; the calculation task is to calculate specific industrial data according to a preset algorithm;
the generating module 3014 is configured to encapsulate the determined data source addresses of the multiple target users, generate a task packet corresponding to the computing task, and send the computing task carrying the task packet to a server whose load at the current time point is less than a predetermined threshold.
Fig. 5 is a schematic structural diagram of a server provided in the embodiment of the present application, as shown in fig. 5, the server 302 includes a receiving module 3021, an parsing module 3022, and an executing module 3023;
the receiving module 3021 is configured to receive a plurality of computing tasks with task packages sent by the task management platform, and add the received plurality of computing tasks to a task queue of the server according to a time sequence;
the parsing module 3022 is configured to parse, for each computing task in the task queue, a task packet corresponding to the computing task, to obtain data source addresses of multiple target users corresponding to the computing task;
The execution module 3023 is configured to invoke threads having the same number as that of the target users from a thread pool set in advance, and synchronously execute the calculation task based on the data source address of each target user, so as to obtain the calculation result of the industrial data of each target user.
Further, the execution module 3023 includes an identification unit, an acquisition unit, and an execution unit;
the identifying unit is used for identifying target users to be processed from a plurality of target users aiming at each invoked thread; the target users comprise target users to be processed and processed target users;
the acquisition unit is used for acquiring industrial data of each target user to be processed according to the data source address corresponding to the target user to be processed;
the execution unit is used for executing the calculation task based on the industrial data of the target user to be processed so as to obtain a calculation result of the industrial data of the target user to be processed, and marking the target user to be processed as the processed target user.
Further, the server 302 further includes a storage module 3024;
the storage module 3024 is configured to identify a database corresponding to the target user to be processed according to the data source address corresponding to the target user to be processed, and store the calculation result of the industrial data of the target user in a specific location in the database corresponding to the target user to be processed.
Further, the execution module 3023 further includes a statistics unit and a creation unit;
the statistics unit is used for counting the number of threads in the current thread pool and the number of users in the industrial Internet platform;
the creation unit is used for creating a preset number of threads according to the difference value between the number of threads and the number of users when the number of threads is smaller than the number of users, and storing the created threads into a thread pool.
According to the task generating system based on the industrial Internet platform, which is provided by the embodiment of the application, the identity information of each user in the industrial Internet platform and the corresponding data source address are acquired through the task management platform; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity; the task management platform displays the identity information of the user on a display interface of the task management platform; the task management platform responds to the selection operation of a plurality of identity information on the display interface for each computing task, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm; and the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point. Compared with the method for executing the computing tasks in the whole quantity in the prior art, the method for executing the computing tasks dynamically selects the corresponding target user for each computing task, invokes the corresponding thread to execute the computing task, and reduces unnecessary consumption of the thread and simultaneously reduces computing pressure of a server by dynamically and flexibly configuring the thread.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic device 600 includes a processor 601, a memory 602, and a bus 603.
The memory 602 stores machine-readable instructions executable by the processor 601, when the electronic device 600 is running, the processor 601 communicates with the memory 602 through the bus 603, and when the machine-readable instructions are executed by the processor 601, the steps of the task generating method based on the industrial internet platform in the method embodiments shown in fig. 1 and fig. 2 can be executed, and detailed implementation manner can refer to method embodiments and will not be repeated herein.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the task generating method based on the industrial internet platform in the method embodiments shown in fig. 1 and fig. 2 may be executed, and a specific implementation manner may refer to the method embodiment and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. The task generation method based on the industrial Internet platform is characterized by comprising the following steps of:
the task management platform acquires the identity information of each user in the industrial Internet platform and the corresponding data source address; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity;
the task management platform displays the identity information of the user on a display interface of the task management platform;
the task management platform responds to the selection operation of a plurality of identity information on the display interface for each computing task, and determines a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm;
the task management platform encapsulates the determined data source addresses of the plurality of target users, generates a task packet corresponding to the calculation task, and sends the calculation task carrying the task packet to a server with a load smaller than a preset threshold value at the current time point;
after the computing task carrying the task package is sent to the server with the load smaller than the preset threshold value at the current time point, the task generating method further comprises the following steps:
The server receives a plurality of computing tasks carrying task packages and sent by the task management platform, and adds the received computing tasks into a task queue of the server according to time sequence;
the server analyzes a task packet corresponding to each calculation task in the task queue to obtain data source addresses of a plurality of target users corresponding to the calculation task;
the server retrieves threads with the same number as the target users from a preset thread pool, and synchronously executes the calculation task based on the data source address of each target user so as to obtain the calculation result of the industrial data of each target user;
the step of synchronously executing the calculation task based on the data source address of each target user to obtain the calculation result of the industrial data of each target user comprises the following steps:
the server identifies target users to be processed from a plurality of target users for each thread which is called; the target users comprise target users to be processed and processed target users;
the server acquires industrial data of each target user to be processed according to a data source address corresponding to the target user to be processed;
And the server executes the calculation task based on the industrial data of the target user to be processed to obtain a calculation result of the industrial data of the target user to be processed, and marks the target user to be processed as a processed target user.
2. The task generating method according to claim 1, characterized in that after obtaining a calculation result of the industrial data of the target user to be processed, the task generating method further comprises:
and the server identifies a database corresponding to the target user to be processed according to the data source address corresponding to the target user to be processed, and stores the calculation result of the industrial data of the target user in a specific position in the database corresponding to the target user to be processed.
3. The task generating method according to claim 1, wherein the thread pool is set in advance by:
the server counts the number of threads in the current thread pool and the number of users in the industrial Internet platform;
when the number of threads is smaller than the number of users, the server creates a preset number of threads according to the difference value between the number of threads and the number of users, and stores the created threads into a thread pool.
4. A task generation system based on an industrial internet platform, the task generation system comprising: a task management platform and a server; the task management platform comprises an acquisition module, a display module, a determination module and a generation module;
the acquisition module is used for acquiring the identity information of each user in the industrial Internet platform and the corresponding data source address; the identity information of the user comprises the name of the enterprise to which the user belongs and a unique identity;
the display module is used for displaying the identity information of the user on a display interface of the task management platform;
the determining module is used for responding to the selection operation of the plurality of identity information on the display interface for each computing task, and determining a plurality of users corresponding to the selected plurality of identity information as target users of the computing task; the calculation task is to calculate specific industrial data according to a preset algorithm;
the generation module is used for packaging the determined data source addresses of the plurality of target users, generating a task packet corresponding to the calculation task, and sending the calculation task carrying the task packet to a server with the load smaller than a preset threshold value at the current time point;
The server comprises a receiving module, an analyzing module and an executing module;
the receiving module is used for receiving a plurality of computing tasks carrying task packages and sent by the task management platform, and adding the received computing tasks into a task queue of the server according to time sequence;
the analysis module is used for analyzing a task packet corresponding to each calculation task in the task queue to obtain data source addresses of a plurality of target users corresponding to the calculation task;
the execution module is used for calling threads with the same number as the target users from a preset thread pool, and synchronously executing the calculation task based on the data source address of each target user so as to obtain the calculation result of the industrial data of each target user;
the execution module comprises an identification unit, an acquisition unit and an execution unit;
the identifying unit is used for identifying target users to be processed from a plurality of target users aiming at each invoked thread; the target users comprise target users to be processed and processed target users;
the acquisition unit is used for acquiring industrial data of each target user to be processed according to the data source address corresponding to the target user to be processed;
The execution unit is used for executing the calculation task based on the industrial data of the target user to be processed so as to obtain a calculation result of the industrial data of the target user to be processed, and marking the target user to be processed as the processed target user.
5. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1-3.
6. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1-3.
CN202110678219.7A 2021-06-18 2021-06-18 Task generation method and system based on industrial Internet platform Active CN113296915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110678219.7A CN113296915B (en) 2021-06-18 2021-06-18 Task generation method and system based on industrial Internet platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110678219.7A CN113296915B (en) 2021-06-18 2021-06-18 Task generation method and system based on industrial Internet platform

Publications (2)

Publication Number Publication Date
CN113296915A CN113296915A (en) 2021-08-24
CN113296915B true CN113296915B (en) 2023-07-18

Family

ID=77328737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110678219.7A Active CN113296915B (en) 2021-06-18 2021-06-18 Task generation method and system based on industrial Internet platform

Country Status (1)

Country Link
CN (1) CN113296915B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710535A (en) * 2018-05-22 2018-10-26 中国科学技术大学 A kind of task scheduling system based on intelligent processor
CN110532076A (en) * 2019-08-09 2019-12-03 济南浪潮数据技术有限公司 A kind of method, system, equipment and the readable storage medium storing program for executing of cloud resource creation
CN111813554A (en) * 2020-07-17 2020-10-23 济南浪潮数据技术有限公司 Task scheduling processing method and device, electronic equipment and storage medium
CN112565391A (en) * 2020-12-01 2021-03-26 瀚云科技有限公司 Method, apparatus, device and medium for adjusting instances in an industrial internet platform

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030078956A1 (en) * 2001-10-24 2003-04-24 Aruna Ravichandran Multi-threaded design mechanism and methodology for dynamic menu management in GUI application
US9329899B2 (en) * 2013-06-24 2016-05-03 Sap Se Parallel execution of parsed query based on a concurrency level corresponding to an average number of available worker threads
CN107766132B (en) * 2017-06-25 2019-03-15 平安科技(深圳)有限公司 Multi-task scheduling method, application server and computer readable storage medium
CN107885590A (en) * 2017-11-30 2018-04-06 百度在线网络技术(北京)有限公司 Task processing method and device for smart machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710535A (en) * 2018-05-22 2018-10-26 中国科学技术大学 A kind of task scheduling system based on intelligent processor
CN110532076A (en) * 2019-08-09 2019-12-03 济南浪潮数据技术有限公司 A kind of method, system, equipment and the readable storage medium storing program for executing of cloud resource creation
CN111813554A (en) * 2020-07-17 2020-10-23 济南浪潮数据技术有限公司 Task scheduling processing method and device, electronic equipment and storage medium
CN112565391A (en) * 2020-12-01 2021-03-26 瀚云科技有限公司 Method, apparatus, device and medium for adjusting instances in an industrial internet platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Types of Task Scheduling Algorithms in Cloud Computing Environment;Tahani Aladwani;intechopen.com;全文 *
数据流程序动态调度与优化;杨胜哲;于俊清;唐九飞;;计算机工程与科学(07);4-13 *

Also Published As

Publication number Publication date
CN113296915A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN106027328B (en) Cluster monitoring method and system based on application container deployment
CN109587008B (en) Method, device and storage medium for detecting abnormal flow data
US20210035126A1 (en) Data processing method, system and computer device based on electronic payment behaviors
CN112766907A (en) Service data processing method and device and server
CN107040578A (en) Method of data synchronization, device and system
CN105338082A (en) Load balancing method and load balancing device based on application proxy server
CN111881221A (en) Method, device and equipment for customer portrait in logistics service
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN107168844B (en) Performance monitoring method and device
CN112702228A (en) Service current limiting response method and device, electronic equipment and readable storage medium
CN113688923A (en) Intelligent order abnormity detection method and device, electronic equipment and storage medium
CN106651513B (en) Quotation method and device for circuit board orders
CN111431733B (en) Service alarm coverage information evaluation method and device
CN113296915B (en) Task generation method and system based on industrial Internet platform
CN107193749B (en) Test method, device and equipment
CN115629951B (en) Task full-link tracking method, first node, link system and medium
CN114168624B (en) Data analysis method, computing device and storage medium
CN116028696A (en) Resource information acquisition method and device, electronic equipment and storage medium
US7506319B2 (en) Generating a model of software in execution
CN115081413A (en) Report generation method, device, system, equipment and medium
CN110263044B (en) Data storage method, device, equipment and computer readable storage medium
CN109635015B (en) Determination method and device for attribute data using object and server
CN111782688A (en) Request processing method, device and equipment based on big data analysis and storage medium
CN113127327A (en) Test method and device for performance test
CN109886327B (en) System and method for processing Java data in distributed system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant