Device power-on rule configuration method, electronic devices and computer-readable storage media

By pre-configuring data sources and script code for devices and binding device power-on rules according to different business scenarios, the problems of low flexibility and low efficiency in traditional device management methods are solved, and flexible and efficient device power-on control is achieved.

CN119201250BActive Publication Date: 2026-01-06ZHONGKE YUNGU TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411363579.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2026-01-06
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

Traditional equipment management methods rely on static configuration and manual intervention, resulting in low equipment startup flexibility, low efficiency, and a high risk of errors.

Method used

By pre-configuring data sources and script code, and binding device power-on rules according to different business scenarios, flexible device power-on control can be achieved.

Benefits of technology

It improves the flexibility and accuracy of equipment startup, reduces reliance on manual operation, and increases efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201250B_ABST
    Figure CN119201250B_ABST
Patent Text Reader

Abstract

The application provides a device startup rule configuration method, an electronic device and a computer readable storage medium, and the method comprises the following steps: preconfiguring corresponding data sources according to the requirements of at least one service scenario; writing script codes for realizing the business logic corresponding to different service scenarios based on the at least one data source; and binding the data sources and the script codes with the service scenarios. In the foregoing manner, the corresponding script codes can be automatically acquired according to different service requirements, and the automatic control of the device startup in different scenarios can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of equipment power-on control technology, and in particular to a method for configuring equipment power-on rules, an electronic device, and a readable storage medium. Background Technology

[0002] Device power-on systems are a core component of the Internet of Things (IoT) and remote device management. With technological advancements, an increasing number of devices require remote control and management to achieve automation and intelligence.

[0003] Traditional device management methods typically rely on static configuration and manual intervention, which proves inadequate in today's rapidly changing business environment. For example, static configuration rules often have pre-defined device startup conditions and rules that are difficult to change, resulting in low flexibility in device startup. Manual operation, on the other hand, requires users to manually input 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, electronic device, and computer-readable storage medium to solve the above problems. Summary of the Invention

[0005] The technical problem solved by this invention is to provide a device startup rule configuration method, an electronic device, and a computer-readable storage medium, which can customize script code according to different business scenarios, meet the business needs of different startup scenarios, improve the flexibility of device startup, reduce reliance on manual operation, and improve efficiency and accuracy.

[0006] The technical problem solved by this invention is achieved by the following technical solution:

[0007] A method for configuring device power-on rules includes: pre-configuring a corresponding data source according to the requirements of at least one business scenario; writing script code to implement the 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 parameters / conditions, output parameters / query fields, and path / data table.

[0009] In a preferred embodiment of the present invention, the step of binding the data source and script code with the business scenario includes: in response to a script configuration request of the target business scenario, associating the target business scenario with at least one data source; obtaining the 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 steps of obtaining the 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: generating a script configuration list for the target business scenario based on the target business scenario, the at least one data source, and the script code. 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.

[0011] In a preferred embodiment of the present invention, after the step of binding the data source and script code with the business scenario described above, the method further 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 script code corresponding to at least one pre-configured business scenario includes: obtaining 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, after the step of determining the output parameters based on the target data source and the target script code, the method further includes: determining whether the output parameters meet the power-on conditions of the target business scenario; if yes, sending a device power-on command to start the target device; if no, 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, after the step of obtaining the output parameters of all relevant data sources based on the data source code, the input parameters of the data source, and the script code, the method further includes: determining whether the output parameters meet the power-on conditions of the corresponding business scenario; if yes, sending a device power-on command; if no, 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 includes a memory and a processor, wherein the memory stores a device power-on rule configuration program, and when the processor executes the device power-on rule configuration program, it implements the steps of the device power-on rule configuration method as described in any one of the above descriptions.

[0017] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the device boot rule configuration method as described in any one of the preceding descriptions.

[0018] The technical effects achieved by the present invention using the above technical solution are as follows: by configuring the corresponding data source and code script for different business scenarios, the corresponding execution script code can be quickly obtained according to different business scenarios, which meets the business needs of different boot scenarios, reduces the dependence on manual operation, and improves efficiency and accuracy.

[0019] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the steps of a device startup rule configuration method according to the present invention;

[0021] Figure 2 This is a business scenario data flow diagram illustrating a device startup rule configuration method according to the present invention. Detailed Implementation

