Information processing method, device, electronic device and storage medium

By obtaining business requirement information and using a rule engine to automatically generate API interfaces, it solves the problems of complex and low-efficiency API interface generation in the existing technology, achieves fast and accurate API interface generation, and reduces the communication needs between business personnel and developers. .

CN115080005BActive Publication Date: 2024-10-29SHENZHEN ZHIYUAN SPEEDLINK INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210787257.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2024-10-29
Estimated Expiration
2042-07-04

AI Technical Summary

Technical Problem

In the existing technology, it is difficult for developers to understand the meaning of data in business files, resulting in a complex API interface generation process with low efficiency and poor accuracy. Moreover, the connection between business personnel and developers is limited, making it impossible to automatically generate personalized APIs according to business needs. interface.

Method used

By obtaining business demand information, extracting target feature parameters, determining target rules from the rules engine, and generating API interfaces that meet business needs, the pre-built rule engine is used to automatically generate API interfaces, reducing manual adjustments and improving efficiency and accuracy.

Benefits of technology

It realizes the rapid generation of personalized API interfaces based on business needs, improves the efficiency and accuracy of generating API interfaces, reduces personnel communication time, and reduces the complexity of generating API interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080005B_ABST
    Figure CN115080005B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to an information processing method, device, electronic device and storage medium, including: obtaining a first target file and business demand information corresponding to the first target file; extracting target feature parameters from the first target file according to the business demand information; determining the target rule corresponding to the target feature parameter from the rule engine; generating a corresponding API interface according to the target rule and the target feature parameter; and controlling the API interface to generate a second target file that meets the business demand information. This can realize the rapid generation of a personalized API interface according to business needs, so that the API interface outputs data that meets business needs, improves the efficiency of generating the API interface, increases the accuracy of information processing, reduces the communication time of personnel, and reduces the complexity of generating the API interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to an information processing method, device, electronic device, and storage medium. Background Art

[0002] In the prior art, when processing business documents according to business needs, it is necessary to output business data that meets the business needs through a pre-built API interface, and the API interface needs to be written by developers. When writing an API interface for specific business needs, the developer needs to fully communicate with the business personnel, extract the required feature parameters from the business documents, and write an API interface based on the feature parameters and business needs.

[0003] However, when developers write API interfaces, it is difficult to understand the meaning of data in business files, and business personnel cannot understand the machine language used by developers to write interfaces. When generating API interfaces that meet business needs, developers are often required to make multiple modifications, and personalized API interfaces cannot be automatically generated according to business needs. Therefore, the current API interface generation method is relatively single, the connection between business personnel and developers has limitations, and developers need to spend a lot of time on adjustments, resulting in low work efficiency and poor accuracy. Summary of the invention

[0004] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide an information processing method, device, electronic device and storage medium.

[0005] In a first aspect, an embodiment of the present invention provides an information processing method, including:

[0006] Acquire a first target file and business requirement information corresponding to the first target file;

[0007] Extracting target feature parameters from the first target file according to the business requirement information;

[0008] Determine the target rule corresponding to the target feature parameter from the rule engine;

[0009] Generate a corresponding API interface according to the target rule and the target characteristic parameter;

[0010] The API interface is controlled to generate a second target file that meets the business requirement information.

[0011] In a possible implementation, the rule engine is generated in the following manner:

[0012] Generate a correspondence between a plurality of basic rules, a plurality of characteristic parameters and a logical relationship between the plurality of basic rules, wherein the target rule is composed of one or more of the basic rules;

[0013] The rule engine is generated according to the corresponding relationship.

[0014] In a possible implementation, determining the target rule corresponding to the target feature parameter from a rule engine includes:

[0015] Inputting the target feature parameters into the rule engine;

[0016] Determine the target basic rule corresponding to the target characteristic parameter according to the corresponding relationship;

[0017] When the target characteristic parameter corresponds to one of the target basic rules, the target basic rule is used as the target rule;

[0018] or,

[0019] When the target characteristic parameter corresponds to a plurality of the target basic rules, determining the target logical relationship corresponding to the target characteristic parameter;

[0020] Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule;

[0021] The nested rule is used as the target rule.

[0022] In a possible implementation, the generating a corresponding API interface according to the target rule and the target characteristic parameter includes:

[0023] Extracting JSON data in the target rule, wherein the target rule includes at least one segment of JSON data;

