CN114398104B - Script processing method, device, equipment and storage medium - Google Patents

Script processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114398104B
CN114398104B CN202210062306.4A CN202210062306A CN114398104B CN 114398104 B CN114398104 B CN 114398104B CN 202210062306 A CN202210062306 A CN 202210062306A CN 114398104 B CN114398104 B CN 114398104B
Authority
CN
China
Prior art keywords
script
target
execution
function
authority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210062306.4A
Other languages
Chinese (zh)
Other versions
CN114398104A (en
Inventor
黄林鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202210062306.4A priority Critical patent/CN114398104B/en
Publication of CN114398104A publication Critical patent/CN114398104A/en
Application granted granted Critical
Publication of CN114398104B publication Critical patent/CN114398104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to data processing and provides a script processing method, a script processing device, script processing equipment and a storage medium. According to the method, whether a script management tool corresponding to script execution requirements exists in a server can be detected, if so, a target script on the script management tool is positioned, script detail information of the target script is obtained, whether the target script can finish processing the script execution requirements or not is detected according to the script detail information, if not, operation authority of a target user to the target script is identified according to the script detail information, if the operation authority comprises preset authority, script upgrading is conducted on the target script according to the script execution requirements, an upgrading script is obtained, operation processing is conducted on the upgrading script based on the execution authority, an execution result is obtained, the situation that a plurality of scripts realize the same function can be avoided, and generation efficiency of the execution result is improved. Furthermore, the present invention relates to blockchain techniques, and the execution results may be stored in the blockchain.

Description

Script processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a script processing method, device, equipment, and storage medium.
Background
In the current batch job scheduling platform, when a certain request needs to be executed, a development user generally generates a new script directly according to the execution requirement, and each generated script is an independent copy and is not associated with each other, so that the situation that a plurality of scripts realize the same function occurs, the difficulty of script management is increased, and the generation efficiency of a request result is low.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a script processing method, apparatus, device, and storage medium that can not only avoid the situation where a plurality of scripts implement the same function, but also improve the efficiency of generating execution results.
In one aspect, the present invention provides a script processing method, applied to an electronic device, where the electronic device communicates with a server, the script processing method includes:
acquiring script execution requirements of a target user;
Detecting whether a script management tool corresponding to the script execution requirement exists in the server or not;
if the script management tool exists in the server, locating a target script on the script management tool;
script detail information of the target script is obtained;
detecting whether the target script can finish the processing of the script execution requirement according to the script detail information;
if the target script cannot finish the processing of the script execution requirement, identifying the operation authority of the target user on the target script according to the script detail information;
if the operation authority comprises the preset authority, carrying out script upgrading on the target script according to the script execution requirement to obtain an upgrading script;
And carrying out operation processing on the upgrade script based on the execution authority in the operation authority to obtain an execution result, wherein the execution authority is different from the preset authority.
According to a preferred embodiment of the present invention, the detecting whether a script management tool corresponding to the script execution requirement exists in the server includes:
Extracting key functions from the script execution demands based on a function mapping table, and acquiring function identifiers of the key functions from the function mapping table;
writing the function identifier into a preset expression to obtain a regular expression;
Acquiring a tool mapping table of a script management library from the server;
Processing the tool mapping table based on the regular expression to obtain an operation result;
and if the running result comprises the function identifier, determining that the script management tool exists in the server.
According to a preferred embodiment of the present invention, after detecting whether a script management tool corresponding to the script execution requirement exists in the server, the script processing method further includes:
If the script management tool does not exist in the server, displaying a preset script generation interface, wherein the preset script generation interface comprises a submit button;
When the completion of triggering of the submit button is monitored, acquiring an input script in the preset script generation interface;
and creating a target tool according to the input script.
According to a preferred embodiment of the present invention, locating the target script on the script management tool includes one or more of the following combinations:
Acquiring script generation time of all management scripts in the script management tool, and determining the management script with the largest script generation time as the target script; and/or
And acquiring the script use times of all the management scripts, and determining the management script with the largest script use times as the target script.
According to a preferred embodiment of the present invention, the detecting whether the target script can fulfill the script execution requirement according to the script detail information includes:
Extracting script content of the target script from the script detail information;
Analyzing the script content to obtain the execution function of the target script;
dividing the script execution requirement to obtain a plurality of function indexes;
detecting whether each function index is contained in the execution function;
If the execution function does not contain any function index, determining that the target script cannot finish the processing of the script execution requirement; or alternatively
If the execution function comprises each function index, determining that the target script can finish the processing of the script execution requirement.
According to a preferred embodiment of the present invention, the performing script upgrade on the target script according to the script execution requirement, to obtain an upgrade script includes:
Determining a function index different from the execution function as a target index;
Capturing an execution script of the target user on the target index;
and merging the execution script and the target script to obtain the upgrade script.
According to a preferred embodiment of the present invention, the identifying, according to the script detail information, the operation authority of the target user on the target script includes:
extracting script generation users of the target script from the script detail information;
detecting whether the target user and the script generation user are the same user or not;
If the target user and the script generation user are the same user, determining that the operation authority comprises the preset authority and the execution authority;
if the target user and the script generation user are not the same user, extracting a sharing user of the target script from the script detail information;
detecting whether the target user exists in the sharing user;
and if the target user exists in the shared user, determining that the operation authority comprises the execution authority.
In another aspect, the present invention further provides a script processing apparatus, which is run in an electronic device, where the electronic device communicates with a server, and the script processing apparatus includes:
the acquisition unit is used for acquiring script execution requirements of the target user;
The detection unit is used for detecting whether a script management tool corresponding to the script execution requirement exists in the server or not;
The positioning unit is used for positioning a target script on the script management tool if the script management tool exists in the server;
the acquisition unit is also used for acquiring script detail information of the target script;
The detection unit is further used for detecting whether the target script can finish the processing of the script execution requirement according to the script detail information;
the identification unit is used for identifying the operation authority of the target user on the target script according to the script detail information if the target script cannot finish the processing of the script execution requirement;
The upgrading unit is used for carrying out script upgrading on the target script according to the script execution requirement if the operation authority comprises a preset authority so as to obtain an upgrading script;
And the running unit is used for running the upgrade script based on the execution authority in the operation authority to obtain an execution result, wherein the execution authority is different from the preset authority.
In another aspect, the present invention also proposes an electronic device, including:
A memory storing computer readable instructions; and
And a processor executing the computer readable instructions stored in the memory to implement the script processing method.
In another aspect, the present invention also proposes a computer readable storage medium having stored therein computer readable instructions that are executed by a processor in an electronic device to implement the script processing method.
According to the technical scheme, the script management tool is used for uniformly managing the scripts with the script execution requirements, the situation that a plurality of scripts realize the same function can be avoided, when the script management tool is detected to exist in the server, the target script can be directly positioned, the user can be prevented from screening the plurality of scripts on the script management tool, whether the target script can finish processing the script execution requirements or not is further detected, the situation that individual functions in the script execution requirements cannot be realized due to the fact that the target script cannot finish processing the script execution requirements can be avoided, the execution integrity of the script execution requirements is improved, further, the operation authority of the target user on the target script is identified to determine whether the target script can be directly upgraded or not, the user without authority is prevented from directly modifying the target script, the safety of the target script is improved, further, the running processing of the upgrading script is prevented, the execution authority is improved based on the repeated execution of the target script, and the generation of the target script execution requirements is improved.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the script processing method of the present invention.
FIG. 2 is a functional block diagram of a preferred embodiment of the script processing apparatus of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing a script processing method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a preferred embodiment of the script processing method of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The script processing method can acquire and process related data based on artificial intelligence technology. Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The script processing method is applied to one or more electronic devices, wherein the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored computer readable instructions, and the hardware of the electronic devices comprises, but is not limited to, microprocessors, application SPECIFIC INTEGRATED Circuits (ASICs), programmable gate arrays (Field-Programmable GATE ARRAY, FPGA), digital signal processors (DIGITAL SIGNAL processors, DSPs), embedded devices and the like.
The electronic device may be any electronic product that can interact with a user in a human-computer manner, such as a Personal computer, a tablet computer, a smart phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a game console, an interactive internet protocol television (Internet Protocol Television, IPTV), a smart wearable device, etc.
The electronic device may comprise a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network electronic device, a group of electronic devices made up of multiple network electronic devices, or a Cloud based Cloud Computing (Cloud Computing) made up of a large number of hosts or network electronic devices.
The network on which the electronic device is located includes, but is not limited to: the internet, wide area networks, metropolitan area networks, local area networks, virtual private networks (Virtual Private Network, VPN), etc.
In at least one embodiment of the invention, the electronic device communicates with a server.
S10, acquiring script execution requirements of a target user.
In at least one embodiment of the present invention, the target user may be any user with development requirements.
The script execution requirement carries a plurality of function identifiers. The script execution requirement can be extracted from the request generated by triggering of the target user, and the specific acquisition mode of the script execution requirement is not limited by the invention.
S11, detecting whether a script management tool corresponding to the script execution requirement exists in the server.
In at least one embodiment of the invention, the script management tool is capable of maintaining a plurality of scripts under key functions in the script execution requirements.
In at least one embodiment of the present invention, the electronic device detecting whether a script management tool corresponding to the script execution requirement exists in the server includes:
Extracting key functions from the script execution demands based on a function mapping table, and acquiring function identifiers of the key functions from the function mapping table;
writing the function identifier into a preset expression to obtain a regular expression;
Acquiring a tool mapping table of a script management library from the server;
Processing the tool mapping table based on the regular expression to obtain an operation result;
and if the running result comprises the function identifier, determining that the script management tool exists in the server.
Wherein the critical function may be the same as the script execution requirement, and the critical function may be different from the script execution requirement. For example, the script execution requirements are: looking at the IP addresses of all devices communicating with the a-terminal, the key functions, extracted, may be: the IP address is looked at.
The function mapping table stores mapping relations between a plurality of functions and the identifiers.
The script management library stores a plurality of version management tools, and each version management tool stores at least one script with a corresponding function.
The key functions are extracted through the function mapping table, so that the problem that the tool mapping table cannot be traversed due to the fact that the script execution requirement does not exist in the function mapping table can be avoided, and the detection convenience of the script management tool is improved.
In at least one embodiment of the present invention, if the running result does not include any character corresponding to the function identifier, it is determined that the script management tool does not exist in the server.
In at least one embodiment of the present invention, after detecting whether a script management tool corresponding to the script execution requirement exists in the server, the script processing method further includes:
If the script management tool does not exist in the server, displaying a preset script generation interface, wherein the preset script generation interface comprises a submit button;
When the completion of triggering of the submit button is monitored, acquiring an input script in the preset script generation interface;
and creating a target tool according to the input script.
The preset script generation interface is an interface for developing a script.
According to the embodiment, when the completion of triggering of the submit button is monitored, the input script can be timely acquired, so that the creation efficiency of the target tool is improved, in addition, the target tool is created when the input script is acquired, and the target tool can be prevented from not containing any script information.
And S12, if the script management tool exists in the server, locating the target script on the script management tool.
In at least one embodiment of the present invention, the target script refers to a management script with the largest generation time or the largest script usage number in the script management tool.
In at least one embodiment of the present invention, the electronic device locating the target script on the script management tool comprises a combination of one or more of:
Acquiring script generation time of all management scripts in the script management tool, and determining the management script with the largest script generation time as the target script; and/or
The script generation time refers to a time when a management script is generated in the script management tool.
According to the embodiment, since the version of the target script is up to date, the execution function of the target script is the most comprehensive, and further when the target script cannot complete the processing of the script execution requirement, the target script is subjected to upgrading processing, so that excessive fluctuation of the target script can be avoided, and the generation efficiency of the upgrading script is improved.
And acquiring the script use times of all the management scripts, and determining the management script with the largest script use times as the target script.
The script use frequency refers to the number of times that a user executes a management script.
In the above embodiment, since the number of times of use of the target scenario is the highest, the management scenario having the largest number of times of use of the scenario is determined as the target scenario, and the multiplexing rate of the target scenario can be improved.
S13, acquiring script detail information of the target script.
In at least one embodiment of the present invention, the script detail information includes specific script content of the target script.
In at least one embodiment of the present invention, the electronic device obtains the script detail information from the target script based on a preset identifier.
S14, detecting whether the target script can finish the processing of the script execution requirement according to the script detail information.
In at least one embodiment of the present invention, the electronic device detecting, according to the script detail information, whether the target script can complete the process of executing the requirement on the script includes:
Extracting script content of the target script from the script detail information;
Analyzing the script content to obtain the execution function of the target script;
dividing the script execution requirement to obtain a plurality of function indexes;
detecting whether each function index is contained in the execution function;
If the execution function does not contain any function index, determining that the target script cannot finish the processing of the script execution requirement; or alternatively
If the execution function comprises each function index, determining that the target script can finish the processing of the script execution requirement.
The execution function refers to function information which can be completed by the target script.
By comparing the execution function with the plurality of function indexes, whether the target script can finish the processing of the script execution requirement can be accurately determined.
And S15, if the target script cannot finish the processing of the script execution requirement, identifying the operation authority of the target user on the target script according to the script detail information.
In at least one embodiment of the present invention, the operation authority may include an execution authority, and the operation authority may further include a preset authority, where the execution authority refers to an authority for performing a running process on a script, and the preset authority refers to an authority for performing a modification process on the script.
In at least one embodiment of the present invention, the electronic device identifying, according to the script detail information, an operation authority of the target user on the target script includes:
extracting script generation users of the target script from the script detail information;
detecting whether the target user and the script generation user are the same user or not;
If the target user and the script generation user are the same user, determining that the operation authority comprises the preset authority and the execution authority;
if the target user and the script generation user are not the same user, extracting a sharing user of the target script from the script detail information;
detecting whether the target user exists in the sharing user;
and if the target user exists in the shared user, determining that the operation authority comprises the execution authority.
Wherein, the script generating user refers to a user who generates the target script.
The sharing user refers to a visible user of the target script.
By the implementation mode, the operation authority of the target user on the target script can be accurately identified.
In at least one embodiment of the present invention, if the target script is capable of completing the processing of the script execution requirement, the method further includes:
And carrying out operation processing on the target script based on the execution authority to obtain the execution result.
By the above embodiment, when the target script can complete the processing of the script execution requirement, the execution processing can be directly performed on the target script based on the execution authority, so that the generation efficiency of the execution result can be improved.
S16, if the operation authority comprises the preset authority, carrying out script upgrading on the target script according to the script execution requirement to obtain an upgrading script.
In at least one embodiment of the present invention, the upgrade script refers to a script capable of completing the script execution requirements.
In at least one embodiment of the present invention, the electronic device performing script upgrade on the target script according to the script execution requirement, and obtaining an upgrade script includes:
Determining a function index different from the execution function as a target index;
Capturing an execution script of the target user on the target index;
and merging the execution script and the target script to obtain the upgrade script.
According to the embodiment, the target script can be upgraded based on the target index, and the upgrading efficiency of the upgrading script is improved.
And S17, performing running processing on the upgrade script based on the execution permission in the operation permission to obtain an execution result, wherein the execution permission is different from the preset permission.
It should be emphasized that, to further ensure the privacy and security of the execution results, the execution results may also be stored in a node of a blockchain.
In at least one embodiment of the present invention, the execution result refers to a result generated after processing an upgrade script corresponding to the script execution requirement.
According to the technical scheme, the script management tool is used for uniformly managing the scripts with the script execution requirements, the situation that a plurality of scripts realize the same function can be avoided, when the script management tool is detected to exist in the server, the target script can be directly positioned, the user can be prevented from screening the plurality of scripts on the script management tool, whether the target script can finish processing the script execution requirements or not is further detected, the situation that individual functions in the script execution requirements cannot be realized due to the fact that the target script cannot finish processing the script execution requirements can be avoided, the execution integrity of the script execution requirements is improved, further, the operation authority of the target user on the target script is identified to determine whether the target script can be directly upgraded or not, the user without authority is prevented from directly modifying the target script, the safety of the target script is improved, further, the running processing of the upgrading script is prevented, the execution authority is improved based on the repeated execution of the target script, and the generation of the target script execution requirements is improved.
FIG. 2 is a functional block diagram of a script processing apparatus according to a preferred embodiment of the present invention. The script processing apparatus 11 includes an acquisition unit 110, a detection unit 111, a positioning unit 112, an identification unit 113, an upgrade unit 114, an operation unit 115, a display unit 116, and a creation unit 117. The module/unit referred to herein is a series of computer readable instructions capable of being retrieved by the processor 13 and performing a fixed function and stored in the memory 12. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The acquisition unit 110 acquires script execution requirements of the target user.
In at least one embodiment of the present invention, the target user may be any user with development requirements.
The script execution requirement carries a plurality of function identifiers. The script execution requirement can be extracted from the request generated by triggering of the target user, and the specific acquisition mode of the script execution requirement is not limited by the invention.
The detection unit 111 detects whether or not there is a script management tool corresponding to the script execution requirement in the server.
In at least one embodiment of the invention, the script management tool is capable of maintaining a plurality of scripts under key functions in the script execution requirements.
In at least one embodiment of the present invention, the detecting unit 111 detects whether a script management tool corresponding to the script execution requirement exists in the server, including:
Extracting key functions from the script execution demands based on a function mapping table, and acquiring function identifiers of the key functions from the function mapping table;
writing the function identifier into a preset expression to obtain a regular expression;
Acquiring a tool mapping table of a script management library from the server;
Processing the tool mapping table based on the regular expression to obtain an operation result;
and if the running result comprises the function identifier, determining that the script management tool exists in the server.
Wherein the critical function may be the same as the script execution requirement, and the critical function may be different from the script execution requirement. For example, the script execution requirements are: looking at the IP addresses of all devices communicating with the a-terminal, the key functions, extracted, may be: the IP address is looked at.
The function mapping table stores mapping relations between a plurality of functions and the identifiers.
The script management library stores a plurality of version management tools, and each version management tool stores at least one script with a corresponding function.
The key functions are extracted through the function mapping table, so that the problem that the tool mapping table cannot be traversed due to the fact that the script execution requirement does not exist in the function mapping table can be avoided, and the detection convenience of the script management tool is improved.
In at least one embodiment of the present invention, if the operation result does not include any character corresponding to the function identifier, the detection unit 111 determines that the script management tool does not exist in the server.
In at least one embodiment of the present invention, after detecting whether a script management tool corresponding to the script execution requirement exists in the server, if the script management tool does not exist in the server, the display unit 116 displays a preset script generation interface, where the preset script generation interface includes a submit button;
When the completion trigger of the submit button is monitored, the acquiring unit 110 acquires an input script in the preset script generating interface;
the creation unit 117 creates a target tool from the input script.
The preset script generation interface is an interface for developing a script.
According to the embodiment, when the completion of triggering of the submit button is monitored, the input script can be timely acquired, so that the creation efficiency of the target tool is improved, in addition, the target tool is created when the input script is acquired, and the target tool can be prevented from not containing any script information.
If the script management tool exists in the server, the positioning unit 112 positions the target script on the script management tool.
In at least one embodiment of the present invention, the target script refers to a management script with the largest generation time or the largest script usage number in the script management tool.
In at least one embodiment of the present invention, the locating unit 112 locates the target script on the script management tool includes one or more of the following combinations:
Acquiring script generation time of all management scripts in the script management tool, and determining the management script with the largest script generation time as the target script; and/or
The script generation time refers to a time when a management script is generated in the script management tool.
According to the embodiment, since the version of the target script is up to date, the execution function of the target script is the most comprehensive, and further when the target script cannot complete the processing of the script execution requirement, the target script is subjected to upgrading processing, so that excessive fluctuation of the target script can be avoided, and the generation efficiency of the upgrading script is improved.
And acquiring the script use times of all the management scripts, and determining the management script with the largest script use times as the target script.
The script use frequency refers to the number of times that a user executes a management script.
In the above embodiment, since the number of times of use of the target scenario is the highest, the management scenario having the largest number of times of use of the scenario is determined as the target scenario, and the multiplexing rate of the target scenario can be improved.
The acquisition unit 110 acquires script detail information of the target script.
In at least one embodiment of the present invention, the script detail information includes specific script content of the target script.
In at least one embodiment of the present invention, the obtaining unit 110 obtains the script detail information from the target script based on a preset identifier.
The detection unit 111 detects whether the target script can complete processing of the script execution requirement based on the script detail information.
In at least one embodiment of the present invention, the detecting unit 111 detecting whether the target script is able to complete the process of executing the requirement for the script according to the script detail information includes:
Extracting script content of the target script from the script detail information;
Analyzing the script content to obtain the execution function of the target script;
dividing the script execution requirement to obtain a plurality of function indexes;
detecting whether each function index is contained in the execution function;
If the execution function does not contain any function index, determining that the target script cannot finish the processing of the script execution requirement; or alternatively
If the execution function comprises each function index, determining that the target script can finish the processing of the script execution requirement.
The execution function refers to function information which can be completed by the target script.
By comparing the execution function with the plurality of function indexes, whether the target script can finish the processing of the script execution requirement can be accurately determined.
If the target script cannot complete the processing of the script execution requirement, the identification unit 113 identifies the operation authority of the target user on the target script according to the script detail information.
In at least one embodiment of the present invention, the operation authority may include an execution authority, and the operation authority may further include a preset authority, where the execution authority refers to an authority for performing a running process on a script, and the preset authority refers to an authority for performing a modification process on the script.
In at least one embodiment of the present invention, the identifying unit 113 identifies the operation authority of the target user to the target script according to the script detail information, including:
extracting script generation users of the target script from the script detail information;
detecting whether the target user and the script generation user are the same user or not;
If the target user and the script generation user are the same user, determining that the operation authority comprises the preset authority and the execution authority;
if the target user and the script generation user are not the same user, extracting a sharing user of the target script from the script detail information;
detecting whether the target user exists in the sharing user;
and if the target user exists in the shared user, determining that the operation authority comprises the execution authority.
Wherein, the script generating user refers to a user who generates the target script.
The sharing user refers to a visible user of the target script.
By the implementation mode, the operation authority of the target user on the target script can be accurately identified.
In at least one embodiment of the present invention, if the target script can complete the processing of the script execution requirement, the execution unit 115 executes the execution processing on the target script based on the execution authority, so as to obtain the execution result.
By the above embodiment, when the target script can complete the processing of the script execution requirement, the execution processing can be directly performed on the target script based on the execution authority, so that the generation efficiency of the execution result can be improved.
If the operation authority includes a preset authority, the upgrading unit 114 performs script upgrading on the target script according to the script execution requirement, so as to obtain an upgraded script.
In at least one embodiment of the present invention, the upgrade script refers to a script capable of completing the script execution requirements.
In at least one embodiment of the present invention, the upgrading unit 114 performs a script upgrade on the target script according to the script execution requirement, and obtaining an upgrade script includes:
Determining a function index different from the execution function as a target index;
Capturing an execution script of the target user on the target index;
and merging the execution script and the target script to obtain the upgrade script.
According to the embodiment, the target script can be upgraded based on the target index, and the upgrading efficiency of the upgrading script is improved.
The running unit 115 performs running processing on the upgrade script based on the execution authority in the operation authorities, so as to obtain an execution result, where the execution authority is different from the preset authority.
It should be emphasized that, to further ensure the privacy and security of the execution results, the execution results may also be stored in a node of a blockchain.
In at least one embodiment of the present invention, the execution result refers to a result generated after processing an upgrade script corresponding to the script execution requirement.
According to the technical scheme, the script management tool is used for uniformly managing the scripts with the script execution requirements, the situation that a plurality of scripts realize the same function can be avoided, when the script management tool is detected to exist in the server, the target script can be directly positioned, the user can be prevented from screening the plurality of scripts on the script management tool, whether the target script can finish processing the script execution requirements or not is further detected, the situation that individual functions in the script execution requirements cannot be realized due to the fact that the target script cannot finish processing the script execution requirements can be avoided, the execution integrity of the script execution requirements is improved, further, the operation authority of the target user on the target script is identified to determine whether the target script can be directly upgraded or not, the user without authority is prevented from directly modifying the target script, the safety of the target script is improved, further, the running processing of the upgrading script is prevented, the execution authority is improved based on the repeated execution of the target script, and the generation of the target script execution requirements is improved.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing the script processing method.
In one embodiment of the invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions, such as script processing programs, stored in the memory 12 and executable on the processor 13.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and may include more or less components than illustrated, or may combine certain components, or different components, e.g. the electronic device 1 may further include input-output devices, network access devices, buses, etc.
The Processor 13 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor 13 is an operation core and a control center of the electronic device 1, connects various parts of the entire electronic device 1 using various interfaces and lines, and executes an operating system of the electronic device 1 and various installed applications, program codes, etc.
Illustratively, the computer readable instructions may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instructions capable of performing a specific function, the computer readable instructions describing a process of executing the computer readable instructions in the electronic device 1. For example, the computer readable instructions may be divided into an acquisition unit 110, a detection unit 111, a positioning unit 112, an identification unit 113, an upgrade unit 114, an operation unit 115, a display unit 116, and a creation unit 117.
The memory 12 may be used to store the computer readable instructions and/or modules, and the processor 13 may implement various functions of the electronic device 1 by executing or executing the computer readable instructions and/or modules stored in the memory 12 and invoking data stored in the memory 12. The memory 12 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. Memory 12 may include non-volatile and volatile memory, such as: a hard disk, memory, plug-in hard disk, smart memory card (SMART MEDIA CARD, SMC), secure Digital (SD) card, flash memory card (FLASH CARD), at least one magnetic disk storage device, flash memory device, or other storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a physical memory, such as a memory bank, a TF card (Trans-FLASH CARD), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present invention may also be implemented by implementing all or part of the processes in the methods of the embodiments described above, by instructing the associated hardware by means of computer readable instructions, which may be stored in a computer readable storage medium, the computer readable instructions, when executed by a processor, implementing the steps of the respective method embodiments described above.
Wherein the computer readable instructions comprise computer readable instruction code which may be in the form of source code, object code, executable files, or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory).
The blockchain is a novel application mode of computer technologies such as distributed script processing, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
In connection with fig. 1, the memory 12 in the electronic device 1 stores computer readable instructions implementing a script processing method, the processor 13 being executable to implement:
acquiring script execution requirements of a target user;
Detecting whether a script management tool corresponding to the script execution requirement exists in a server or not;
if the script management tool exists in the server, locating a target script on the script management tool;
script detail information of the target script is obtained;
detecting whether the target script can finish the processing of the script execution requirement according to the script detail information;
if the target script cannot finish the processing of the script execution requirement, identifying the operation authority of the target user on the target script according to the script detail information;
if the operation authority comprises the preset authority, carrying out script upgrading on the target script according to the script execution requirement to obtain an upgrading script;
And carrying out operation processing on the upgrade script based on the execution authority in the operation authority to obtain an execution result, wherein the execution authority is different from the preset authority.
In particular, the specific implementation method of the processor 13 on the computer readable instructions may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The computer readable storage medium has stored thereon computer readable instructions, wherein the computer readable instructions when executed by the processor 13 are configured to implement the steps of:
acquiring script execution requirements of a target user;
Detecting whether a script management tool corresponding to the script execution requirement exists in a server or not;
if the script management tool exists in the server, locating a target script on the script management tool;
script detail information of the target script is obtained;
detecting whether the target script can finish the processing of the script execution requirement according to the script detail information;
if the target script cannot finish the processing of the script execution requirement, identifying the operation authority of the target user on the target script according to the script detail information;
if the operation authority comprises the preset authority, carrying out script upgrading on the target script according to the script execution requirement to obtain an upgrading script;
And carrying out operation processing on the upgrade script based on the execution authority in the operation authority to obtain an execution result, wherein the execution authority is different from the preset authority.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1. The script processing method is applied to electronic equipment, and the electronic equipment is communicated with a server, and is characterized by comprising the following steps:
acquiring script execution requirements of a target user;
The detecting whether a script management tool corresponding to the script execution requirement exists in the server comprises the following steps: extracting key functions from the script execution demands based on a function mapping table, and acquiring function identifiers of the key functions from the function mapping table; writing the function identifier into a preset expression to obtain a regular expression; acquiring a tool mapping table of a script management library from the server; processing the tool mapping table based on the regular expression to obtain an operation result; if the running result comprises the function identifier, determining that the script management tool exists in the server;
If the script management tool exists in the server, locating a target script on the script management tool, wherein the target script is the script with the latest version, and/or the target script is the script with the highest use times;
script detail information of the target script is obtained;
The step of detecting whether the target script can fulfill the script execution requirement according to the script detail information comprises the following steps: extracting script content of the target script from the script detail information; analyzing the script content to obtain the execution function of the target script; dividing the script execution requirement to obtain a plurality of function indexes; detecting whether each function index is contained in the execution function; if the execution function does not contain any function index, determining that the target script cannot finish the processing of the script execution requirement; or if the execution function contains each function index, determining that the target script can finish the processing of the script execution requirement;
if the target script cannot finish the processing of the script execution requirement, identifying the operation authority of the target user on the target script according to the script detail information;
If the operation authority includes a preset authority, performing script upgrading on the target script according to the script execution requirement to obtain an upgrading script, including: determining a function index different from the execution function as a target index; capturing an execution script of the target user on the target index; combining the execution script and the target script to obtain the upgrade script;
And carrying out operation processing on the upgrade script based on the execution authority in the operation authority to obtain an execution result, wherein the execution authority is different from the preset authority.
2. The script processing method of claim 1, wherein after detecting whether a script management tool corresponding to the script execution requirement exists in the server, the script processing method further comprises:
If the script management tool does not exist in the server, displaying a preset script generation interface, wherein the preset script generation interface comprises a submit button;
When the completion of triggering of the submit button is monitored, acquiring an input script in the preset script generation interface;
and creating a target tool according to the input script.
3. The script processing method of claim 1, wherein locating the target script on the script management tool comprises a combination of one or more of:
Acquiring script generation time of all management scripts in the script management tool, and determining the management script with the largest script generation time as the target script; and/or
And acquiring the script use times of all the management scripts, and determining the management script with the largest script use times as the target script.
4. The script processing method of claim 1, wherein the identifying the operation authority of the target user to the target script based on the script detail information comprises:
extracting script generation users of the target script from the script detail information;
detecting whether the target user and the script generation user are the same user or not;
If the target user and the script generation user are the same user, determining that the operation authority comprises the preset authority and the execution authority;
if the target user and the script generation user are not the same user, extracting a sharing user of the target script from the script detail information;
detecting whether the target user exists in the sharing user;
and if the target user exists in the shared user, determining that the operation authority comprises the execution authority.
5. A script processing apparatus operating in an electronic device, the electronic device being in communication with a server, the script processing apparatus comprising:
the acquisition unit is used for acquiring script execution requirements of the target user;
The detecting unit, configured to detect whether a script management tool corresponding to the script execution requirement exists in the server, includes: extracting key functions from the script execution demands based on a function mapping table, and acquiring function identifiers of the key functions from the function mapping table; writing the function identifier into a preset expression to obtain a regular expression; acquiring a tool mapping table of a script management library from the server; processing the tool mapping table based on the regular expression to obtain an operation result; if the running result comprises the function identifier, determining that the script management tool exists in the server;
The positioning unit is used for positioning a target script on the script management tool if the script management tool exists in the server, wherein the target script is the script with the latest version and/or the target script is the script with the highest use times;
the acquisition unit is also used for acquiring script detail information of the target script;
The detecting unit is further configured to detect, according to the script detail information, whether the target script can complete processing of the script execution requirement, where the processing includes: extracting script content of the target script from the script detail information; analyzing the script content to obtain the execution function of the target script; dividing the script execution requirement to obtain a plurality of function indexes; detecting whether each function index is contained in the execution function; if the execution function does not contain any function index, determining that the target script cannot finish the processing of the script execution requirement; or if the execution function contains each function index, determining that the target script can finish the processing of the script execution requirement;
the identification unit is used for identifying the operation authority of the target user on the target script according to the script detail information if the target script cannot finish the processing of the script execution requirement;
The upgrade unit is configured to, if the operation right includes a preset right, perform script upgrade on the target script according to the script execution requirement to obtain an upgrade script, where the upgrade unit includes: determining a function index different from the execution function as a target index; capturing an execution script of the target user on the target index; combining the execution script and the target script to obtain the upgrade script;
And the running unit is used for running the upgrade script based on the execution authority in the operation authority to obtain an execution result, wherein the execution authority is different from the preset authority.
6. An electronic device, the electronic device comprising:
A memory storing computer readable instructions; and
A processor executing computer readable instructions stored in the memory to implement the script processing method of any of claims 1 to 4.
7. A computer-readable storage medium, characterized by: the computer-readable storage medium has stored therein computer-readable instructions that are executed by a processor in an electronic device to implement the script processing method of any of claims 1 to 4.
CN202210062306.4A 2022-01-19 2022-01-19 Script processing method, device, equipment and storage medium Active CN114398104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210062306.4A CN114398104B (en) 2022-01-19 2022-01-19 Script processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210062306.4A CN114398104B (en) 2022-01-19 2022-01-19 Script processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114398104A CN114398104A (en) 2022-04-26
CN114398104B true CN114398104B (en) 2024-06-04