[0022] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the embodiments of the present invention. Through the description of the specific embodiments, a more in-depth and specific understanding of the technical means and effects adopted by the present invention to achieve its intended purpose can be obtained. Moreover, the accompanying drawings are only provided for reference and illustration and are not intended to limit the present invention.

[0023] Please see Figure 1 , Figure 1 This invention provides a flowchart of the steps involved in configuring device startup rules.

[0024] like Figure 1 As shown, a device startup rule configuration method provided by an embodiment of the present invention includes the following steps:

[0025] S11: Pre-configure the corresponding data source according to the needs of at least one business scenario.

[0026] In this implementation, the business scenario refers to the conditions or requirements for device startup (under what circumstances to start the device), including fully automatic startup, semi-automatic startup, and startup application payment verification, etc. The data source is the source of the input data required by the script code, containing the input data needed by the script code. The device refers to equipment owned by the customer and purchased from a specific department / company.

[0027] Configuring the data source allows application / script code to correctly connect to the database server and retrieve the necessary parameters. Data source configuration typically includes specifying the database location, authentication information, and any necessary connection parameters.

[0028] S12: Write script code to implement the 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 according to a certain format.

[0031] The script code, which is written and configured using different data sources, can implement the business logic for different business scenarios.

[0032] It's important to note that during the process of writing and configuring script code using a data source, business scenarios can also be configured, specifying the business scenarios in which the script code can be executed. Because different business scenarios correspond to different data sources, business scenario configuration can also be achieved while writing and configuring script code based on the data source. Business scenario configuration associates the business scenario with the data source and the script code.

[0033] In one implementation, when configuring script code, it is first necessary to set the associated business scenario, assign a scenario code to the business scenario, and then select one or more data sources for the business scenario (associating the scenario code with the data source code). Then, based on the selected one or more data sources, corresponding script code is written, and the script code is associated with the data source code to execute the specific operations and processes required by the business scenario.

[0034] The above methods allow for the customization of script code based on different business scenarios, meeting the business needs of various startup scenarios, improving the flexibility of device startup, reducing reliance on manual operation, and enhancing 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 a single business scenario can correspond to multiple data sources. Data sources can provide the necessary input data for subsequent configuration script code.

[0037] Specifically, based on the business requirements of the business scenario, one or more pre-created data sources can be selected. These data sources will provide the necessary input data for the script. If no pre-created data source meets the business requirements, a data source that meets the requirements can be configured according to the business needs.

[0038] Pre-created data sources can be displayed through a data source configuration list for easy user management and reference. The data source configuration list includes information such as: data source code, data source name, data source type, input parameters / conditions, output parameters / query fields, path / data table, etc.

[0039] For example, users can manually configure different data sources in advance. After configuration, they can obtain a list of data source configurations for different data sources and save it in the database for easy management and reference. For instance, users can associate the created data sources with business scenarios or modify the data source configuration list according to the business requirements of those scenarios.

[0040] This implementation primarily supports two types of data sources: HTTP interfaces and database query SQL statements. The following are the detailed steps for configuring the data source:

[0041] Data source encoding and basic information entry:

[0042] Before configuring a data source, a unique code needs to be assigned to it, known as the data source code. This code allows for direct access and association with the data source in subsequent processes. Furthermore, after determining the data source code, other basic information about the data source needs to be edited to facilitate identification and use. This basic information includes: data source name, data source description, and data source type, among others.

[0043] Interface path or lookup table settings:

[0044] Different settings are required depending on the data source type. For example, for HTTP interface types, the path to the interface needs to be specified, which is the URL address for system-external service interaction. For database query types, the database table targeted by the SQL query statement needs to be specified.

[0045] Input parameters:

[0046] Enter the input parameters (input parameters) required for the data source. Input parameters are the conditions or data required when calling the HTTP interface or executing a database query. In other words, input parameters are the data processed after calling the HTTP interface or executing a database query.

[0047] When the data source type is an HTTP interface, you can set mock parameters to automatically generate corresponding output parameters. Alternatively, you can manually set output parameters, but you need to ensure that the manually set output parameters are consistent with the data parameter names returned by the interface.

[0048] When the data source type is a database query SQL statement, you need to manually fill in the field names and aliases of the parameters in order to accurately identify and process the data returned from the database query.