[0024] Combining the target feature parameters with the JSON data to generate a rule file;

[0025] Generate a sub-rule engine from the rule file;

[0026] The API interface is generated according to the sub-rule engine.

[0027] In a possible implementation, the rule engine generation method further includes:

[0028] Generate a storage address corresponding to the corresponding relationship;

[0029] Storing the corresponding relationship in the storage address;

[0030] The rule engine is generated according to the storage address.

[0031] In a possible implementation manner, determining the target basic rule corresponding to the target characteristic parameter according to the corresponding relationship includes:

[0032] Searching the storage address for the basic rule corresponding to the target characteristic parameter;

[0033] The basic rules corresponding to the target characteristic parameters are loaded into the rule engine as the target basic rules.

[0034] In a possible implementation manner, determining the target logical relationship corresponding to the target characteristic parameter includes:

[0035] When there are multiple target basic rules, searching the storage address for the logical relationship corresponding to the target characteristic parameter;

[0036] The logical relationship corresponding to the target feature parameter is loaded into the rule engine as the target logical relationship.

[0037] In a second aspect, an embodiment of the present invention provides an information processing device, including:

[0038] An acquisition module, used to acquire a first target file and business requirement information corresponding to the first target file;

[0039] A processing module, used for extracting target characteristic parameters from the first target file according to the business requirement information;

[0040] The processing module is further used to determine the target rule corresponding to the target feature parameter from the rule engine;

[0041] The processing module is further used to generate a corresponding API interface according to the target rule and the target characteristic parameter;

[0042] The processing module is further used to control the API interface to generate a second target file that meets the business requirement information.

[0043] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a control program stored in the memory to implement the information processing method described in any one of the first aspects above.

[0044] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the information processing method described in any one of the first aspects above.

[0045] The information processing method provided by the embodiment of the present invention obtains a first target file and business demand information corresponding to the first target file; extracts target feature parameters from the first target file according to the business demand information; determines the target rule corresponding to the target feature parameter from the rule engine; generates a corresponding API interface according to the target rule and the target feature parameter; and controls the API interface to generate a second target file that meets the business demand information. This enables the rapid generation of a personalized API interface according to business needs, so that the API interface outputs data that meets business needs, improves the efficiency of generating the API interface, increases the accuracy of information processing, reduces the communication time of personnel, and reduces the complexity of generating the API interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of an information processing method provided by an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of a flow chart of another information processing method provided by an embodiment of the present invention;

[0048] Figure 3 A flowchart of another information processing method provided by an embodiment of the present invention;

[0049] Figure 4 A flowchart of another information processing method provided by an embodiment of the present invention;

[0050] Figure 5 A schematic diagram of the structure of an information processing device provided by an embodiment of the present invention;

[0051] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 described embodiments are 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 creative work are within the scope of protection of the present invention.

[0053] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.

[0054] Figure 1 A flowchart of an information processing method provided by an embodiment of the present invention is shown in FIG. Figure 1As shown, the method specifically includes:

[0055] S11. Acquire a first target file and business requirement information corresponding to the first target file.

[0056] The information processing method provided by the embodiment of the present invention is applied to computer devices, including but not limited to smart phones, tablet computers, desktop computers, etc., and specifically automatically generates an API interface that meets business requirements through a pre-built rule engine, so that the API interface outputs data that meets business requirements.

[0057] In this embodiment, the first target file is a business file provided by a business person, and the content of the business file may include but is not limited to text, tables, data, and pictures, etc. The business demand information is the business demand for the business file (for example, the business demand is to extract profit data from the business file and generate a profit annual report).

[0058] Specifically, an input template or selection template for business requirement information is pre-set in the front-end interface. Business personnel can use natural language to fill in business requirements in the input template, or select business requirements in the selection template. The back-end extracts the requirement information based on the filled-in template and uploads the first target file.

[0059] S12. Extracting target feature parameters from the first target file according to the business demand information.

[0060] In this embodiment, the correspondence between business requirement information and characteristic parameters is preset. One business requirement information may correspond to multiple characteristic parameters. The characteristic parameters may be keywords corresponding to the business requirement information and are used to search for data corresponding to the business requirement information in the first target file.

[0061] Specifically, at least one characteristic parameter corresponding to the business requirement information is determined according to the corresponding relationship, the first target file is traversed, and the characteristic parameters appearing in the target file are used as target characteristic parameters.

