CN118012526A - Server-based loading method, device, computer equipment and storage medium - Google Patents

Server-based loading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN118012526A
CN118012526A CN202410023673.2A CN202410023673A CN118012526A CN 118012526 A CN118012526 A CN 118012526A CN 202410023673 A CN202410023673 A CN 202410023673A CN 118012526 A CN118012526 A CN 118012526A
Authority
CN
China
Prior art keywords
module
control module
loading
switching
main control
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.)
Pending
Application number
CN202410023673.2A
Other languages
Chinese (zh)
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202410023673.2A priority Critical patent/CN118012526A/en
Publication of CN118012526A publication Critical patent/CN118012526A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application relates to a loading method, a loading device, computer equipment and a storage medium based on a server, wherein the method comprises the following steps: judging whether the module type and the module number of the second control module to be loaded meet the switching condition or not in the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number; if the switching condition is not met, maintaining the first execution strategy to execute the loading task; if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task; and executing a second loading task through a second execution strategy. According to the application, the problem that the loading efficiency is restricted under the condition that the processing performance of the main control module is limited in the related technology, so that the overall performance of the server is affected is solved, the utilization of the processing performance of the second control module is realized, the loading efficiency is improved, and the overall performance of the server is further improved.

Description

Server-based loading method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a server-based loading method, a server-based loading device, a computer device, and a storage medium.
Background
The server provides computing or application services to other clients in the network (e.g., terminals such as PCs, smartphones, ATM, and even large devices such as train systems). The intelligent server is used as one of the servers and comprises a main control module, an expansion module and a slave control module; the main control module is connected with the slave control module through the expansion module. When the server is started, starting resources are required to be loaded into the slave control module through the expansion module under the control of the master control module, so that the starting is completed.
At present, a serial loading mode is adopted to finish the starting of a server, specifically: setting the priority of the slave control module; and loading the starting resources into the slave control modules one by one according to the set priority, thereby completing starting. The disadvantage of this approach is that: the loading efficiency is limited by the performance of the main control module itself; under the condition that the performance of the main control module is limited, the loading efficiency is limited, and the overall performance of the server is further affected.
Under the condition that the processing performance of the main control module is limited in the related technology, the loading efficiency is restricted, so that the overall performance of the server is affected, and no effective solution is proposed at present.
Disclosure of Invention
In this embodiment, a server-based loading method, device, computer equipment and storage medium are provided, so as to solve the problem that in the related art, under the condition that the performance of a main control module is limited, the loading efficiency is limited, and thus the overall performance of the server is affected.
In a first aspect, in this embodiment, a server-based loading method is provided, where the server includes a first control module, a switching module, an expansion module, and a second control module; the first control module is connected with the switching module; the switching module is respectively connected with the expansion module and at least one second control module; the expansion module is connected with the second control module; the method comprises the following steps:
Judging whether the module type and the module number of the second control module to be loaded meet a switching condition or not in the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
If the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution policy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
If the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining the first execution strategy to execute the first loading task; executing the second loading task through a second execution strategy; the second execution policy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and the expansion module through the switching module.
In some of these embodiments, maintaining the first execution policy to execute the load task includes:
and loading the resource file in the first main control center into a corresponding second control module based on the first link.
In some of these embodiments, executing the second loading task via a second execution policy includes:
Loading a resource file corresponding to the second loading task to the second main control center through the switching module;
And loading the resource files in the second main control center into corresponding second control modules based on the second links.
In some embodiments, one of the second control modules is used as a second main control center, and the method comprises the following steps:
Selecting the appointed second control module as a second main control center;
Or, screening the corresponding second control module as a second main control center by taking the processing performance as a screening condition.
In some of these embodiments, the method further comprises:
In the process of executing the second loading task through a second execution strategy, judging whether the processing performance of the second main control center is smaller than a preset processing performance threshold value or not, and judging whether the processing performance of the first control module is larger than the processing performance of the second main control center or not;
And if the processing performance of the second main control center is smaller than a preset processing performance threshold and the processing performance of the first control module is larger than the processing performance of the second main control center, executing the first loading task and the second loading task according to the first execution strategy.
In some of these embodiments, the method further comprises:
after the process of executing the loading task through the second execution strategy is completed, the first control module is used as a first main control center to wait for the loading task.
In some of these embodiments, the switching condition further comprises a processing performance overload of the first control module;
Judging whether the module type and the module number of the second control module to be loaded meet the switching conditions or not, including:
When the requirements are met at the same time, the types of the modules of the second control module to be loaded are the same, the number of the modules of the second control module to be loaded is smaller than the preset number, and when the processing performance of the first control module is overloaded, the switching conditions are met;
When the module types of the second control module to be loaded are different, the number of the modules of the second control module to be loaded is larger than or equal to the preset number, and one or more of the processing performances of the first control module are not overloaded, the switching condition is not met.
In a second aspect, in this embodiment, a server-based loading device is provided, where the server includes a first control module, a switching module, an expansion module, and a second control module; the first control module is connected with the switching module; the switching module is respectively connected with the expansion module and at least one second control module; the expansion module is connected with the second control module; the device comprises: the device comprises a judging unit, a first processing unit and a second processing unit;
the judging unit is used for judging whether the module type and the module number of the second control module to be loaded meet the switching condition in the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
The first processing unit is used for keeping the first execution strategy to execute the loading task if the switching condition is not met; the first execution policy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
The second processing unit is used for dividing the loading task into a first loading task and a second loading task if the switching condition is met; maintaining the first execution strategy to execute the first loading task; executing the second loading task through a second execution strategy; the second execution policy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and the expansion module through the switching module.
In a third aspect, in this embodiment, a server is provided, where the server includes a first control module, a switching module, an expansion module, and a second control module;
The first control module is connected with the switching module and is used for judging whether the module type and the module number of the second control module to be loaded meet the switching conditions or not; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number; if the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution policy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module; if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining the first execution strategy to execute the first loading task;
The switching module is respectively connected with the expansion module and at least one second control module and is used for switching links;
The second control module is connected with the expansion module and is used for executing the second loading task through a second execution strategy if the switching condition is met; the second execution policy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and the expansion module through the switching module.
In a fourth aspect, in this embodiment, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the server-based loading method described in the first aspect above.
Compared with the related art, the server-based loading method, the server-based loading device, the computer equipment and the storage medium provided in the embodiment judge whether the module type and the module number of the second control module to be loaded meet the switching condition or not through the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number; if the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution strategy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module; if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; the second execution strategy is: one of the second control modules is a second main control center; the link is the second link that makes second main control center connection corresponding second control module and expansion module through the switching module, and the second link that forms has solved in the correlation technique under the condition that there is main control module's processing ability limited, and loading efficiency receives the restriction, and then influences the problem of server wholeness ability, combines the switching condition through the switching of switching module, has realized the utilization of the processing ability of second control module, improves loading efficiency, and then promotes the server wholeness ability.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a block diagram of a server according to an embodiment of the present application;
FIG. 2 is a block diagram of a server according to a preferred embodiment of the present application;
FIG. 3 is a flow chart of a server-based loading method according to an embodiment of the present application;
fig. 4 is a flowchart of step S320 in fig. 2;
FIG. 5 is a block diagram of a server according to another embodiment of the present application;
FIG. 6 is a block diagram of a server according to still another embodiment of the present application;
FIG. 7 is a flow chart of a server-based loading method according to a preferred embodiment of the present application;
fig. 8 is a block diagram of a server-based loading device according to an embodiment of the present application.
In the figure: 10. a first control module; 20. a switching module; 30. an expansion module; 40. a second control module; 210. a judging unit; 220. a first processing unit; 230. and a second processing unit.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples for a clearer understanding of the objects, technical solutions and advantages of the present application.
Unless defined otherwise, technical or scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these" and similar terms in this application are not intended to be limiting in number, but may be singular or plural. The terms "comprising," "including," "having," and any variations thereof, as used herein, are intended to encompass non-exclusive inclusion; for example, a process, method, and system, article, or apparatus that comprises a list of steps or modules (units) is not limited to the list of steps or modules (units), but may include other steps or modules (units) not listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in this disclosure are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. Typically, the character "/" indicates that the associated object is an "or" relationship. The terms "first," "second," "third," and the like, as referred to in this disclosure, merely distinguish similar objects and do not represent a particular ordering for objects.
The method embodiments provided in the present embodiment may be performed in a server. Fig. 1 is a block diagram of the hardware configuration of the server of the present embodiment. As shown in fig. 1, the server includes a first control module 10, a switching module 20, an expansion module 30, and a second control module 40;
The first control module 10 is connected with the switching module 20 and is used for judging whether the module type and the module number of the second control module 40 to be loaded meet the switching conditions; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number; if the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution strategy is: the first control module 10 is a first main control center; the link is a first link formed by connecting the expansion module 30 and the second control module 40 by the switching module 20 to the first main control center; if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task;
The switching module 20 is respectively connected with the expansion module 30 and the at least one second control module 40 and is used for switching links;
The second control module 40 is connected with the expansion module 30, and is configured to execute a second loading task through a second execution policy if the switching condition is satisfied; the second execution strategy is: one of the second control modules 40 is a second main control center; the link is a second link formed by connecting the second main control center to the corresponding second control module 40 and expansion module 30 through the switching module 20.
Wherein, the first control module 10 and the second control module 40 may be one processor. The processor may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like. The first control module 10 differs from the second control module 40 in terms of processing performance, and in general, the processing performance of the first control module 10 is much greater than that of the second control module 40 in the case of no load. The second control module 40 includes, but is not limited to, a codec module, an AI analysis module, an alignment module, an intelligent training module, and the like. In the server, both the type and data of these second control modules 40 can be adapted by the usage scenario. Such as: the server includes three AI analysis modules. The server comprises three encoding and decoding modules, five AI analysis modules, two comparison modules and the like. After the first control module 10 is powered on, the corresponding resource file needs to be loaded into each second control module 40, so that the starting of the whole server can be completed.
Wherein, the switching module 20 may be a switching circuit; the first link or the second link may be formed according to different execution strategies by switching the switching circuit. Typically, upon power up, the first link is based on the form of the switching module 20 by default. And the specific connection mode of the switching module 20 and the second control module 40 will be matched with the matched loading method. Such as: the switching module 20 is connected to only one second control module 40, and then the designated second control module 40 is selected as the second main control center. The second control module 40, which generally has the best processing performance, is connected to the switching module 20 to improve the performance of the server. The switching module 20 is connected to the plurality of second control modules 40, and then the corresponding second control modules 40 are screened as the second main control center by taking the processing performance as the screening condition.
The expansion module 30 may be an expansion chip that uses a high-speed signal bus for supporting expansion. The type and number of the second control modules 40 can be greatly increased as allowed by the extension module 30 to accommodate more application scenarios.
As shown in fig. 2, a block diagram of a server provided by a preferred embodiment is provided. The first control module of the server is connected with 4 expansion modules, the expansion modules 1 to 3 are respectively connected with 6 second control modules, and the expansion modules 4 are connected with 15 second control modules. The switching module, the expansion module and the second control module may form a subsystem, and execute the method embodiment in cooperation with the first control module. If there are multiple subsystems, parallel processing may be implemented. For a specific implementation of the loading method, as shown in fig. 2, reference may be made to the following loading method embodiment, which is not repeated here.
In this embodiment, a server-based loading method is provided, and fig. 3 is a flowchart of the server-based loading method in this embodiment, as shown in fig. 3, where the flowchart includes the following steps:
Step S310, judging whether the module type and the module number of the second control module to be loaded meet the switching condition or not in the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
Step S320, if the switching condition is not satisfied, keeping the first execution strategy to execute the loading task; the first execution strategy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
Step S330, if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; the second execution strategy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and expansion module through the switching module.
Specifically, when the server is powered on, the switching module defaults to connect the first control module with the second control module through the expansion module; the first control module can acquire the module type and the module number of the second control module to be loaded, so as to judge whether the module type and the module number of the second control module to be loaded meet the switching condition.
The switching condition mainly relates to the module type and the module number of the second control module to be loaded; the number of modules is required to be the same type, and the number of modules is smaller than the preset number. The preset number is related to the processing performance of the second control module; if the processing performance of the second control module is high, the preset number may be tens, or the like. If the processing performance of the second control module is not high, the preset number may be several, such as three. Here, the preset number is not limited.
These two conditions are only that one condition is not satisfied, and the switching condition is not considered to be satisfied, then the first execution policy is kept executing the loading task. The first execution strategy is a default execution strategy, and in the first execution strategy, the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module. That is, the first control module is used as the first main control center, and all loading tasks are executed according to a priority processing strategy, a parallel processing strategy or a mixed strategy (the priority processing strategy is combined with the parallel processing strategy) based on the first link.
Only if both conditions are satisfied, the handover condition is considered satisfied; dividing a loading task into a first loading task and a second loading task; specifically, the method can be considered as screening the loading task corresponding to the second control module meeting the switching condition from the original loading tasks as the second loading task; the remaining load tasks are the first load task. For the first loading task, a first execution strategy is maintained to execute the first loading task. And for the second loading task, switching from the first execution strategy to the second execution strategy, and executing the second loading task through the second execution strategy. In the second execution strategy, the second main control center is a second control module; the link is a second link formed by connecting the second control module and the expansion module which need to load a second loading task by the second main control center through the switching module. That is, the second control module is used as a second main control center, and based on the second link, the second loading task selected from the loading tasks is executed according to the priority processing strategy, the parallel processing strategy or the mixed strategy (the priority processing strategy is combined with the parallel processing strategy). The method can fully utilize the processing performance of the second control module, improves the loading efficiency, and further improves the overall performance of the server.
It should be noted that, in each process of executing the loading task, if the switching condition is not satisfied, only one main control center is provided, and the main control center is the first main control center; if the switching condition is satisfied, two main control centers are provided, namely a first main control center and a second main control center, and the two main control centers execute corresponding loading tasks.
Through the steps, in the first control module, judging whether the module type and the module number of the second control module to be loaded meet the switching condition or not; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number; if the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution strategy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module; if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; the second execution strategy is: one of the second control modules is a second main control center; the link is the second link that makes second main control center connection corresponding second control module and expansion module through the switching module, and the second link that forms has solved in the correlation technique under the condition that there is main control module's processing ability limited, and loading efficiency receives the restriction, and then influences the problem of server wholeness ability, combines the switching condition through the switching of switching module, has realized the utilization of the processing ability of second control module, improves loading efficiency, and then promotes the server wholeness ability.
In some of these embodiments, as shown in fig. 4, the holding the first execution policy in step S320 performs a loading task, including the steps of:
step S321, based on the first link, loads the resource file in the first main control center into the corresponding second control module.
Specifically, the first execution policy is a default execution policy; after the server is electrified, the first control module serves as a first main control center, and the first main control center stores resource files; the switching module defaults to connect the first control module with the second control module and the expansion module to form a first link. If the module type and the module number of the second control module to be loaded are judged not to meet the switching condition, the first execution strategy is kept to execute the loading task. And the first control module is considered to be used as a first main control center, the switching module does not need to switch, and the resource file is loaded into the corresponding second control module according to the default first link.
According to the embodiment, the resource file is loaded into the corresponding second control module based on the first main control center and the first link, so that the starting of the server is smoothly realized.
Furthermore, the first main control center can execute the loading task according to the priority processing strategy, the parallel processing strategy or the mixed strategy (combining the priority processing strategy with the parallel processing strategy), so that the starting efficiency is further improved.
In some of these embodiments, the performing the second loading task by the second execution policy in step S320 includes the steps of:
step S322, loading the resource file corresponding to the second loading task to the second main control center through the switching module;
step S323, based on the second link, loads the resource file in the second main control center into the corresponding second control module.
Specifically, the second loading task is executed by a second execution policy, which corresponds to the resource file. It may be considered that if it is determined that the module type and the number of modules of the second control module to be loaded satisfy the switching condition, the second loading task that is originally executed by the first execution policy is switched to the second execution policy execution, and the first loading task continues to maintain the first execution policy execution. Specifically, under the coordination of the switching module, a second main control center and a second link are formed, and then the resource file corresponding to the second loading task is loaded into the cache of the second main control center, so that the processing performance of the first control module required to be allocated to the second loading task is liberated. And under the control of the second main control center, loading the resource files in the second main control center into corresponding second control modules based on the second links. The resource files include, but are not limited to, OS files, driver files, configuration files, and the like.
According to the embodiment, the resource file is loaded into the corresponding second control module based on the second main control center and the second link, so that the processing performance of the second control module is reasonably utilized, the effect of parallel processing is achieved, and the starting of the server is quickened.
Furthermore, the second main control center can execute the loading task according to the priority processing strategy, the parallel processing strategy or the mixed strategy (combining the priority processing strategy with the parallel processing strategy), so that the starting efficiency is further improved.
In some embodiments, one of the second control modules is a second master control center, comprising the steps of:
selecting a designated second control module as a second main control center;
Or, the processing performance is used as a screening condition, and a corresponding second control module is screened to be used as a second main control center.
Specifically, the second main control center is selected in a plurality of ways. Which has a certain relation with the number of second control modules connected to the switching module. The following is illustrative:
As shown in fig. 5, the switching module is connected to a second control module, where the second control module is A1 (typically, the second control module with the highest processing performance is selected); the second control module A1 may be considered to be the designated second control module, i.e. it is designated as the second main control center. The resource file corresponding to the second loading task is loaded into the second control module A1, and then loading of the corresponding second control module is completed through a loading path. The loading path of the resource file is as follows: the switching module, an uplink port of the expansion module, a downlink port of the expansion module and the rest of the second control modules. Here, a mode of selecting the designated second control module as the second main control center is adopted.
As shown in fig. 6, the switching module is connected with a plurality of second control modules (the second control modules are the second control modules A1 to X1), and all the second control modules are connected with the expansion module. Screening the corresponding second control module as a second main control center by taking the processing performance as a screening condition, for example: and if the current processing performance of the second control module B1 is highest, the second control module B1 is used as a second main control center, and the rest second control modules are used as slave controls. At this time, the resource file corresponding to the second loading task is loaded into the second control module B1, and then loading of the remaining second control modules is completed through the loading path. The loading path is: the switching module, the downlink port of the expansion module, the uplink port of the expansion module, the switching module and the rest of the second control modules. The processing performance is used as a screening condition, and a corresponding second control module is screened to be used as a second main control center.
It should be noted that, the second control module connected to the expansion module cannot be used as the second main control center, and only the second control module connected to the switching module can be used as the second main control center.
Through the embodiment, one of the second control modules is used as the second main control center in various modes, so that the connection structure of the server can be flexibly allocated, the second main control center can be adjusted, and more application scenes can be adapted.
In some of these embodiments, the server-based loading method further comprises the steps of:
in the process of executing the second loading task through the second execution strategy, judging whether the processing performance of the second main control center is smaller than a preset processing performance threshold value or not, and judging whether the processing performance of the first control module is larger than the processing performance of the second main control center or not;
And if the processing performance of the second main control center is smaller than the preset processing performance threshold and the processing performance of the first control module is larger than the processing performance of the second main control center, executing the first loading task and the second loading task according to the first execution strategy.
Specifically, the second master control center is mainly used for executing the second loading task according to the second execution strategy. The resource file corresponding to the second loading task is migrated to the second main control center, so that the processing performance of the first control module is released, and the first control module can process other loading tasks, thereby expanding the loading performance. If the second main control center is found that the processing performance of the second main control center is smaller than the preset processing performance threshold value in the process of executing the second loading task according to the second execution strategy, the second main control center is indicated that the second loading task can affect the operation of the second main control center, and meanwhile, the processing performance of the first control module is judged to be larger than the processing performance of the second main control center, the first control module has the capability of executing the second loading task, and the first loading task and the second loading task are executed according to the first execution strategy; thereby avoiding the second loading task from affecting the normal operation of the second main control center. If the processing performance of the second main control center is greater than or equal to the preset processing performance threshold, the second main control center continues to execute the second loading task according to the second execution strategy.
Through the embodiment, in the process of executing the loading task by the second execution strategy, the second loading task can be switched back to the first control center for execution, so that the second loading task is prevented from affecting the normal operation of the second main control center.
In some of these embodiments, the server-based loading method further comprises the steps of:
after the process of executing the loading task through the second execution strategy is completed, the first control module is used as a first main control center to wait for the loading task.
Specifically, after the whole process of executing the loading task through the second execution policy is completed, the server will restore to the default state, i.e. the first control module is used as the first main control center, and the link is the first link.
According to the embodiment, after the execution of the loading task is completed, the first control module is always used as the first main control center to wait for the loading task, and the first control module is used as the control module with the best processing performance, so that the image of the server operation is reduced in switching, and the stability of loading starting can be ensured.
In some of these embodiments, the switching condition further includes a processing performance overload of the first control module;
based on the switching condition, judging whether the module type and the module number of the second control module to be loaded meet the switching condition or not, and comprising the following steps:
When the two types of modules of the second control module to be loaded are the same, the number of the modules of the second control module to be loaded is smaller than the preset number, and when the processing performance of the first control module is overloaded, the switching condition is met;
when the module types of the second control modules to be loaded are different, the number of the modules of the second control modules to be loaded is larger than or equal to the preset number, and one or more of the processing performances of the first control modules are not overloaded, the switching condition is not met.
Specifically, the switching conditions may be considered to include three conditions, respectively: the module types are the same type, and the number of the modules is smaller than the preset number and the processing performance of the first control module is overloaded; the logic of the judgment can be as follows: judging whether the module type of the second control module to be loaded meets the switching condition that the module type is the same type; judging whether the number of the modules of the same type of the second control module to be loaded meets the switching condition that the number of the modules is smaller than the preset number; finally judging the switching condition of overload processing performance of the first control module; dividing the loading task into a first loading task and a second loading task under the condition that the first loading task and the second loading task are satisfied; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; if one of the switching conditions is not satisfied, the switching condition is considered not satisfied.
By the embodiment, the processing performance of the first control module can be fully utilized.
The present embodiment is described and illustrated below by way of preferred embodiments.
Fig. 7 is a flow chart of the server-based loading method of the preferred embodiment. As shown in fig. 7, the server-based loading method includes the steps of:
S51, powering up to start working; s52, in the first control module, acquiring the module type and the module number of the second control module to be loaded; s53, judging whether the module type and the module number of the second control module to be loaded meet the switching condition that the module type is the same type and the module number is smaller than the preset number; s54, if not, keeping the first execution strategy to execute the loading task; s55, if so, continuing to judge whether the switching condition of the first control module for processing the overload performance is met; if not, returning to S54; s56, if yes, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; s57, judging whether the processing performance of the second main control center is smaller than a preset processing performance threshold value, and judging whether the processing performance of the first control module (the first main control center) is larger than the processing performance of the second main control center; and S58, if yes, executing a second loading task according to the first execution strategy. And S59, if not, enabling the second master control center to continue to execute the loading task according to the second execution strategy. S60, ending.
The following is described in connection with fig. 2:
The first control module is connected with 4 expansion modules, the expansion modules 1 to 3 are respectively connected with 6 second control modules, and the expansion module 4 is connected with 15 second control modules; assuming that the first control module can load at most 3 second control modules at the same time, the second control module can load only one second control module at the same time. When the power-on begins to work, if the second control modules A1-A3 meet the switching conditions, the loading tasks are divided into a first loading task and a second loading task; the second loading task is a task of loading the resource file to the second control modules A1 to A3. If the second control module A1 is selected as a second main control center, simultaneously, the resource files required by the second control modules (A1-A3) are put into the cache of the second control module A1; the expansion modules 1 to 3 are switched so that the first link becomes the second link and the expansion module 4 continues to hold. At this time, the expansion modules 1 to 3 execute a second loading task according to a second execution strategy by a second control module A1 of the same module to a second control module (A2-A3); the second control module of the expansion module 4 performs execution of the first loading task by the first control module according to the first execution policy. If the switching condition is not met, the loading task is executed by the first execution strategy; the first control module is used as a first main control center, and then for the second control modules A1-A3, the resource file loading path is as follows: the first main control center, the switching module, the uplink port of the expansion module, the downlink port of the expansion module, the switching module and the second control modules A1-A3. For the second control modules B1 to B3, etc., the resource file loading path is: the first main control center, the switching module, the uplink port of the expansion module, the downlink port of the expansion module, the second control modules B1-B3, and the like.
In this embodiment, an optimal loading manner can be planned by dynamically detecting the available processing performance of the first control module, the processing performance of the second control module, and the type and number of the second control modules to be loaded, and then the optimal loading manner is realized by cooperation of the switching modules; the loading efficiency of the server can be effectively improved, and the starting time is reduced.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment also provides a server-based loading device, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. The terms "module," "unit," "sub-unit," and the like as used below may refer to a combination of software and/or hardware that performs a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
Fig. 8 is a block diagram of the structure of the server-based loading apparatus of the present embodiment, as shown in fig. 8, including: a judging unit 210, a first processing unit 220, and a second processing unit 230;
A judging unit 210, configured to judge, in the first control module, whether the module type and the module number of the second control module to be loaded meet the switching condition; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
The first processing unit 220 is configured to keep the first execution policy executing the loading task if the switching condition is not satisfied; the first execution strategy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
A second processing unit 230, configured to divide the loading task into a first loading task and a second loading task if the switching condition is satisfied; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; the second execution strategy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and expansion module through the switching module.
Through the device, the problem that the overall performance of the server is affected due to the fact that the loading efficiency is limited under the condition that the processing performance of the main control module is limited in the related technology is solved, the utilization of the processing performance of the second control module is realized through the switching of the switching module and the switching condition, the loading efficiency is improved, and the overall performance of the server is further improved.
In some of these embodiments, the first processing unit 220 is further configured to load the resource file in the first main control center into the corresponding second control module based on the first link.
In some embodiments, the second processing unit 230 is further configured to load, through the switching module, a resource file corresponding to the second loading task to the second main control center; and loading the resource files in the second main control center into corresponding second control modules based on the second links.
In some embodiments, the second processing unit 230 is further configured to select the designated second control module as the second main control center;
Or, the processing performance is used as a screening condition, and a corresponding second control module is screened to be used as a second main control center.
In some of these embodiments, the server-based loading device further comprises a feedback unit;
the feedback unit is used for judging whether the processing performance of the second main control center is smaller than a preset processing performance threshold value or not and whether the processing performance of the first control module is larger than the processing performance of the second main control center or not in the process of executing the second loading task through the second execution strategy;
And if the processing performance of the second main control center is smaller than the preset processing performance threshold and the processing performance of the first control module is larger than the processing performance of the second main control center, executing the first loading task and the second loading task according to the first execution strategy.
In some of these embodiments, the server-based loading device further comprises a reset unit;
And the reset unit is used for taking the first control module as a first main control center after the process of executing the loading task through the second execution strategy is completed, and waiting for the loading task.
In some of these embodiments, the switching condition further includes a processing performance overload of the first control module;
The judging unit 210 is further configured to, when the module types of the second control modules to be loaded are the same, satisfy the condition that the number of modules of the second control modules to be loaded is less than the preset number, and the processing performance of the first control module is overloaded;
when the module types of the second control modules to be loaded are different, the number of the modules of the second control modules to be loaded is larger than or equal to the preset number, and one or more of the processing performances of the first control modules are not overloaded, the switching condition is not met.
The above-described modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented in hardware, the above modules may be located in the same processor; or the modules may be located in different processors in any combination.
There is also provided in this embodiment a computer device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the computer device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, judging whether the module type and the module number of a second control module to be loaded meet a switching condition or not in a first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
S2, if the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution strategy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
S3, if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining a first execution strategy to execute a first loading task; executing a second loading task through a second execution strategy; the second execution strategy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and expansion module through the switching module.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and are not described in detail in this embodiment.
In addition, in combination with the server-based loading method provided in the above embodiment, a storage medium may be provided to implement this embodiment. The storage medium has a computer program stored thereon; the computer program, when executed by a processor, implements any of the server-based loading methods of the above embodiments.
It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to be limiting. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure in accordance with the embodiments provided herein.
It is to be understood that the drawings are merely illustrative of some embodiments of the present application and that it is possible for those skilled in the art to adapt the present application to other similar situations without the need for inventive work. In addition, it should be appreciated that while the development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as a departure from the disclosure.
The term "embodiment" in this disclosure means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive. It will be clear or implicitly understood by those of ordinary skill in the art that the embodiments described in the present application can be combined with other embodiments without conflict.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the patent claims. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. The loading method based on the server is characterized in that the server comprises a first control module, a switching module, an expansion module and a second control module; the first control module is connected with the switching module; the switching module is respectively connected with the expansion module and at least one second control module; the expansion module is connected with the second control module; the method comprises the following steps:
Judging whether the module type and the module number of the second control module to be loaded meet a switching condition or not in the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
If the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution policy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
If the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining the first execution strategy to execute the first loading task; executing the second loading task through a second execution strategy; the second execution policy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and the expansion module through the switching module.
2. The server-based loading method of claim 1, wherein maintaining the first execution policy to execute the loading task comprises:
and loading the resource file in the first main control center into a corresponding second control module based on the first link.
3. The server-based loading method of claim 1, wherein executing the second loading task via a second execution policy comprises:
Loading a resource file corresponding to the second loading task to the second main control center through the switching module;
And loading the resource files in the second main control center into corresponding second control modules based on the second links.
4. The server-based loading method of claim 1, wherein one of the second control modules is a second master control center, comprising:
Selecting the appointed second control module as a second main control center;
Or, screening the corresponding second control module as a second main control center by taking the processing performance as a screening condition.
5. The server-based loading method of claim 1, further comprising:
In the process of executing the second loading task through a second execution strategy, judging whether the processing performance of the second main control center is smaller than a preset processing performance threshold value or not, and judging whether the processing performance of the first control module is larger than the processing performance of the second main control center or not;
And if the processing performance of the second main control center is smaller than a preset processing performance threshold and the processing performance of the first control module is larger than the processing performance of the second main control center, executing the first loading task and the second loading task according to the first execution strategy.
6. The server-based loading method of claim 1, further comprising:
after the process of executing the loading task through the second execution strategy is completed, the first control module is used as a first main control center to wait for the loading task.
7. The server-based loading method of claim 1, wherein the switching condition further comprises a processing performance overload of the first control module;
Judging whether the module type and the module number of the second control module to be loaded meet the switching conditions or not, including:
When the requirements are met at the same time, the types of the modules of the second control module to be loaded are the same, the number of the modules of the second control module to be loaded is smaller than the preset number, and when the processing performance of the first control module is overloaded, the switching conditions are met;
When the module types of the second control module to be loaded are different, the number of the modules of the second control module to be loaded is larger than or equal to the preset number, and one or more of the processing performances of the first control module are not overloaded, the switching condition is not met.
8. The loading device based on the server is characterized in that the server comprises a first control module, a switching module, an expansion module and a second control module; the first control module is connected with the switching module; the switching module is respectively connected with the expansion module and at least one second control module; the expansion module is connected with the second control module; the device comprises: the device comprises a judging unit, a first processing unit and a second processing unit;
the judging unit is used for judging whether the module type and the module number of the second control module to be loaded meet the switching condition in the first control module; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number;
The first processing unit is used for keeping the first execution strategy to execute the loading task if the switching condition is not met; the first execution policy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module;
The second processing unit is used for dividing the loading task into a first loading task and a second loading task if the switching condition is met; maintaining the first execution strategy to execute the first loading task; executing the second loading task through a second execution strategy; the second execution policy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and the expansion module through the switching module.
9. The server is characterized by comprising a first control module, a switching module, an expansion module and a second control module;
The first control module is connected with the switching module and is used for judging whether the module type and the module number of the second control module to be loaded meet the switching conditions or not; the switching condition is that the module types are the same type, and the number of the modules is smaller than the preset number; if the switching condition is not met, maintaining the first execution strategy to execute the loading task; the first execution policy is: the first control module is a first main control center; the link is a first link formed by connecting the first main control center with the expansion module and the second control module through the switching module; if the switching condition is met, dividing the loading task into a first loading task and a second loading task; maintaining the first execution strategy to execute the first loading task;
The switching module is respectively connected with the expansion module and at least one second control module and is used for switching links;
The second control module is connected with the expansion module and is used for executing the second loading task through a second execution strategy if the switching condition is met; the second execution policy is: one of the second control modules is a second main control center; the link is a second link formed by connecting the second main control center with the corresponding second control module and the expansion module through the switching module.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the server-based loading method of any one of claims 1 to 7.
CN202410023673.2A 2024-01-08 2024-01-08 Server-based loading method, device, computer equipment and storage medium Pending CN118012526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410023673.2A CN118012526A (en) 2024-01-08 2024-01-08 Server-based loading method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410023673.2A CN118012526A (en) 2024-01-08 2024-01-08 Server-based loading method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118012526A true CN118012526A (en) 2024-05-10