Family

ID=81231050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210062306.4A Active CN114398104B (en) 2022-01-19 2022-01-19 Script processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114398104B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270174A (en) * 2011-08-04 2011-12-07 北京星网锐捷网络技术有限公司 Automatic test method and device
US8522203B1 (en) * 2009-08-28 2013-08-27 Adobe Systems Incorporated Dynamic script management
CN104423948A (en) * 2013-09-02 2015-03-18 阿里巴巴集团控股有限公司 Automatic script operation method and device
CN107070732A (en) * 2017-06-28 2017-08-18 郑州云海信息技术有限公司 The method and device of server configuration information in a kind of batch modification cluster
CN107818102A (en) * 2016-09-12 2018-03-20 平安科技(深圳)有限公司 data extraction method and device
CN109062777A (en) * 2018-08-10 2018-12-21 湖南中车时代通信信号有限公司 A kind of track traffic signal equipment general automation test macro
CN109684195A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, script conversion method and storage medium
CN109683942A (en) * 2018-11-13 2019-04-26 平安科技(深圳)有限公司 Script management method, device, medium and electronic equipment
CN110222104A (en) * 2019-04-30 2019-09-10 中国人民财产保险股份有限公司 Data extraction method, equipment and storage medium
CN110659358A (en) * 2019-09-16 2020-01-07 上海云从企业发展有限公司 Knowledge network management method, device, equipment and medium based on financial business
CN112181485A (en) * 2020-10-20 2021-01-05 平安银行股份有限公司 Script execution method and device, electronic equipment and storage medium
CN113419718A (en) * 2021-06-29 2021-09-21 未鲲(上海)科技服务有限公司 Data transmission method, device, equipment and medium
CN113900937A (en) * 2021-09-30 2022-01-07 杭州贝嘟科技有限公司 Script calling method and device, electronic device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9778953B2 (en) * 2009-06-16 2017-10-03 International Business Machines Corporation Process and system for comprehensive IT discovery without credentials

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8522203B1 (en) * 2009-08-28 2013-08-27 Adobe Systems Incorporated Dynamic script management
CN102270174A (en) * 2011-08-04 2011-12-07 北京星网锐捷网络技术有限公司 Automatic test method and device
CN104423948A (en) * 2013-09-02 2015-03-18 阿里巴巴集团控股有限公司 Automatic script operation method and device
CN107818102A (en) * 2016-09-12 2018-03-20 平安科技(深圳)有限公司 data extraction method and device
CN107070732A (en) * 2017-06-28 2017-08-18 郑州云海信息技术有限公司 The method and device of server configuration information in a kind of batch modification cluster
CN109062777A (en) * 2018-08-10 2018-12-21 湖南中车时代通信信号有限公司 A kind of track traffic signal equipment general automation test macro
CN109684195A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, script conversion method and storage medium
CN109683942A (en) * 2018-11-13 2019-04-26 平安科技(深圳)有限公司 Script management method, device, medium and electronic equipment
CN110222104A (en) * 2019-04-30 2019-09-10 中国人民财产保险股份有限公司 Data extraction method, equipment and storage medium
CN110659358A (en) * 2019-09-16 2020-01-07 上海云从企业发展有限公司 Knowledge network management method, device, equipment and medium based on financial business
CN112181485A (en) * 2020-10-20 2021-01-05 平安银行股份有限公司 Script execution method and device, electronic equipment and storage medium
CN113419718A (en) * 2021-06-29 2021-09-21 未鲲(上海)科技服务有限公司 Data transmission method, device, equipment and medium
CN113900937A (en) * 2021-09-30 2022-01-07 杭州贝嘟科技有限公司 Script calling method and device, electronic device and storage medium