[0062] S13. Determine the target rule corresponding to the target feature parameter from the rule engine.

[0063] In this embodiment, a rule engine is pre-constructed, and the rule engine includes: 1. A rule set, which includes multiple basic rules written in advance by developers, each basic rule is a piece of JSON data, and each JSON data includes at least one vacant position, which is used to fill in the target feature parameter; 2. A pre-constructed logical relationship, which is used to select multiple basic rules from the rule set according to the target feature parameter, and to combine multiple basic rules into nested rules according to the logical relationship; 3. The correspondence between the feature parameters and the basic rules and the logical relationship.

[0064] Specifically, determine whether the target rule belongs to a basic rule or a nested rule. If it belongs to a basic rule, directly select the corresponding basic rule from the rule set as the target rule. If it belongs to a nested rule, select multiple corresponding basic rules from the rule set, and combine the multiple basic rules according to the corresponding logical relationship to obtain the target rule.

[0065] S14. Generate a corresponding API interface according to the target rule and the target feature parameters.

[0066] In this embodiment, the target rule and the target characteristic parameter are combined to generate a new JSON data, the new JSON data is used to generate a rule file, the rule file is numbered after being released through standard API technology (for example, a rule file numbered API001 is generated), and the numbered rule file is executed by the rule engine according to the API gateway service to generate the corresponding API interface.

[0067] S15. Generate a second target file that meets the business requirement information through the API interface.

[0068] In this embodiment, the above-mentioned API interface can output the first target file as a second target file that meets the business requirement information. The second target file contains business data that meets the business requirements, so that business personnel can directly access the required business data through the API interface, and developers can also directly call the API interface for adjustments.

[0069] The information processing method provided by the embodiment of the present invention obtains a first target file and business demand information; extracts target feature parameters from the first target file according to the business demand information; determines the target rule corresponding to the target feature parameter from the rule engine; generates a corresponding API interface according to the target rule and the target feature parameter; and generates a second target file that meets the business demand information through the API interface. This enables the rapid generation of a personalized API interface according to business needs, so that the API interface outputs data that meets business needs, improves the efficiency of generating the API interface, enables business personnel to quickly and easily obtain business data, reduces the communication between business personnel and developers, increases the accuracy of information processing, and reduces the complexity of generating the API interface.

[0070] Figure 2 A flowchart of another information processing method provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:

[0071] S21, generating a correspondence between a plurality of basic rules, a plurality of characteristic parameters and a plurality of logical relationships between the basic rules; and generating the rule engine according to the correspondence.

[0072] In this embodiment, the developer sets multiple basic rules in the rule engine, and sets the characteristic parameters corresponding to each basic rule. One characteristic parameter can correspond to one or more basic rules. When corresponding to multiple basic rules, the logical relationship between the multiple basic rules corresponding to each characteristic parameter is set. The logical relationship is used to combine multiple basic rules to generate nested rules. The logical relationship may include but is not limited to logical operation relationships such as AND, OR, NOT, XOR, etc. The corresponding relationship among the basic rules, characteristic parameters and logical relationship is set, and the basic rules, characteristic parameters, corresponding relationship and logical relationship are generated into a rule engine.

[0073] In a possible implementation, nested rules are generated directly according to logical relationships, corresponding relationships among basic rules, nested rules, and characteristic parameters are set, and a rule engine is generated by combining the basic rules, nested rules, characteristic parameters, and corresponding relationships. This allows the corresponding nested rules to be directly found when searching for rules according to target characteristic parameters, without the need to combine basic rules according to logical relationships.

[0074] S22. Acquire a first target file and business requirement information; and extract target feature parameters from the first target file according to the business requirement information.

[0075] In this embodiment, the steps are Figure 1 S11-S12 in the example are similar and are briefly described in detail. Figure 1 The relevant description is not repeated here.

[0076] S23. Determine a target rule corresponding to the target feature parameter according to the corresponding relationship.

[0077] In this embodiment, the target feature parameters are input into the rule engine, the target basic rules corresponding to the target feature parameters are searched in the corresponding relationship, and the number of target basic rules is determined. When the number of target basic rules is one, the target basic rule is used as the target rule; when the number of target basic rules is multiple, the logical relationship corresponding to the target feature parameters is determined from the corresponding relationship as the target logical relationship; according to the target logical relationship, multiple target basic rules are combined to generate nested rules, and the nested rules are used as the target rules.

