CN116400988B - Target parameter returning method, storage medium and electronic equipment - Google Patents

Target parameter returning method, storage medium and electronic equipment Download PDF

Info

Publication number
CN116400988B
CN116400988B CN202310675054.7A CN202310675054A CN116400988B CN 116400988 B CN116400988 B CN 116400988B CN 202310675054 A CN202310675054 A CN 202310675054A CN 116400988 B CN116400988 B CN 116400988B
Authority
CN
China
Prior art keywords
target
class
parameter
return
derived
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
CN202310675054.7A
Other languages
Chinese (zh)
Other versions
CN116400988A (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.)
China Travelsky Mobile Technology Co Ltd
Original Assignee
China Travelsky Mobile Technology Co 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 China Travelsky Mobile Technology Co Ltd filed Critical China Travelsky Mobile Technology Co Ltd
Priority to CN202310675054.7A priority Critical patent/CN116400988B/en
Publication of CN116400988A publication Critical patent/CN116400988A/en
Application granted granted Critical
Publication of CN116400988B publication Critical patent/CN116400988B/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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/4492Inheritance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The present invention relates to the field of data processing, and in particular, to a method for returning target parameters, a storage medium, and an electronic device. Comprising the following steps: when a call request of the target derived class to the onDestroy function in the base class is monitored, performing first matching processing on the target derived class, and generating a first parameter return instruction. And the base class configures the target return parameters into the preamble derivative class corresponding to the target derivative class according to the first parameter return instruction. And after the target return parameters are configured to the preamble derived class corresponding to the target derived class, calling and executing the onDestroy function. The invention sets the corresponding back trigger condition by utilizing the operation characteristic of the bottom layer of the operating system, and the trigger condition can be kept valid all the time because the characteristic is not changed along with the version update of the application program. So as to further ensure the smooth return of the parameters and further ensure that the functions of the related pages can be normally realized.

Description

