CN114612015A - Control method and device of shared equipment, electronic equipment and storage medium - Google Patents

Control method and device of shared equipment, electronic equipment and storage medium Download PDF

Info

Publication number
CN114612015A
CN114612015A CN202210496089.XA CN202210496089A CN114612015A CN 114612015 A CN114612015 A CN 114612015A CN 202210496089 A CN202210496089 A CN 202210496089A CN 114612015 A CN114612015 A CN 114612015A
Authority
CN
China
Prior art keywords
time
production line
time period
target
target production
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210496089.XA
Other languages
Chinese (zh)
Other versions
CN114612015B (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.)
Nexwise Intelligence China Ltd
Original Assignee
Nexwise Intelligence China 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 Nexwise Intelligence China Ltd filed Critical Nexwise Intelligence China Ltd
Priority to CN202210496089.XA priority Critical patent/CN114612015B/en
Publication of CN114612015A publication Critical patent/CN114612015A/en
Application granted granted Critical
Publication of CN114612015B publication Critical patent/CN114612015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06314Calendaring for a resource
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Primary Health Care (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Manufacturing & Machinery (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a control method and a control device of shared equipment, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring the demand information of each target production line; dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift; the first time period of each target production line is mapped to the time sequence of the target shift in parallel, and the position information of the first time period of each target production line in the time sequence is obtained; and coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result. The invention greatly reduces the total time complexity caused by one-to-one comparison and sequencing of the time slots and comparison and combination, improves the calculation efficiency, reduces the resource consumption, reduces the logic complexity of the calculation of the running time of the sharing equipment, effectively simplifies the control process of the sharing equipment, and further conveniently and quickly controls the sharing equipment.

Description

Control method and device of shared equipment, electronic equipment and storage medium
Technical Field
The present invention relates to the field of device control technologies, and in particular, to a method and an apparatus for controlling a shared device, an electronic device, and a storage medium.
Background
In a production line of an industrial internet of things, a plurality of production lines often share one device, and the used time periods are different or crossed, for example, a refiner and a pulper of a paper mill, and one set of refiner can be shared by the plurality of production lines, so that an algorithm is needed to determine the switching time of the refiner and the pulper according to the pulp using time of each production line.
In the prior art, generally, jobs of all production lines are time-sequentially ordered according to start time of a shared device to form a time-ordered job sequence. Then, comparing and combining the execution time of each adjacent job, and repeating the steps of comparing and combining until all jobs are traversed and finished, and finally forming an arrangement sequence of job execution, namely start-stop arrangement of the shared device.
Sequencing the starting time of all the jobs according to the mode, wherein the time complexity is high, and the sequencing time complexity is also obviously increased along with the increase of the number of the jobs; in addition, after the sorting is completed, time periods of adjacent jobs need to be compared one by one and combined, and the time complexity is high.
In summary, in the prior art, after the start times of operations of the production lines are compared and sequenced one by one, the start-stop times of the collinear devices can be scheduled only after one-to-one comparison and combination, and then the shared devices are controlled according to the start-stop times, so that the time complexity is high, the calculation efficiency is low, and the control efficiency of the shared devices is low.
Disclosure of Invention
The invention provides a control method and device of shared equipment, electronic equipment and a storage medium, which are used for solving the defects of low control efficiency of the shared equipment caused by high time complexity and low calculation efficiency of the calculation of the running time of the shared equipment in the prior art and realizing the improvement of the calculation efficiency of the running time of the shared equipment and the control efficiency of the shared equipment.
The invention provides a control method of sharing equipment, which comprises the following steps:
acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment;
dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift;
the first time period of each target production line is mapped to the time sequence of the target shift in parallel, and the position information of the first time period of each target production line in the time sequence is obtained; the position information corresponding to each target production line is used for representing the starting and ending time of each target production line for using the shared equipment;
and coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result.
According to the control method of the sharing device provided by the invention, the dividing the target shift into a plurality of second time periods to obtain the time sequence of the target shift comprises the following steps:
acquiring the starting time and the ending time of the target shift;
acquiring the total duration of the target shift according to the starting time and the ending time;
dividing the total time length of the target shift by the preset unit time length and rounding upwards to obtain the total time segment number of the target shift;
and dividing the target shift into a plurality of second time periods according to the total time period number to obtain a time sequence of the target shift.
According to the control method of the shared device provided by the invention, the mapping of the first time period of each target production line to the time sequence of the target shift in parallel comprises the following steps:
acquiring a second time period matched with the first time period of each target production line in the time sequence;
and mapping the first time period of each target production line to a second time period matched with the first time period of each target production line in parallel.
According to the control method of the shared device provided by the present invention, the obtaining a second time period matching the first time period of each target production line in the time series includes:
mapping the starting time of the first time period of each target production line according to the starting time of the first time period of each target production line, the starting time of the target shift and a preset unit time length to obtain a mapping result of the starting time of the first time period of each target production line;
mapping the end time of the first time period of each target production line according to the end time of the first time period of each target production line, the start time of the target shift and the preset unit time length to obtain a mapping result of the end time of the first time period of each target production line;
and acquiring a second time period matched with the first time period of each target production line in the time sequence according to the mapping result of the starting time and the mapping result of the ending time of the first time period of each target production line.
According to a control method of a sharing device provided by the present invention, the encoding the time series according to the position information includes:
determining a position sequence occupied by a first time period of each target production line in the time sequence according to the position information;
coding a position sequence occupied by a first time period of each target production line in the time sequence into a first preset value;
and coding a position sequence which is not occupied by the first time period of any target production line in the time sequence into a second preset value.
According to the control method of the sharing device provided by the invention, the control of the sharing device is carried out according to the coding result, which comprises the following steps;
acquiring a control instruction corresponding to each coding value in the coding result;
and sequentially traversing the control instruction corresponding to each code value in the coding result, and sending the control instruction corresponding to each code value to the sharing device in the time period to which each code value belongs, so that the sharing device executes the action to which the control instruction corresponding to each code value belongs until the control instructions corresponding to all code values in the coding result are sent.
According to the control method of the sharing device provided by the present invention, the obtaining of the control instruction corresponding to each encoded value in the encoding result includes:
for each coded value in the coding result, performing the following operations:
under the condition that the current coding value in the coding result is consistent with the previous coding value, generating a first control instruction; the first control instruction is used for controlling the sharing device to continue executing the control instruction corresponding to the previous coding value;
under the condition that the current code is inconsistent with the previous code value, generating a second control instruction; the second control instruction is used for controlling the shared device to switch states; the state switching comprises switching from a power-off state to a power-on state or switching from the power-on state to the power-off state.
The present invention also provides a control apparatus for a shared device, including:
the acquisition module is used for acquiring a plurality of target production lines sharing the shared equipment in a target shift and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment;
the dividing module is used for dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift;
the mapping module is used for mapping the first time period of each target production line to the time sequence of the target shift in parallel to obtain the position information of the first time period of each target production line in the time sequence; the position information corresponding to each target production line is used for representing the starting and ending time of each target production line for using the shared equipment; and the control module is used for coding the time sequence according to the position information and controlling the sharing equipment according to a coding result.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the control method of the sharing device.
The present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a control method of a sharing device as described in any of the above.
The present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of controlling a sharing device as described in any one of the above.
According to the control method and device of the sharing equipment, the electronic equipment and the storage medium, the first time period of each target production line is directly mapped into the time sequence of the target shift in parallel to obtain the position information of the first time period of each target production line in the time sequence, and the time sequence is coded according to the position information so as to directly convert the time sequence into the action sequence of the sharing equipment, and further the sharing equipment is controlled quickly and accurately; the total time complexity caused by one-to-one comparison and sequencing of each first time period and the total time complexity caused by one-to-one comparison and combination of each first time period are greatly reduced, the calculation efficiency is improved, the resource consumption is reduced, the logic complexity of the running time calculation of the sharing equipment is reduced, the control process of the sharing equipment is effectively simplified, and the sharing equipment is conveniently and quickly controlled.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a control method of a sharing device provided by the present invention;
FIG. 2 is a schematic structural diagram of a control device of a sharing apparatus provided in the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Generally, the on-off time of the equipment in the plant is determined according to the production schedule, and if no production operation is performed in a certain period of time, the equipment does not need to be turned on, so that the power is saved and the loss is reduced. For example, the pulp consumption time of the A production line is 0:26-3:12, the pulp consumption time of the B production line is 2:13-4:22, and the starting time of the pulping machine is 0:26-4: 22. Here there is a crossover in pulp time, the calculation is relatively simple, and only two periods of time require the use of refiners, which is also relatively simple to calculate. However, when there are many production lines, there are many time periods, and the calculation is troublesome, and particularly, when there are many time-crossing portions, the calculation is more complicated. For example, production lines A are respectively 0:26-1:12, 2:13-4:22, 5:12-6:23 and 7:11-7:29, production lines B are respectively 0:35-3:12, 5:12-7:00 and 7:00-7:45, and the calculation complexity is high due to the fact that a large number of operation time periods of pulping machines are used. In addition, since the given job time is not necessarily sequential, it may be, for example, 5:12 to 7:00, 0:35 to 3:12, and 7:00 to 7: 45; in this case, the computational complexity is further increased. Therefore, how to calculate the start-stop time arrangement of the shared device according to the operation time submitted by each production line is one of the technical problems to be solved in the industry at present.
In the prior art, all jobs sharing a device are generally sorted in time increments according to start time to form a series of time-ordered job time sequences. The execution times of adjacent jobs are then compared and merged.
Wherein, time combination is to combine two overlapping periods of time into one period of time, for example, 1:12-3:21 and 2:11-4:23 into 1:12-4: 23.
For another example, if the end time of the 1 st job is greater than the start time of the 2 nd job, the time of the 1 st job and the time of the 2 nd job are merged, the merged time takes the start time of the 1 st job as the start time and the end time of the 2 nd job as the end time, and then the newly formed job is continuously compared with the time of the next job. If the 1 st job's end time is less than the 2 nd job's start time, no processing is done and the 2 nd job's time is then compared to the next job's time. And repeating the steps until all the jobs are traversed and finished, and finally forming an arrangement sequence executed by the jobs, namely the start-stop time arrangement of the shared equipment. If a new added operation exists temporarily, the new operation needs to be brought into the existing operation sequence, and the new operation is recalculated and arranged once according to the steps.
In summary, the above-mentioned conventional method for calculating the running time of the shared device has the following problems:
(1) ordering according to the start time of all the jobs, the time complexity is O (nlogn) to O (n)2) And as the number of jobs increases, the time complexity of the sorting also increases significantly.
(2) Comparing and combining time periods of adjacent operations one by one, wherein the time complexity is O (n) and is higher;
(3) for the operation added in real time, the steps of comparing and sorting one by one and then comparing and combining one by one are needed to be recalculated and arranged, so that the efficiency is low.
In summary, the running time calculation method of the sharing device in the prior art has high time complexity and low calculation efficiency, thereby resulting in low control efficiency of the sharing device.
In order to solve the problem of low scheduling efficiency of start-stop time of shared equipment in the existing industrial Internet of things and reduce the complexity of logic calculation, the embodiment provides a control method of the shared equipment, time periods of shared equipment used by production lines are mapped into a time sequence of a target shift and the time sequence is encoded to convert the time sequence into an action sequence of the shared equipment, the startup and shutdown time periods of the shared equipment are directly obtained according to the action sequence, the time complexity caused by sequencing each time period one by one and comparing and combining each time period one by one is avoided, only one traversal is needed for all operations, the complexity of the running time of the shared equipment can be effectively reduced, the time complexity of the calculation is always O (1), the increase of the number of operations and the number of operations of cross operations is avoided, and the running time of the shared equipment can be conveniently and quickly obtained, thereby controlling the sharing equipment quickly and effectively.
It should be noted that the execution subject of the method may be an electronic device built inside or outside the shared device, a component in the electronic device, an integrated circuit, or a chip, and the like, and this example is not particularly limited thereto.
The control method of the sharing device of the present invention is described below with reference to fig. 1, and the method includes the steps of:
step 101, acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring demand information of each target production line; the demand information includes a first time period for using the shared device.
The target shift is a shift required to be arranged for the running time of the sharing equipment; the current shift may be the current shift, or the future shift, which is not specifically limited in this embodiment.
The shared device is a device that can be shared by a plurality of objects and is to be subjected to runtime arrangement, such as a refiner and a pulper of a paper mill, and the like, which is not specifically limited in this embodiment.
In order to reduce the cost, the shared equipment in the factory is shared by all production lines, and as long as one production line needs to use the shared equipment, the shared equipment cannot be shut down.
The target production line is a production line sharing the same shared equipment.
The demand information includes, but is not limited to, the number of the sharing device that needs to be used and the time period that the sharing device needs to be used.
Optionally, when the running time of the shared device in the target shift needs to be scheduled and the shared device is further controlled, a plurality of target production lines sharing the shared device in the target shift may be acquired, and the requirement information of each target production line is acquired at the same time, so as to analyze and acquire the first time period for each target production line to use the shared device from the requirement information of each target production line.
The mode of acquiring the multiple target production lines may be to acquire all target production lines sharing the shared device in the target shift according to the use information of the shared device by each production line in the target shift; the requirement information of each production line in the target shift may be analyzed to obtain the number of the shared device used by each production line, match the number of the shared device used by each production line with the number of the shared device, and use the production line matched with the number of the shared device as the target production line, which is not specifically limited in this embodiment.
Step 102, dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift;
optionally, the target shift may be divided into a plurality of second time periods according to a preset number, or may be divided into a plurality of second time periods according to a preset unit time length, and the like, which is not specifically limited in this embodiment.
Then, a time series of the target shift is formed according to the plurality of second time periods.
For example, if the target shift starts from 2:00 and ends at 8:30, and the preset unit duration is 1 hour, the target shift may be divided into 7 second time segments, and the time sequence of the target shift is [2:00, 3:00, 4:00, 5:00, 6:00, 7:00, 8:00, 8:30 ].
It should be noted that each value in the time series can be characterized by a time period, such as 2:00, which is characterized by a time period of 2:00 to 3: 00.
Step 103, mapping the first time period of each target production line to the time sequence of the target shift in parallel to obtain the position information of the first time period of each target production line in the time sequence; the position information corresponding to each target production line is used for representing the starting and ending time of each target production line for using the shared equipment; optionally, after the time series of the target shift is obtained, the first time period of each target production line may be mapped to the time series of the target shift in parallel, and the position information of the position occupied by the first time period of the shared device used by each target production line in the time series of the target shift is determined.
The position information includes one or more combinations of numbers, time and duration of the starting position and the ending position.
The position information is used for representing the starting and ending time of the target production line needing to use the shared equipment in the time sequence.
In the embodiment, the first time periods of the target production lines are directly mapped to the time sequence of the target shift in parallel, so that the time complexity caused by one-to-one comparison and sequencing of each first time period is avoided, and the time complexity and the logic complexity of the running time calculation of the shared equipment can be effectively reduced.
And 104, coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result.
The position information is used for representing which time in the time sequence needs to use the shared device, namely representing the action state of the shared device in each time; the action state includes power on or power off. It should be noted that the encoding result in the following is an action sequence of the sharing device, and the action sequence includes a plurality of encoding values.
Optionally, after the position information of the first time period of each target production line in the time sequence is obtained, it may be determined whether a target production line needs to use the shared device in each second time period of the time sequence according to the position information. Therefore, the time sequence can be directly encoded according to the position information, and the second time period when the target production line needs to use the shared device and the second time period when the non-target production line needs to use the shared device are differentially encoded, so that the time sequence is converted into the action sequence of the shared device.
The encoding method may be a character string, a numerical value, or the like, and this embodiment does not specifically limit this.
For example, if the time series is encoded with 1 and 0, and 1 and 0 are used to represent the power-on and power-off actions of the sharing device, respectively, the action sequence of the sharing device in the target shift mapped by the time series of the target shift can be characterized as:
in the initial state, the initial action sequence is [0,0,0, … … 0], i.e. the entire shift is in the shutdown state; when the target production line needs to use the shared device in the period from T0+ T to T0+3T, the shared device needs to be powered on at a time point of T0+ T until the shared device is powered off at a time point of T0+3T, and the code values in the action sequence of the target shift are updated to [0,1,1,0, 0, … … 0 ].
Then, the action state of the sharing equipment in each second time period can be obtained in real time according to the coding result, and the sharing equipment is controlled quickly and accurately at the corresponding time point.
In the embodiment, the time sequence is directly encoded according to the position information, and can be converted into the action sequence of the shared device, so that the running time arrangement result of the shared device is directly obtained, the time complexity caused by one-to-one comparison and combination of each first time period is avoided, the time complexity and the logic complexity of running time calculation of the shared device can be effectively reduced, the consumption of calculation resources is reduced, the calculation efficiency is improved, the control process of the shared device is simplified, and the control efficiency is improved.
It should be noted that, for the operation time newly inserted during the operation or during the update process of the action sequence, the action sequence is updated once in time in the same manner, and it is not necessary to reorder, compare and merge the time periods when all the production lines use the shared device, so that the computation complexity and time complexity are effectively reduced, and the computation efficiency is effectively improved.
In the embodiment, the first time period of each target production line is directly mapped to the time sequence of the target shift in parallel to obtain the position information of the first time period of each target production line in the time sequence, and the time sequence is encoded according to the position information so as to directly convert the time sequence into the action sequence of the shared equipment, thereby quickly and accurately controlling the shared equipment; the total time complexity caused by one-to-one comparison and sequencing of each first time period and the total time complexity caused by one-to-one comparison and combination of each first time period are greatly reduced, the calculation efficiency is improved, the resource consumption is reduced, the logic complexity of the running time calculation of the sharing equipment is reduced, the control process of the sharing equipment is effectively simplified, and the sharing equipment is conveniently and quickly controlled.
On the basis of the foregoing embodiment, in this embodiment, the dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift includes: acquiring the starting time and the ending time of the target shift; acquiring the total duration of the target shift according to the starting time and the ending time; dividing the total time length of the target shift by the preset unit time length and rounding upwards to obtain the total time segment number of the target shift; and dividing the target shift into a plurality of second time periods according to the total time period number to obtain a time sequence of the target shift.
The preset unit duration is duration of basic operation or unit operation of one device, such as 5 seconds, 10 minutes, 1.3 hours and the like, and the unit durations of different operations of different devices are different and can be specifically set according to actual requirements.
Optionally, the specific step of obtaining the time series of the target shift includes:
first, the start time T0 and the end time Td of the target shift are acquired.
Then, the time difference between the ending time Td and the time before the starting time T0 of the target shift is calculated to obtain the total duration T of the target shift.
Then, in order to ensure accurate division of the target shift, dividing the total time length T of the target shift by a preset unit time length T and rounding up to obtain the total time segment number N of the target shift, wherein the specific calculation formula is as follows:
N=⌈T/t⌉;
where N is the total number of time segments of the target shift, t is a preset unit duration, and ⌈ ⌉ represents a rounding-up operation.
Then, dividing the target shift into a plurality of second time periods according to the total time period number to obtain a time sequence of the target shift; the number of the second time periods is determined according to the total time period number, namely the total time period number is directly used as the number of the second time periods under the condition that the result of dividing the total time length by the preset unit time length is 0; and under the condition that the division result of the total time length and the preset unit time length is not 0, adding 1 to the total time section number to be used as the number of the second time section.
For example, in a case where the total duration of the target shift is T, the starting time is T0, the preset unit duration is T, and there is a margin in the division result between the total duration and the preset unit duration, the target shift is divided into a time series with a series length of N +1, specifically denoted as [ T0, T0+ T, T0+2T, … …, T0+ (N-1) T, T0+ T ], and the corresponding position subscripts are [0 th, 1 st, 2 nd, 3 rd, … … nth ].
For another example, if the target shift starts from 2:00 and ends at 8:30, the total time duration is 6.5 hours, and the preset unit time duration is 1 hour, the time series length of the target shift is 7, which is specifically expressed as follows: [2:00,3:00,4:00,5:00,6:00,7:00,8:00,8:30].
It should be noted that, in order to ensure the accuracy of the time series, the last bit of the time series is the end time of the target shift, i.e., T0+ T, instead of T0+ Nt, so that the start time and the end time of the time series are consistent with the target shift, i.e., the end of the target shift is indicated at T0+ T, and the start of the target shift is indicated at T0.
In the implementation, the total duration of the target shift is divided by the preset unit duration and rounded upwards to obtain the total time segment number of the target shift, and the target shift is divided into a plurality of second time segments according to the total time segment number to obtain the time sequence of the target shift, so that the time sequence is consistent with the time of the target shift, the accuracy of time division is effectively ensured, the time sequence can completely cover the time segment of the target shift, and the calculation accuracy of the running time of the sharing equipment is effectively ensured.
On the basis of the foregoing embodiment, the mapping the first time period of each target production line to the time series of the target shift in parallel in this embodiment includes: acquiring a second time period matched with the first time period of each target production line in the time sequence; and mapping the first time period of each target production line to a second time period matched with the first time period of each target production line.
Optionally, the mapping the first time period of each target production line to the time sequence of the target shift in parallel in step 103 specifically includes the following steps:
firstly, traversing a first time period for each target production line sharing shared equipment in a target shift to use the shared equipment;
then, in the time sequence, a second time period matched with the first time period of each target production line is acquired in parallel.
Optionally, the manner of obtaining the second time period matched with the first time period of each target production line includes: directly acquiring a second time period to which the first time period belongs according to the starting time and the ending time of the first time period of each target production line, namely acquiring the second time period matched with the first time period of each target production line;
or mapping the first time period of each target production line into a time period consistent with the characterization mode of the second time period, and then matching the time period with each second time period in the time sequence to obtain the second time period matched with the first time period of each target production line, where the matching mode is not specifically limited in this embodiment.
And after the second time period matched with the first time period of each target production line is obtained, directly and parallelly mapping the first time period of each target production line to the second time period matched with the first time period of each target production line to obtain a time sequence.
In this embodiment, the first time periods of the target production lines are simply matched with the second time periods in the time sequence in parallel, so that the first time periods of the target production lines can be quickly and accurately mapped into the time sequence, and the total time complexity caused by one-to-one comparison and sorting of each first time period is greatly reduced.
On the basis of the foregoing embodiment, in this implementation, the acquiring, in the time sequence, the second time period matched with the first time period of each object production line includes: mapping the starting time of the first time period of each target production line according to the starting time of the first time period of each target production line, the starting time of the target shift and a preset unit time length to obtain a mapping result of the starting time of the first time period of each target production line; mapping the end time of the first time period of each target production line according to the end time of the first time period of each target production line, the start time of the target shift and the preset unit time length to obtain a mapping result of the end time of the first time period of each target production line; and acquiring a second time period matched with the first time period of each target production line in the time sequence according to the mapping result of the starting time and the mapping result of the ending time of the first time period of each target production line.
Optionally, the specific step of acquiring a second time period matched with the first time period of each target production line includes:
firstly, in order to ensure the completeness of the operation, subtracting the start time of the first time period of each target production line from the start time of the target shift, dividing the subtraction result by the preset unit time length, then rounding down, multiplying the result of rounding down by the preset unit time length, and then adding the result of rounding down to the start time of the target shift to obtain a mapping result F1 of the start time of the first time period of each target production line, wherein the specific calculation formula is as follows:
F1=T0+⌊ (T1-T0)/t⌋*t;
wherein T0 is the starting time of the target shift, T1 is the starting time of the first time period of each target production line, and T is the preset unit duration; ⌊ ⌋ denotes a round-down operation.
Meanwhile, subtracting the ending time of the first time period of each target production line from the starting time of the target shift, dividing the subtraction result by the preset unit time length, rounding down, multiplying the result of rounding down by the preset unit time length, and adding the result of rounding down to the starting time of the target shift to obtain a mapping result F2 of the starting time of the first time period of each target production line, wherein the specific calculation formula is as follows:
F2=T0+⌊ (T2-T0)/t⌋*t;
wherein T0 is the starting time of the target shift, T2 is the ending time of the first time period of each target production line, and T is the preset unit duration; ⌊ ⌋ denotes a round-down operation.
Then, in the time sequence, a second time period matched with the mapping result of the starting time and the mapping result of the ending time of the first time period of each target production line is obtained, so that the first time period of each target production line is mapped into the time sequence, and the position information of the first time period of each target production line in the time sequence is obtained.
In the embodiment, sequencing of all the operation time periods can be effectively avoided, one-by-one combination of all the operation time periods can also be avoided, all the operations are not required to be traversed successively once, and the time complexity is maintained at O (1). And the more the shared equipment is operated, the more complex the time slot crossing is, and the more obvious the superiority is.
On the basis of the foregoing embodiments, in this embodiment, the encoding the time series according to the position information includes: determining a position sequence occupied by a first time period of each target production line in the time sequence according to the position information; coding a position sequence occupied by a first time period of each target production line in the time sequence into a first preset value; and coding a position sequence which is not occupied by the first time period of any target production line in the time sequence into a second preset value.
The first preset value and the second preset value can be set according to actual requirements, and if the first preset value is 1, the second preset value is 0.
Optionally, if the time span of the first time period of any one target production line is from T1 to T2, the start position of the first time period map of the target production line in the time sequence is ⌊ (T1-T0)/T ⌋, and the end position is ⌈ (T2-T0)/T ⌉ -1, that is, it represents that the shared device needs to be powered on at T0+ ⌊ (T1-T0)/T ⌋, and powered off until T0+ ⌈ (T2-T0)/T ⌉. Correspondingly, the position sequence occupied by the first time period of the target production line is all the position sequences from ⌊ (T1-T0)/T ⌋ th position to ⌈ (T2-T0)/T ⌉ -1 th position in the time sequence.
Then, the time series is encoded according to the position information of the first time period of each target production line in the time series, such as encoding all sequences between ⌊ (T1-T0)/T ⌋ th bit and ⌈ (T2-T0)/T ⌉ -1 th bit in the time series to be 1, and the shared device is controlled to be powered on. Meanwhile, the ⌈ th (T2-T0)/T ⌉ th bit in the time series remained unchanged.
The following description will be made of the running time calculation of the sharing device in this embodiment, taking the encoding values 1 and 0 as examples to represent the power-on state and the power-off state of the sharing device.
For example, the target shift starts at 2:00 and ends at 8:30 for a total duration of 6.5 hours, and the predetermined unit duration is 1 hour. If the time periods in which the plurality of target production lines share the shared device are respectively as follows: 3:10-5:30, 2:00-3:40, 3:00-6:10, 7:00-8:20, then the encoding process is as follows:
firstly, dividing a target shift into 7 second time periods to obtain a time sequence of the target shift, which is specifically represented as [2:00, 3:00, 4:00, 5:00, 6:00, 7:00, 8:00, 8:30];
then, performing initial coding on the time sequence to obtain an initial coding result of the time sequence of the shared device in the target shift, namely an initial action sequence, which is specifically represented as [0,0,0, 0, 0]; the initialization action sequence indicates that all the time periods of the target shift are in the shutdown state in the initial state, and the position indexes in the action sequence are [0 th bit, 1 st bit, 2 nd bit, 3 rd bit, 4 th bit, 5 th bit, 6 th bit and 7 th bit ].
Then, mapping the first time segment of each target production line into the time sequence, and updating the coding result of the initialization action sequence according to the position information of the first time of each target production line in the time sequence, which is specifically as follows:
1) reading a first time period 3:10-5:30, projecting the start time to be 3:00, projecting the end time to be 6:00, updating the codes of the 1 st bit to the 3 rd bit of the time sequence to be 1, keeping the 4 th bit to be 0, and then setting the action sequence to be [0,1,1, 1,0, 0,0, 0];
2) reading a second time period 2:10-3:40, projecting the starting time to be 2:00, projecting the ending time to be 4:00, updating the 0 th bit to the 1 st bit of the action sequence to be 1, and keeping the 2 nd bit unchanged, wherein the action sequence is [1, 1,1, 1,0, 0,0, 0];
3) reading a third time period of 3:00-6:10, projecting the starting time to be 3:00, projecting the ending time to be 7:00, updating the 1 st bit to the 4 th bit of the action sequence to be 1, keeping the 5 th bit to be 0, and then setting the action sequence to be [1, 1,1, 1,1,0, 0, 0];
4) reading the fourth time period 7:00-8:20, the projection of the start time is 7:00, the projection of the end time is 8:30, the 5 th bit to the 6 th bit of the motion sequence are updated to be 1, the 7 th bit is kept to be 0, and then the motion sequence is [1, 1,1, 1,1, 1,0 ].
In the embodiment, all the operations need to be traversed one time without any sequence, the time complexity is low, the efficiency of equipment control can be effectively improved, the coding result is simpler, and the observability is stronger.
On the basis of the foregoing embodiments, in this embodiment, the controlling the sharing device according to the encoding result includes; acquiring a control instruction corresponding to each coding value in the coding result; and sequentially traversing the control instruction corresponding to each code value in the coding result, and sending the control instruction corresponding to each code value to the sharing device in the time period to which each code value belongs, so that the sharing device executes the action to which the control instruction corresponding to each code value belongs until the control instructions corresponding to all code values in the coding result are sent.
Optionally, the method includes sending a corresponding control instruction to the sharing device according to the time information in the time sequence and the coding value in the coding result of the time sequence, and includes the following specific steps:
firstly, acquiring a control instruction corresponding to each coding value according to the meaning of each coding value in a coding result; for example, the encoding value of 1 means to control the shared device to be powered on or powered on, and the encoding value of 0 means to control the shared device to be powered off or powered off.
And meanwhile, determining the start-stop time of the shared equipment according to the time period to which each code value belongs in the coding result.
And then, sequentially traversing the control instruction corresponding to each code value in the coding result, and sending the control instruction corresponding to each code value to the sharing device in the time period to which each code value belongs, so that the sharing device executes the action to which the control instruction corresponding to each code value belongs until the control instructions corresponding to all code values are sent.
The following description is given by taking an example in which the code value is 1 to represent the on or on of the sharing device, and the code value is 0 to represent the off or off of the sharing device, and the specific steps are as follows:
1) reading the 0 th bit (namely the coding result) of the action sequence, if the 0 th bit is 1, starting the shared device at the time point of the 0 th bit of the time sequence, and if the 0 th bit is 0, closing the shared device;
2) continuously reading the (N + 1) th bit of the action sequence, and if the (N + 1) th bit is the same as the nth bit, not sending an operation command to enable the sharing equipment to continuously execute a control instruction corresponding to the nth bit code value; or sending a control instruction to be executed continuously, so that the shared device continues to execute the control instruction corresponding to the nth bit encoding value, which is not specifically limited in this embodiment;
if the position is different from the Nth position, generating a control instruction different from the Nth position, and sending a corresponding control instruction according to the (N + 1) th position of the action sequence at the time point of the (N + 1) th position of the time sequence;
repeating the step 2) until all the code values in the action sequence are scanned.
In the embodiment, the shared device can be quickly and accurately controlled only according to the encoding result, and the operation is simple.
On the basis of the foregoing embodiment, in this embodiment, the obtaining the control instruction corresponding to each encoded value in the encoding result includes: for each coded value in the coding result, performing the following operations: under the condition that the current coding value in the coding result is consistent with the previous coding value, generating a first control instruction; the first control instruction is used for controlling the sharing device to continue executing the control instruction corresponding to the previous coding value; under the condition that the current code is inconsistent with the previous code value, generating a second control instruction; the second control instruction is used for controlling the shared device to switch states; the state switching comprises switching from a power-off state to a power-on state or switching from the power-on state to the power-off state.
Optionally, the following operations may be performed for each encoded value in the encoding result to control the sharing device:
firstly, reading a current code value in a code result, and determining whether the current code value is consistent with a previous code value; under the condition of keeping consistent, the control instruction corresponding to the representation current code value and the previous code value is consistent, that is, the action state of the sharing device in the time period to which the current code value belongs is consistent with the action state of the sharing device in the time period to which the previous code value belongs, and a first control instruction can be generated to control the sharing device to continuously execute the control instruction corresponding to the previous code value.
Under the condition that the current code is inconsistent with the previous code value, a second control instruction can be generated to control the sharing device to switch the state, such as controlling the sharing device to switch from a shutdown state to a startup state or from the startup state to the shutdown state, wherein the second control instruction represents that the current code value is inconsistent with the control instruction corresponding to the previous code value, that is, the action state of the sharing device in the period of time to which the current code value belongs is inconsistent with the action state of the sharing device in the period of time to which the previous code value belongs. Specific examples are as follows:
the time sequence of the target shift is [2:00, 3:00, 4:00, 5:00, 6:00, 7:00, 8:00, 8:30], and the coding result of the time sequence is [1, 1,1, 1,1, 1,1, 0];
bit 0 of the read action sequence is 1, at 2:00 starting the equipment;
if the 1 st bit of the read action sequence is 1 and is the same as the 0 th bit, generating a first control instruction and controlling the sharing equipment to continuously keep the starting state;
if the 2 nd bit of the read action sequence is 1 and is the same as the 1 st bit, generating a first control instruction and controlling the shared equipment to continuously keep a starting state;
and repeating the operation until the 7 th bit of the action sequence is read, the 7 th bit of the action sequence is 0, and if the bit is different from the 6 th bit, sending a second control instruction to control the shared equipment to be switched from the power-on state to the power-off state.
According to the embodiment, the shared equipment can be quickly and accurately controlled only according to the encoding result, and the operation is simple.
The following describes the control device of the sharing device provided by the present invention, and the control device of the sharing device described below and the control method of the sharing device described above may be referred to correspondingly.
As shown in fig. 2, the present embodiment provides a control apparatus for a shared device, the apparatus including: an obtaining module 201, a dividing module 202, a mapping module 203 and a control module 204, wherein:
the obtaining module 201 is configured to obtain a plurality of target production lines sharing a shared device within a target shift, and obtain requirement information of each target production line; the demand information comprises a first time period for using the sharing equipment;
optionally, when the running time of the shared device in the target shift needs to be scheduled and the shared device is further controlled, a plurality of target production lines sharing the shared device in the target shift may be acquired, and the requirement information of each target production line is acquired at the same time, so as to analyze and acquire the first time period for each target production line to use the shared device from the requirement information of each target production line.
The mode of acquiring the plurality of target production lines may be to acquire all target production lines sharing the shared device in the target shift according to the use information of each production line to the shared device in the target shift; the requirement information of each production line in the target shift may be analyzed to obtain the number of the shared device used by each production line, match the number of the shared device used by each production line with the number of the shared device, and use the production line matched with the number of the shared device as the target production line, which is not specifically limited in this embodiment.
The dividing module 202 is configured to divide the target shift into a plurality of second time periods to obtain a time sequence of the target shift;
optionally, the target shift may be divided into a plurality of second time periods according to a preset number, or may be divided into a plurality of second time periods according to a preset unit time length, and the like, which is not specifically limited in this embodiment.
Then, a time series of the target shift is formed according to the plurality of second time periods.
The mapping module 203 is configured to map the first time period of each target production line to the time sequence of the target shift in parallel, so as to obtain position information of the first time period of each target production line in the time sequence; the position information corresponding to each target production line is used for representing the starting and ending time of each target production line for using the shared equipment;
optionally, after the time series of the target shift is obtained, the first time period of each target production line may be mapped to the time series of the target shift in parallel, and the position information of the position occupied by the first time period of the shared device used by each target production line in the time series of the target shift is determined.
The position information includes one or more combinations of numbers, time and duration of the starting position and the ending position.
The position information is used for representing the starting and ending time of the target production line needing to use the shared equipment in the time sequence.
In the embodiment, the first time periods of the target production lines are directly mapped to the time sequence of the target shift in parallel, so that the time complexity caused by one-to-one comparison and sequencing of each first time period is avoided, and the logic complexity of the computation time complexity of the running time of the shared equipment can be effectively reduced.
The control module 204 is configured to encode the time sequence according to the location information, and control the sharing device according to an encoding result.
Optionally, after the position information of the first time period of each target production line in the time sequence is obtained, it may be determined whether a target production line needs to use the shared device in each second time period of the time sequence according to the position information. Therefore, the time sequence can be directly encoded according to the position information, and the second time period when the target production line needs to use the shared device and the second time period when the non-target production line needs to use the shared device are differentially encoded, so that the time sequence is converted into the action sequence of the shared device.
The encoding method may be a character string, a numerical value, or the like, and this embodiment is not particularly limited thereto.
Then, the action state of the sharing equipment in each second time period can be obtained in real time according to the coding result, and the sharing equipment is controlled quickly and accurately at the corresponding time point.
In the embodiment, the first time period of each target production line is directly mapped to the time sequence of the target shift in parallel to obtain the position information of the first time period of each target production line in the time sequence, and the time sequence is encoded according to the position information so as to directly convert the time sequence into the action sequence of the shared equipment, thereby quickly and accurately controlling the shared equipment; the total time complexity caused by one-to-one comparison and sequencing of each first time period and the total time complexity caused by one-to-one comparison and combination of each first time period are greatly reduced, the calculation efficiency is improved, the resource consumption is reduced, the logic complexity of the running time calculation of the sharing equipment is reduced, the control process of the sharing equipment is effectively simplified, and the sharing equipment is conveniently and quickly controlled.
On the basis of the foregoing embodiment, the partition module in this embodiment is specifically configured to: acquiring the starting time and the ending time of the target shift; acquiring the total duration of the target shift according to the starting time and the ending time; dividing the total time length of the target shift by the preset unit time length and rounding upwards to obtain the total time segment number of the target shift; and dividing the target shift into a plurality of second time periods according to the total time period number to obtain a time sequence of the target shift.
On the basis of the foregoing embodiment, the mapping module in this embodiment is specifically configured to: acquiring a second time period matched with the first time period of each target production line in the time sequence; and mapping the first time period of each target production line to a second time period matched with the first time period of each target production line in parallel.
On the basis of the foregoing embodiment, the mapping module in this embodiment is further configured to: mapping the starting time of the first time period of each target production line according to the starting time of the first time period of each target production line, the starting time of the target shift and a preset unit time length to obtain a mapping result of the starting time of the first time period of each target production line; mapping the end time of the first time period of each target production line according to the end time of the first time period of each target production line, the start time of the target shift and the preset unit time length to obtain a mapping result of the end time of the first time period of each target production line; and acquiring a second time period matched with the first time period of each target production line in the time sequence according to the mapping result of the starting time and the mapping result of the ending time of the first time period of each target production line.
On the basis of the foregoing embodiments, the control module in this embodiment is specifically configured to: determining a position sequence occupied by a first time period of each target production line in the time sequence according to the position information; coding a position sequence occupied by a first time period of each target production line in the time sequence into a first preset value; and coding a position sequence which is not occupied by the first time period of any target production line in the time sequence into a second preset value.
On the basis of the foregoing embodiments, the control module in this embodiment is further configured to: acquiring a control instruction corresponding to each coding value in the coding result; and sequentially traversing the control instruction corresponding to each code value in the coding result, and sending the control instruction corresponding to each code value to the sharing device in the time period to which each code value belongs, so that the sharing device executes the action to which the control instruction corresponding to each code value belongs until the control instructions corresponding to all code values in the coding result are sent.
On the basis of the foregoing embodiment, the control module in this embodiment is further configured to: for each coded value in the coding result, performing the following operations: under the condition that the current coding value in the coding result is consistent with the previous coding value, generating a first control instruction; the first control instruction is used for controlling the sharing device to continue executing the control instruction corresponding to the previous coding value; under the condition that the current code is inconsistent with the previous code value, generating a second control instruction; the second control instruction is used for controlling the shared device to switch states; the state switching comprises switching from a power-off state to a power-on state or switching from the power-on state to the power-off state.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor)301, a communication Interface (communication Interface)302, a memory (memory)303 and a communication bus 304, wherein the processor 301, the communication Interface 302 and the memory 303 complete communication with each other through the communication bus 304. The processor 301 may call logic instructions in the memory 303 to perform a method of controlling a shared device, the method comprising: acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment; dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift; the first time period of each target production line is mapped to the time sequence of the target shift in parallel, and the position information of the first time period of each target production line in the time sequence is obtained; and coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result.
In addition, the logic instructions in the memory 303 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, a computer is capable of executing the method for controlling a sharing device provided by the above methods, the method including: acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment; dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift; the first time period of each target production line is mapped to the time sequence of the target shift in parallel, and the position information of the first time period of each target production line in the time sequence is obtained; and coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of controlling a shared device provided by the above methods, the method comprising: acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment; dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift; the first time period of each target production line is mapped to the time sequence of the target shift in parallel, and the position information of the first time period of each target production line in the time sequence is obtained; and coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for controlling a shared device, comprising:
acquiring a plurality of target production lines sharing shared equipment in a target shift, and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment;
dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift;
the first time period of each target production line is mapped to the time sequence of the target shift in parallel, and the position information of the first time period of each target production line in the time sequence is obtained; the position information corresponding to each target production line is used for representing the starting and ending time of each target production line for using the shared equipment;
and coding the time sequence according to the position information, and controlling the sharing equipment according to a coding result.
2. The method according to claim 1, wherein the dividing the target shift into a plurality of second time periods to obtain the time sequence of the target shift comprises:
acquiring the starting time and the ending time of the target shift;
acquiring the total duration of the target shift according to the starting time and the ending time;
dividing the total time length of the target shift by a preset unit time length and rounding upwards to obtain the total time segment number of the target shift;
and dividing the target shift into a plurality of second time periods according to the total time period number to obtain a time sequence of the target shift.
3. The method of claim 1, wherein the mapping the first time period of each target production line into the time series of the target shift in parallel comprises:
in the time sequence, acquiring a second time period matched with the first time period of each target production line;
and mapping the first time period of each target production line to a second time period matched with the first time period of each target production line in parallel.
4. The method according to claim 3, wherein the obtaining a second time period matching the first time period of each target production line in the time series includes:
mapping the starting time of the first time period of each target production line according to the starting time of the first time period of each target production line, the starting time of the target shift and a preset unit time length to obtain a mapping result of the starting time of the first time period of each target production line;
mapping the end time of the first time period of each target production line according to the end time of the first time period of each target production line, the start time of the target shift and the preset unit time length to obtain a mapping result of the end time of the first time period of each target production line;
and acquiring a second time period matched with the first time period of each target production line in the time sequence according to the mapping result of the starting time and the mapping result of the ending time of the first time period of each target production line.
5. The method according to any one of claims 1 to 4, wherein the encoding the time series according to the position information includes:
determining a position sequence occupied by a first time period of each target production line in the time sequence according to the position information;
coding a position sequence occupied by a first time period of each target production line in the time sequence into a first preset value;
and coding a position sequence which is not occupied by the first time period of any target production line in the time sequence into a second preset value.
6. The method for controlling the sharing device according to any one of claims 1 to 4, wherein the controlling the sharing device according to the encoding result includes;
acquiring a control instruction corresponding to each coding value in the coding result;
and sequentially traversing the control instruction corresponding to each code value in the coding result, and sending the control instruction corresponding to each code value to the sharing device in the time period to which each code value belongs, so that the sharing device executes the action to which the control instruction corresponding to each code value belongs until the control instructions corresponding to all code values in the coding result are sent completely.
7. The method according to claim 6, wherein the obtaining the control instruction corresponding to each encoded value in the encoded result comprises:
for each coded value in the coding result, performing the following operations:
under the condition that the current coding value in the coding result is consistent with the previous coding value, generating a first control instruction; the first control instruction is used for controlling the sharing device to continue executing the control instruction corresponding to the previous coding value;
under the condition that the current code is inconsistent with the previous code value, generating a second control instruction; the second control instruction is used for controlling the shared device to switch states; the state switching comprises switching from a power-off state to a power-on state or switching from the power-on state to the power-off state.
8. A control apparatus for a shared device, comprising:
the acquisition module is used for acquiring a plurality of target production lines sharing the shared equipment in a target shift and acquiring the demand information of each target production line; the demand information comprises a first time period for using the sharing equipment;
the dividing module is used for dividing the target shift into a plurality of second time periods to obtain a time sequence of the target shift;
the mapping module is used for mapping the first time period of each target production line to the time sequence of the target shift in parallel to obtain the position information of the first time period of each target production line in the time sequence; the position information corresponding to each target production line is used for representing the starting and ending time of each target production line for using the shared equipment;
and the control module is used for coding the time sequence according to the position information and controlling the sharing equipment according to a coding result.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the control method of the sharing device according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing a control method of a sharing device according to any one of claims 1 to 7.
CN202210496089.XA 2022-05-09 2022-05-09 Control method and device of shared equipment, electronic equipment and storage medium Active CN114612015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210496089.XA CN114612015B (en) 2022-05-09 2022-05-09 Control method and device of shared equipment, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210496089.XA CN114612015B (en) 2022-05-09 2022-05-09 Control method and device of shared equipment, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114612015A true CN114612015A (en) 2022-06-10
CN114612015B CN114612015B (en) 2022-08-02