[0078] S24, extracting the JSON data in the target rule; combining the target feature parameters with the JSON data to generate a rule file; generating a sub-rule engine from the rule file; and generating the API interface according to the sub-rule engine.

[0079] In this embodiment, the target rule includes at least one piece of JSON data, the JSON data of the basic rule or the nested rule in the target rule is extracted, the target feature parameter is converted into machine language and filled into the vacant position in the JSON data to obtain new JSON data, the new JSON data is used to generate a rule file, the rule file is numbered, and a sub-rule engine is generated from the numbered rule file according to the API gateway service, and the sub-rule engine is printed into a corresponding API interface.

[0080] S25. Generate a second target file that meets the requirement information through the API interface.

[0081] In this embodiment, the steps are Figure 1 Similar to S15 in the description, please refer to Figure 1 The relevant description is not repeated here.

[0082] For example, the business requirement input by the user is to obtain the average profit data of the first quarter in the business file. Rule engine A extracts the target feature parameters of the first quarter and the average profit according to the business requirement, and determines the corresponding basic rules a, b, and c in the corresponding relationship according to the target feature parameters, where a represents the profit data for January, b represents the profit data for February, and c represents the profit data for March. The corresponding logical relationship is the first logical relationship, which is used to calculate the average value of the data in a, b, and c. According to the first logical relationship, a, b, and c are generated into nested rules, and the nested rules are generated into sub-rule engine A1. A1 is generated into an API interface numbered 001. Business personnel can access the average profit data of the first quarter in the business file through the 001 API.

[0083] The information processing method provided by the embodiment of the present invention generates a correspondence between multiple basic rules, multiple feature parameters and logical relationships; generates a rule engine based on the correspondence; obtains a first target file and business demand information; extracts a target feature parameter from the first target file; determines a target rule corresponding to the target feature parameter based on the correspondence; extracts JSON data in the target rule; combines the target feature parameter with at least one segment of JSON data to generate a rule file; generates a sub-rule engine from the rule file; generates an API interface based on the sub-rule engine; and generates a second target file through the API interface. In this way, it can be achieved that the rules corresponding to the business needs are determined by a pre-built rule engine, and a personalized API interface is automatically generated according to the rules, which improves the efficiency of generating the API interface, enables business personnel to quickly and easily obtain business data, and developers can call the API interface without understanding the business data, which reduces the communication between business personnel and developers, increases the accuracy of information processing, and reduces the complexity of generating the API interface.

[0084] Figure 3A flowchart of another information processing method provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the method specifically includes:

[0085] S31, generating a storage address corresponding to the corresponding relationship; storing the corresponding relationship in the storage address; and generating the rule engine according to the storage address.

[0086] In this embodiment, the rule engine does not need to pre-store basic rules, characteristic parameters, corresponding relationships and logical relationships. Instead, it only stores dynamic storage addresses that can characterize the corresponding relationships. When an API interface needs to be generated, the storage address is accessed in real time to search and load the required rules and data from the storage address.

[0087] Specifically, the developer pre-sets the storage address corresponding to the corresponding relationship, stores the corresponding relationship in the storage address, and generates a rule engine based on the storage address. The corresponding relationship includes: multiple basic rules, multiple feature parameters and multiple logical relationships, as well as the corresponding relationship between the three.

[0088] S32. Acquire a first target file and business requirement information; and extract target feature parameters from the first target file according to the business requirement information.

[0089] In this embodiment, the steps are Figure 1 S11-S12 in the example are similar and are briefly described in detail. Figure 1 The relevant description is not repeated here.

[0090] S33, searching the storage address for the basic rule corresponding to the target feature parameter; loading the basic rule corresponding to the target feature parameter into the rule engine as the target basic rule.

[0091] In this embodiment, the corresponding relationship is searched from the storage address, the basic rule is searched in the corresponding relationship according to the target characteristic parameter, and the basic rule is loaded from the storage address into the rule engine as the target basic rule.

[0092] S34. When there are multiple target basic rules, search the storage address for the logical relationship corresponding to the target feature parameter; load the logical relationship corresponding to the target feature parameter into the rule engine as the target logical relationship.