Family

ID=90951348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410023673.2A Pending CN118012526A (en) 2024-01-08 2024-01-08 Server-based loading method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118012526A (en)

Similar Documents

Publication Publication Date Title
US9935897B2 (en) Network switching device
US7487504B2 (en) Thread dispatch for multiprocessor computer systems
US7712103B2 (en) Method and system for managing load balancing in data processing system
CN108647104B (en) Request processing method, server and computer readable storage medium
CN107077390B (en) Task processing method and network card
US10528119B2 (en) Dynamic power routing to hardware accelerators
US9985893B2 (en) Load sharing method and apparatus, and board
US20220070099A1 (en) Method, electronic device and computer program product of load balancing
CN111400041A (en) Server configuration file management method and device and computer readable storage medium
CN108933687B (en) Power consumption control method and device
CN111314249B (en) Method and server for avoiding data packet loss of 5G data forwarding plane
CN112685174A (en) Container creation method, device, equipment and medium
CN118012526A (en) Server-based loading method, device, computer equipment and storage medium
CN116909729A (en) GPU multitasking scheduling method
CN112379978A (en) Back-end service calling method, device, equipment and storage medium
CN107092531B (en) Computing framework, electronic device and information processing method
JPH07114518A (en) Task scheduling system of multiprocessor system
CN112769603B (en) Out-of-band management switching device, method and server
CN118394533B (en) Resource scheduling method, computer device, storage medium, and program product
CN118555244A (en) Message flow processing method, device, equipment and readable storage medium
CN116627868A (en) Control method and device for forwarding modes among controllers
CN118069354A (en) Load balancing method, device, equipment and medium
CN113900984A (en) Circuit and server for interconnection and switching between single node and multiple nodes
CN117290160A (en) Backup method, storage medium and equipment for database read-write separation cluster
CN117492988A (en) Task execution method, device, electronic equipment and storage medium

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