Family

ID=81869485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210496089.XA Active CN114612015B (en) 2022-05-09 2022-05-09 Control method and device of shared equipment, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114612015B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018000709A1 (en) * 2016-06-30 2018-01-04 童晓冲 Time information coding method, coding value retrieval method, and decoding method and device
CN110264292A (en) * 2018-03-12 2019-09-20 杭州海康威视系统技术有限公司 Determine the method, apparatus and storage medium of effective period of time
CN111596963A (en) * 2020-04-16 2020-08-28 广州博依特智能信息科技有限公司 Equipment starting time merging method and device and storage medium
CN112001762A (en) * 2020-09-01 2020-11-27 珠海格力电器股份有限公司 Shared electrical appliance, control method thereof and computer readable storage medium
CN112561106A (en) * 2020-12-22 2021-03-26 珠海格力电器股份有限公司 Control method and device of shared equipment, electronic equipment and storage medium
WO2021098121A1 (en) * 2019-11-22 2021-05-27 北京百度网讯科技有限公司 Shared encoder generation method and apparatus, and electronic device
WO2022017052A1 (en) * 2020-07-24 2022-01-27 青岛海尔空调器有限总公司 Method and apparatus for shared device instruction control and device
CN114331622A (en) * 2021-12-29 2022-04-12 珠海格力电器股份有限公司 Control method and device of sharing equipment and sharing service platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018000709A1 (en) * 2016-06-30 2018-01-04 童晓冲 Time information coding method, coding value retrieval method, and decoding method and device
CN110264292A (en) * 2018-03-12 2019-09-20 杭州海康威视系统技术有限公司 Determine the method, apparatus and storage medium of effective period of time
WO2021098121A1 (en) * 2019-11-22 2021-05-27 北京百度网讯科技有限公司 Shared encoder generation method and apparatus, and electronic device
CN111596963A (en) * 2020-04-16 2020-08-28 广州博依特智能信息科技有限公司 Equipment starting time merging method and device and storage medium
WO2022017052A1 (en) * 2020-07-24 2022-01-27 青岛海尔空调器有限总公司 Method and apparatus for shared device instruction control and device
CN112001762A (en) * 2020-09-01 2020-11-27 珠海格力电器股份有限公司 Shared electrical appliance, control method thereof and computer readable storage medium
CN112561106A (en) * 2020-12-22 2021-03-26 珠海格力电器股份有限公司 Control method and device of shared equipment, electronic equipment and storage medium
CN114331622A (en) * 2021-12-29 2022-04-12 珠海格力电器股份有限公司 Control method and device of sharing equipment and sharing service platform