[0093] In this embodiment, when there are multiple target basic rules, the corresponding relationship is searched from the storage address, the logical relationship is searched in the corresponding relationship according to the target feature parameters, and the logical relationship is loaded from the storage address into the rule engine as the target logical relationship.

[0094] S35. Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule; and using the nested rule as the target rule.

[0095] S36. Generate a corresponding API interface according to the target rules and target feature parameters.

[0096] S37. Generate a second target file that meets the business requirement information through the API interface.

[0097] In this embodiment, the steps are Figure 1 S14-S15 in the description are similar, please refer to Figure 1 The relevant description is not repeated here.

[0098] Figure 4 A flowchart of another information processing method provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the method specifically includes:

[0099] S41, generate multiple first identifiers of multiple basic rules, generate multiple second identifiers of multiple characteristic parameters, generate multiple third identifiers of multiple logical relationships; generate corresponding relationships among the multiple first identifiers, the multiple second identifiers, and the multiple third identifiers.

[0100] S42, store multiple basic rules and multiple first identifiers to the first storage address, store multiple characteristic parameters and multiple second identifiers to the second storage address, store multiple logical relationships and multiple third identifiers to the third storage address, and store corresponding relationships to the fourth storage address; generate a rule engine using the first storage address, the second storage address, the third storage address, and the fourth storage address.

[0101] In this embodiment, the identifiers corresponding to the basic rules, characteristic parameters and logical relationships are pre-set, and only the corresponding relationships are generated between the identifiers of the three. The basic rules, characteristic parameters, logical relationships and corresponding relationships are stored in different locations respectively, and four dynamic storage addresses are generated. When it is necessary to generate an API interface, the required rules and data are loaded in real time according to the dynamic storage address and identifier.

[0102] Specifically, a corresponding first identifier is set for each basic rule, the first identifier is used to characterize the basic rule, and the target basic rule can be found in the first storage address according to the first identifier, and the basic rule and the first identifier are stored in the first storage address; a corresponding second identifier is set for each characteristic parameter, the second identifier is used to characterize the characteristic parameter, and the characteristic parameter and the second identifier are stored in the second storage address; a third identifier is set for each logical relationship, the third identifier is used to characterize the logical relationship, and the logical relationship and the third identifier are stored in the third storage address; only the corresponding relationship between the first identifier, the second identifier and the third identifier is generated, and the corresponding relationship is stored in the fourth storage address. The first storage address, the second storage address, the third storage address and the fourth storage address are written into the rule engine.

[0103] S43, obtaining a first target file and business requirement information; and extracting target feature parameters from the first target file according to the business requirement information.

[0104] In this embodiment, the steps are Figure 1 S11-S12 in the example are similar and are briefly described in detail. Figure 1 The relevant description is not repeated here.

[0105] S44, obtaining the target second identifier of the target characteristic parameter from the second storage address; obtaining the corresponding relationship according to the fourth storage address; and determining the target first identifier corresponding to the target second identifier according to the corresponding relationship.

[0106] In this embodiment, the target second identifier corresponding to the target characteristic parameter is searched from the second storage address, and the target second identifier is loaded into the rule engine; the corresponding relationship is loaded according to the fourth storage address, and the first identifier corresponding to the target second identifier is determined from the corresponding relationship as the target first identifier, wherein the target first identifier is the first identifier of the target basic rule.

[0107] S45, when the number of the target first identifier is one, obtaining the target basic rule according to the target first identifier and the first storage address. When the number of the target first identifier is multiple, determining the target third identifier corresponding to the target second identifier according to the corresponding relationship; and obtaining the target logical relationship according to the target third identifier and the third storage address.

[0108] In this embodiment, the number of target first identifiers is determined. When the number is one, the target basic rule is searched in the first storage address according to the target first identifier, and the target basic rule is loaded into the rule engine. When the number of target first identifiers is multiple, the third identifier corresponding to the target second identifier is determined from the corresponding relationship as the target third identifier, the corresponding logical relationship is searched in the third storage address according to the target third identifier as the target logical relationship, and the target logical relationship is loaded into the rule engine.

[0109] S46. Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule; and using the nested rule as the target rule.

[0110] In this embodiment, multiple target first identifiers corresponding to the target third identifier are determined from the corresponding relationship, multiple target basic rules are searched in the first storage address according to the multiple target first identifiers, and the multiple target basic rules are loaded into the rule engine. The multiple target basic rules are combined into nested rules according to the target logical relationship, and the nested rules are used as target rules.

