Method for scheduling application program of safety-certified computer platform, and safety-certified computer platform
By introducing a scheduling management module into the secure computer platform, single-threaded call and dependency management of applications are implemented, resource preemption and compatibility issues when multiple applications are fusion, and seamless fusion and minimize modifications are achieved.
Patent Information
- Application Number
- PCT/CN2024/122331
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-26
- Filing Date
- 2024-09-29
- Publication Date
- 2025-09-04
AI Technical Summary
When the prior art merges multiple applications into a secure computer platform, there are problems such as resource preemption, inability to guarantee system security, compatibility issues, code interference and software modification scope.
By introducing a scheduling management module into the secure computer platform, single-threaded call and dependency management of applications are realized, splitting and reorganizing input and output tasks are avoided, and sequential call and data caching mechanisms are adopted to ensure the independence and enclosure of applications.
It realizes seamless integration of multiple applications, avoids the expansion of software modification scope and code interference, maintains the independence and enclosure of the application, and reduces the modification workload.
Smart Images

Figure CN2024122331_04092025_PF_FP_ABST
Abstract
Description
Method for scheduling application programs of secure computer platform and secure computer platform Technical Field
[0001] The present invention relates to the field of rail transportation technology, and in particular to a method for scheduling applications on a secure computer platform and a secure computer platform. Background Art
[0002] To achieve cost reduction and efficiency improvement in railway signaling design projects, there are scenarios where multiple systems with similar functions or structures are integrated into a single system. Examples include integrating interlocking and regional controllers, integrating interlocking and train control centers, integrating interlocking and crossings, and integrating multiple crossings.
[0003] Currently, solutions for integrating multiple applications into a single one in the field of railway signal safety control include: modifying the safety computer platform to support the parallel execution of multiple applications; and refactoring the software to achieve the control flow that integrates multiple applications.
[0004] However, the solution of modifying the secure computer platform requires modifying the secure computer platform to implement the multi-threaded scheduling function of the application. There is a problem of application resource preemption under multi-threading. At the same time, the system security under multi-threading cannot be guaranteed.
[0005] Application fusion through software refactoring requires splitting and reorganizing the input and output tasks of existing applications. This integration can also lead to compatibility issues and a larger scope of software modifications. The original code between applications ends up in the same module, causing code interference between the original applications.
[0006] Summary of the Invention
[0007] The embodiments of the present invention provide a method for scheduling applications on a secure computer platform and a secure computer platform, which can solve the problems existing in current application integration solutions.
[0008] According to one aspect of the present invention, a method for scheduling application programs on a secure computer platform is provided, which is applied to a secure computer platform supporting the operation of a single application program, comprising:
[0009] Determining a current application according to the calling order of the applications, and sending configuration data and status data corresponding to the current application to the current application to update the current application;
[0010] Obtaining target input data corresponding to the current application, sending the target input data to an updated current application, and performing a logical operation based on the target input data by the updated current application to obtain target output data corresponding to the current application;
[0011] If the target output data meets the preset data sending condition, an output data packet is determined according to the target output data in the sending buffer, and the output data packet is sent, wherein the sending buffer is used to cache the target output data corresponding to each application.
[0012] According to another aspect of the present invention, there is provided a secure computer platform comprising: a platform software module, a scheduling management module, and at least two application modules, wherein the platform software module represents platform software, and the application module represents application programs;
[0013] The current application module of the at least two application modules is configured to read configuration data and state data, and update original state data and original configuration data according to the configuration data and state data; and is further configured to read target input data, perform logical operations based on the target input data, and obtain target output data;
[0014] The scheduling management module acts between the application module and the platform software module and is used to execute the application scheduling method of the secure computer platform as described in any embodiment of the present invention.
[0015] The technical solution of the embodiment of the present invention is to implement single-threaded calling of applications by sequentially calling applications, and determine the current application according to the calling sequence, load state data and configuration data into the current application, so as to load the application's dependencies into the current application, and avoid modifying the application's input and output tasks; then, the target input data corresponding to the current application is sent to the corresponding application, so that the current application performs logical operations based on the target input data to obtain target output data, and when the target output data meets the preset data sending conditions, all target output data are combined to obtain an output data packet and output it. The embodiment of the present disclosure achieves the effect of merging multiple applications on the basis of limiting the scope of modification to outside the business logic of the application, without splitting and reorganizing the input and output tasks of existing applications, without affecting the existing application interface, nor destroying the closedness of the existing application, and without adding new dependencies, thereby avoiding the expansion of the scope of software modification; in addition, there is no need to load the original code of each application into a module, thereby avoiding code interference between applications and achieving minimized modification of multi-application fusion functions.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] FIG1 is a schematic diagram of a task scheduling process of an application provided by the related art;
[0019] FIG2 is an execution flow of a fused application input task provided by related art;
[0020] FIG3 is an execution flow of a fused application output task provided by related art;
[0021] FIG4 is a flow chart of an application scheduling method for a secure computer platform according to an embodiment of the present invention;
[0022] FIG5 is a schematic diagram of an application scheduling process of a scheduling management module provided by an embodiment of the present invention;
[0023] FIG6 is a schematic diagram of a processing flow of input data provided by an embodiment of the present invention;
[0024] FIG7 is a schematic diagram of input data splitting provided by an embodiment of the present invention;
[0025] FIG8 is a schematic diagram of a processing flow of output data provided by an embodiment of the present invention;
[0026] FIG9 is a schematic diagram of output data splitting provided by an embodiment of the present invention;
[0027] FIG10 is a structural block diagram of a secure computer platform provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Currently, railway signaling systems mostly utilize a two-by-two safety computer platform. This system consists of a dual-system redundant structure, System I and System II. Each system utilizes two CPUs to run applications for two-by-two comparisons. If a two-by-two inconsistency occurs, the system crashes to ensure system safety. Signaling system applications implement control logic in C language. To ensure system functional safety, applications typically do not utilize multithreading. Instead, they are broken down into a sequential task scheduling process. The safety platform calls this sequential structure of the application each cycle to implement system control functions. Figure 1 is a schematic diagram of a task scheduling process for an application, as provided by related art. As shown in Figure 1, the application's sequential structure includes S110, Start; S120, Input Task; S130, Logical Operation Task; S140, Output Task; and S150, End.
[0031] To achieve cost reduction and efficiency gains, railway signaling design projects often involve integrating multiple systems with similar functions or structures into a single system. Examples include integrating interlocking and regional controllers, interlocking and train control centers, interlocking and level crossings, and multiple level crossings. Due to security requirements for computer platforms, modifications are generally limited to the application program. Software refactoring is then used to achieve a control flow that integrates multiple sets of business logic.
[0032] According to the interface characteristics provided by the secure computer platform, the input data of the merged applications is mainly divided into two types. The first type is distributed data, that is, the input data obtained through the computer platform's interface program is differentiated according to the device, and each application obtains data based on different device codes; the second type is centralized data, that is, when obtaining input data through the computer platform's interface program, all input data is given at once. If the interface is called again within a cycle, no data will be obtained or the data obtained will be the same as the previous application (depending on whether the saved data will be cleared immediately after the interface provided by the platform is called). Distributed input data has corresponding distributed output data, and centralized input data has corresponding centralized output data. For example, application configuration data, acquisition driver data, and inter-system synchronization data are all centralized data, and network communication data is generally distributed data.
[0033] The following uses the code fusion of two applications as an example to introduce the existing technical solutions:
[0034] The original application input task can be simply decomposed into three steps: receiving data, verifying data, and processing data. After the application is merged, the data that has passed the verification needs to be split according to a certain format, and then the processing input data interface of each application is called separately for processing. Figure 2 is an execution flow of a fused application input task provided by the relevant technology. As shown in Figure 2, the input task includes the following steps executed in sequence: S210, start; S220, receive data; S230, determine whether the data verification is passed, if so, execute S240, otherwise execute S260; S240, execute the original application 1 data processing code; S250, execute the original application 2 data processing code; S260, end.
[0035] The original application output task can be simply decomposed into three steps: generating data, adding a checksum, and sending data. After the applications are merged, it is necessary to call the output data generation interface of each application to generate their own output data, and then add the overall checksum after combining the output data and send it. Figure 3 is an execution flow of a merged application output task provided by the relevant technology. As shown in Figure 3, the output task includes the following steps executed in sequence: S310, start; S320, execute the original application 1 output processing code; S330, execute the original application 2 output processing code; S340, add the checksum; S350, send data; S360, end.
[0036] Considering the input and output tasks after the aforementioned application fusion, the original application input task needs to be split into two modules: data reception and verification, and input processing. During fusion, the new data reception and verification module interfaces with the data processing modules of each original application. Therefore, compatibility issues need to be addressed at these interfaces. Inconsistencies in variable definitions or data transmission methods are likely to necessitate code refactoring in these areas, potentially spreading software modifications across all modules related to the input task. Similarly, output task processing can encounter similar issues.
[0037] For logical operations, the two applications originally belonged to different systems, communicating information over the network. For example, the interlocking system sends train approach notifications to the crossing system, and the crossing system sends crossing status information to the interlocking system. Therefore, the integration of application business logic should consider creating new data channels to transmit data sent to other applications through internal channels within the application.
[0038] The existing technical solution is to set a flag in the data transmission interface of the output task. If the data is sent to another application in the system, the data is copied to a new global variable. Meanwhile, when another application needs to receive data output by another application in the system, it copies the data from this new global variable. This approach further increases the data dependency between the two independent applications and greatly increases the modification requirements of the input and output tasks.
[0039] Existing technical solutions have the following problems when implementing application integration functions:
[0040] 1. The input and output tasks of existing applications need to be split and reorganized, and compatibility issues may arise during the combination, which will expand the scope of software modification.
[0041] 2. The original codes between applications will appear in one module, making it impossible to change and upgrade the original applications individually.
[0042] 3. There are data dependencies between the integrated applications, and there is no separate module to manage the dependencies, resulting in confusion in the application relationships.
[0043] In view of the aforementioned issues in related technologies, the present invention provides a solution that, from the application perspective, adds a scheduling management module between existing applications and the platform software of a secure computer platform. This module is used to schedule and process data for multiple applications within a single application cycle, thereby achieving application fusion. It should be noted that each fused application package maintains an independent structure, and the scheduling management module loads the application's status and configuration into the application, thereby managing dependencies between applications and realizing the original business functions implemented by the scheduling management module.
[0044] Figure 4 is a flow chart of an application scheduling method for a secure computer platform according to an embodiment of the present invention. This embodiment is applicable to rail transit signal safety control scenarios. The method can be executed by a secure computer platform that supports the operation of a single application program. The secure computer platform can be implemented in the form of hardware and / or software. As shown in Figure 4, the method includes:
[0045] S410: Determine a current application according to a calling sequence of the applications, and send configuration data and status data corresponding to the current application to the current application to update the current application.
[0046] The current application represents the application that should be run. The state data represents the state of the modules within the application during the previous cycle. When the application is called, the state data from the previous cycle in the state data area is loaded into the application to restore its state from the previous cycle. After the application performs logical operations based on input data during the current cycle, module states may change. Therefore, the state data from the current cycle needs to be cached in the state data area for state restoration during the next cycle.
[0047] Configuration data represents the configuration of modules within an application. Configuration data is stored in the configuration data area. When an application is called, the configuration data in the configuration data area is loaded into the application.
[0048] The configuration data and status data required by the application are stored as internal variables of the scheduling management module and distributed to each application through the above-mentioned interface.
[0049] In order to realize the function of the scheduling management module to load the configuration and loading status for each application, it is necessary to obtain the loading configuration interface function and the loading status interface function of each application. Among them, the loading configuration interface function is used to read the content of the configuration data area after the scheduling management module provides the first address and length of the configuration data area as input, so as to update the configuration data of all modules within the application, and feedback the length of the configuration data read by this application. The loading status interface function is used to read the content of the status data area after the scheduling management module provides the first address and length of the status data area as input, so as to update the status data of all modules within the application, and feedback the length of the status data read by this application.
[0050] The calling order of the application programs is a predetermined order, and the calling order of the application programs can be adjusted according to the business scenario. The embodiment of the present invention does not specifically limit the calling order.
[0051] Exemplarily, the application to be called is determined as the current application according to the calling order of the application. The configuration data area starting address and length are sent to the current application so that the current application reads the corresponding configuration data from the configuration data area. The current application configures the internal module based on the obtained configuration data. The configuration data read length returned by the current application is obtained, and the configuration data area starting address and length are updated according to the configuration data read length. The status data area starting address and length are sent to the current application so that the current application reads the corresponding status data from the status data area. The current application performs status recovery on the internal module based on the obtained status data. The status data read length returned by the current application is obtained, and the status data area starting address and length are updated according to the status data read length.
[0052] In some embodiments, the scheduling management module includes a top-level scheduling interface to implement the scheduling functions of multiple applications without modifying the scheduling tasks of existing applications. For example, an existing application provides a preset interface for periodic calls by the secure computer platform. The present invention does not modify the implementation logic of the preset interface, but rather modifies the name of the preset interface, which functionally still represents the main scheduling task of the corresponding application. The top-level scheduling interface of the scheduling management module is named the original name of the preset interface of the application. For example, the original name of the preset interface of the application is a, the modified name is b, and the name of the top-level scheduling interface is a.
[0053] In an embodiment of the present invention, the top-level scheduling interface is used to load configuration data and status data for the current application every cycle, and then call the modified name of the preset interface of the existing application to implement the scheduling task of the application. Finally, the status data of the current application is saved. During the call, the program identifier of the current application is recorded through the internal variables of the scheduling management module for use when the input and output management interfaces select data. Among them, the input management interface is used to replace the platform data receiving interface called by the existing application to realize data reception. The output management interface is used to replace the platform data sending interface called by the existing application to realize data sending. Since all data of the application will be received or sent through the scheduling management module, for the data transmitted between applications, the input management interface and the output management interface can be directly implemented by copying the internal variables of the calling management module.
[0054] FIG5 is a schematic diagram of an application scheduling process of a scheduling management module provided by an embodiment of the present invention. The top-level scheduling interface is named Submain, and the preset interfaces of the two fused applications are renamed Submain_1 and Submain_2. As shown in FIG5 , the scheduling process includes: S500, detecting that the top-level scheduling interface Submain is called by the secure computer platform; S510, loading the configuration data of application 1; S520, loading the status data of application 1; S530, calling Submain_1; S540, saving the status data of application 1; S550, loading the configuration data of application 2; S560, loading the status data of application 2; S570, calling Submain_2; S580, saving the status data of application 2; S590, returning.
[0055] S420: Obtain target input data corresponding to the current application, send the target input data to the updated current application, and use the updated current application to perform a logical operation based on the target input data to obtain target output data corresponding to the current application.
[0056] The target input data is the application input data to be processed by the current application. The target input data can be centralized data or distributed data. The target output data is the result of a logical operation performed on the target input data by the current application. If the target input data is centralized data, the target output data is also centralized data. If the target input data is distributed data, the target output data is also distributed data.
[0057] In some embodiments, when input data is first acquired in this cycle, if the input data meets preset input conditions, the input data is split according to application to obtain candidate input data corresponding to each application, and the candidate input data is saved in the data cache corresponding to each application. The data cache corresponding to each application is queried based on the currently running application to obtain the target input data.
[0058] The preset input condition may indicate that the input data is centralized data. For the first time input data is acquired in this cycle, if the input data is centralized data, a check code in the input data is obtained and the input data is verified based on the check code. If the verification passes, the input data is parsed to obtain the data offset and data length of candidate input data corresponding to each application. The input data is then split based on the data offset and data length to obtain candidate input data corresponding to each application.
[0059] If the input data is centralized data, the input data is a data packet of data to be processed by each application in the fusion application, received at one time. The data offset represents the offset of each candidate input data in the data packet. The data length represents the length of each candidate input data in the data packet.
[0060] For example, if the data packet is parsed and the input data obtained is data to be processed by application 1 and application 2, and the data offset of application 1 is 1k and the data length is 2k, then the data starting from the 1k position of the data packet and the data after that position are intercepted as candidate input data for application 1. If the data offset of application 2 is 4k and the data length is 1k, then the data starting from the 4k position of the data packet and the data after that position are intercepted as candidate input data for application 2.
[0061] Optionally, splitting the input data according to the data offset and data length to obtain candidate input data corresponding to each application includes: deleting a checksum in the input data. Splitting the input data after deleting the checksum according to the data offset and data length corresponding to each application to obtain input data corresponding to each application. Determining an input checksum for each input data based on the type of the input data corresponding to each application, and combining the input data corresponding to each application and the input checksum of the input data to obtain candidate input data.
[0062] In some embodiments, if the input data is not obtained for the first time in this cycle and the input data meets the preset input conditions, the data cache corresponding to each application is queried according to the currently running application to obtain the target input data.
[0063] Optionally, after the input management interface is called, it is determined whether the input data to be obtained is centralized data. For distributed data, the input task directly calls the platform data receiving interface to obtain the input data and pass it to the current application. For centralized data, it is further determined whether the data obtained this time is the first time to obtain input data in this cycle. If it is the first time to obtain input data, the centralized data is received once and verification is performed. After removing the verification code from the verified input data, it is split into data buffers corresponding to each application, and a new verification code is determined according to the type of input data of each application, and a new verification code is added to the input data of each application to obtain candidate input data for each application. Then, the candidate input data after splitting is selected according to the current application and passed to the current application. If it is not the first time to obtain input data, the candidate input data corresponding to the current application after splitting is selected and passed to the current application. The technical solution of the present invention does not modify the input task of the existing application, but replaces the platform data receiving interface called by the existing application with the input management interface implemented by the scheduling management module.
[0064] FIG6 is a schematic diagram of a processing flow of input data provided by an embodiment of the present invention. As shown in FIG6, the processing flow of input data includes: S601, start; S602, determine whether the acquired data is centralized, if so, execute S603, otherwise execute S604; S603, determine whether it is the first time to receive centralized data in this cycle, if so, execute S605, otherwise execute S607; S604, receive distributed data, and go to execute S612; S605, receive centralized data; S606, determine whether the centralized data passes the verification, if so, execute S607, otherwise execute S608; S607, copy Centralized data goes to the centralized receiving data area and goes to S609; S608, clears the target data area, where the target data area is the data cache area corresponding to each application; S609, obtains the data offset and length configuration in the centralized receiving data area according to the current application; S610, intercepts the corresponding input data from the centralized receiving data area according to the data offset and data length, and adds a check code to obtain candidate input data; S611, copies the candidate input data to the target data area; S612, copies the distributed data to the target data area; S613, ends.
[0065] Figure 7 is a schematic diagram of input data splitting according to an embodiment of the present invention. As shown in Figure 7, the centralized received data area includes application 1 data, application 2 data, application 3 data, and a checksum. The data cache corresponding to each application within the target data area includes application 1 data and a new checksum, application 2 data and a new checksum, and application 3 data and a new checksum.
[0066] S430: If the target output data meets the preset data sending condition, determine an output data packet according to the target output data in the sending buffer, and send the output data packet, wherein the sending buffer is used to cache the target output data corresponding to each application.
[0067] The preset data transmission condition includes the target output data being the last data transmission in the current cycle. If the target output data is detected as the last data transmission in the current cycle, the target output data is determined to meet the preset data transmission condition. If the target output data is not the last data transmission in the current cycle, the data to be transmitted is copied to the transmission buffer after removing the checksum.
[0068] Exemplarily, if the target output data meets the preset data transmission conditions, the target output data is deleted from the checksum and stored in the transmission buffer. An output checksum is determined based on the target output data corresponding to each application in the transmission buffer. The output checksum is concatenated with the target output data in the transmission buffer to obtain an output data packet.
[0069] After acquiring the target output data, determine whether the newly acquired target output data is the last data sent in this cycle. If it is the last data sent, remove the checksum from the newly acquired target output data and copy it to the send buffer. Then, recalculate the checksum based on all the target output data in the entire send buffer, append the checksum to obtain the output data packet, and call the platform data transmission interface to send the output data packet. If it is not the last data sent, remove the checksum from the data to be sent and copy it to the send buffer.
[0070] In some embodiments, after the output management interface is called, it is determined whether the data to be sent is centralized data. For distributed data, the output task directly calls the platform data sending interface. For centralized data, the output task calls the output management interface, and determines through the output management interface whether the data to be sent is the last time data is sent in this cycle. If it is not the last time data is sent, the check code of the data to be sent is removed, and then copied to the sending buffer. If it is the last time data is sent, the check code of the data to be sent is removed, and then copied to the sending buffer. A new check code is recalculated based on all the data in the entire sending buffer, and the new check code is appended to the end of all the data in the sending buffer to obtain an output data packet, and the platform data sending interface is called to send the output data packet. The technical solution of the present invention does not modify the output task of the existing application, but uses the output management interface implemented by the scheduling management module to replace the platform data sending interface called by the existing application.
[0071] FIG8 is a schematic diagram of an output data processing flow provided by an embodiment of the present invention. As shown in FIG8 , the output data processing flow includes: S801, start; S802, determine whether the target output data to be sent is centralized data; if so, execute S803; otherwise, execute S804; S803, remove the check code in the target output data; S804, call the platform data sending interface to send the target output data; S805, obtain the storage offset corresponding to the sending buffer and the current application; S806, copy the target output data to the sending buffer according to the storage offset, and update the storage offset corresponding to the current application according to the sending buffer occupancy information of the target output data; S807, determine whether the target output data is the last centralized data sent in this cycle; if so, execute S808; otherwise, execute S810; S808, generate a new check code based on all target output data in the sending buffer, add the new check code, and obtain an output data packet; S809, send the output data packet; S810, end.
[0072] Figure 9 is a schematic diagram of output data splitting provided by an embodiment of the present invention. As shown in Figure 9, the check code of the target output data of application 1 is deleted, and the target output data of application 1 is copied to the storage position corresponding to application 1 in the cache area according to the storage offset corresponding to application 1 in the cache area. The check code of the target output data of application 2 is deleted, and the target output data of application 2 is copied to the storage position corresponding to application 2 in the cache area according to the storage offset corresponding to application 2 in the cache area. The check code of the target output data of application 3 is deleted, and the target output data of application 3 is copied to the storage position corresponding to application 3 in the cache area according to the storage offset corresponding to application 3 in the cache area. Then, a new check code is generated based on all the target output data in the cache area, and all the target output data in the cache area and the new check code are spliced to obtain an output data packet.
[0073] The embodiment of the present invention implements single-threaded calling of applications by sequentially calling applications, and determines the current application according to the calling sequence, and loads state data and configuration data into the current application to load the application's dependencies into the current application, thereby avoiding modifications to the application's input and output tasks; then, the target input data corresponding to the current application is sent to the corresponding application, so that the current application performs logical operations based on the target input data to obtain target output data, and when the target output data meets the preset data sending conditions, all target output data are combined to obtain an output data packet and output it. The embodiment of the present disclosure achieves the effect of merging multiple applications on the basis of limiting the scope of modification to outside the business logic of the application, without splitting and reorganizing the input and output tasks of existing applications, without affecting the existing application interface, without destroying the closedness of the existing application, and without adding new dependencies, thereby avoiding the expansion of the scope of software modification; in addition, there is no need to load the original code of each application into a module, thereby avoiding code interference between applications and achieving minimized modification of the multi-application fusion function.
[0074] In some embodiments, after the updated current application performs a logical operation based on the target input data to obtain the target output data corresponding to the current application, it also includes: sending the starting address and length of the status data area to the current application so that the current application saves the status data to the status data area; obtaining the occupied length of the status data area returned by the current application, and updating the starting address and length of the status data area according to the occupied length of the status data area. In order to realize the function of the scheduling management module to save the status for each application, it is also necessary to obtain the save status interface function of each application. The save status interface function is used to save the status data of all modules in the application to the status data area after the scheduling management module provides the starting address and length of the status data area as input, and feedback the length of the status data area occupied by this application.
[0075] The application fusion solution of the present invention treats each application to be fused as a closed independent module, loads configuration data and status data for the independent module every cycle, and restores the status of the current application in the previous cycle. Then, after input data is passed to the current application, the current application is called to perform logical operations, and the status data of the current application is saved for the status service of the next cycle. In addition to adding loading configuration data, loading status data, saving status data, and replacing functions called on the platform interface, the present invention does not require other modifications to the application, does not affect the existing application interface, does not destroy the closedness of the existing application, does not add new dependencies, and makes minimal modifications to the existing application, thus achieving a minimized modification range for the fusion functions of multiple applications. It also has the advantages of clear modification methods and simple modification content. There is no need to modify the application business logic. Even developers who do not understand the business logic of existing applications can achieve application fusion through the solution of the present invention.
[0076] Figure 10 is a block diagram of a secure computer platform provided by an embodiment of the present invention. As shown in Figure 10, the secure computer platform 1000 includes: a platform software module 1010, a scheduling management module 1020, and at least two application modules 1030. The platform software module 1010 represents the platform software, and the application modules 1030 represent the application programs.
[0077] The current application module in the at least two application modules 1030 is configured to read configuration data and state data, and update original state data and original configuration data according to the configuration data and state data; and is further configured to read target input data, perform logical operations based on the target input data, and obtain target output data;
[0078] The scheduling management module 1020 acts between the application module 1030 and the platform software module 1010 and is used to execute the application scheduling method of the secure computer platform as described in any embodiment of the present invention.
[0079] The scheduling management module 1020 communicates with the application module 1030 and the platform software module through interfaces (APIs).
[0080] Optionally, the secure computer platform 1000 further includes an operating system module 1040 , a device driver module 1050 , a hardware module 1060 , and the like.
[0081] The secure computer platform provided by the embodiment of the present invention can execute the application level scheduling method of the secure computer platform provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0082] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0083] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for scheduling application levels on a secure computer platform, applied to a secure computer platform supporting a single application program, characterized in that: include: Determining a current application according to the calling order of the applications, and sending configuration data and status data corresponding to the current application to the current application to update the current application; Obtaining target input data corresponding to the current application, sending the target input data to an updated current application, and performing a logical operation based on the target input data by the updated current application to obtain target output data corresponding to the current application; If the target output data meets the preset data sending condition, an output data packet is determined according to the target output data in the sending buffer, and the output data packet is sent, wherein the sending buffer is used to cache the target output data corresponding to each application.
2. The method according to claim 1, characterized in that The obtaining of target input data corresponding to the current application includes: For the first acquisition of input data in this cycle, if the input data meets the preset input conditions, the input data is split according to the application to obtain candidate input data corresponding to each application, and the candidate input data is saved in the data buffer area corresponding to each application; According to the currently running application, the data cache area corresponding to each application is queried to obtain the target input data.
3. The method according to claim 2, characterized in that The step of splitting the input data according to the application program to obtain candidate input data corresponding to each application program includes: Obtaining a check code from the input data, and verifying the input data according to the check code; If the test passes, the input data is parsed to obtain the data offset and data length of the candidate input data corresponding to each application; The input data is split according to the data offset and the data length to obtain candidate input data corresponding to each application.
4. The method according to claim 3, characterized in that The step of splitting the input data according to the data offset and the data length to obtain candidate input data corresponding to each application program includes: Deleting the check code in the input data; According to the data offset and data length corresponding to each application, the input data after the checksum is deleted is split to obtain the input data corresponding to each application; An input verification code for each input data is determined according to the type of input data corresponding to each application, and candidate input data is obtained by combining the input data corresponding to each application and the input verification code of the input data.
5. The method according to claim 1, characterized in that The obtaining of target input data corresponding to the current application includes: For this cycle, if the input data is not obtained for the first time and meets the preset input conditions, the data cache area corresponding to each application is queried according to the currently running application to obtain the target input data.
6. The method according to claim 1, characterized in that The determining the current application according to the calling order of the applications, and sending the configuration data and status data corresponding to the current application to the current application, includes: Determine the application to be called as the current application according to the calling order of the applications; Sending the configuration data area's first address and length to the current application program so that the current application program reads the corresponding configuration data from the configuration data area; The starting address and length of the status data area are sent to the current application so that the current application reads the corresponding status data from the status data area.
7. The method according to claim 6, characterized in that Also includes: After the current application reads the corresponding configuration data from the configuration data area, obtaining the configuration data read length returned by the current application, and updating the first address and length of the configuration data area according to the configuration data read length; Alternatively, after the current application reads the corresponding status data from the status data area, The status data read length returned by the current application is obtained, and the starting address and length of the status data area are updated according to the status data read length.
8. The method according to claim 1, characterized in that If the target output data satisfies a preset data sending condition, determining an output data packet according to the target output data in the sending buffer area includes: If the target output data meets the preset data sending condition, the target output data is deleted from the check code and stored in the sending buffer; Determine the output check code based on the target output data corresponding to each application in the sending buffer; The output check code is spliced to the target output data in the sending buffer area to obtain an output data packet.
9. The method according to claim 1, characterized in that After the updated current application program performs a logical operation based on the target input data to obtain target output data corresponding to the current application program, the method further includes: Sending the state data area's first address and length to the current application, so that the current application saves the state data to the state data area; The occupied length of the status data area returned by the current application is obtained, and the starting address and length of the status data area are updated according to the occupied length of the status data area.
10. A secure computer platform, characterized in that: include: A platform software module, a scheduling management module, and at least two application modules, wherein the platform software module represents the platform software, and the application module represents the application; The current application module of the at least two application modules is configured to read configuration data and state data, and update original state data and original configuration data according to the configuration data and state data; and is further configured to read target input data, perform logical operations based on the target input data, and obtain target output data; The scheduling management module acts between the application module and the platform software module and is used to execute the application scheduling method of the secure computer platform according to any one of claims 1 to 9.
Citation Information
Patent Citations
Software running method, system, computing equipment and storage medium
CN111857886A
Data scheduling processing method and device and electronic equipment
CN117527906A
Scheduling method of application program of secure computer platform and secure computer platform
CN118051311A
I / O scheduling system and method
US8732342B1