Target parameter returning method, storage medium and electronic equipment
Technical Field
The present invention relates to the field of data processing, and in particular, to a method for returning target parameters, a storage medium, and an electronic device.
Background
With the development of technology, various terminal applications have been developed to meet the corresponding use requirements. Correspondingly, the application program generally comprises a plurality of pages to display different types of content. Meanwhile, in order to meet a certain requirement, a plurality of related pages sometimes need to be sequentially jumped to obtain a plurality of related parameters. The parameters may be parameters entered by the user or the page may be processed to generate parameters based on the user input. When the related parameters are returned to the original page, the original page can be processed according to the parameters, and corresponding information is output so as to realize the target function.
In the prior art, in order to realize the function of returning the corresponding parameters, a specific parameter return trigger condition is configured for each page, and a page jump path corresponding to the current version is configured. And after triggering, the related parameters are returned in sequence along the configured page jump path. However, with the update of the application program, the original trigger condition and/or the page jump are changed, so that the corresponding parameters cannot be returned, and the function of the related page cannot be realized.
Disclosure of Invention
Aiming at the technical problems, the invention adopts the following technical scheme:
according to one aspect of the present invention, there is provided a method for returning a target parameter, the method comprising the steps of:
when a call request of the target derived class to the onDestroy function in the base class is monitored, performing first matching processing on the target derived class, and generating a first parameter return instruction.
And the base class configures the target return parameters into the preamble derivative class corresponding to the target derivative class according to the first parameter return instruction. The leading derived class is a derived class that makes a direct call to the target derived class. The leading derived class and the target derived class have inheritance relation with the base class.
And after the target return parameters are configured to the preamble derived class corresponding to the target derived class, calling and executing the onDestroy function.
A first matching process comprising:
and inquiring an operation result database corresponding to the target derived class according to the target derived class identifier included in the call request. The target derived class is the derived class that received the close request.
And after the target calling information is inquired, acquiring target return parameters from the operation result database according to the target calling information.
And generating a first parameter return instruction according to the target return parameter and the target call information.
According to a second aspect of the present invention, there is provided a non-transitory computer readable storage medium storing a computer program which when executed by a processor implements a method of returning a target parameter as described above.
According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing a method of returning a target parameter as described above when executing the computer program.
The invention has at least the following beneficial effects:
in the invention, each derived class is a corresponding functional page object, and because in the existing running system, the derived class is extended by a base class. I.e. there is an inheritance relationship between the base class and the derived class. Therefore, when any one derived class is closed, an onDestroy function in the base class is called to execute the closing operation corresponding to the derived class needing to be closed. If the corresponding data is deleted and the corresponding running resources are released. The invention utilizes the characteristic in the operation process of the operating system to set the corresponding back trigger condition, and the trigger condition can be kept valid all the time because the characteristic is not changed along with the version update of the application program.
In addition, according to the target derivative class identification included in the call request, the operation result database of various data generated in the operation process of the corresponding target derivative class can be positioned. And the target call information of the leading derivative class to the target derivative class is stored in the operation result database. According to the target call information, a first parameter return instruction can be generated. And the base class carries out configuration of the corresponding parameters according to the first parameter feedback instruction. So as to realize the parameter return function. Because the target call information contains the latest call class and the path information between the called classes, the invention can determine the latest call path, namely the current latest page jump path according to a plurality of target call information. Therefore, the return path of the parameter can be ensured to be the latest available return path, so that the smooth return of the parameter is further ensured, and the function of the related page can be normally realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for returning target parameters according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
According to an aspect of the present invention, as shown in fig. 1, there is provided a method for returning a target parameter, the method comprising the steps of:
s100: when a call request of the target derived class to the onDestroy function in the base class is monitored, performing first matching processing on the target derived class, and generating a first parameter return instruction.
The call event of the onDestroy function in the base class is monitored for derived classes generated in the system using prior art techniques.
Prior to S100, the method further comprises:
s10: when a closing request of a target derived class is obtained, generating a call request of an ondestruction function in a base class according to a target derived class identifier corresponding to the target derived class.
The target derived class identification may be a corresponding page identification.
Since in existing operating systems, the derived classes are extended from the base class extension. I.e. there is an inheritance relationship between the base class and the derived class. Therefore, when any one derived class is closed, an onDestroy function in the base class is called to execute the closing operation corresponding to the derived class needing to be closed. If the corresponding data is deleted and the corresponding running resources are released. The invention sets the corresponding back trigger condition by utilizing the feature, and the trigger condition can be kept valid all the time because the feature cannot be changed along with the version update of the application program.
S200: and the base class configures the target return parameters into the preamble derivative class corresponding to the target derivative class according to the first parameter return instruction. The leading derived class is a derived class that makes a direct call to the target derived class. The leading derived class and the target derived class have inheritance relation with the base class.
Preferably, each derived class of the inheritance base class sequentially stores the data in the corresponding operation result database into a stack according to the sequence of the mutual call.
The method and the device can be used for a scene that a plurality of pages need to jump in sequence and return target parameters when the pages are closed. The inter-call between each derived class in this embodiment is equivalent to the jump between each page. The following example illustrates a jump path of page A, B, C, D as A→B→C→D. The data generated during each page run is stored in the stack in turn. That is, the data of page a is at the top of the stack and the data of page D is at the bottom of the stack. Due to the data structure of the stack, the "before-first-in-last-out" feature is met. Thus, the sequence of returning the parameters along the path D, C, B, a opposite to the jump path is also consistent with the present embodiment. By storing the data in the operation result database in the stack data structure, the accuracy of the return path can be further ensured when the parameters are returned.
S300: and after the target return parameters are configured to the preamble derived class corresponding to the target derived class, calling and executing the onDestroy function.
The onDestroy function includes a program for cleaning data, that is, popping data from the operation result database of each page.
A first matching process comprising:
s101: and inquiring an operation result database corresponding to the target derived class according to the target derived class identifier included in the call request. The target derived class is the derived class that received the close request.
S102: and after the target calling information is inquired, acquiring target return parameters from the operation result database according to the target calling information.
S103: and generating a first parameter return instruction according to the target return parameter and the target call information.
Preferably, the target call information includes a target parameter identifier and a preamble derivative class identifier.
S102, including:
s112: and acquiring the target return parameters from the operation result database according to the target parameter identification.
S103, including:
s113: and respectively generating a corresponding parameter configuration instruction of each preamble derivative class according to the preamble derivative class identifier and the target return parameter.
Specifically, taking the jump path of the page A, B, C, D as the example of a→b→c→d for illustration, when the page D receives the page close instruction, the page D will initiate a call request to the constraint function in the base class. The call request will include the identity of page D, i.e., the target derived class identity. Then, the onDestroy function cleans up the storage space of the corresponding operation result database according to the target derived class identifier, and releases the corresponding buffer resource. Before the ontrol function is executed, the embodiment will query the operation result database corresponding to the page D for whether the instruction for returning a certain type of parameter is included. The instruction is configured to be carried in target call information when the page jumps, for example, when the page C calls the page D, a parameter return instruction is carried, and the parameter return instruction includes a target parameter identifier and an address of a target derivative class to which the target parameter is returned, that is, a leading derivative class identifier. And the target call information is recorded in the operation result database corresponding to the page D.
According to the target derivative class identification included in the call request, the operation result database of various data generated in the operation process of the corresponding target derivative class can be positioned. And the target call information of the leading derivative class to the target derivative class is stored in the operation result database. According to the target call information, a first parameter return instruction can be generated. And the base class carries out configuration of the corresponding parameters according to the first parameter feedback instruction. So as to realize the parameter return function. Because the target call information contains the latest call class and the path information between the called classes, the invention can determine the latest call path, namely the current latest page jump path according to a plurality of target call information. Therefore, the return path of the parameter can be ensured to be the latest available return path, so that the smooth return of the parameter is further ensured, and the function of the related page can be normally realized.
As one possible embodiment of the invention, the preamble derived class is a weex page, and the target derived class is a native page. The communication process between the weex page and the active page comprises the following steps:
s400: an initial call request of the weex page to the active page is obtained.
S410: and analyzing the initial call request by using the JSbridge to generate an intermediate call parameter.
S420: and generating a target call request of the weex page to the native page according to the intermediate call parameters.
when the weex page is communicated with the native page, because of different communication protocols, JSBridge is needed to be used for transferring so as to realize normal communication between the weex page and the native page, and further ensure that the function of jumping from the weex page to the native page can be realized.
As a possible embodiment of the present invention, the data of each derived class of the inheritance base class is stored in the form of a hash table. The hash table includes a query key value and a data storage address corresponding to each derived class of the inheritance base class. Preferably, according to the class name of each derived class of the inheritance base class, a query key value and a data storage address corresponding to each derived class of the inheritance base class are generated.
When a call request of the target derived class to the onDestroy function in the base class is monitored, the method further comprises:
s500: and carrying out second matching processing on the query key value corresponding to the target derived class and each return message, and generating a second parameter return instruction corresponding to the target derived class. Wherein A is i For the ith return information, A i =(a i -b i ,C b i ),a i Is A i Mesogenic derivationQuery key values for classes. b i Is A i Middle and a i Query key values for corresponding target-derived classes. -a key value separator. C (C) b i To from b i And acquiring an instruction of the target return parameter from an operation result database of the corresponding target derivative class.
The second matching process includes:
s501: when the query key value corresponding to the target derived class is equal to b i When the same, according to C b i From b i And acquiring the target return parameters from the operation result database of the corresponding target derived class.
S502: according to the target return parameter and a i And generating a second parameter return instruction.
The multiple pieces of feedback information in this step can be configured in the same database for maintenance and storage. And because the database is not a database of the system, a developer can more conveniently acquire the modification authority of the database for storing the returned information. Therefore, when the application update is performed at a later stage, the new a can be more conveniently updated i -b i And modifying to ensure that the return path of the timely parameters can be updated timely.
a i And b i The generation algorithm of (2) is the same as the generation method of each query key value in the hash table. A specific example is illustrated below:
in the page jump scene that the page jump path is A, B, C and D, the page A needs the return parameter of the page D. The corresponding backhaul information is configured in advance. In this example, page A is the source derived class, a i And generating a value which is calculated by a hash algorithm for the page name of the page A, such as 001010. Page D is the target derived class corresponding to page A. b i The hash algorithm is used to calculate the generated value of the page name of the page D, such as 101010. Therefore, a in this example i -b i =001010-101010。
In this embodiment, a corresponding hash algorithm, such as an MD5 hash algorithm, an SHA-1 hash algorithm, or other existing hash algorithms, may be selected according to actual situations.
When the page D is closed, the query key 101010 corresponding to the page D in the hash table is used for carrying out second matching processing, and after matching, a plurality of parameters needing to be returned are obtained according to the corresponding a i -b i Generates a second parameter return instruction.
S600: and the base class configures the target return parameters into the source derivative class corresponding to the target derivative class according to the second parameter return instruction. The source derived class is a derived class which needs to be called at least once to obtain the target derived class. The target derived class generates target backhaul parameters for the corresponding source derived class.
In this step, each target parameter is configured into a corresponding source derivative class according to the generated multiple second parameter feedback instructions, so as to implement the function of target parameter feedback.
S700: after the target backhaul parameter is configured to the source derived class corresponding to the target derived class, the execute onDestroy function is called.
Preferably, the source derived class is a weex page or a native page.
After the target backhaul parameter is configured into the source derived class corresponding to the target derived class, the method further comprises:
s800: and rendering the corresponding weex page or the native page according to the target return parameter.
After the corresponding page receives the corresponding parameters, the corresponding functions can be realized according to the parameters, and the responsive page is rendered and displayed according to the final result.
In this embodiment, the data of each derived class is stored in a data structure of a hash table. The speed of searching the target parameter can be improved because the speed of searching and deleting the hash table is faster. Meanwhile, since the hash table is not a database of the system, a developer can more conveniently acquire the modification authority of the hash table. And further, the maintenance and the management of developers are more convenient.
In addition, in the embodiment, the feedback information can be modified in real time according to the update of the application program, so that the validity of the parameter feedback path is ensured. And, the bookA in carrying out the backhaul information in the embodiment i -b i When setting, only the query key value of the source derived class and the corresponding target derived class is included. Therefore, when the parameter is returned, the return path is D-A, namely the parameter is directly returned from the page D to the page A, and the return speed is higher because the parameter is not used for passing through the page C and the page B. Meanwhile, due to the reduction of the nodes in the return path, the occurrence of parameter return failure caused by the abnormality of the intermediate node can be further avoided, and the success rate of parameter return is further improved.
According to a second aspect of the present invention, there is provided a non-transitory computer readable storage medium storing a computer program which when executed by a processor implements a method of returning a target parameter as described above.
According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing a method of returning a target parameter as described above when executing the computer program.
Embodiments of the present invention also provide a computer program product comprising program code for causing an electronic device to carry out the steps of the method according to the various exemplary embodiments of the invention described in the present specification when the program product is run on the electronic device.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device according to this embodiment of the invention. The electronic device is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present invention.
The electronic device is in the form of a general purpose computing device. Components of an electronic device may include, but are not limited to: the at least one processor, the at least one memory, and a bus connecting the various system components, including the memory and the processor.
Wherein the memory stores program code that is executable by the processor to cause the processor to perform steps according to various exemplary embodiments of the present invention described in the above section of the exemplary method of this specification.
The storage may include readable media in the form of volatile storage, such as Random Access Memory (RAM) and/or cache memory, and may further include Read Only Memory (ROM).
The storage may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus may be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any device (e.g., router, modem, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. And, the electronic device may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with an electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary method" section of this specification, when the program product is run on the terminal device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
The present invention is not limited to the above embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A method for returning a target parameter, the method comprising the steps of:
when a call request of a target derived class to an onDestroy function in a base class is monitored, performing first matching processing on the target derived class to generate a first parameter return instruction;
the base class configures a target return parameter into a preamble derivative class corresponding to the target derivative class according to the first parameter return instruction; the leading derivative class is a derivative class which directly calls the target derivative class; the leading derivative class and the target derivative class have inheritance relation with the base class;
after the target return parameters are configured to the preamble derived class corresponding to the target derived class, calling and executing an onDestroy function;
the first matching process includes:
inquiring an operation result database corresponding to the target derived class according to the target derived class identifier included in the call request; the target derived class is the derived class which receives the closing request;
after inquiring the target calling information, acquiring target return parameters from the operation result database according to the target calling information;
and generating a first parameter return instruction according to the target return parameter and the target call information.
2. The backhaul method of the target parameter according to claim 1, wherein before monitoring a call request of the target derived class to an ondestrey function in the base class, the backhaul method further comprises:
when a closing request of the target derived class is obtained, generating a call request of an ontrol function in a base class according to a target derived class identifier corresponding to the target derived class.
3. The method for returning a target parameter according to claim 1, wherein the target call information includes a target parameter identifier and a preamble derivative class identifier;
obtaining the target return parameters from the operation result database according to the target call information, wherein the target return parameters comprise:
acquiring a target return parameter from the operation result database according to the target parameter identifier;
generating a first parameter return instruction according to the target return parameter and the target call information, wherein the first parameter return instruction comprises:
and respectively generating a corresponding parameter configuration instruction of each preamble derivative class according to the preamble derivative class identifier and the target return parameter.
4. The method for returning target parameters according to claim 1, wherein the preamble derived class is a weex page and the target derived class is a native page; the communication process between the weex page and the active page comprises the following steps:
acquiring an initial call request of the weex page to the active page;
analyzing the initial call request by using JSbridge to generate an intermediate call parameter;
and generating a target call request of the weex page to the active page according to the intermediate call parameter.
5. The method for returning target parameters according to claim 1, wherein each derived class of the inheritance base class sequentially stores corresponding operation result data in a stack according to the sequence of the mutual call.
6. The method of claim 1, wherein the data of each derived class of the inherited base class is stored in the form of a hash table; the hash table comprises a query key value and a data storage address corresponding to each derived class of the inheritance base class;
when a call request of the target derived class to the onDestroy function in the base class is monitored, the backhaul method further comprises:
performing a second matching process with each returned information by using the query key value corresponding to the target derived class to generate a target derived classA second parameter corresponding to the target derived class returns an instruction; wherein A is i For the ith return information, A i =(a i -b i ,C b i ),a i Is A i Query key values of the medium source derived classes; b i Is A i Middle and a i Query key values of corresponding target derived classes; -a key value separator; c (C) b i To from b i Acquiring an instruction of a target return parameter from an operation result database of a corresponding target derivative class;
the base class configures the target return parameters into source derivative classes corresponding to the target derivative classes according to the second parameter return instruction; the source derived class is a derived class which can be obtained by calling at least once; the target derived class generates a target return parameter of the corresponding source derived class;
after the target return parameters are configured to source derived classes corresponding to the target derived classes, invoking and executing an onDestroy function;
the second matching process includes:
when the query key value corresponding to the target derived class is equal to b i When the same, according to C b i From b i Obtaining a target return parameter from an operation result database of a corresponding target derivative class;
according to the target return parameter and a i And generating a second parameter return instruction.
7. The method of claim 6, wherein the query key and the data storage address corresponding to each derived class of the inheritance base class are generated according to the class name of each derived class of the inheritance base class.
8. The method for returning target parameters according to claim 6, wherein the source derived class is a weex page or a native page;
after the target backhaul parameter is configured into the source derivative class corresponding to the target derivative class, the backhaul method further includes:
and rendering the corresponding weex page or the active page according to the target return parameter.
9. A non-transitory computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements a method of returning a target parameter according to any one of claims 1 to 8.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements a method of returning a target parameter according to any one of claims 1 to 8 when executing the computer program.
CN202310675054.7A 2023-06-08 2023-06-08 Target parameter returning method, storage medium and electronic equipment Active CN116400988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310675054.7A CN116400988B (en) 2023-06-08 2023-06-08 Target parameter returning method, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310675054.7A CN116400988B (en) 2023-06-08 2023-06-08 Target parameter returning method, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN116400988A CN116400988A (en) 2023-07-07
CN116400988B true CN116400988B (en) 2023-08-11

Family

ID=87014636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310675054.7A Active CN116400988B (en) 2023-06-08 2023-06-08 Target parameter returning method, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116400988B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050066338A1 (en) * 2003-09-18 2005-03-24 Anthony Bloesch Exstensibility application programming interface and framework for meta-model objects
US20050203673A1 (en) * 2000-08-18 2005-09-15 Hassanayn Machlab El-Hajj Wireless communication framework
US20080040661A1 (en) * 2006-07-07 2008-02-14 Bryce Allen Curtis Method for inheriting a Wiki page layout for a Wiki page
CN108932123A (en) * 2018-06-21 2018-12-04 北京奇虎科技有限公司 parameter processing method and device
CN114510300A (en) * 2022-01-14 2022-05-17 上海万物新生环保科技集团有限公司 Method and equipment for embedding target object in derived class

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050203673A1 (en) * 2000-08-18 2005-09-15 Hassanayn Machlab El-Hajj Wireless communication framework
US20050066338A1 (en) * 2003-09-18 2005-03-24 Anthony Bloesch Exstensibility application programming interface and framework for meta-model objects
US20080040661A1 (en) * 2006-07-07 2008-02-14 Bryce Allen Curtis Method for inheriting a Wiki page layout for a Wiki page
CN108932123A (en) * 2018-06-21 2018-12-04 北京奇虎科技有限公司 parameter processing method and device
CN114510300A (en) * 2022-01-14 2022-05-17 上海万物新生环保科技集团有限公司 Method and equipment for embedding target object in derived class

Also Published As

Publication number Publication date
CN116400988A (en) 2023-07-07

Similar Documents

Publication Publication Date Title
US11218386B2 (en) Service ticket escalation based on interaction patterns
CN109194606B (en) Attack detection system, method, computer device and storage medium
CN111880826A (en) Cloud service application upgrading method and device, electronic equipment and storage medium
CN110858172A (en) Automatic test code generation method and device
EP4209894A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
CN113805882A (en) Method and device for developing application program, electronic equipment and storage medium
EP4290399A1 (en) Log information processing method and apparatus, device, storage medium, and program product
CN111026439A (en) Application program compatibility method, device, equipment and computer storage medium
CN111782730A (en) File uploading method and device and storage medium
CN111831365A (en) Interface route forwarding method, system, computer equipment and readable storage medium
CN117009911B (en) Abnormality determination method and device for target event, medium and electronic equipment
CN116400988B (en) Target parameter returning method, storage medium and electronic equipment
CN114610446B (en) Method, device and system for automatically injecting probe
US9378123B2 (en) Testing of transaction tracking software
CN114924742A (en) Hot patch making and applying method and device for virtual machine simulation software
CN112612474A (en) Product transplanting method and device, storage medium and electronic equipment
CN111488286A (en) Method and device for independently developing Android module
CN117009962B (en) Anomaly detection method, device, medium and equipment based on effective label
CN115102748B (en) Vulnerability detection method and device, storage medium and electronic equipment
CN112615918B (en) Network management system and information synchronization method thereof
CN117034210B (en) Event image generation method and device, storage medium and electronic equipment
CN113141407B (en) Page resource loading method and device and electronic equipment
CN111680867B (en) Resource allocation method and device and electronic equipment
CN113760404A (en) Page rollback method, device, equipment and storage medium
CN116032612A (en) Method, device, equipment and medium for judging network attack target range

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