[0111] S47. Generate a corresponding API interface according to the target rule and the target characteristic parameter; and generate a second target file that meets the business requirement information through the API interface.

[0112] In this embodiment, the steps are Figure 1 S14-S15 in the description are similar, please refer to Figure 1 The relevant description is not repeated here.

[0113] The information processing method provided by the embodiment of the present invention stores multiple basic rules and corresponding first identifiers to a first storage address, stores multiple characteristic parameters and corresponding second identifiers to a second storage address, stores multiple logical relationships and corresponding third identifiers to a third storage address, and stores corresponding relationships to a fourth storage address; generates a rule engine with the first storage address, the second storage address, the third storage address, and the fourth storage address; when it is necessary to generate an API interface, dynamically load the required characteristic parameters, basic rules, corresponding relationships, and logical relationships from the four storage addresses into the rule engine according to the above identifiers, and then generate the corresponding API interface; and generate a second target file through the API interface. Thus, it can be achieved that it is not necessary to store all the rules and corresponding relationships in the rule engine, but to load the required ones in real time when generating the API interface, and it is not necessary to record all the rules and data in the corresponding relationship, only the identifiers are recorded, which reduces the workload and storage space of the rule engine, improves the efficiency of generating the API interface by dynamically loading rules and data, speeds up the speed at which business personnel obtain business data, and improves the accuracy of information processing.

[0114] Figure 5 A schematic diagram of the structure of an information processing device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device specifically includes:

[0115] An acquisition module 51 is used to acquire a first target file and business requirement information corresponding to the first target file;

[0116] A processing module 52, configured to extract target feature parameters from the first target file according to the business requirement information;

[0117] The processing module 52 is further used to determine the target rule corresponding to the target feature parameter from the rule engine;

[0118] The processing module 52 is further used to generate a corresponding API interface according to the target rule and the target characteristic parameter;

[0119] The processing module 52 is further used to control the API interface to generate a second target file that meets the business requirement information.

[0120] In a possible implementation manner, the processing module 52 is specifically used to generate a correspondence between a plurality of basic rules, a plurality of characteristic parameters and a plurality of logical relationships between the basic rules, and the target rule is composed of one or more of the basic rules;

[0121] The rule engine is generated according to the corresponding relationship.

[0122] In a possible implementation, the processing module 52 is specifically configured to input the target feature parameter into the rule engine;

[0123] Determine the target basic rule corresponding to the target characteristic parameter according to the corresponding relationship;

[0124] When the target characteristic parameter corresponds to one of the target basic rules, the target basic rule is used as the target rule;

[0125] or,

[0126] When the target characteristic parameter corresponds to a plurality of the target basic rules, determining the target logical relationship corresponding to the target characteristic parameter;

[0127] Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule;

[0128] The nested rule is used as the target rule.

[0129] In a possible implementation, the processing module 52 is specifically configured to extract JSON data in the target rule, wherein the target rule includes at least one segment of JSON data;

[0130] Combining the target feature parameters with the JSON data to generate a rule file;

[0131] Generate a sub-rule engine from the rule file;

[0132] The API interface is generated according to the sub-rule engine.

[0133] In a possible implementation, the processing module 52 is specifically configured to generate a storage address corresponding to the corresponding relationship;

[0134] Storing the corresponding relationship in the storage address;

[0135] The rule engine is generated according to the storage address.

[0136] In a possible implementation manner, the processing module 52 is specifically configured to search the storage address for the basic rule corresponding to the target characteristic parameter;

[0137] The basic rules corresponding to the target characteristic parameters are loaded into the rule engine as the target basic rules.

[0138] In a possible implementation manner, the processing module 52 is specifically configured to search the storage address for the logical relationship corresponding to the target characteristic parameter when there are multiple target basic rules;

[0139] The logical relationship corresponding to the target feature parameter is loaded into the rule engine as the target logical relationship.

[0140] The information processing device provided in this embodiment may be as follows Figure 5 The device shown in FIG. 1 can perform the following steps: Figure 1-4 All steps of the information processing method in Figure 1-4 For details on the technical effects of the information processing method shown, please refer to Figure 1-4 For the sake of brevity, the relevant description is not repeated here.