Also Published As

Publication number Publication date
CN114398104A (en) 2022-04-26

Similar Documents

Publication Publication Date Title
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN112541009B (en) Data query method, device, electronic equipment and storage medium
CN112559535B (en) Multithreading-based asynchronous task processing method, device, equipment and medium
CN113050900B (en) Screen sharing method, device, equipment and storage medium
CN112053143B (en) Fund routing method, apparatus, electronic device and storage medium
CN114418398A (en) Scene task development method, device, equipment and storage medium
CN112181485B (en) Script execution method and device, electronic equipment and storage medium
CN112199483B (en) Information input assisting method and device, electronic equipment and storage medium
CN114398104B (en) Script processing method, device, equipment and storage medium
CN116089535A (en) Data synchronization method, device, equipment and storage medium
CN115205032A (en) Credit investigation query method, apparatus, device and storage medium
CN114692204A (en) Data query method, device, equipment and storage medium
CN114329095A (en) System logic diagram generation method, device, equipment and storage medium
CN114003784A (en) Request recording method, device, equipment and storage medium
CN111933241B (en) Medical data analysis method, device, electronic equipment and storage medium
CN114610386A (en) Interaction method, device, equipment and storage medium of H5 and application program
CN114238296A (en) Product index data display method, device, equipment and storage medium
CN114925033A (en) Information uplink method, device, system and storage medium
CN112632098A (en) Dynamic generation method of structured query statement and related equipment
CN113282218A (en) Multi-dimensional report generation method, device, equipment and storage medium
CN111859985A (en) AI customer service model testing method, device, electronic equipment and storage medium
CN112308440B (en) Work order processing method, device, computer equipment and computer readable storage medium
CN114726541B (en) Electronic license reading method, device, equipment and storage medium
CN114741018B (en) Data visualization method, device, equipment and storage medium
CN112667659B (en) Feature processing method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant