Efficient and sufficient discrete mixed shearing method and system, electronic equipment and medium
By adopting efficient and sufficient discrete mixed-cutting methods in short video production, the video content is automatically processed, and the problem of low manual operation efficiency is solved, and high-quality and efficient short video production is achieved.
Patent Information
- Application Number
- CN202510313154.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-05-30
AI Technical Summary
The short video production process relies on manual operations, which is low efficiency and high repetition rate, making it difficult to meet the needs of large-scale production.
An efficient and sufficient discrete mixed shearing method is adopted to achieve automated reorganization of video content by building pits, putting materials, setting starting lines and step lengths, and using intelligent algorithms to generate combination solutions.
The short video production process is simplified, the video output and quality are improved, and automated processing is realized, which significantly reduces the cost of manual editing.
Smart Images

Figure CN120075540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video creation, and in particular to an efficient and sufficient discrete mixing and editing method, system, electronic device and medium. Background Art
[0002] With the booming development of the short video industry, more and more enterprises and individuals use matrix marketing as the core promotion channel for products and IPs. In this trend, the quantity and quality of short videos have become bottlenecks. Currently, the main links in the production process of short videos, such as the arrangement and combination of materials, the matching of subtitles and background music, still rely on manual operations, which not only has poor efficiency but also easily causes problems such as high repetition rate and low utilization rate.
[0003] Therefore, it is necessary to develop an innovative short video batch mixing and editing method, system, and system, aiming to optimize the production process and achieve automated processing through intelligent algorithms and synthesis technologies, so as to produce short videos in large quantities, quickly, and with high quality, and significantly improve the quality and efficiency. Summary of the Invention
[0004] In view of the content creation bottleneck in the above-mentioned large-scale short video production scenario, the present invention proposes an efficient and sufficient discrete mixing and editing method, system, electronic device and medium. Through the innovative design of short video batch processing, it realizes the efficient and automated reorganization of video content, thereby simplifying the production process of short videos and improving the quantity and quality of short video production.
[0005] The technical solution of the present invention is as follows:
[0006] An efficient and sufficient discrete mixing and editing method includes the following steps:
[0007] Step1: Construction of slots and placement of materials: According to the number of materials, a certain number of slots are constructed. Each slot includes several material spaces. The classified materials are placed into the slots, and the materials are marked according to the slots and material spaces where they are located.
[0008] Step2: Setting the starting line and step size: A line connecting the starting positions of each slot is defined as the starting line, and the amplitude of each displacement of the starting line is defined as the step size. The initial position and step size of the starting line are set.
[0009] Step3: Generating the combination scheme of the initial starting line: The combination scheme corresponding to the initial position of the starting line is defined as the 1st combination, and the combination scheme corresponding to the starting line shifted down by 1 step size is defined as the 2nd combination, and so on. More combination schemes are continuously generated until the newly generated combination scheme repeats with one of the existing combination schemes, and then enter the next step;
[0010] Step 4: Transform the starting line and generate combination schemes: 1) Remove duplicates and determine if the starting line is exhausted: When the generated combination scheme duplicates an already generated one, it is determined that the starting line has been exhausted;
[0011] 2) Increment the position and transform the starting line: When a starting line is exhausted, the starting line is transformed by incrementing the position;
[0012] 3) Generate combination schemes for the transformed starting line: In the same way as in Step 3, generate combination schemes for the transformed starting line;
[0013] 4) Loop calculation: Loop through steps 1) to 3) until the last starting line is exhausted;
[0014] Step 5: Stop the calculation, save and output the combination scheme.
[0015] Preferably, in Step 1, the number of pits is N, each pit includes M material spaces, p materials are placed in each pit, N, M, and p are all positive integers, p ≤ M. Denote the first material placed in the first pit as A1, the second material placed in the first pit as A2,..., the p-th material placed in the first pit as Ap. Denote the first material placed in the second pit as B1, the second material placed in the second pit as B2,..., the p-th material placed in the second pit as Bp. Denote the p-th material placed in the N-th pit as Np, and so on, to mark all the materials in each pit.
[0016] Preferably, in Step 1, corresponding to the number of material spaces M in each pit, when the number of materials p to be placed in at least one pit is greater than M, then screen the materials in that pit so that the condition p ≤ M is satisfied, or increase the number of material spaces in the pit so that p is not greater than the increased number of material spaces.
[0017] Preferably, in Step 2, the starting line starts from the starting position of each pit, and the step size of each displacement of each starting line is set to be equal, increasing, or decreasing, and the step size is only based on the materials already placed, with the step size range being 1 - 3, or the step sizes of different pits in each starting line are different each time, and in each displacement of each starting line, at least one pit has a displacement with a step size of 1 - 3.
[0018] Preferably, in the step Step4, for the upshift, based on the initial starting line, starting from the first pit, it moves 1 position at a step length of 1 once while the other pits remain unchanged, then the second pit moves 1 position at a step length of 1 once while the other pits remain unchanged, until the last pit moves 1 position at a step length of 1 once while the other pits remain unchanged to establish a new starting line. Then, based on the initial starting line, the first pit moves 2 positions at a step length of 1 once while the other pits remain unchanged, the second pit moves 2 positions at a step length of 1 once while the other pits remain unchanged, until the last pit moves 2 positions at a step length of 1 once while the other pits remain unchanged to establish a new starting line. In this process, when any pit has moved and covered all the materials, that pit stops moving. When there are materials not covered in at least 1 pit, that pit continues to move 1 more position at a step length of 1, and this continues according to the same rule until, based on the initial starting line, the upshift stops when all the materials in the last pit among the pits with the largest number of materials are covered;
[0019] Or: For the upshift, based on the initial starting line, starting from the first pit, it moves at a step length of 1 until all the materials are covered while the other pits remain unchanged, then the second pit moves at a step length of 1 until all the materials are covered while the other pits remain unchanged, and this continues according to the same rule until all the materials in the last pit are covered and then it stops;
[0020] Or: For the upshift, based on the initial starting line, the way of synchronously moving two or more pits at a step length of 1 is set as the new starting line, and in this process, it stops when each pit reaches the maximum amount of materials it can cover based on this upshift rule.
[0021] Preferably, in the step Step4, when the number of non - repeating combination schemes reaches the maximum value, which is equal to the product of the number of materials placed in each pit, stop the calculation and go to step Step5.
[0022] Preferably, in the step Step4, when the number of non - repeating combination schemes reaches the set value S, stop the calculation, record the position of the current starting line and the generated non - repeating combination schemes, and after pausing or when a round of calculation stops, support the processing method of resuming from the breakpoint.
[0023] Furthermore, the present invention provides an efficient and sufficient discrete mixed - editing system, which adopts the above - mentioned discrete mixed - editing method, including:
[0024] An information input - output unit, used for information collection and processing, input and output of various parameters and instructions, and capable of realizing remote interaction;
[0025] An information storage unit, used for the normal and dynamic storage of information and data such as original materials, classified materials, combination schemes generated in each step, etc.;
[0026] A control unit for data calling, calculation processing, and instruction control, which realizes a series of operations including material classification, building pits, placing materials, generating combination plans according to the starting line position and step length, judging the repeatability of the plan, raising the starting line by transformation, system initialization, and stopping calculation;
[0027] A parameter setting and display unit for parameter setting and interface display. The parameters include the number of materials, the material classification method, the use of pits, the number of pit and material spaces, the initial position of the starting line, and the step length, and realizes the user - end display of the control interface and calculation results.
[0028] Furthermore, the present invention provides an electronic device, which includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the above - mentioned discrete mixed - editing method provided by the present invention.
[0029] Furthermore, the present invention provides a computer - readable storage medium, on which a computer program is stored. The computer program is configured to execute the above - mentioned discrete mixed - editing method provided by the present invention when running.
[0030] The characteristics of the present invention are as follows: 1. Discrete: Each combination plan has sufficient differences from its previous and next ones. Visually, they are different from each other, but essentially they are in order within chaos; 2. Sufficient: On the premise of maintaining discreteness, the number of combinations in actual production can reach the target value or the theoretical maximum; 3. Efficient: This algorithm uses very few resources, time, and execution times to achieve discreteness and sufficiency, and supports resuming from a breakpoint, which is convenient and user - friendly.
[0031] The present invention has the following beneficial effects:
[0032] 1. High efficiency and good performance: The present invention can realize the permutation and combination of materials. Each combination has sufficient differences from its previous and next combinations. Visually, they are different from each other, but essentially they are in order within chaos. The present invention can make full use of existing materials. On the premise of maintaining discreteness, the number of combinations in actual production can reach the target value or the theoretical maximum, and this method uses very few resources, time, and execution times to achieve discreteness and sufficiency, reflecting excellent performance;
[0033] 2. Comprehensive functions, low cost, and good prospects: The system utilizes logical rules such as the pits, starting lines, step lengths, duplicate removal, and rank elevation of the method to achieve the effects of material classification, shuffling, arrangement, and combination. Experiments have shown that in scenarios with a large number of materials, this method and system are several times more efficient than traditional editing software, and support real-time preview, multiple selection, and breakpoint resumption functions. It has been successfully applied to scenarios such as short video matrix production and batch generation of e-commerce advertisements, significantly reducing the manual editing cost. Due to achieving low cost and high performance, the system can provide important and reliable technical support for the industrial production of digital content. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is the workflow diagram of an efficient and sufficient discrete mixing and editing method of the present invention;
[0035] Figure 2 is the unit structure diagram of an efficient and sufficient discrete mixing and editing system of the present invention;
[0036] Figure 3 is the state schematic diagram of the embodiment of the present invention without a starting line and with an initial starting line set and displaced by a step length of 1;
[0037] Figure 4 is the initial position state schematic diagram of each starting line in the embodiment of the present invention;
[0038] Figure 5 is the operation interface diagram of building pits, placing materials, and peripheral configuration in the embodiment of the present invention;
[0039] Figure 6 is the display interface diagram of the short video output after performing intelligent mixing and editing operations in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] The present invention will be further described below with reference to the drawings and embodiments:
[0041] As Figure 1 shown, an efficient and sufficient discrete mixing and editing method provided by the present invention includes the following steps:
[0042] Step1: Construction of pits and placement of materials: According to the number of materials, a certain number of pits are constructed. The materials are video materials to be edited. The materials are classified according to processing requirements. The pits are used to accommodate different types of materials and are set in sequence. Each pit includes several material spaces. The classified materials are placed into the pits, and the materials are marked according to the pit where they are located and the material space where they are located;
[0043] Step 2: Set the starting line and step size: Define a line formed by connecting the starting positions of each pit as the starting line, and define the amplitude of each displacement of the starting line as the step size, and set the initial position and step size of the starting line;
[0044] It can be understood that usually, a line connecting the first elements of each pit is defined as the initial position of the starting line, and the step size is set to 1 to achieve coverage of all materials in the pit;
[0045] Step 3: Generate a combination scheme for the initial starting line: Define the combination scheme corresponding to the initial position of the starting line as the 1st combination, and define the combination scheme corresponding to the starting line shifted down by 1 step size as the 2nd combination, and so on, continuously generate more combination schemes until the newly generated combination scheme repeats with one of the existing combination schemes, and then enter the next step;
[0046] In this process, the displacement of the starting line within each pit is carried out independently, and for each pit, when the starting line moves from the first element to the last element, moving down again will return to the first element for cyclic calculation (the same is true for the case where the step size exceeds 1), and here the element is the material placed in the material space of the pit;
[0047] Step 4: Transform the starting line and generate a combination scheme:
[0048] 1) Remove duplicates and judge whether the starting line is exhausted: Removing duplicates is to judge whether the generated combination scheme repeats with the already generated combination scheme. When there is a repetition, it is judged that the starting line has been exhausted;
[0049] 2) Ascend the position and transform the starting line: Ascending the position means displacing the previous starting line to construct a new starting line. When a starting line is exhausted, the starting line is transformed by ascending the position;
[0050] 3) Generate a combination scheme for the transformed starting line: In the same way as in Step 3, generate a combination scheme for the transformed starting line;
[0051] 4) Cyclic calculation: Cyclically perform steps 1) to 3) until the last starting line is exhausted;
[0052] Step 5: Stop the calculation, save and output the combination scheme.
[0053] Specifically, in the step Step1, the number of pits is N, each pit includes M material spaces, and p materials are placed in each pit. N, M, and p are all positive integers, and p ≤ M. For simplicity of expression, the first material placed in the first pit is denoted as A1, the second material placed in the first pit is denoted as A2,..., the p-th material placed in the first pit is denoted as Ap, the first material placed in the second pit is denoted as B1, the second material placed in the second pit is denoted as B2,..., the p-th material placed in the second pit is denoted as Bp, and the p-th material placed in the N-th pit is denoted as Np, and so on, to achieve the marking of all materials in each pit.
[0054] Specifically, in the step Step1, corresponding to the number of material spaces M in each pit, when the number of materials p to be placed in at least one pit is greater than M, then the materials in this pit are screened to satisfy the condition of p ≤ M, or the number of material spaces in the pit is increased so that p is not greater than the increased number of material spaces.
[0055] Among them, increasing the number of material spaces in the pit means: according to the number of materials that can be placed, in the initial state, the number of pits is reasonably increased to N + 1, and each pit includes M + 1 material spaces, that is, according to the size of the number of materials placed, the number of pits and the material spaces are expanded to increase the number of materials that can be processed. Since increasing the number of materials that can be processed will also affect the processing speed when increasing the processing range, therefore, it is necessary to reasonably control the number of material spaces that can be placed in each pit, or set a preprocessing program to control the number of materials to be placed in each pit so that it is less than the material spaces owned by the pit to be placed.
[0056] Specifically, in the step Step2, the starting line starts from the starting position of each pit, and the step size of each starting line's displacement each time is set to be equal, increasing, or decreasing, and the step size is only based on the materials that have been placed, and the step size range is 1 - 3, or the step sizes of different pits in each starting line's displacement are different, and at least one pit in each starting line's displacement achieves a displacement with a step size of 1 - 3.
[0057] Specifically, in the step Step4, for the upshift, based on the initial starting line, starting from the first pit, it is displaced 1 time with a step size of 1 while the other pits remain unchanged, then the second pit is displaced 1 time with a step size of 1 while the other pits remain unchanged, until the last pit is displaced 1 time with a step size of 1 while the other pits remain unchanged to establish a new starting line. Then, based on the initial starting line, the first pit is displaced 2 times with a step size of 1 while the other pits remain unchanged, the second pit is displaced 2 times with a step size of 1 while the other pits remain unchanged, until the last pit is displaced 2 times with a step size of 1 while the other pits remain unchanged to establish a new starting line. In this process, when any pit is displaced and all the materials are covered, the displacement of this pit stops. When there is at least 1 pit with uncovered materials, this pit continues to be displaced again with a step size of 1, and it continues in the same rule until, based on the initial starting line, the upshift stops when all the materials in the last pit among the pits with the largest number of materials are covered;
[0058] Or: For the upshift, based on the initial starting line, starting from the first pit, it is displaced with a step size of 1 until all the materials are covered while the other pits remain unchanged, then the second pit is displaced with a step size of 1 until all the materials are covered while the other pits remain unchanged, and it continues in the same rule until the displacement stops when all the materials in the last pit are covered;
[0059] Or: For the upshift, based on the initial starting line, the way of synchronously displacing two or more pits with a step size of 1 is set as the new starting line, and in this process, it stops when each pit reaches the maximum amount of materials it can cover based on this upshift rule.
[0060] It can be understood that the upshift rule is set as needed to improve efficiency according to the material situation, and in the case of a small processing volume, it is set manually.
[0061] Specifically, in the step Step4, when the number of non-repeating combination schemes reaches the maximum value, which is equal to the product of the number of materials placed in each pit, the calculation stops and it goes to step Step5.
[0062] Or, in the step Step4, when the number of non-repeating combination schemes reaches the set value S, the calculation stops, records the position of the current starting line and the generated non-repeating combination schemes, and supports the processing method of resuming from the breakpoint after pausing or when a round of calculation stops.
[0063] It can be understood that resuming from the breakpoint can obtain more combination schemes, or exhaust the combination schemes under the same rules, and at the same time, it also realizes the function of pausing or resuming the calculation process in the case where the process stops due to data network transmission or human factors.
[0064] Furthermore, the present invention also provides as Figure 2An efficient and sufficient discrete mixed editing system as shown, which adopts the above-mentioned discrete mixed editing method, including:
[0065] An information input / output unit, which is used for information collection and processing, input / output of various parameters and instructions, and can achieve remote interaction;
[0066] An information storage unit, which is used for the normal and dynamic storage of information and data such as original materials, classified materials, combination schemes generated in each step, etc.;
[0067] A control unit, which is used for data calling, calculation processing and instruction control, and realizes a series of operations such as material classification, building slots, placing materials, generating combination schemes according to the starting line position and step length, judging the repeatability of the scheme, raising the starting line for transformation, system initialization and stopping calculation;
[0068] A parameter setting and display unit, which is used for parameter setting and interface display. The parameters include the number of materials, the material classification method, the use of slots, the number of slot and material spaces, the initial position and step length of the starting line, and realizes the user-side display of the control interface and calculation results.
[0069] Furthermore, for the above-mentioned discrete mixed editing method provided by the present invention, each step can be executed in a computer system such as a set of computer-executable instructions. Therefore, the present invention provides an electronic device, which includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the discrete mixed editing method of the above-mentioned embodiment.
[0070] Furthermore, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program is set to execute the discrete mixed editing method of the above-mentioned embodiment when running.
[0071] Based on the above design, the system, electronic device and medium provided by the present invention can realize the batch editing and production of videos with less calculation, and have the advantages of convenient operation, high efficiency and good stability.
[0072] It should be noted that each unit in the system provided by the present invention can be a functional unit or a program unit, and can be implemented either by software or by hardware. For the units implemented by hardware, the above-mentioned units can be located in the same processor; or the above-mentioned units can also be located in different processors in any combined form.
[0073] Meanwhile, the method provided by the present invention can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned discrete mixed editing method provided by the present invention. Moreover, the memory, storage, database or other media in the present invention can all include non-volatile and / or volatile memories. The non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. The volatile memory can include random access memory (RAM) or an external cache memory. Although the description of the system, electronic device and medium in the present invention is relatively concise, the combination of software, hardware and internal modules for implementing the method and process of the present invention through a computer program should be understood to be within the scope described in the specification of the present invention as long as there is no contradiction.
[0074] Next, taking a specific application scenario as an example, the above technical solutions will be further explained:
[0075] A playground often needs to edit a large number of short videos introducing the playground and publish them to multiple accounts on major platforms for matrix marketing.
[0076] To realize the batch production of short videos for the playground, first, a pit template is built with 4 pits, namely:
[0077] Pit A: Shoot the overall distant view of the playground;
[0078] Pit B: Shoot the external close-up views of the playground, such as the gate, ticket office, ticket checking entrance, etc.;
[0079] Pit C: Shoot the amusement projects, such as the carousel, pirate ship, canyon rafting, etc.;
[0080] Pit D: Shoot the surrounding environment, such as the parking lot, subway station, restaurant, hotel, etc.;
[0081] Since the photographer usually takes various materials of several seconds to dozens of seconds for the playground, from these material libraries, according to the uses of each pit, the corresponding materials are selected and put under each pit. Depending on the quantity of the obtained materials, each pit can be respectively put with several or dozens of video materials.
[0082] On this basis, the efficient and sufficient discrete mixed editing method provided by the present invention includes the following steps:
[0083] Step1: Construction of pits and placement of materials:
[0084] Refer to Figure 3 , construct a total of 4 pits, namely A, B, C, and D. Place 3 - 5 materials in each pit and represent them with subscripts. That is, A1 is the first material in pit A, and B3 is the third material in pit B;
[0085] Step2: Set the starting line and step length:
[0086] Refer to Figure 3 , the starting line is a line connecting the starting positions of each pit. The step length is the amplitude of each displacement of the starting line. Select the first element of each pit and connect them into an initial starting line (A1B1C1D1), and set the step length to 1;
[0087] Step3: Generate a combination plan for the initial starting line:
[0088] The algorithm starts to run. First, multiply the current number of pits by the number of materials, and it can be calculated that there are a total of 2 * 3 * 4 * 2 = 48 combination plans;
[0089] Refer to Figure 3 , the first combination is the initial starting line itself, that is, A1B1C1D1;
[0090] The second combination is that the starting line moves down one step length, that is, A2B2C2D2;
[0091] The third combination is that the starting line moves down one more step length. Since there are only 2 elements in pit A, moving down goes back from the end of the queue (A2) to the head of the queue (A1). In the same way, pit D also goes back to D1. Finally, the third combination is A1B3C3D1;
[0092] The fourth combination is that the starting line continues to move down one step length. At this time, pit B has reached the end of the queue, so this time moving down goes back from the end of the queue (B3) to the head of the queue (B1). In the same way, finally, the fourth combination is A2B1C4D2;
[0093] The fifth combination is that the starting line continues to move down one step length. At this time, pit C has also reached the end of the queue, so this time moving down goes back from the end of the queue (C4) to the head of the queue (C1). In the same way, finally, the fifth combination is A1B2C1D1;
[0094] So far, the first 5 combinations have been generated: 1A1B1C1D1, 2A2B2C2D2, 3A1B3D3D1, 4A2B1C4D2,
[0095] 5A1B2C1D1; It can be seen that essentially, the starting line + displacement are used to concatenate various combinations.
[0096] Next, the starting line continues to be displaced to generate more combination schemes, as shown in Table 1:
[0097] Table 1 Combination schemes generated by the initial starting line
[0098] 1 A1B1C1D1 2 A2B2C2D2 3 A1B3D3D1 4 A2B1C4D2 5 A1B2C1D1 6 A2B3C2D2 7 A1B1C3D1 8 A2B2C4D2 9 A1B3C1D1 10 A2B1C2D2 11 A1B2C3D1 12 A2B3C4D2 <![CDATA 13 A1B1C1D1 >
[0099] It is found from Table 1 that when generating the 13th combination, it repeats the 1st combination. This enters the next stage: duplicate removal, position increment, and starting line transformation.
[0100] Step4: Duplicate removal, position increment, and starting line transformation to generate combination schemes:
[0101] See Figure 4 , based on the set duplicate removal rules, when it is found that the 13th combination (A1B1C1D1) repeats a previously generated combination, it means that this starting line has been exhausted and needs to be replaced.
[0102] First, consider the 13th combination (A1B1C1D1) as invalid and discard it. To generate more combination schemes, the starting line needs to be transformed. By incrementing the position, the starting position in each pit is changed one by one and then connected into a line to form a new starting line.
[0103] Specifically, based on the initial starting line (A1B1C1D1), the starting position of pit A is incremented by 1 to become A2. Then the new starting line 2 becomes A2B1C1D1, and then step3 is executed again until a repeat occurs.
[0104] With the actual starting line 2, 12 new combination schemes can be generated, as shown in Table 2:
[0105] Table 2 Combination schemes generated by starting line 2
[0106] 13 A2B1C1D1 14 A1B2C2D2 15 A2B3C3D1 16 A1B1C4D2 17 A2B2C1D1 18 A1B3C2D2 19 A2B1C3D1 20 A1B2C4D2 21 A2B3C1D1 22 A1B1C2D2 23 A2B2C3D1 24 A1B3C4D2 <![CDATA 25 A2B1C1D1 >
[0107] It is found from Table 2 that the 25th combination (A2B1C1D1) appears as a repeat again.
[0108] Then, duplicate removal, position increment, and starting line transformation are performed again.
[0109] Based on the initial starting line (A1B1C1D1), the starting position of pit B is incremented by 1 to become B2. Then the new starting line 3 becomes A1B2C1D1. Then step3 is executed again until a repeat occurs.
[0110] At the practical starting line 3, a new combination plan is generated. The first plan is shown in Table 3:
[0111] Table 3 Combination plan generated by starting line 3
[0112] <![CDATA 25 A1B2C1D1 >
[0113] It is found from Table 3 that the first plan (A1B2C1D1) it generated is repeated with the previously generated plan. Therefore, starting line 3 ends immediately.
[0114] According to the rules, as long as there is a repetition, duplicate removal, position increment, and starting line transformation are performed. Therefore, the starting line is continued to be transformed.
[0115] Based on the initial starting line (A1B1C1D1), the starting position of pit C is incremented by 1 to become C2. Then the new starting line 4 becomes A1B1C2D1. Then step 3 is executed again until a repetition appears again.
[0116] At the practical starting line 4, 12 new combination plans can be generated, which are shown in Table 4:
[0117] Table 4 Combination plan generated by starting line 4
[0118]
[0119]
[0120] It is found from Table 4 that when the 37th combination (A1B1C2D1) is generated, a repetition appears again.
[0121] Then duplicate removal, position increment, and starting line transformation are performed again.
[0122] Based on the initial starting line (A1B1C1D1), the starting position of pit D is incremented by 1 to become D2. Then the new starting line 5 becomes A1B1C1D2. Then step 3 is executed again until a repetition appears again.
[0123] At the practical starting line 5, 12 new combination plans can be generated, which are shown in Table 5:
[0124] Table 5 Combination plan generated by starting line 5
[0125] 37 A1B1C1D2 38 A2B2C2D1 39 A1B3C3D2 40 A2B1C4D1 41 A1B2C1D2 42 A2B3C2D1 43 A1B1C3D2 44 A2B2C4D1 45 A1B3C1D2 46 A2B1C2D1 47 A1B2C3D2 48 A2B3C4D1 <![CDATA 49 A1B1C1D2 >
[0126] It is found from Table 5 that when the 49th combination plan is generated, a repetition appears again and starting line 5 is exhausted.
[0127] At the same time, 48 combinations have been generated, reaching the maximum value, and there is no need to transform the starting line. Therefore, the algorithm execution ends here.
[0128] Step 5: Stop the calculation, save and output the combination scheme:
[0129] List all the combination schemes as shown in Table 6:
[0130] Table 6 All valid combination schemes generated after stopping the calculation
[0131]
[0132]
[0133] It can be seen from Table 6 that there are 48 non-repeating combination schemes, which are the same as the maximum value of the combination schemes obtained by multiplying the number of materials placed in each pit.
[0134] During the entire operation of this embodiment, a total of 5 starting lines were used, 53 generation actions were executed, and 53 combination schemes were generated. Among them, 5 were invalidated due to repetition, leaving 48 valid combination schemes, which is also the theoretical maximum value. Each scheme has a large difference from its previous and next ones, seemingly chaotic but actually orderly, thus verifying the advantages of high efficiency, sufficiency, and discreteness of this method.
[0135] In this embodiment, the transformation of the starting line uses the logic of incrementing each pit by 1 bit in this case. If more complex situations such as more pits, more materials, or the same number of materials in each pit are encountered, it can be solved by strengthening the transformation logic of the starting line. For example, the starting line is first transformed by incrementing each pit by 1 bit. After all pits have been incremented by 1 bit, the pits can be incremented by 2 bits, or even n bits (n ≤ the maximum number of materials p) one by one. Or, the starting line can be incremented by n pits at a time (n ≤ the number of pits / 2), such as incrementing 2 pits at a time. First, pits A and B are incremented together, then pits B and C are incremented together, and then pits C and D are incremented together, and so on. Therefore, the transformation logic of the starting line can be designed separately according to needs.
[0136] Furthermore, if not all schemes are needed, but only 20 combination schemes, the method can end by itself after generating the 20th one. At the same time, by recording the current starting line and the 20th combination scheme, it can directly start from the 21st one next time and then generate the remaining 28 combination schemes, thus realizing the function of resuming from a breakpoint, and the whole process is lossless.
[0137] In summary, the core steps of this mixed editing method include: building pits, placing materials, setting the initial starting line and step size, executing the set algorithm, transforming the starting line and generating combination schemes, continuously transforming the starting line, and obtaining all non-repeating combination schemes with the target quantity. Based on this, a discrete mixed editing system applicable to the scenario of the embodiment is developed, and the system is configured with software and hardware based on the processing steps of this method. As Figure 5, Figure 6 As shown, by setting up positions, placing materials, and performing peripheral configurations on the operation interface, intelligent mixed editing operations of short videos can be achieved, with more than 50 short videos output in one batch, thus realizing the intelligent processing of short videos, featuring high speed, less computational volume, comprehensive editing, and high efficiency.
[0138] It should be clear that the above-mentioned embodiments provided by the present invention are only preferred embodiments of the present invention and are not used to limit the protection scope of the present invention. Equivalent transformations made on the basis of the above embodiments all fall within the protection scope of the present invention.
Claims
1. An efficient and sufficient discrete mixed shearing method, characterized in that: The following steps are involved: Step 1: Build slots and place materials: Build a certain number of slots according to the number of materials. Each slot includes several material spaces. Place the classified materials into the slots and mark the materials according to their slots and material spaces. Step 2: Set the starting line and stride length: define the line connecting the starting positions of each pit as the starting line, define the amplitude of each displacement of the starting line as the stride length, and set the initial position and stride length of the starting line; Step 3: Generate a combination scheme for the initial starting line: define the combination scheme corresponding to the initial position of the starting line as the first combination, define the combination scheme corresponding to moving the starting line down by one step as the second combination, and so on, continue to generate more combination schemes until the newly generated combination scheme overlaps with an existing combination scheme, and then proceed to the next step; Step 4: Change the starting line and generate combination schemes: 1) Remove duplicates and judge that the starting line is exhausted: When the generated combination scheme is repeated with the generated combination scheme, it is judged that the starting line has been exhausted; 2) Raising the position and changing the starting line: When one starting line is exhausted, the starting line can be changed by raising the position; 3) Generate a combination scheme of the starting line after transformation: Generate a combination scheme of the starting line after transformation in the same manner as step 3; 4) Loop calculation: loop through steps 1) to 3) until the last starting line is used up; Step 5: Stop calculation, save and output the combination solution.
2. The highly efficient and sufficient discrete mixed shearing method according to claim 1, characterized in that: In the step Step1, the number of slots is N, each slot includes M material spaces, p materials are placed in each slot, N, M, and p are all positive integers, p≤M, the first material placed in the first slot is represented as A1, the second material placed in the first slot is represented as A2, ..., the Pth material placed in the first slot is represented as Ap, the first material placed in the second slot is represented as B1, the second material placed in the second slot is represented as B2, ..., the Pth material placed in the second slot is represented as Bp, the Pth material placed in the Nth slot is represented as Np, and so on, to achieve marking of all materials in each slot.
3. The highly efficient and sufficient discrete mixed shearing method according to claim 2, characterized in that: In the step Step 1, corresponding to the number of material spaces M for each slot, when the number p of materials to be placed in at least one slot is greater than M, the materials of the slot are screened so that the condition of p≤M is met, or the number of material spaces for the slot is increased so that p is not greater than the increased number of material spaces.
4. The highly efficient and sufficient discrete mixed shearing method according to claim 1, characterized in that: In the step Step 2, the starting line starts from the starting position of each pit, and the step length of each displacement of each starting line is equal, increasing or decreasing, and the step length is only based on the materials that have been put in, and the step length range is 1-3, or the step length of each displacement of different pits in each starting line is different, and at least one pit in each displacement of each starting line achieves a displacement with a step length of 1-3.
5. The highly efficient and sufficient discrete mixed shearing method according to claim 1, characterized in that: In the step 4, the promotion is based on the initial starting line. First, the first pit is displaced once by step 1, and other pits remain unchanged. The second pit is displaced once by step 1, and other pits remain unchanged, until the last pit is displaced once by step 1, and other pits remain unchanged to establish a new starting line. Then, based on the initial starting line, the first pit is displaced twice by step 1, and other pits remain unchanged. The second pit is displaced twice by step 1, and other pits remain unchanged, until the last pit is displaced twice by step 1, and other pits remain unchanged to establish a new starting line. In this process, when any pit is displaced and covers all materials, the pit stops displacing. When at least one pit has uncovered materials, the pit continues to displace again by step 1, and the same rule is continued until, based on the initial starting line, the last promotion stops when all materials in the last pit among the pits with the largest number of materials are covered; Or: The promotion is based on the initial starting line, first the first pit is shifted by a step length of 1 until all materials are covered, and other pits remain unchanged, then the second pit is shifted by a step length of 1 until all materials are covered, and other pits remain unchanged, and the same rule is continued until all materials in the last pit are covered; Or: the promotion is based on the initial starting line, and two or more positions are selected to be synchronously displaced in step size 1 to set as the new starting line. This process stops when each position reaches the maximum amount of material that can be covered based on the promotion rule.
6. The highly efficient and sufficient discrete mixed shearing method according to claim 1, characterized in that: In the step Step 4, when the number of non-repetitive combination schemes reaches a maximum value, which is equal to the product of the number of materials placed in each pit, the calculation is stopped and the process goes to Step 5.
7. The highly efficient and sufficient discrete mixed shearing method according to claim 1, characterized in that: In the step Step 4, when the number of non-repetitive combination schemes reaches the set value S, the calculation is stopped, the position of the current starting line and the generated non-repetitive combination schemes are recorded, and after a pause or a round of calculation is stopped, a breakpoint resumption processing method is supported.
8. An efficient and sufficient discrete mixed shear system, using the discrete mixed shear method as claimed in claim 1, characterized in that: include: Information input and output unit, used for information collection and processing, input and output of various parameters and instructions, and capable of realizing remote interaction; Information storage unit, used for normal and dynamic storage of information and data such as original materials, classified materials, and combination schemes generated in each step; The control unit is used for data calling, calculation processing and command control, and realizes a series of operations such as material classification, pit setting, material placement, generating combination schemes according to the starting line position and step length, scheme repeatability judgment, upgrading and changing the starting line, system initialization and stopping calculation; The parameter setting and display unit is used for parameter setting and interface display. The parameters include the number of materials, material classification method, pit usage, number of pits and material space, starting line initial position and step length, to realize the user-side display of the control interface and calculation results.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the discrete mixing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is configured to execute the discrete mixing method according to any one of claims 1 to 7 when executed.