[0141] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, Figure 6The electronic device 600 shown includes: at least one processor 601, a memory 602, at least one network interface 604 and other user interfaces 603. The various components in the electronic device 600 are coupled together via a bus system 605. It is understood that the bus system 605 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 605 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 605 is not shown in FIG. Figure 5 Various buses are labeled as bus system 605 .

[0142] The user interface 603 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0143] It can be understood that the memory 602 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 602 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0144] In some implementations, the memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 6021 and an application 6022 .

[0145] The operating system 6021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 6022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 6022.

[0146] In the embodiment of the present invention, by calling the program or instruction stored in the memory 602, specifically, the program or instruction stored in the application 6022, the processor 601 is used to execute the method steps provided by each method embodiment, for example, including:

[0147] Acquire a first target file and business requirement information corresponding to the first target file;

[0148] Extracting target feature parameters from the first target file according to the business requirement information;

[0149] Determine the target rule corresponding to the target feature parameter from the rule engine;

[0150] Generate a corresponding API interface according to the target rule and the target characteristic parameter;

[0151] The API interface is controlled to generate a second target file that meets the business requirement information.

[0152] In a possible implementation, a correspondence between a plurality of basic rules, a plurality of characteristic parameters and a plurality of logical relationships between the basic rules is generated, and the target rule is composed of one or more of the basic rules;

[0153] The rule engine is generated according to the corresponding relationship.

[0154] In one possible implementation, the target feature parameter is input into the rule engine;

[0155] Determine the target basic rule corresponding to the target characteristic parameter according to the corresponding relationship;

[0156] When the target characteristic parameter corresponds to one of the target basic rules, the target basic rule is used as the target rule;

[0157] or,

[0158] When the target characteristic parameter corresponds to a plurality of the target basic rules, determining the target logical relationship corresponding to the target characteristic parameter;

[0159] Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule;

[0160] The nested rule is used as the target rule.

[0161] In a possible implementation, extracting JSON data in the target rule, wherein the target rule includes at least one segment of JSON data;

[0162] Combining the target feature parameters with the JSON data to generate a rule file;

[0163] Generate a sub-rule engine from the rule file;

[0164] The API interface is generated according to the sub-rule engine.

[0165] In a possible implementation, generating a storage address corresponding to the corresponding relationship;

[0166] Storing the corresponding relationship in the storage address;

[0167] The rule engine is generated according to the storage address.

[0168] In a possible implementation, searching the storage address for a basic rule corresponding to the target characteristic parameter;

[0169] The basic rules corresponding to the target characteristic parameters are loaded into the rule engine as the target basic rules.

[0170] In a possible implementation, when there are multiple target basic rules, searching the storage address for the logical relationship corresponding to the target characteristic parameter;

[0171] The logical relationship corresponding to the target feature parameter is loaded into the rule engine as the target logical relationship.

[0172] The method disclosed in the above embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 601 or the instruction in the form of software. The above processor 601 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0173] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0174] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0175] The electronic device provided in this embodiment may be Figure 6 The electronic device shown in FIG. 1 may perform the following steps: Figure 1-4 All steps of the information processing method in Figure 1-4 For details on the technical effects of the information processing method shown, please refer to Figure 1-4 For the sake of brevity, the relevant description is not repeated here.

[0176] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0177] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned information processing method executed on the device side can be implemented.

[0178] The processor is used to execute the information processing program stored in the memory to implement the following steps of the information processing method performed on the device side:

[0179] Acquire a first target file and business requirement information corresponding to the first target file;

[0180] Extracting target feature parameters from the first target file according to the business requirement information;

[0181] Determine the target rule corresponding to the target feature parameter from the rule engine;

[0182] Generate a corresponding API interface according to the target rule and the target characteristic parameter;

[0183] The API interface is controlled to generate a second target file that meets the business requirement information.

[0184] In a possible implementation, a correspondence between a plurality of basic rules, a plurality of characteristic parameters and a plurality of logical relationships between the basic rules is generated, and the target rule is composed of one or more of the basic rules;

[0185] The rule engine is generated according to the corresponding relationship.

[0186] In one possible implementation, the target feature parameter is input into the rule engine;

[0187] Determine the target basic rule corresponding to the target characteristic parameter according to the corresponding relationship;

[0188] When the target characteristic parameter corresponds to one of the target basic rules, the target basic rule is used as the target rule;