[0049] Output parameters: The results output after processing the input parameters by calling the HTTP interface or executing a database query.

[0050] By following the steps above, you can flexibly configure the required data source and correctly obtain the necessary input parameters and process the data to support subsequent business scenario script configuration and execution.

[0051] Optionally, the step of binding the data source and script code with the business scenario includes: in response to a script configuration request of the target business scenario, associating the target business scenario with at least one data source; obtaining the 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 obtaining the corresponding script code based on the at least one data source and associating the script code with the target business scenario, the method includes: generating a script configuration list for the target business scenario based on the target business scenario, the 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 name for the business scenario that facilitates 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 this script configuration. Creation Time: The date and time the script configuration was created.

[0055] Specifically, scripts for business scenarios can be configured through the business scenario script configuration page. The configuration process includes the following steps: Entering the scenario code: First, provide a unique code for the business scenario, i.e., the scenario code, and fill in other relevant basic information (such as scenario name and scenario description). Selecting a data source: Next, select one or more data sources from the previously created ones to provide the necessary input data for the script code. Writing the script code: Finally, write the script engine's script code based on the selected data source to execute the specific operations and processes required for the corresponding business scenario.

[0056] Through the business scenario script configuration page, users can customize script code according to the business needs of their business scenarios, thereby achieving automated business processes and equipment management.

[0057] Specifically, the business scenario script configuration list can display pre-configured script code and data source information for different business scenarios.

[0058] The business scenario script configuration list can be used to associate business scenarios with corresponding data source codes and script codes. This allows the business scenario of device startup to be confirmed through the scenario code during subsequent processing, and the corresponding script code and data source to be called through the business scenario script configuration list.

[0059] The script configuration list for each business scenario provides users with a clear view, making it easy for them to view and manage existing script configurations for that scenario. This includes functions such as modifying or deleting script configurations for different business scenarios.

[0060] Optionally, after binding the data source and script code to the business scenario, the process 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.

[0061] Specifically, a script configuration list for multiple business scenarios is pre-configured. The target data source corresponding to the current business scenario and the target script code corresponding to the target data source can be identified through the script configuration list.

[0062] For example, the corresponding executable script code can be obtained based on the scenario code of the business scenario and the input parameters (input parameters) of the corresponding data source. This enables the dynamic generation and execution of scripts for specific business scenarios, thereby achieving automated processing.

[0063] In addition, the output parameters of all relevant data sources can be obtained through the data source encoding and input parameters of the data source in the business scenario. By executing script code, the required data can be automatically collected and returned using the information provided by the data source, thereby supporting more complex data processing and business logic implementation.

[0064] The current business scenario can be identified through scenario coding. In one implementation, the current business scenario can be the highest priority business scenario among all business scenarios.

[0065] Specifically, the script code is executed by a script engine, which then generates the corresponding execution results. A script engine is a computer programming language interpreter used to interpret and execute the user's program text, translating it into machine code that the computer can execute to perform 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, the corresponding output parameters are automatically generated based on the simulation parameters.

[0067] Specifically, data source types include HTTP interfaces and database query SQL statements. The default interface is the HTTP interface. For example, when retrieving output parameters, if the data source type is an HTTP interface, mock parameters can be set, and the system can automatically generate the corresponding output parameters based on the mock parameters. Different data sources can be configured through the data source configuration page.

[0068] Optionally, 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.

[0069] In this implementation, the priority of business scenarios from high to low is as follows: fully automatic power-on, semi-automatic power-on, and power-on application for repayment amount verification.

[0070] Optionally, the step of 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 includes: obtaining script code that can execute the business logic of the target business scenario based on 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, after determining the output parameters based on the target data source and the target script code, the process includes: determining whether the output parameters meet the power-on conditions of the target business scenario; if yes, sending a device power-on command to start the target device; if no, taking the next priority business scenario as the target business scenario and obtaining the output parameters of the target business scenario.

[0073] Optionally, after the step of obtaining the output parameters of all relevant data sources based on the data source code, the input parameters of the data source, and the script code, the process includes: determining whether the output parameters meet the power-on conditions of the corresponding business scenario; if yes, sending a device power-on command; if no, taking the next priority business scenario as the target business scenario and obtaining the output parameters of the target business scenario.

