CN111949419A - Cross-environment resource acquisition method and device and electronic equipment - Google Patents

Cross-environment resource acquisition method and device and electronic equipment Download PDF

Info

Publication number
CN111949419A
CN111949419A CN202010693028.3A CN202010693028A CN111949419A CN 111949419 A CN111949419 A CN 111949419A CN 202010693028 A CN202010693028 A CN 202010693028A CN 111949419 A CN111949419 A CN 111949419A
Authority
CN
China
Prior art keywords
resource
environment
middleware
parameters
cross
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.)
Pending
Application number
CN202010693028.3A
Other languages
Chinese (zh)
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.)
Shanghai Qifu Information Technology Co ltd
Original Assignee
Shanghai Qifu Information 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 Shanghai Qifu Information Technology Co ltd filed Critical Shanghai Qifu Information Technology Co ltd
Priority to CN202010693028.3A priority Critical patent/CN111949419A/en
Publication of CN111949419A publication Critical patent/CN111949419A/en
Pending legal-status Critical Current

Links

Images

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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the specification provides a cross-environment resource acquisition method, which comprises the steps of extracting resource parameters of resources to be acquired, which are adaptive to a first environment, from a first system, converting the resource parameters into a middleware according to cross-environment rules, sending resource request information carrying the middleware to a second system with a second environment by using a key value transfer parameter communication protocol, receiving the resource request information by the second system, extracting the middleware, analyzing the resource parameters from the middleware by using preset rules, and responding to a resource request by combining the resource parameters. The resource parameters are converted into the middleware, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to the second system with the second environment, so that the second system can directly receive the middleware through the key value transmission parameter communication protocol and analyze the resource parameters from the middleware, and the cross-environment resource acquisition universality is improved by sending the middleware through the key value transmission parameter communication protocol.

Description

Cross-environment resource acquisition method and device and electronic equipment
Technical Field
The present application relates to the field of internet, and in particular, to a method and an apparatus for acquiring cross-environment resources, and an electronic device.
Background
The transmission of data resources between systems has been widely used.
Both sides of a system for data transmission often have different language environments, so that the process of acquiring resources often involves a cross-environment scheme, and the existing cross-environment resource acquisition schemes include rpc, soap and the like, but have higher threshold and poorer universality.
There is a need for a highly versatile method for acquiring resources across environments.
Disclosure of Invention
The embodiment of the specification provides a cross-environment resource obtaining method and device and electronic equipment, and aims to improve universality.
An embodiment of the present specification provides a cross-environment resource obtaining method, including:
extracting resource parameters of resources to be acquired, which are adapted to a first environment, from a first system, and converting the resource parameters of the resources to be acquired into middleware according to a cross-environment rule;
sending resource request information carrying the middleware to a second system with a second environment by using a key value transmission parameter communication protocol;
and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
Optionally, the responding to the resource request in combination with the resource parameter includes:
performing data query and logic processing by using the resource parameters to generate resource information to be acquired;
and sending the resource information to be acquired to a resource requester corresponding to the resource request.
Optionally, the converting the resource parameter of the resource to be acquired into the middleware according to the cross-environment rule includes:
and converting the resource parameters of the resources to be acquired into key value pair character strings in a Json format according to a cross-environment rule.
Optionally, the converting the resource parameter of the resource to be acquired into a key-value pair character string in a Json format according to the cross-environment rule includes:
and generating a Json object, and converting the data structure of the resource parameters into a Json format data structure.
Optionally, the first system is a client application, and the second system is a server.
Optionally, the sending, by using a key-value-transfer-participating type communication protocol, resource request information carrying the middleware to a second system having a second environment includes:
compiling the first language, sending a resource request carrying the middleware to a second system with a second environment by running an executable program generated by compiling the first language in the first environment, and enabling the second system to run the executable program generated by compiling the second language so as to respond to the resource request by combining the resource parameters.
Optionally, the resource parameter is a uniform resource location parameter.
An embodiment of the present specification further provides a cross-environment resource obtaining apparatus, including:
the extraction module is used for extracting resource parameters of resources to be acquired, which are adaptive to a first environment, from the first system and converting the resource parameters of the resources to be acquired into middleware according to a cross-environment rule;
the sending module is used for sending the resource request information carrying the middleware to a second system with a second environment by using a key value transmission parameter communication protocol;
and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
Optionally, the responding to the resource request in combination with the resource parameter includes:
performing data query and logic processing by using the resource parameters to generate resource information to be acquired;
and sending the resource information to be acquired to a resource requester corresponding to the resource request.
Optionally, the converting the resource parameter of the resource to be acquired into the middleware according to the cross-environment rule includes:
and converting the resource parameters of the resources to be acquired into key value pair character strings in a Json format according to a cross-environment rule.
Optionally, the converting the resource parameter of the resource to be acquired into a key-value pair character string in a Json format according to the cross-environment rule includes:
and generating a Json object, and converting the data structure of the resource parameters into a Json format data structure.
Optionally, the first system is a client application, and the second system is a server.
Optionally, the sending, by using a key-value-transfer-participating type communication protocol, resource request information carrying the middleware to a second system having a second environment includes:
compiling the first language, sending a resource request carrying the middleware to a second system with a second environment by running an executable program generated by compiling the first language in the first environment, and enabling the second system to run the executable program generated by compiling the second language so as to respond to the resource request by combining the resource parameters.
Optionally, the resource parameter is a uniform resource location parameter.
An embodiment of the present specification further provides an electronic device, where the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the above methods.
In the various technical solutions provided in the embodiments of the present specification, resource parameters of resources to be acquired, which are adapted to a first environment, are extracted from a first system, the resource parameters are converted into a middleware according to a cross-environment rule, a key value-based parameter communication protocol is used to send resource request information carrying the middleware to a second system having a second environment, the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to a resource request by combining the resource parameters. The resource parameters are converted into the middleware, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to the second system with the second environment, so that the second system can directly receive the middleware through the key value transmission parameter communication protocol and analyze the resource parameters from the middleware, and the cross-environment resource acquisition universality is improved by sending the middleware through the key value transmission parameter communication protocol.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram illustrating a cross-environment resource obtaining method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a cross-environment resource obtaining apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
The existing cross-environment scheme mostly sets parameter conversion rules in two environments respectively, the conversion rules are set for the two environments, if the other environment needs to be requested to acquire resources, the other conversion rule is needed, and therefore one conversion rule cannot use multiple environments.
If middleware supporting multiple environments can be provided, the middleware is made to be parsed by systems of different environments, thereby improving generality.
Therefore, an embodiment of the present specification provides a cross-environment resource obtaining method, including:
extracting resource parameters of resources to be acquired, which are adapted to a first environment, from a first system, and converting the resource parameters of the resources to be acquired into middleware according to a cross-environment rule;
sending resource request information carrying the middleware to a second system with a second environment by using a key value transmission parameter communication protocol;
and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
The resource parameters of the resources to be acquired, which are adaptive to a first environment, are extracted from the first system, the resource parameters are converted into the middleware according to the cross-environment rule, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to a second system with a second environment, the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by utilizing a preset rule, and responds to the resource request by combining the resource parameters. The resource parameters are converted into the middleware, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to the second system with the second environment, so that the second system can directly receive the middleware through the key value transmission parameter communication protocol and analyze the resource parameters from the middleware, and the cross-environment resource acquisition universality is improved by sending the middleware through the key value transmission parameter communication protocol.
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a cross-environment resource obtaining method provided in an embodiment of the present disclosure, where the method may include:
s101: and extracting resource parameters of the resources to be acquired, which are adapted to the first environment, from the first system, and converting the resource parameters of the resources to be acquired into the middleware according to the cross-environment rule.
In the embodiment of the specification, cross-environment can be communication between systems with different environments so as to achieve acquisition of resources.
We may refer to the system requesting the acquisition of the resource as the first system and the system transmitting the resource as the second system.
In one embodiment, the first system is a client application and the second system is a server.
The language environment of the client application is a first environment and the language environment of the server is a second environment.
In this case, the specific scenario for acquiring the resource may be that the client application requests the server to acquire the web page information.
The resource parameter is a uniform resource locator parameter, such as a URL (uniform resource locator).
Considering that currently the Json data structure is supported by most languages, if the Json data structure is used to generate middleware, the middleware can be directly adapted to many environments, and therefore, the universality can be improved.
Therefore, in this embodiment of the present specification, the converting the resource parameter of the resource to be acquired into the middleware according to the cross-environment rule may include:
and converting the resource parameters of the resources to be acquired into key value pair character strings in a Json format according to a cross-environment rule.
Thus, the key-value pair character string in the Json format can be directly sent by a communication protocol and can also be directly analyzed by a cross-environment system.
Converting the resource parameters of the resource to be acquired into key value pair character strings in a Json format according to the cross-environment rule, wherein the method comprises the following steps:
and generating a Json object, and converting the data structure of the resource parameters into a Json format data structure.
A key-value pair string records values of variables in the form of key names and key values, for example: "sign": 22334455", where sign is the key name and 22334455 is the key value, indicates that the value of the variable sign is 22334455.
S102: and sending the resource request information carrying the middleware to a second system with a second environment by using a key value transmission paramedic communication protocol.
After the middleware is generated, a resource request can be sent to a second system with a second environment in combination with the middleware, and the process of sending the request is the process of executing the program.
Optionally, the sending, by using a key-value-transfer-participating type communication protocol, resource request information carrying the middleware to a second system having a second environment includes:
compiling the first language, sending a resource request carrying the middleware to a second system with a second environment by running an executable program generated by compiling the first language in the first environment, and enabling the second system to run the executable program generated by compiling the second language so as to respond to the resource request by combining the resource parameters.
The middleware may contain customized parameters, thereby implementing various complex functions.
S103: and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
The resource parameters of the resources to be acquired, which are adaptive to a first environment, are extracted from the first system, the resource parameters are converted into the middleware according to the cross-environment rule, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to a second system with a second environment, the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by utilizing a preset rule, and responds to the resource request by combining the resource parameters. The resource parameters are converted into the middleware, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to the second system with the second environment, so that the second system can directly receive the middleware through the key value transmission parameter communication protocol and analyze the resource parameters from the middleware, and the cross-environment resource acquisition universality is improved by sending the middleware through the key value transmission parameter communication protocol.
Wherein the responding to the resource request in combination with the resource parameter may include:
performing data query and logic processing by using the resource parameters to generate resource information to be acquired;
and sending the resource information to be acquired to a resource requester corresponding to the resource request.
Because the resource parameters are converted into key value pair character strings in the Json format, and Json is supported by a plurality of language environments, even if the middleware is sent to different systems in different environments, the system receiving the middleware can directly analyze the middleware, the language environment can be universal as long as the Json format is supported, the problem that the rule of the language A to the language B is inconsistent with the rule of the language A to the language C does not exist, and therefore the universality is improved.
The above embodiments can be realized by a general http protocol based on nodejs language, so that languages such as c, java, python, php and the like supporting the http protocol can be used as other systems for seamless docking, and cross-language is realized. The jsonbody data content in the parameter instance can be completely customized, so long as the jsonbody data content is well defined with other systems, and parameter extension is realized to the maximum extent.
In specific implementation, a network communication protocol request may be configured, where the request carries a key name and a key value in a character string form, such as a key name like "appkey", and certainly, the request may also carry information like an authentication code, which is not specifically described and limited herein, so that a party receiving the request can assign a value to a variable according to the key name and the key value to perform logic processing, and then return to a corresponding resource.
Other embodiments are not specifically described herein.
Fig. 2 is a schematic structural diagram of an apparatus for acquiring cross-environment resources according to an embodiment of the present disclosure, where the apparatus may include:
an extracting module 201, configured to extract resource parameters of resources to be acquired, which are adapted to a first environment, from a first system, and convert the resource parameters of the resources to be acquired into middleware according to a cross-environment rule;
a sending module 202, configured to send, to a second system having a second environment, resource request information carrying the middleware by using a key value parameter communication protocol;
and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
Optionally, the responding to the resource request in combination with the resource parameter includes:
performing data query and logic processing by using the resource parameters to generate resource information to be acquired;
and sending the resource information to be acquired to a resource requester corresponding to the resource request.
Optionally, the converting the resource parameter of the resource to be acquired into the middleware according to the cross-environment rule includes:
and converting the resource parameters of the resources to be acquired into key value pair character strings in a Json format according to a cross-environment rule.
Optionally, the converting the resource parameter of the resource to be acquired into a key-value pair character string in a Json format according to the cross-environment rule includes:
and generating a Json object, and converting the data structure of the resource parameters into a Json format data structure.
Optionally, the first system is a client application, and the second system is a server.
Optionally, the sending, by using a key-value-transfer-participating type communication protocol, resource request information carrying the middleware to a second system having a second environment includes:
compiling the first language, sending a resource request carrying the middleware to a second system with a second environment by running an executable program generated by compiling the first language in the first environment, and enabling the second system to run the executable program generated by compiling the second language so as to respond to the resource request by combining the resource parameters.
Optionally, the resource parameter is a uniform resource location parameter.
The device extracts resource parameters of resources to be acquired, which are adaptive to a first environment, from a first system, converts the resource parameters into a middleware according to a cross-environment rule, transmits resource request information carrying the middleware to a second system with a second environment by using a key value transmission parameter communication protocol, receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to a resource request by combining the resource parameters. The resource parameters are converted into the middleware, the key value transmission parameter communication protocol is utilized to send the resource request information carrying the middleware to the second system with the second environment, so that the second system can directly receive the middleware through the key value transmission parameter communication protocol and analyze the resource parameters from the middleware, and the cross-environment resource acquisition universality is improved by sending the middleware through the key value transmission parameter communication protocol.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the various system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage 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 storage 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 for aspects 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A cross-environment resource acquisition method is characterized by comprising the following steps:
extracting resource parameters of resources to be acquired, which are adapted to a first environment, from a first system, and converting the resource parameters of the resources to be acquired into middleware according to a cross-environment rule;
sending resource request information carrying the middleware to a second system with a second environment by using a key value transmission parameter communication protocol;
and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
2. The method of claim 1, wherein said responding to the resource request in conjunction with the resource parameter comprises:
performing data query and logic processing by using the resource parameters to generate resource information to be acquired;
and sending the resource information to be acquired to a resource requester corresponding to the resource request.
3. The method according to any one of claims 1-2, wherein the converting the resource parameters of the resource to be acquired into middleware according to the cross-environment rule comprises:
and converting the resource parameters of the resources to be acquired into key value pair character strings in a Json format according to a cross-environment rule.
4. The method according to any one of claims 1 to 3, wherein the converting the resource parameter of the resource to be acquired into a Json-formatted key-value pair character string according to the cross-environment rule comprises:
and generating a Json object, and converting the data structure of the resource parameters into a Json format data structure.
5. The method of any of claims 1-4, wherein the first system is a client application and the second system is a server.
6. The method according to any one of claims 1-5, wherein the sending resource request information carrying the middleware to a second system having a second environment by using a key-value-transfer-parametrization-type communication protocol comprises:
compiling the first language, sending a resource request carrying the middleware to a second system with a second environment by running an executable program generated by compiling the first language in the first environment, and enabling the second system to run the executable program generated by compiling the second language so as to respond to the resource request by combining the resource parameters.
7. The method according to any of claims 1-6, wherein the resource parameter is a uniform resource location parameter.
8. An apparatus for acquiring cross-environment resources, comprising:
the extraction module is used for extracting resource parameters of resources to be acquired, which are adaptive to a first environment, from the first system and converting the resource parameters of the resources to be acquired into middleware according to a cross-environment rule;
the sending module is used for sending the resource request information carrying the middleware to a second system with a second environment by using a key value transmission parameter communication protocol;
and the second system receives the resource request information, extracts the middleware, analyzes the resource parameters from the middleware by using a preset rule, and responds to the resource request by combining the resource parameters.
9. An electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-7.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-7.
CN202010693028.3A 2020-07-17 2020-07-17 Cross-environment resource acquisition method and device and electronic equipment Pending CN111949419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010693028.3A CN111949419A (en) 2020-07-17 2020-07-17 Cross-environment resource acquisition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010693028.3A CN111949419A (en) 2020-07-17 2020-07-17 Cross-environment resource acquisition method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111949419A true CN111949419A (en) 2020-11-17