[0189] or,

[0190] When the target characteristic parameter corresponds to a plurality of the target basic rules, determining the target logical relationship corresponding to the target characteristic parameter;

[0191] Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule;

[0192] The nested rule is used as the target rule.

[0193] In a possible implementation, extracting JSON data in the target rule, wherein the target rule includes at least one segment of JSON data;

[0194] Combining the target feature parameters with the JSON data to generate a rule file;

[0195] Generate a sub-rule engine from the rule file;

[0196] The API interface is generated according to the sub-rule engine.

[0197] In a possible implementation, generating a storage address corresponding to the corresponding relationship;

[0198] Storing the corresponding relationship in the storage address;

[0199] The rule engine is generated according to the storage address.

[0200] In a possible implementation, searching the storage address for a basic rule corresponding to the target characteristic parameter;

[0201] The basic rules corresponding to the target characteristic parameters are loaded into the rule engine as the target basic rules.

[0202] In a possible implementation, when there are multiple target basic rules, searching the storage address for the logical relationship corresponding to the target characteristic parameter;

[0203] The logical relationship corresponding to the target feature parameter is loaded into the rule engine as the target logical relationship.

[0204] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0205] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0206] The specific implementation methods described above further explain the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An information processing method, characterized in that: include: Acquire a first target file and business requirement information corresponding to the first target file; Extracting target feature parameters from the first target file according to the business requirement information; Determine the target rule corresponding to the target feature parameter from the rule engine; Generate a corresponding API interface according to the target rule and the target characteristic parameter; The API interface is controlled to generate a second target file that meets the business requirement information.

2. The method according to claim 1, characterized in that: The rule engine is generated in the following way: Generate a correspondence between a plurality of basic rules, a plurality of characteristic parameters and a logical relationship between the plurality of basic rules, wherein the target rule is composed of one or more of the basic rules; The rule engine is generated according to the corresponding relationship.

3. The method according to claim 2, characterized in that The determining, from a rule engine, a target rule corresponding to the target feature parameter comprises: Inputting the target feature parameters into the rule engine; Determine the target basic rule corresponding to the target characteristic parameter according to the corresponding relationship; When the target characteristic parameter corresponds to one of the target basic rules, the target basic rule is used as the target rule; or, When the target characteristic parameter corresponds to a plurality of the target basic rules, determining the target logical relationship corresponding to the target characteristic parameter; Combining a plurality of the target basic rules according to the target logical relationship to generate a nested rule; The nested rule is used as the target rule.

4. The method according to claim 3, characterized in that The generating a corresponding API interface according to the target rule and the target characteristic parameter includes: Extracting JSON data in the target rule, wherein the target rule includes at least one segment of JSON data; Combining the target feature parameters with the JSON data to generate a rule file; Generate a sub-rule engine from the rule file; The API interface is generated according to the sub-rule engine.

5. The method according to claim 4, characterized in that The rule engine generation method further includes: Generate a storage address corresponding to the corresponding relationship; Storing the corresponding relationship in the storage address; The rule engine is generated according to the storage address.

6. The method according to claim 5, characterized in that The determining, according to the corresponding relationship, a target basic rule corresponding to the target characteristic parameter includes: Searching the storage address for the basic rule corresponding to the target characteristic parameter; The basic rules corresponding to the target characteristic parameters are loaded into the rule engine as the target basic rules.

7. The method according to claim 6, characterized in that The determining of the target logical relationship corresponding to the target characteristic parameter includes: When there are multiple target basic rules, searching the storage address for the logical relationship corresponding to the target characteristic parameter; The logical relationship corresponding to the target feature parameter is loaded into the rule engine as the target logical relationship.

8. An information processing device, characterized in that: include: An acquisition module, used to acquire a first target file and business requirement information corresponding to the first target file; A processing module, configured to extract target feature parameters from the first target file according to the business requirement information; The processing module is further used to determine the target rule corresponding to the target feature parameter from the rule engine; The processing module is further used to generate a corresponding API interface according to the target rule and the target characteristic parameter; The processing module is further used to control the API interface to generate a second target file that meets the business requirement information.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute an information processing program stored in the memory to implement the information processing method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the information processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A method and system for generating an API

    CN109144512A

  • Method and device for configuring application program interface, storage medium and terminal

    CN111427576A