[0074] For example, after obtaining the data source and script code required for "fully automatic device power-on," the corresponding script code is executed, and its execution result (output parameters) is obtained. Based on the execution result, it is determined whether the power-on conditions for "fully automatic device power-on" are met. If it is confirmed that the power-on conditions for the highest priority target business scenario, "fully automatic device power-on," are not met, the next priority business scenario, "semi-automatic device power-on," is obtained. Then, its corresponding data source and script code are obtained, and the script code is executed again to obtain the execution result. Based on the result, it is determined whether the power-on conditions for "semi-automatic device power-on" are met. If the conditions are still not met, the process continues to the next priority business scenario, "device power-on application repayment amount verification," and determines whether "device power-on application repayment amount verification" meets the power-on conditions.

[0075] In other implementations, a pre-defined business scenario for device startup can be set. This allows for direct acquisition of the target device's business scenario based on the scenario code, thereby directly obtaining the data source and script code for that scenario. The execution result of the script code is then obtained, and the result is used to determine whether the target device meets the startup conditions under the set business scenario. In other words, after device production, a specific business scenario is set for the device to achieve startup control.

[0076] For example, please refer to Figure 2 , Figure 2This is a business scenario data flow diagram illustrating a device startup rule configuration method according to the present invention.

[0077] like Figure 2 As shown, the fully automatic startup process is as follows:

[0078] Scheduled task execution: Automatically retrieve the list of currently locked devices through a set scheduled task.

[0079] Information gathering: Traverse customer information and extract the parameters required by the script engine.

[0080] Parameter passing: Pass the fully automatic scene code and related customer information parameters to the system.

[0081] Script code retrieval: Read the configuration information based on the passed parameters, and obtain the corresponding fully automatic startup script code and parameters.

[0082] Script execution: The script engine executes the obtained fully automatic startup script code and obtains the final execution result.

[0083] Conditional judgment: If the execution result meets the preset power-on conditions, a power-on command is 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 conditions, a semi-automatic power-on process is executed.

[0084] It should be noted that the preset startup conditions can be the number of devices and the amount of payment, which can be customized by the user.

[0085] like Figure 2 As shown, the semi-automatic startup process is as follows:

[0086] Customer selection: Select a specific customer and initiate a power-on request.

[0087] Parameter transmission: After receiving the power-on request, obtain the semi-automatic scene code and parameters related to customer information.

[0088] Script code retrieval: Read configuration information and retrieve the script code required for semi-automatic startup.

[0089] Script execution: Executes script code and obtains the execution results through the script engine.

[0090] Result processing: If the execution result meets the startup conditions, the startup request is accepted and submitted. If the execution result does not meet the startup conditions, the process of verifying the repayment amount in the startup request is executed.

[0091] Command transmission: Send a power-on command to the IoT platform to turn on the device.

[0092] like Figure 2As shown, the process for verifying the refund amount upon system startup is as follows:

[0093] Customer selection and information entry: Select a customer and enter the expected repayment amount to initiate a device activation request.

[0094] Parameter passing: Obtain the scenario code and related parameters for verifying the repayment amount upon system startup.

[0095] Script code retrieval: Read the configuration information to obtain the script code used to calculate the minimum repayment amount.

[0096] Script execution: Executes the script code and obtains the calculation results through the script engine.

[0097] Condition judgment: If the calculation result shows that the repayment amount meets the conditions, the activation application will be allowed and enter the approval process.

[0098] Approval and instruction transmission: After approval, an instruction is sent to the IoT platform to turn on the device; if the conditions are not met, the device cannot be turned on.

[0099] By using the above methods, the corresponding executable script code can be obtained based on the business scenario code and the input parameters of the data source. This allows for the dynamic generation and execution of scripts for specific business scenarios, thereby achieving automated processing. Furthermore, the output parameter (output parameter) data values ​​of all relevant data sources can be obtained through the data source code and the input parameters of the data source. Based on the information provided by the data source, the required data can be automatically collected and returned to support more complex data processing and business logic implementation.

[0100] The device startup rule configuration method provided by this invention can customize the script code for specific business scenarios by associating and binding business scenarios with pre-configured data sources and script codes, thereby enhancing the system's flexibility and responsiveness. It can quickly obtain the corresponding script code based on different business scenarios and data sources to determine device startup.

