Equipment startup rule configuration method, electronic equipment and computer readable storage medium
The method addresses inflexible device startup by dynamically generating script codes based on data sources and priority rules, improving efficiency and accuracy in device management.
Patent Information
- Application Number
- CN202411363579.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Traditional device management methods face challenges in flexibility and efficiency due to static configuration and manual intervention, leading to inflexible device startup conditions and high error-proneness.
A method for configuring device startup rules by pre-configuring data sources, writing script codes for different business scenarios, and binding them to scenarios, utilizing a script engine to dynamically generate executable codes based on priority rules.
Enhances flexibility and accuracy in device startup by reducing manual operations and enabling quick adaptation to business needs through automated script code generation.
Smart Images

Figure CN119201250A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device startup control, and in particular to a device startup rule configuration method, an electronic device and a readable storage medium. Background Art
[0002] The device startup system is a core component in the Internet of Things (IoT) and remote device management. With the development of technology, more and more devices need to be remotely controlled and managed to achieve automation and intelligence.
[0003] Traditional device management methods usually rely on static configuration and manual intervention, which is inadequate in the modern fast-changing business environment. For example, static configuration rules have the problem that the device startup conditions and rules are usually pre-set and difficult to change, resulting in low flexibility in device startup; manual operation requires users to manually enter commands or configurations to start the device, which is time-consuming and prone to errors.
[0004] Therefore, there is an urgent need for a device startup rule configuration method, an electronic device and a computer-readable storage medium to solve the above problems. Summary of the invention
[0005] The technical problem solved by the present invention is to provide a device startup rule configuration method, an electronic device and a computer-readable storage medium, which can customize script codes according to different business scenarios to meet the business needs of different startup scenarios, improve the flexibility of device startup, reduce dependence on manual operations, and improve efficiency and accuracy.
[0006] The present invention solves the technical problem by adopting the following technical solutions:
[0007] A method for configuring device startup rules includes: pre-configuring a corresponding data source according to the requirements of at least one business scenario; writing script code for implementing business logic corresponding to different business scenarios based on at least one data source; and binding the data source and script code to the business scenario.
[0008] In a preferred embodiment of the present invention, the above-mentioned data source includes: data source code, data source name, data source type, input parameter / condition, output parameter / query field and path / data table.
[0009] In a preferred embodiment of the present invention, the above-mentioned step of binding the data source and script code with the business scenario includes: responding to a script configuration request of the target business scenario, associating the target business scenario with at least one data source; obtaining corresponding script code based on the at least one data source, and associating the script code with the target business scenario.
[0010] In a preferred embodiment of the present invention, after the above-mentioned step of obtaining the corresponding script code based on the at least one data source and associating the script code with the target business scenario, it includes: generating a script configuration list of the target business scenario according to the target business scenario, at least one data source and the script code, the script configuration list including: the scenario code, scenario name, scenario description of the target business scenario and the data source code, script code, creator and creation time of the at least one data source.
[0011] In a preferred embodiment of the present invention, after the above-mentioned step of binding the data source and the script code with the business scenario, it includes: determining the target data source corresponding to the current business scenario based on the data source corresponding to at least one pre-configured business scenario; determining the target script code corresponding to the target data source based on the script code corresponding to at least one pre-configured business scenario; and determining output parameters based on the target data source and the target script code.
[0012] In a preferred embodiment of the present invention, the step of determining the target data source corresponding to the current business scenario based on the data source corresponding to at least one pre-configured business scenario includes: obtaining the target business scenario with the highest priority; obtaining the scenario code and the corresponding target data source corresponding to the target business scenario.
[0013] In a preferred embodiment of the present invention, the step of determining the target script code corresponding to the target data source based on the pre-configured script code corresponding to at least one business scenario includes: obtaining the script code that can execute the business logic of the target business scenario based on the target data source.
[0014] In a preferred embodiment of the present invention, the step of determining the output parameters based on the target data source and the target script code includes: judging whether the output parameters meet the power-on conditions of the target business scenario; if so, sending a device power-on instruction to start the target device; if not, taking the next priority business scenario as the target business scenario, and obtaining the output parameters of the target business scenario.
[0015] In a preferred embodiment of the present invention, the step of obtaining the output parameters of all relevant data sources according to the data source code, the input parameters of the data source and the script code includes: determining whether the output parameters meet the power-on conditions of the corresponding business scenario; if so, sending a device power-on instruction; if not, taking the next priority business scenario as the target business scenario, and obtaining the output parameters of the target business scenario.
[0016] An electronic device comprises: a memory and a processor, wherein a device startup rule configuration program is stored in the memory, and when the device startup rule configuration program is executed by the processor, the steps of the device startup rule configuration method as described in any one of the above are implemented.
[0017] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device startup rule configuration method as described in any one of the above are implemented.
[0018] The technical effect achieved by the present invention using the above technical solution is: by configuring the corresponding data sources and code scripts for different business scenarios, the corresponding execution script codes can be quickly obtained according to different business scenarios, thereby meeting the business needs of different startup scenarios, reducing dependence on manual operations, and improving efficiency and accuracy.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a method for configuring device startup rules according to the present invention;
[0021] Figure 2 A business scenario data flow chart of a device startup rule configuration method shown in the present invention. DETAILED DESCRIPTION
[0022] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, the embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention. Through the description of the specific implementation methods, the technical means and effects taken by the present invention to achieve the predetermined purpose can be more deeply and specifically understood, and the attached drawings are only for reference and explanation purposes, and are not used to limit the present invention.
[0023] See also Figure 1 , Figure 1 The present invention is a flowchart of a method for configuring device startup rules.
[0024] like Figure 1 As shown, a method for configuring device startup rules provided by an embodiment of the present invention includes the following steps:
[0025] S11: Pre-configure a corresponding data source according to requirements of at least one business scenario.
[0026] In this implementation, the business scenario is the equipment startup condition or requirement (under what circumstances to start the equipment), which includes fully automatic startup, semi-automatic startup, and startup application payment amount verification. The data source is the source of the input data required by the script code, including the input data required by the script code. Equipment refers to the equipment purchased by the customer from a specific department / company.
[0027] Configuring the data source allows the application / script code to correctly connect to the database server and obtain the required parameters from it. Data source configuration usually includes specifying the location of the database, authentication information, and any necessary connection parameters.
[0028] S12: Writing script codes to implement business logic corresponding to different business scenarios based on at least one data source.
[0029] S13: Bind the data source and script code to the business scenario.
[0030] Script code is an executable file written in a specific descriptive language and in a certain format.
[0031] The script code written and configured using different data sources can implement the business logic of different business scenarios.
[0032] It should be noted that in the process of writing and configuring script code through the data source, you can also complete the configuration of the business scenario and set the business scenario that can execute the script code. Because different business scenarios correspond to different data sources, the business scenario configuration can also be completed when writing and configuring script code according to the data source. Business scenario configuration associates the business scenario with the data source and script code.
[0033] In one embodiment, when configuring the script code, first, it is necessary to set the associated business scenario, set a scenario code for the business scenario, and then select one or more data sources for the business scenario (associate the scenario code with the data source code). Then, according to the selected one or more data sources, write the corresponding script code, and then associate the script code with the data source code to perform the specific operations and processing required by the business scenario.
[0034] Through the above method, the script code can be customized according to different business scenarios to meet the business needs of different startup scenarios, improve the flexibility of equipment startup, reduce dependence on manual operation, and improve efficiency and accuracy.
[0035] Optionally, the data source includes: data source code, data source name, data source type, input parameters / conditions, output parameters / query fields and path / data table.
[0036] It should be noted that one business scenario can correspond to multiple data sources. The data source can provide necessary input data for the script code configured later.
[0037] Specifically, one or more pre-created data sources are selected according to the business requirements of the business scenario, and these data sources will provide the necessary input data for the script. If there is no data source that meets the business requirements among the pre-created data sources, a data source that meets the business requirements can be configured according to the business requirements.
[0038] Pre-created data sources can be displayed in the data source configuration list for easy management and reference. The data source configuration list includes: data source code, data source name, data source type, input parameters / conditions, output parameters / query fields, path / data table and other information.
[0039] For example, the user manually configures different data sources in advance, and after the configuration is completed, the data source configuration list of different data sources can be obtained and saved in the database, so that the user can manage and reference the created data sources. For example, the created data source is associated with the business scenario, or the data source configuration list is modified according to the business requirements of the business scenario.
[0040] In this implementation, two types of data sources are mainly supported: HTTP interface and database query SQL statement. The following are the detailed steps of the data source configuration process:
[0041] Data source code and basic information:
[0042] Before configuring a data source, you need to specify / set a unique code for the data source, namely the data source code, so that the subsequent process can directly call and associate the data source through the data source code. In addition, after determining the data source code, you also need to edit other basic information of the data source to facilitate subsequent identification and use of the data source. Basic information includes: data source name, data source description, data source type, etc.
[0043] Interface path or query table settings:
[0044] Different settings are required depending on the data source type. For example, for the HTTP interface type, you need to specify the path of the interface, which is the URL address for the system to interact with external services. For the database query type, you need to specify the database table for the SQL query statement.
[0045] Fill in the parameters:
[0046] Fill in the input parameters (input parameters) required by the data source. Input parameters are the conditions or data required when calling the HTTP interface or executing a database query. That is, input parameters are the data processed after calling the HTTP interface or executing a database query.
[0047] When the data source type is HTTP interface, you can set simulation parameters (mock parameters) to automatically generate corresponding output parameters (output parameters) based on the simulation parameters. In addition, you can also set output parameters manually, but you need to ensure that the manually set output parameters are consistent with the data parameter name returned by the interface.
[0048] When the data source type is a database query SQL statement, you need to manually fill in the parameter field name and its alias to accurately identify and process the data returned from the database query.
[0049] Output parameters: The output result after calling the HTTP interface or executing a database query to process the input parameters.
[0050] Through the above steps, the required data sources can be flexibly configured, and the required input parameters and processing data can be correctly obtained to support subsequent business scenario script configuration and execution.
[0051] Optionally, the step of binding the data source and the script code with the business scenario includes: responding to a script configuration request of the target business scenario, associating the target business scenario with at least one data source; obtaining corresponding script code based on the at least one data source, and associating the script code with the target business scenario.
[0052] Optionally, after the step of acquiring corresponding script code based on the at least one data source and associating the script code with the target business scenario, it includes: generating a script configuration list for the target business scenario according to the target business scenario, at least one data source and the script code.
[0053] The script configuration list includes: the scenario code, scenario name, scenario description of the target business scenario, and the data source code, script code, creator and creation time of the at least one data source.
[0054] Scenario code, a unique identifier assigned to each business scenario. Scenario name, a business scenario name for easy identification. Scenario description, a detailed description of the business scenario to help users understand its purpose. Data source code, a unique code for the data source associated with the script. Script code, the script code that implements specific business logic. Creator, the user who created the script configuration. Creation time, the date and time the script configuration was created.
[0055] Specifically, the business scenario script configuration page can be used to configure the business scenario script. The configuration process includes the following steps: Fill in the scenario code: First, provide a unique code for the business scenario, namely the scenario code, and fill in other relevant basic information (such as the scenario name and scenario description). Select the data source: Then select one or more from the previously created data sources to provide the necessary input data for the script code. Write the script code: Finally, write the script code of the script engine based on the selected data source to perform the specific operations and processing required for the corresponding business scenario.
[0056] Through the business scenario script configuration page, users can customize script codes according to the business requirements of the business scenario, thereby realizing automated business process and device management.
[0057] Specifically, the business scenario script configuration list can display information such as script codes and data sources corresponding to different pre-configured business scenarios.
[0058] The business scenario script configuration list can be used to associate the business scenario with the corresponding data source code and script code, so that in the subsequent processing process, the business scenario of device startup can be confirmed by the scenario code, and finally the corresponding script code and data source can be called through the business scenario script configuration list.
[0059] The script configuration list of the business scenario provides a clear view for users to view and manage the script configuration of the existing business scenario, for example, modify the script configuration of the business scenario or delete the script configuration of the business scenario.
[0060] Optionally, after the step of binding the data source and the script code to the business scenario, it includes: determining a target data source corresponding to the current business scenario based on a data source corresponding to at least one pre-configured business scenario; determining a target script code corresponding to the target data source based on a script code corresponding to at least one pre-configured business scenario; and determining output parameters based on the target data source and the target script code.
[0061] Specifically, a script configuration list of multiple business scenarios is pre-configured, and the target data source corresponding to the current business scenario and the target script code corresponding to the target data source can be confirmed through the script configuration list.
[0062] Exemplarily, the corresponding executable script code is obtained according to the scenario coding of the business scenario and the input parameters (input parameters) of the corresponding data source, and the script can be dynamically generated and executed for a specific business scenario, thereby realizing an automated processing flow.
[0063] In addition, you can also obtain the output parameters (output parameters) of all relevant data sources through the data source code and the input parameters of the data source in the business scenario. By executing the script code and using the information provided by the data source, the required data can be automatically collected and returned, thereby supporting more complex data processing and business logic implementation.
[0064] The current business scenario can be identified by a scenario code. In one embodiment, the current business scenario can be the business scenario with the highest priority among all business scenarios.
[0065] Specifically, the script code is executed by the script engine to generate the corresponding execution results. The script engine is an interpreter of a computer programming language, which is used to interpret and execute the user's program text, translate it into machine code that can be executed by the computer, and complete a series of functions.
[0066] In one embodiment, the data source type of the data source is obtained; when the data source type is a preset interface, simulation parameters are set, and when an output parameter acquisition request is received, corresponding output parameters are automatically generated according to the simulation parameters.
[0067] Specifically, data source types include: HTTP interface and database query SQL statement. The default interface is HTTP interface. For example, when obtaining output parameters, if the data source type is HTTP interface, you can set simulation parameters (mock parameters), and the system can automatically generate corresponding output parameters (output parameters) according to the simulation parameters through system analysis. Specifically, different data sources are configured through the data source configuration page.
[0068] Optionally, based on a data source corresponding to at least one pre-configured business scenario, the step of determining a target data source corresponding to the current business scenario includes: obtaining a target business scenario with the highest priority; and obtaining a scenario code and a corresponding target data source corresponding to the target business scenario.
[0069] In this implementation, the priorities of the business scenarios are from high to low: fully automatic startup, semi-automatic startup, and startup application payment amount verification.
[0070] Optionally, the step of determining the target script code corresponding to the target data source according to the pre-configured script code corresponding to at least one business scenario includes: acquiring the script code that can execute the business logic of the target business scenario according to the target data source.
[0071] Specifically, the target data source and target script code associated with the highest priority business scenario can be obtained through the script configuration list.
[0072] Optionally, based on the target data source and the target script code, the step of determining the output parameters includes: judging whether the output parameters meet the power-on conditions of the target business scenario; if so, sending a device power-on instruction to start the target device; if not, taking the next priority business scenario as the target business scenario, and obtaining the output parameters of the target business scenario.
[0073] Optionally, the step of obtaining the output parameters of all relevant data sources according to the data source code, the input parameters of the data source and the script code includes: determining whether the output parameters meet the power-on conditions of the corresponding business scenario; if so, sending a device power-on instruction; if not, taking the next priority business scenario as the target business scenario, and obtaining the output parameters of the target business scenario.
[0074] Exemplarily, after obtaining the data source and script code required for "fully automatic startup of equipment", execute the corresponding script code, obtain its execution result (output parameter), and judge whether the startup conditions of "fully automatic startup of equipment" are met according to the execution result. After confirming that the startup conditions of the highest priority target business scenario "fully automatic startup of equipment" are not met, obtain the next priority business scenario "semi-automatic startup of equipment". Then obtain its corresponding data source and script code, and execute the script code to obtain the execution result. According to the execution result, judge whether the startup conditions of "semi-automatic startup of equipment" are met. If the conditions are still not met, continue with the next priority business scenario "verification of the amount of payment applied for equipment startup", and judge whether "verification of the amount of payment applied for equipment startup" meets the startup conditions.
[0075] In other implementations, the business scenario for starting up the device may be pre-set, so that the business scenario of the target device can be directly obtained according to the scenario code, so that the data source and script code of the business scenario can be directly obtained, and the execution result of the script code can be obtained after the script code is executed, so as to judge whether the target device meets the startup condition under the set business scenario according to the execution result. That is, after the device is produced, a specific business scenario is set for the device in order to realize the startup control of the device.
[0076] For example, see Figure 2 , Figure 2A business scenario data flow chart of a device startup rule configuration method shown in the present invention.
[0077] like Figure 2 As shown, the process of fully automatic startup is as follows:
[0078] Scheduled task execution: Automatically obtain the list of currently locked devices through the set scheduled tasks.
[0079] Information collection: Traverse customer information and extract the parameters required by the script engine.
[0080] Parameter transfer: Pass the fully automatic scenario encoding and related customer information parameters to the system.
[0081] Script code acquisition: Read the configuration information according to the passed parameters and obtain the corresponding automatic startup script code and parameters.
[0082] Script execution: The obtained fully automatic startup script code is executed through the script engine, and the final execution result is obtained.
[0083] Condition judgment: If the execution result meets the preset power-on condition, the power-on command will be automatically sent to the IoT platform to complete the automatic power-on of the device. If the execution result does not meet the preset power-on condition, the semi-automatic power-on process will be executed.
[0084] It should be noted that the preset power-on conditions may be the number of devices and the amount of charges, etc., which may be customized by the user.
[0085] like Figure 2 As shown in the figure, the process of semi-automatic startup is as follows:
[0086] Customer selection: Select a specific customer and initiate a startup application.
[0087] Parameter transfer: After receiving the power-on application, obtain the semi-automatic scene code and parameters related to the customer information.
[0088] Script code acquisition: Read the configuration information and obtain the script code required for semi-automatic startup.
[0089] Script execution: Execute the script code and obtain the execution result through the script engine.
[0090] Result processing: If the execution result meets the startup conditions, the startup application will be accepted and submitted. If the execution result does not meet the startup conditions, the startup application payment amount verification process will be executed.
[0091] Send command: Send a power-on command to the IoT platform to start the device.
[0092] like Figure 2As shown in the figure, the process of verifying the amount of payment for startup application is as follows:
[0093] Customer selection and information filling: Select the customer and fill in the estimated repayment amount to initiate the startup application.
[0094] Parameter passing: Get the startup application payment amount verification scenario code and related parameters.
[0095] Script code acquisition: Read the configuration information and obtain the script code used to calculate the minimum repayment amount.
[0096] Script execution: Execute the script code and obtain the calculation results through the script engine.
[0097] Condition judgment: If the calculation result shows that the repayment amount meets the conditions, the startup application will be allowed and enter the approval process.
[0098] Approval and instruction sending: After approval, the instruction is sent to the IoT platform to complete the device startup; if the conditions are not met, the device cannot be started.
[0099] Through the above method, the corresponding executable script code is obtained according to the business scenario code and the input parameters of the data source, and the script can be dynamically generated and executed for a specific business scenario, thereby realizing an automated processing flow; the output parameter (output parameter) data values of all relevant data sources can also be obtained through the data source code and the input parameters of the data source, so as to automatically collect and return the required data according to the information provided by the data source, so as to support more complex data processing and business logic implementation.
[0100] The device startup rule configuration method provided by the present invention can realize the customization of script codes for specific business scenarios by associating and binding business scenarios with pre-configured data sources and script codes, thereby enhancing the flexibility and responsiveness of the system, and being able to quickly obtain corresponding script codes according to different business scenarios and data sources to make device startup decisions.
[0101] The present application also provides an electronic device, which includes: a memory and a processor, wherein a device startup rule configuration program is stored in the memory, and when the device startup rule configuration program is executed by the processor, the steps of the device startup rule configuration method as described in any one of the above are implemented.
[0102] The electronic device (intelligent terminal) can be a server, a mobile phone, a computer, or other terminals carrying an operating system. The electronic device can also be a combination of multiple terminal devices.
[0103] The present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned device startup rule configuration method.
[0104] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0105] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0108] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0109] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0110] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0111] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a portion of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiments of the present invention can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the embodiments of the present invention.
[0113] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the specific details in the above embodiments. The above embodiments and drawings are exemplary. The modules or processes in the drawings are not necessarily required to implement the embodiments of the present invention and cannot be understood as limitations on the present invention. Within the technical concept of the present invention, the technical scheme of the present invention can be subjected to a variety of simple modifications and combinations, and these simple modifications and combinations all belong to the protection scope of the present invention.
Claims
1. A method for configuring device startup rules, characterized in that: include: Pre-configure corresponding data sources according to the requirements of at least one business scenario; Write script code based on at least one data source to implement business logic corresponding to different business scenarios; The data source and script code are bound to the business scenario.
2. The device startup rule configuration method according to claim 1, characterized in that: The data source includes: data source code, data source name, data source type, input parameters / conditions, output parameters / query fields and path / data table.
3. The device startup rule configuration method according to claim 2, characterized in that: The step of binding the data source and the script code to the business scenario includes: In response to a script configuration request of a target business scenario, associating the target business scenario with at least one data source; Corresponding script code is acquired based on the at least one data source, and the script code is associated with the target business scenario.
4. The device startup rule configuration method according to claim 3, characterized in that: After the step of acquiring corresponding script code based on the at least one data source and associating the script code with the target business scenario, the method further includes: A script configuration list of the target business scenario is generated according to the target business scenario, at least one data source and a script code, wherein the script configuration list includes: a scenario code, a scenario name, a scenario description of the target business scenario and a data source code, a script code, a creator and a creation time of at least one data source.
5. The device startup rule configuration method according to claim 1, characterized in that: After the step of binding the data source and the script code to the business scenario, the method further includes: Determine a target data source corresponding to the current business scenario according to a pre-configured data source corresponding to at least one business scenario; Determine the target script code corresponding to the target data source according to the pre-configured script code corresponding to at least one business scenario; Based on the target data source and the target script code, output parameters are determined.
6. The device startup rule configuration method according to claim 5, characterized in that: The step of determining the target data source corresponding to the current business scenario according to the pre-configured data source corresponding to at least one business scenario comprises: Get the target business scenario with the highest priority; Obtain the scenario code corresponding to the target business scenario and the corresponding target data source.
7. The device startup rule configuration method according to claim 6, characterized in that: The step of determining the target script code corresponding to the target data source according to the pre-configured script code corresponding to at least one business scenario includes: Script code that can execute the business logic of the target business scenario is obtained according to the target data source.
8. The device startup rule configuration method according to claim 7, characterized in that: The step of determining output parameters based on the target data source and the target script code comprises: Determining whether the output parameters meet the startup conditions of the target business scenario; If yes, send a device power-on command to start the target device; If not, the business scenario with the next priority is taken as the target business scenario, and the output parameters of the target business scenario are obtained.
9. An electronic device, characterized in that: The electronic device comprises: a memory and a processor, wherein the memory stores a device startup rule configuration program, and when the device startup rule configuration program is executed by the processor, the steps of the device startup rule configuration method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device startup rule configuration method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Data processing method and device
CN110837356A
Script acquisition method and device
CN114816377A
Low-code service script running method and engine device
CN115268986A
Index rule generation method and device, electronic equipment and storage medium
CN116090867A
Dynamic allocation of resources in surge demand
US20220035677A1