Also Published As

Publication number Publication date
CN114612015B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
Zheng et al. A cooperative coevolution algorithm for multi-objective fuzzy distributed hybrid flow shop
US11894680B2 (en) Integrated solution techniques for security constrained unit commitment problem
Meng et al. A distributed permutation flowshop scheduling problem with the customer order constraint
Morales-España et al. Tight and compact MILP formulation for the thermal unit commitment problem
Shiina et al. Stochastic unit commitment problem
Yin et al. Rescheduling on identical parallel machines with machine disruptions to minimize total completion time
WO2017120564A1 (en) Method and system for analyzing and predicting bidding of electric power generation
EP3751496A1 (en) Method and system for building reinforcement learning (rl) based model for generating bids
CN110162387A (en) Thread scheduling method, device, computer equipment and computer readable storage medium
CN114709880B (en) Control method and system of unit in target power grid, storage medium and processor
CN108415740A (en) A kind of workflow schedule method applied to data analysis task
CN111158680A (en) Page construction method, device, equipment and storage medium
CN114612015B (en) Control method and device of shared equipment, electronic equipment and storage medium
CN114756706A (en) Resource synthesis method, device, equipment and storage medium
CN117332541B (en) Method, device, equipment and medium for temporal management of power grid data based on graph calculation
Motto et al. Coordination in markets with nonconvexities as a mathematical program with equilibrium constraints-Part I: a solution procedure
WO2007020391A1 (en) Electronic circuit design
KR102485542B1 (en) Learning device, learning method, learning data generating device, learning data generating method, inference device, and reasoning method
CN109784484A (en) Neural network accelerated method, device, neural network accelerate chip and storage medium
Vardanyan et al. Hydropower bidding strategies to day-ahead and real-time markets: different approaches
CN109397287B (en) Robot encoding method and device, robot, storage medium and processor
CN116540546A (en) Recommendation method, system, equipment and medium for control parameters of process control system
CN115496373A (en) Task allocation method and device applied to agile management platform
CA2962139A1 (en) Parallel solution generation
Hassani et al. Minimizing the operational costs in a flexible flow shop scheduling problem with unrelated parallel machines

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