[0101] This application also provides an electronic device, the electronic device comprising: a memory and a processor, wherein the memory stores a device power-on rule configuration program, and when the device power-on rule configuration program is executed by the processor, it implements the steps of the device power-on rule configuration method as described in any one of the above.

[0102] Electronic devices (smart terminals) can be servers, mobile phones, computers, and other terminals with operating systems. Electronic devices can also be a combination of multiple terminal devices.

[0103] This application also provides a machine-readable storage medium storing instructions that cause a machine to execute the above-described device power-on rule configuration method.

[0104] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0105] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0106] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0107] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function 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] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0110] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0111] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, which are not necessarily completed at the same time, but may be executed at different times, and their execution order is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments of the present invention can be implemented in hardware or by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of the embodiments of the present invention can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various implementation scenarios of the embodiments of the present invention.

[0113] The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the specific details of the above embodiments. The above embodiments and accompanying drawings are exemplary. The modules or processes in the accompanying drawings are not necessarily necessary for implementing the embodiments of the present invention and should not be construed as limiting the present invention. Within the scope of the technical concept of the present invention, various simple modifications and combinations can be made to the technical solutions of the present invention, and these simple modifications and combinations all fall within the protection scope of the present invention.

Claims

1. A method for configuring a device startup rule, characterized in that, The application relates to a method for realizing a business logic of a business scene, and belongs to the technical field of business logic realization. According to requirements of at least one business scene, a corresponding data source is preconfigured, wherein the data source comprises an HTTP interface and a database query SQL statement; The data source configuration step comprises the following steps: data source coding and basic information filling; interface path or query table setting, wherein for the HTTP interface, the path of the interface needs to be specified, and for the database query SQL statement, the database table to which the SQL query statement is directed needs to be specified; filling in input parameters required by the data source, wherein the input parameters are conditions or data required when the HTTP interface is called or the database query SQL statement is executed; Based on at least one data source, script code realizing the business logic corresponding to different business scenes is written; The data source and the script code are bound to the business scene; According to the preconfigured data source corresponding to at least one business scene, a target data source corresponding to a current target business scene is determined; According to the preconfigured script code corresponding to at least one business scene, target script code corresponding to the target data source is determined; Based on the target data source and the target script code, output parameters are determined, wherein the output parameters are results output after the input parameters are processed by calling the HTTP interface or executing the database query; It is judged whether the output parameters meet the starting condition of the target business scene; If yes, a device starting instruction is sent to start the target device; If no, a business scene with the next priority is taken as the target business scene, and output parameters of the target business scene are obtained.

2. The method of claim 1, wherein the device boot-up rule configuration method is characterized by, The data source comprises data source coding, data source name, data source type, input parameter / condition, output parameter / query field and path / database table.

3. The method of claim 2, wherein the device boot-up rule configuration method is characterized by, The step of binding the data source and the script code to the business scene comprises the following steps: In response to a script configuration request of a target business scene, the target business scene is associated with at least one data source; Based on the at least one data source, corresponding script code is obtained, and the script code is associated with the target business scene.

4. The method of claim 3, wherein the device boot-up rule configuration method is characterized by, After the step of obtaining the script code based on the at least one data source and associating the script code with the target business scene, the following step is included: According to the target business scene, at least one data source and script code, a script configuration list of the target business scene is generated, wherein the script configuration list comprises scene coding, scene name, scene description of the target business scene and data source coding, script code, creator and creation time of the at least one data source.

5. The method of claim 1, wherein the device boot rule configuration method is characterized by, The step of determining the target data source corresponding to the current business scene according to the preconfigured data source corresponding to at least one business scene comprises the following steps: A target business scene with the highest priority is obtained; The scene coding corresponding to the target business scene and the target data source corresponding to the target business scene are obtained.

6. The method of claim 5, wherein the device boot-up rule configuration method is characterized by, The step of determining the target script code corresponding to the target data source according to the preconfigured script code corresponding to at least one business scene comprises the following step: According to the target data source, script code capable of executing the business logic of the target business scene is obtained.

7. An electronic device, comprising: The electronic device comprises a memory and a processor, wherein the memory stores a device startup rule configuration program, and the device startup rule configuration program, when executed by the processor, implements the steps of the device startup rule configuration method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program, and the computer program, when executed by the processor, implements the steps of the device startup rule configuration method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and device

    CN110837356A