Family

ID=73340546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010693028.3A Pending CN111949419A (en) 2020-07-17 2020-07-17 Cross-environment resource acquisition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111949419A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905362A (en) * 2021-03-31 2021-06-04 浙江太美医疗科技股份有限公司 Method and system for transparently transmitting parameters between applications
CN112929675A (en) * 2021-01-27 2021-06-08 上海淇玥信息技术有限公司 Image resource compression method and device and electronic equipment
CN113938533A (en) * 2021-10-15 2022-01-14 京东科技信息技术有限公司 Communication method and device between applications, electronic equipment and computer readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645951A (en) * 2013-12-19 2014-03-19 北京邮电大学 Cross-platform mobile data management system and method
CN105872083A (en) * 2016-05-19 2016-08-17 湖州微未信息科技有限公司 Method and system supporting server access by different types of clients as well as server
CN106997298A (en) * 2016-01-22 2017-08-01 阿里巴巴集团控股有限公司 A kind of application resource acquisition methods and device
CN107544991A (en) * 2016-06-23 2018-01-05 滴滴(中国)科技有限公司 The method and apparatus of server process access request
CN110708162A (en) * 2019-09-02 2020-01-17 深圳壹账通智能科技有限公司 Resource acquisition method and device, computer readable medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645951A (en) * 2013-12-19 2014-03-19 北京邮电大学 Cross-platform mobile data management system and method
CN106997298A (en) * 2016-01-22 2017-08-01 阿里巴巴集团控股有限公司 A kind of application resource acquisition methods and device
CN105872083A (en) * 2016-05-19 2016-08-17 湖州微未信息科技有限公司 Method and system supporting server access by different types of clients as well as server
CN107544991A (en) * 2016-06-23 2018-01-05 滴滴(中国)科技有限公司 The method and apparatus of server process access request
CN110708162A (en) * 2019-09-02 2020-01-17 深圳壹账通智能科技有限公司 Resource acquisition method and device, computer readable medium and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929675A (en) * 2021-01-27 2021-06-08 上海淇玥信息技术有限公司 Image resource compression method and device and electronic equipment
CN112905362A (en) * 2021-03-31 2021-06-04 浙江太美医疗科技股份有限公司 Method and system for transparently transmitting parameters between applications
CN113938533A (en) * 2021-10-15 2022-01-14 京东科技信息技术有限公司 Communication method and device between applications, electronic equipment and computer readable medium
CN113938533B (en) * 2021-10-15 2024-02-02 京东科技信息技术有限公司 Inter-application communication method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN111949419A (en) Cross-environment resource acquisition method and device and electronic equipment
CN108040040A (en) A kind of automation analysis method and device of application protocol message
CN107872437B (en) Method, device and server for service request
CN109815107B (en) Method and device for automatic testing
CN109766148B (en) Method and apparatus for processing interface method calls
CN110858202A (en) Method and device for generating where clause in database query statement
CN112507005B (en) Method and device for processing message
CN110858172A (en) Automatic test code generation method and device
CN110704200A (en) Method and device for converting call interface
CN104021124A (en) Method, device and system used for processing webpage data
JP5039946B2 (en) Technology for relaying communication between client devices and server devices
CN112417016B (en) Data exchange method, system, equipment and storage medium
CN112394907A (en) Container-based delivery system construction method, application delivery method and delivery system
CN112433752B (en) Page analysis method, device, medium and electronic equipment
CN110851678A (en) Method and device for crawling data
US20180203748A1 (en) Validation and parsing performance using subtree caching
CN113779018A (en) Data processing method and device
CN111400623B (en) Method and device for searching information
CN116263690A (en) Method and device for virtual machine to read data from external system and relevant written data
CN113992641A (en) Data processing method, device, equipment and storage medium
CN112650502A (en) Batch processing task processing method and device, computer equipment and storage medium
US9021102B2 (en) Providing platform-independent communication with web servers using command line interface
CN111783006A (en) Page generation method and device, electronic equipment and computer readable medium
CN110858240A (en) Front-end module loading method and device
CN111090485B (en) Multi-cluster-oriented help data processing method and device, medium and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201117

RJ01 Rejection of invention patent application after publication