CN109240740B - Console version compatibility method and device and electronic equipment - Google Patents

Console version compatibility method and device and electronic equipment Download PDF

Info

Publication number
CN109240740B
CN109240740B CN201811364311.0A CN201811364311A CN109240740B CN 109240740 B CN109240740 B CN 109240740B CN 201811364311 A CN201811364311 A CN 201811364311A CN 109240740 B CN109240740 B CN 109240740B
Authority
CN
China
Prior art keywords
console
application program
end application
environment
application
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
CN201811364311.0A
Other languages
Chinese (zh)
Other versions
CN109240740A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201811364311.0A priority Critical patent/CN109240740B/en
Publication of CN109240740A publication Critical patent/CN109240740A/en
Application granted granted Critical
Publication of CN109240740B publication Critical patent/CN109240740B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The invention provides a console version compatibility method, a device and electronic equipment, and relates to the technical field of computers, wherein the method determines a console back-end application program required to be called by adapting to a user request at the back end of a console, so that the integration of a plurality of console versions is realized, the existing service is not influenced, the cost can be saved, and the running speed of a system is improved; in addition, the user experience is determined by the front end, and only one console front-end application program is reserved in the front end, so that the consistency of the operation experience of the user on different console versions is improved, and the experience degree of the user is improved.

Description

控制台版本兼容方法、装置及电子设备Console version compatible method, device and electronic device

技术领域technical field

本发明涉及计算机技术领域,尤其是涉及一种控制台版本兼容方法、装置及电子设备。The present invention relates to the field of computer technology, and in particular, to a console version compatible method, device and electronic device.

背景技术Background technique

控制台用于控制用户在IDC(Internet Data Center,互联网数据中心)机房中的资源,例如调整机房带宽。其中,IDC是电信部门利用已有的互联网通信线路、带宽资源,建立标准化的电信专业级机房环境,为企业、政府提供服务器托管、租用以及相关增值等方面的全方位服务。The console is used to control the resources of the user in the IDC (Internet Data Center, Internet Data Center) computer room, such as adjusting the bandwidth of the computer room. Among them, IDC is the use of existing Internet communication lines and bandwidth resources by the telecommunications department to establish a standardized telecommunications professional-level computer room environment to provide enterprises and governments with a full range of services in server hosting, leasing and related value-added services.

随着科技的发展,IDC机房的应用环境正逐渐由BASIC(Beginners'All-purposeSymbolic Instruction Code,初学者通用符号指令代码)环境向VPC(Virtual PrivateCloud,虚拟私有云)环境过渡。因此,对于诸如网络产品线、主机产品线、安全产品线等比较老的产品线,为了满足不同用户的需求,控制台都具有对应这两种运行环境的新旧两个版本的控制台应用程序,其中,BASIC环境对应老版本的控制台应用程序,VPC环境对应新版本的控制台应用程序。由于新老版本的控制台应用程序是两套不同的、独立的程序,控制台对VPC机房(VPC环境下的IDC机房)的操作和BASIC机房(BASIC环境下的IDC机房)的操作是不一样的,这就出现了新老版本的控制台应用程序的兼容问题。With the development of science and technology, the application environment of the IDC room is gradually transitioning from the BASIC (Beginners' All-purpose Symbolic Instruction Code) environment to the VPC (Virtual Private Cloud, virtual private cloud) environment. Therefore, for older product lines such as network product lines, host product lines, security product lines, etc., in order to meet the needs of different users, the console has two versions of console applications corresponding to the two operating environments. Among them, the BASIC environment corresponds to the console application of the old version, and the VPC environment corresponds to the console application of the new version. Since the console applications of the old and new versions are two different and independent programs, the operation of the console on the VPC computer room (IDC computer room in the VPC environment) is different from the operation in the BASIC computer room (IDC computer room in the BASIC environment). Yes, there is a compatibility problem between new and old versions of console applications.

针对新老版本的控制台应用程序的兼容问题,传统的做法是修改控制台的前端,通过硬编码将老版本的控制台前端应用程序的页面嵌在新版本的控制台前端应用程序的页面中,即前端页面中既有老版本的接口也有新版本的接口,采用if/else语句在程序中写入每个接口对应的业务逻辑,通过判断用户发起的请求对应的接口类型,执行相应的控制台后端应用程序。In view of the compatibility issues between the new and old versions of the console application, the traditional method is to modify the front end of the console, and embed the page of the old version of the console front-end application in the page of the new version of the console front-end application by hardcoding. , that is, there are both old and new versions of the interface in the front-end page. The if/else statement is used to write the business logic corresponding to each interface in the program, and the corresponding control is executed by judging the interface type corresponding to the request initiated by the user. backend application.

由于控制台的前端页面有上百个接口,因此需要写上百个if/else语句,这样一方面会影响美观,另一方面会引入新的程序bug(漏洞),从而对现有业务产生影响。另外,由于新老版本对应的页面风格完全不一样,用户的操作感觉会完全不一样,即用户的操作体验一致性较差。因此现有的控制台版本兼容方法会导致用户体验较差。Since the front-end page of the console has hundreds of interfaces, it is necessary to write hundreds of if/else statements, which will affect the aesthetics on the one hand, and introduce new program bugs (vulnerabilities) on the other hand, thus affecting the existing business. . In addition, since the page styles corresponding to the new and old versions are completely different, the user's operation experience will be completely different, that is, the user's operation experience consistency is poor. Therefore, the existing console version compatibility method will result in a poor user experience.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种控制台版本兼容方法、装置及电子设备,以降低对现有业务的影响,提高用户在不同控制台版本上操作体验的一致性,从而提高用户的体验度。In view of this, the purpose of the present invention is to provide a console version compatible method, device and electronic device, so as to reduce the impact on the existing business, improve the consistency of the user's operating experience on different console versions, thereby improving the user's experience. experience.

第一方面,本发明实施例提供了一种控制台版本兼容方法,包括:In a first aspect, an embodiment of the present invention provides a console version compatibility method, including:

获取控制台前端应用程序发送的页面访问请求;Get the page access request sent by the console front-end application;

对所述页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容;Parse the page access request, and obtain the application environment flag and the request content from the parsed data;

基于所述应用环境标志和预设对应关系,得到与所述应用环境标志相匹配的控制台后端应用程序信息;其中,所述预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系;Based on the application environment flag and the preset corresponding relationship, obtain the console back-end application program information matching the application environment flag; wherein, the preset corresponding relationship is the application environment flag and the console back-end application program information the corresponding relationship;

基于匹配到的控制台后端应用程序信息,将所述请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。Based on the matched console backend application information, the request content is sent to the console backend application corresponding to the matched console backend application information.

结合第一方面,本发明实施例提供了第一方面的第一种可能的实施方式,其中,所述预设对应关系包括:In conjunction with the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, wherein the preset correspondence includes:

第一应用环境标志与第一控制台后端应用程序信息的对应关系;以及the correspondence between the first application environment flag and the first console backend application information; and

第二应用环境标志与第二控制台后端应用程序信息的对应关系;The correspondence between the second application environment flag and the second console back-end application program information;

其中,所述第一控制台后端应用程序信息对应第一控制台后端应用程序;所述第二控制台后端应用程序信息对应第二控制台后端应用程序。Wherein, the first console back-end application program information corresponds to the first console back-end application program; the second console back-end application program information corresponds to the second console back-end application program.

结合第一方面的第一种可能的实施方式,本发明实施例提供了第一方面的第二种可能的实施方式,其中,若所述控制台前端应用程序为第一控制台前端应用程序,且所述应用环境标志为第一应用环境标志,则:With reference to the first possible implementation manner of the first aspect, the embodiment of the present invention provides the second possible implementation manner of the first aspect, wherein, if the console front-end application is the first console front-end application, And the application environment flag is the first application environment flag, then:

所述与所述应用环境标志相匹配的控制台后端应用程序信息为第一控制台后端应用程序信息。The console back-end application program information matching the application environment flag is the first console back-end application program information.

结合第一方面的第二种可能的实施方式,本发明实施例提供了第一方面的第三种可能的实施方式,其中,若所述控制台前端应用程序为第一控制台前端应用程序,且所述应用环境标志为第二应用环境标志,则:With reference to the second possible implementation manner of the first aspect, the embodiment of the present invention provides a third possible implementation manner of the first aspect, wherein, if the console front-end application is the first console front-end application, And the application environment flag is the second application environment flag, then:

所述与所述应用环境标志相匹配的控制台后端应用程序信息为第二控制台后端应用程序信息。The console back-end application program information matching the application environment flag is the second console back-end application program information.

结合第一方面的第一种至第三种中的任一种可能的实施方式,本发明实施例提供了第一方面的第四种可能的实施方式,其中,所述第一应用环境标志用于表示VPC环境,所述第一控制台后端应用程序为在VPC环境下应用的控制台后端应用程序;With reference to any one of the first to third possible implementation manners of the first aspect, the embodiment of the present invention provides a fourth possible implementation manner of the first aspect, wherein the first application environment flag is U represents a VPC environment, and the first console back-end application is a console back-end application applied in the VPC environment;

所述第二应用环境标志表示BASIC环境,所述第二控制台后端应用程序为在BASIC环境下应用的控制台后端应用程序;The second application environment flag represents a BASIC environment, and the second console back-end application is a console back-end application applied in the BASIC environment;

所述控制台后端应用程序信息包括控制台后端应用程序的唯一识别号、端口和IP地址。The console backend application information includes the unique identification number, port and IP address of the console backend application.

结合上述第一方面或其第一种至第三种中的任一种可能的实施方式,本发明实施例提供了第一方面的第五种可能的实施方式,其中,将所述请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序之后,所述方法还包括:With reference to the first aspect or any one of the possible implementations of the first to the third, the embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein the request content is sent After reaching the console backend application corresponding to the matched console backend application information, the method further includes:

接收控制台后端应用程序返回的访问结果;Receive the access result returned by the console backend application;

判断反馈所述访问结果的控制台后端应用程序与所述控制台前端应用程序的应用环境是否相同;Determine whether the application environment of the console back-end application that feeds back the access result is the same as the application environment of the console front-end application;

若相同,则将所述访问结果反馈至所述控制台前端应用程序;If the same, feeding back the access result to the console front-end application;

若不同,则将所述访问结果转换为与所述控制台前端应用程序相匹配的格式,并将转换后的访问结果发送至所述控制台前端应用程序。If not, the access result is converted into a format matching the console front-end application, and the converted access result is sent to the console front-end application.

第二方面,本发明实施例还提供一种控制台版本兼容装置,包括:In a second aspect, an embodiment of the present invention further provides a console version compatible device, including:

获取模块,用于获取控制台前端应用程序发送的页面访问请求;The acquisition module is used to acquire the page access request sent by the console front-end application;

解析模块,用于对所述页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容;a parsing module, configured to parse the page access request, and obtain the application environment flag and the request content from the parsed data;

确定模块,用于基于所述应用环境标志和预设对应关系,得到与所述应用环境标志相匹配的控制台后端应用程序信息;其中,所述预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系;A determination module, configured to obtain console back-end application program information matching the application environment flag based on the application environment flag and a preset corresponding relationship; wherein the preset corresponding relationship is the application environment flag and the console Correspondence of back-end application information;

第一发送模块,用于基于匹配到的控制台后端应用程序信息,将所述请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。The first sending module is configured to send the requested content to the console backend application corresponding to the matched console backend application information based on the matched console backend application information.

结合第二方面,本发明实施例提供了第二方面的第一种可能的实施方式,其中,所述预设对应关系包括:In conjunction with the second aspect, the embodiment of the present invention provides a first possible implementation manner of the second aspect, wherein the preset correspondence includes:

第一应用环境标志与第一控制台后端应用程序信息的对应关系;以及the correspondence between the first application environment flag and the first console backend application information; and

第二应用环境标志与第二控制台后端应用程序信息的对应关系;The correspondence between the second application environment flag and the second console back-end application program information;

其中,所述第一控制台后端应用程序信息对应第一控制台后端应用程序;所述第二控制台后端应用程序信息对应第二控制台后端应用程序。Wherein, the first console back-end application program information corresponds to the first console back-end application program; the second console back-end application program information corresponds to the second console back-end application program.

结合第二方面的第一种可能的实施方式,本发明实施例提供了第二方面的第二种可能的实施方式,其中,若所述控制台前端应用程序为第一控制台前端应用程序,且所述应用环境标志为第一应用环境标志,则:With reference to the first possible implementation manner of the second aspect, the embodiment of the present invention provides the second possible implementation manner of the second aspect, wherein, if the console front-end application is the first console front-end application, And the application environment flag is the first application environment flag, then:

所述与所述应用环境标志相匹配的控制台后端应用程序信息为第一控制台后端应用程序信息。The console back-end application program information matching the application environment flag is the first console back-end application program information.

结合第二方面的第二种可能的实施方式,本发明实施例提供了第二方面的第三种可能的实施方式,其中,若所述控制台前端应用程序为第一控制台前端应用程序,且所述应用环境标志为第二应用环境标志,则:With reference to the second possible implementation manner of the second aspect, the embodiment of the present invention provides a third possible implementation manner of the second aspect, wherein, if the console front-end application is the first console front-end application, And the application environment flag is the second application environment flag, then:

所述与所述应用环境标志相匹配的控制台后端应用程序信息为第二控制台后端应用程序信息。The console back-end application program information matching the application environment flag is the second console back-end application program information.

结合第二方面的第一种至第三种中的任一种可能的实施方式,本发明实施例提供了第二方面的第四种可能的实施方式,其中,所述第一应用环境标志用于表示VPC环境,所述第一控制台后端应用程序为在VPC环境下应用的控制台后端应用程序;With reference to any one of the possible implementation manners of the first to the third aspect of the second aspect, the embodiment of the present invention provides a fourth possible implementation manner of the second aspect, wherein the first application environment flag is U represents a VPC environment, and the first console back-end application is a console back-end application applied in the VPC environment;

所述第二应用环境标志表示BASIC环境,所述第二控制台后端应用程序为在BASIC环境下应用的控制台后端应用程序;The second application environment flag represents a BASIC environment, and the second console back-end application is a console back-end application applied in the BASIC environment;

所述控制台后端应用程序信息包括控制台后端应用程序的唯一识别号、端口和IP地址。The console backend application information includes the unique identification number, port and IP address of the console backend application.

结合上述第二方面或其第一种至第三种中的任一种可能的实施方式,本发明实施例提供了第二方面的第五种可能的实施方式,其中,所述装置还包括:With reference to the second aspect or any one of the possible implementations of the first to the third, the embodiment of the present invention provides a fifth possible implementation of the second aspect, wherein the device further includes:

接收模块,用于接收控制台后端应用程序返回的访问结果;The receiving module is used to receive the access results returned by the console backend application;

判断模块,用于判断反馈所述访问结果的控制台后端应用程序与所述控制台前端应用程序的应用环境是否相同;a judging module for judging whether the application environment of the console back-end application that feeds back the access result is the same as the application environment of the console front-end application;

第二发送模块,用于若所述判断模块的判断结果为相同,则将所述访问结果反馈至所述控制台前端应用程序;若所述判断模块的判断结果为不同,则将所述访问结果转换为与所述控制台前端应用程序相匹配的格式,并将转换后的访问结果发送至所述控制台前端应用程序。The second sending module is configured to feed back the access result to the console front-end application if the judgment result of the judgment module is the same; if the judgment result of the judgment module is different, send the access result to the console The result is converted into a format matching the console front-end application, and the converted access result is sent to the console front-end application.

第三方面,本发明实施例还提供一种电子设备,包括存储器、处理器,所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面或其任一种可能的实施方式所述的方法。In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor implements the computer program when the processor executes the computer program. The method described in the first aspect or any possible implementation manner thereof.

第四方面,本发明实施例还提供一种具有处理器可执行的非易失的程序代码的计算机可读介质,所述程序代码使所述处理器执行上述第一方面或其任一种可能的实施方式所述方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable medium having a processor-executable non-volatile program code, where the program code enables the processor to execute the first aspect or any one of its possibilities. The method described in the embodiment of .

本发明实施例带来了以下有益效果:The embodiments of the present invention have brought the following beneficial effects:

本发明实施例中,获取控制台前端应用程序发送的页面访问请求;对页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容;基于应用环境标志和预设对应关系,得到与应用环境标志相匹配的控制台后端应用程序信息;其中,预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系;基于匹配到的控制台后端应用程序信息,将请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。通过在控制台的后端适配用户的请求,确定请求调用的控制台后端应用程序,从而实现了多个控制台版本的融合,这样既不影响现有业务,又可以节约成本,提高系统的运行速度;另外用户体验由前端决定,前端仅保留一个控制台前端应用程序,因此提高了用户在不同控制台版本上操作体验的一致性,从而提高了用户的体验度。In the embodiment of the present invention, the page access request sent by the front-end application program of the console is obtained; the page access request is parsed, and the application environment flag and the request content are obtained from the parsed data; based on the application environment flag and the preset corresponding relationship, the The console back-end application information matching the application environment flag; wherein, the preset correspondence is the corresponding relationship between the application environment flag and the console back-end application information; based on the matched console back-end application information, the The request content is sent to the console backend application corresponding to the matched console backend application information. By adapting the user's request at the back-end of the console and determining the console back-end application called by the request, the integration of multiple console versions is realized, which will not affect the existing business, but also save costs and improve the system. In addition, the user experience is determined by the front-end, and the front-end only retains one console front-end application, thus improving the consistency of the user's operating experience on different console versions, thereby improving the user's experience.

本发明的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点在说明书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the description and drawings.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below, and are described in detail as follows in conjunction with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the specific embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

图1为本发明实施例提供的一种控制台版本兼容方法实现环境的框架结构示意图;1 is a schematic diagram of a framework structure of an implementation environment for a console version compatible method according to an embodiment of the present invention;

图2为本发明实施例提供的一种控制台版本兼容方法的流程示意图;2 is a schematic flowchart of a console version compatibility method according to an embodiment of the present invention;

图3为本发明实施例提供的另一种控制台版本兼容方法的流程示意图;3 is a schematic flowchart of another console version compatibility method provided by an embodiment of the present invention;

图4为本发明实施例提供的另一种控制台版本兼容方法的流程示意图;4 is a schematic flowchart of another console version compatibility method provided by an embodiment of the present invention;

图5为本发明实施例提供的一种控制台版本兼容装置的结构示意图;5 is a schematic structural diagram of a console version compatible device according to an embodiment of the present invention;

图6为本发明实施例提供的另一种控制台版本兼容装置的结构示意图;6 is a schematic structural diagram of another console version compatible device provided by an embodiment of the present invention;

图7为本发明实施例提供的一种电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. example. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

目前新老版本的控制台应用程序融合时传统的做法是修改前端,这样会导致用户体验较差。基于此,本发明实施例提供的一种控制台版本兼容方法、装置及电子设备。在本发明中,可以在前端设备上运行最新版本的控制台前端应用程序,后端设备上运行新旧两个版本的控制台后端应用程序和前置器。从控制台前端应用程序上发送的页面访问请求会被前置器先拦截,若前置器识别出该页面访问请求属于新版本的控制台后端应用程序,会将该页面访问请求发送至新版本的控制台后端应用程序,若前置器识别出该页面访问请求属于老版本的控制台后端应用程序,会将该页面访问请求发送至老版本的控制台后端应用程序。本发明可以使得前端设备上只保留最新的控制台前端应用程序,相对于现有技术中在前端设备上运行新老两个版本的前端应用程序,给用户带来了一致化的体验,从而提高了用户的体验度,降低了对现有业务的影响。At present, the traditional approach when integrating new and old versions of console applications is to modify the front end, which will lead to poor user experience. Based on this, embodiments of the present invention provide a console version compatible method, device, and electronic device. In the present invention, the latest version of the console front-end application program can be run on the front-end device, and the new and old versions of the console back-end application program and the front-end device can be run on the back-end device. The page access request sent from the console front-end application will be intercepted by the front-end device first. If the front-end device recognizes that the page access request belongs to the new version of the console back-end application, it will send the page access request to the new version. version of the console backend application, if the preprocessor identifies that the page access request belongs to the old version of the console backend application, it will send the page access request to the old version of the console backend application. The present invention can keep only the latest console front-end application program on the front-end device. Compared with running the front-end application programs of the new and old versions on the front-end device in the prior art, the invention brings a consistent experience to the user, thereby improving the The user experience is improved and the impact on the existing business is reduced.

为便于对本实施例进行理解,首先对本发明实施例所公开的一种控制台版本兼容方法进行详细介绍。To facilitate understanding of this embodiment, a console version compatibility method disclosed in the embodiment of the present invention is first introduced in detail.

实施例一:Example 1:

如图1所示,在本发明提供的控制台版本兼容方法的一个实施例中,其实现环境包括:前端设备和后端设备。其中,前端设备可以是PC设备(personal computer),后端设备可以是服务器。前端设备上运行有第一控制台前端应用程序,后端设备上运行有第一控制台后端应用程序和第二控制台后端应用程序。本发明在后端设备上增加了一个应用程序(即图1中所示的前置器)。需要说明的是,本实施例中,第一控制台前端应用程序为新版本的控制台前端应用程序,第一控制台后端应用程序为新版本的控制台后端应用程序,第二控制台后端应用程序为老版本的控制后前端应用程序,但本发明的保护范围不限于此,根据需要,第一控制台前端应用程序也可以为老版本的控制台前端应用程序。另外,本发明提供的控制台版本兼容方法不限于仅针对两个控制台版本。As shown in FIG. 1 , in an embodiment of the console version compatibility method provided by the present invention, its implementation environment includes: a front-end device and a back-end device. The front-end device may be a PC device (personal computer), and the back-end device may be a server. A first console front-end application runs on the front-end device, and a first console back-end application and a second console back-end application run on the back-end device. The present invention adds an application program (ie, the front-end device shown in FIG. 1 ) on the back-end device. It should be noted that, in this embodiment, the first console front-end application is a new version of the console front-end application, the first console back-end application is a new version of the console back-end application, and the second console The back-end application program is an old version of the back-end control front-end application program, but the protection scope of the present invention is not limited to this. As required, the first console front-end application program can also be an old version of the console front-end application program. In addition, the console version compatibility method provided by the present invention is not limited to only two console versions.

图2为本发明实施例提供的一种控制台版本兼容方法的流程示意图,该方法由图1中的前置器执行。如图2所示,该控制台版本兼容方法包括以下几个步骤:FIG. 2 is a schematic flowchart of a console version compatibility method according to an embodiment of the present invention, where the method is executed by the front end device in FIG. 1 . As shown in Figure 2, the console version compatibility method includes the following steps:

步骤S202,获取控制台前端应用程序发送的页面访问请求。Step S202, acquiring the page access request sent by the console front-end application.

在本实施例中,控制台前端应用程序是新版本控制台前端应用程序(即在VPC环境下应用的控制台后端应用程序)。用户在新版本控制台的前端页面进行相应操作后,新版本的控制台前端应用程序会向后端发送页面访问请求,在该页面访问请求到达控制台后端应用程序之前,前置器会先拦截该页面访问请求。该页面访问请求中包括应用环境标志和请求内容。其中,应用环境标志用于表示用户所在机房的应用环境。可选地,应用环境标志为由机房名称表示的地域信息(region)。In this embodiment, the console front-end application is a new version of the console front-end application (ie, the console back-end application applied in the VPC environment). After the user performs corresponding operations on the front-end page of the new version of the console, the front-end application of the new version of the console will send a page access request to the back-end. Intercept the page access request. The page access request includes the application environment flag and the request content. The application environment flag is used to indicate the application environment of the computer room where the user is located. Optionally, the application environment flag is region information (region) represented by the name of the computer room.

例如,用户要调整EIP(Enterprise Information Portal,企业信息门户)带宽,需要在其机房的某台设备上先打开新版本控制台前端的控制页面,选择控制页面内的EIP,填写EIP带宽设置信息,填写完毕并发送后,这些EIP带宽设置信息和用户所在机房的应用环境对应的应用环境标志一起形成一个页面访问请求,经控制台前端应用程序向后端发送,并被前置器拦截。For example, if a user wants to adjust the EIP (Enterprise Information Portal) bandwidth, he needs to open the control page of the front-end console of the new version on a device in his computer room, select EIP in the control page, and fill in the EIP bandwidth setting information. After filling in and sending, the EIP bandwidth setting information and the application environment flag corresponding to the application environment of the user's computer room together form a page access request, which is sent to the back-end through the console front-end application, and is intercepted by the front-end device.

步骤S204,对上述页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容。Step S204, parse the above page access request, and obtain the application environment flag and the request content from the parsed data.

前置器通过拦截获取页面访问请求后,对页面访问请求进行解析。需要说明的是,对页面访问请求进行解析的具体过程可以参照现有技术的相关过程,例如参照对web请求的解析过程,这里不再赘述。The preprocessor parses the page access request after intercepting the page access request. It should be noted that, for the specific process of parsing the page access request, reference may be made to the related process in the prior art, for example, referring to the parsing process of the web request, which will not be repeated here.

步骤S206,基于应用环境标志和预设对应关系,得到与该应用环境标志相匹配的控制台后端应用程序信息;其中,预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系。Step S206, based on the application environment flag and the preset corresponding relationship, obtain the console back-end application program information matching the application environment flag; wherein, the preset corresponding relationship is the correspondence between the application environment flag and the console back-end application program information relation.

控制台后端应用程序信息用于唯一标识对应的控制台后端应用程序。在一些可能的实施例中,上述预设对应关系包括:第一应用环境标志与第一控制台后端应用程序信息的对应关系;以及第二应用环境标志与第二控制台后端应用程序信息的对应关系;其中,第一控制台后端应用程序信息对应第一控制台后端应用程序;第二控制台后端应用程序信息对应第二控制台后端应用程序。The console backend application information is used to uniquely identify the corresponding console backend application. In some possible embodiments, the above-mentioned preset correspondence includes: the correspondence between the first application environment flag and the first console back-end application program information; and the second application environment flag and the second console back-end application program information The corresponding relationship of the first console back-end application program information corresponds to the first console back-end application program; the second console back-end application program information corresponds to the second console back-end application program.

基于此,若上述控制台前端应用程序为第一控制台前端应用程序,且上述应用环境标志为第一应用环境标志,则:与该应用环境标志相匹配的控制台后端应用程序信息为第一控制台后端应用程序信息。若上述控制台前端应用程序为第一控制台前端应用程序,且上述应用环境标志为第二应用环境标志,则:与该应用环境标志相匹配的控制台后端应用程序信息为第二控制台后端应用程序信息。Based on this, if the above-mentioned console front-end application is the first console front-end application, and the above-mentioned application environment mark is the first application environment mark, then: the console back-end application information matching the application environment mark is the first A console backend application information. If the console front-end application is the first console front-end application, and the application environment flag is the second application environment flag, then: the console back-end application information matching the application environment flag is the second console Backend application information.

在一种可能的应用场景中,第一应用环境标志用于表示VPC环境,第一控制台后端应用程序为在VPC环境下应用的控制台后端应用程序;第二应用环境标志表示BASIC环境,第二控制台后端应用程序为在BASIC环境下应用的控制台后端应用程序;控制台后端应用程序信息包括控制台后端应用程序的唯一识别号、端口和IP(Internet Protocol,网络之间互连的协议)地址。In a possible application scenario, the first application environment flag is used to represent the VPC environment, the first console back-end application is the console back-end application applied in the VPC environment; the second application environment flag represents the BASIC environment , the second console back-end application is a console back-end application applied in a BASIC environment; the console back-end application information includes the unique identification number, port and IP (Internet Protocol, network) of the console back-end application interconnection protocol) address.

步骤S208,基于匹配到的控制台后端应用程序信息,将上述请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。Step S208, based on the matched console backend application information, send the above request content to the console backend application corresponding to the matched console backend application information.

在一些可能的实施例中,若上述控制台前端应用程序为VPC环境下应用的第一控制台前端应用程序,且上述应用环境标志为表示BASIC环境的第二应用环境标志,即VPC环境下应用的第一控制台前端应用程序发送的页面访问请求实际要调用的是BASIC环境下应用的第二控制台后端应用程序的接口,则前置器采用动态切面技术自动切到第二控制台后端应用程序去访问。In some possible embodiments, if the above-mentioned console front-end application is the first console front-end application applied in the VPC environment, and the above-mentioned application environment flag is the second application environment flag representing the BASIC environment, that is, the application in the VPC environment The page access request sent by the front-end application of the first console actually calls the interface of the back-end application of the second console applied in the BASIC environment, then the front-end uses dynamic aspect technology to automatically switch to the second console. terminal application to access.

具体地,上述前置器为利用java的动态代码技术,在代码运行期使用AspectJ建立的切面代理,这个切面包在第一控制台前端应用程序的接口外面。该切面代理的代理接口分别与第一控制台后端应用程序的接口和第二控制台后端应用程序的接口连接并交互,从而实现了不同版本控制台应用程序的兼容。Specifically, the above-mentioned preprocessor is an aspect proxy established by using the dynamic code technology of java and using AspectJ during the code running period, and this slicer is outside the interface of the front-end application of the first console. The proxy interface of the aspect proxy is respectively connected and interacted with the interface of the first console backend application and the interface of the second console backend application, thereby realizing the compatibility of console applications of different versions.

本发明实施例中,获取控制台前端应用程序发送的页面访问请求;对页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容;基于应用环境标志和预设对应关系,得到与应用环境标志相匹配的控制台后端应用程序信息;其中,预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系;基于匹配到的控制台后端应用程序信息,将请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。通过在控制台的后端适配用户的请求,确定请求调用的控制台后端应用程序,从而实现了多个控制台版本的融合,这样既不影响现有业务,又可以节约成本,提高系统的运行速度;另外用户体验由前端决定,前端仅保留一个控制台前端应用程序,因此提高了用户在不同控制台版本上操作体验的一致性,从而提高了用户的体验度。In the embodiment of the present invention, the page access request sent by the front-end application program of the console is obtained; the page access request is parsed, and the application environment flag and the request content are obtained from the parsed data; based on the application environment flag and the preset corresponding relationship, the The console back-end application information matching the application environment flag; wherein, the preset correspondence is the corresponding relationship between the application environment flag and the console back-end application information; based on the matched console back-end application information, the The request content is sent to the console backend application corresponding to the matched console backend application information. By adapting the user's request at the back-end of the console and determining the console back-end application called by the request, the integration of multiple console versions is realized, which will not affect the existing business, but also save costs and improve the system. In addition, the user experience is determined by the front-end, and the front-end only retains one console front-end application, thus improving the consistency of the user's operating experience on different console versions, thereby improving the user's experience.

图3为本发明实施例提供的另一种控制台版本兼容方法的流程示意图,图3中第一控制台应用程序为VPC环境下应用的新版本控制台应用程序,第二控制台应用程序为BASIC环境下应用的老版本控制台应用程序,应用环境标志为由机房名称表示的地域信息。为了保证用户获得一致的体验,对新老版本控制台应用程序做一个融合,融合后控制台前端的外部页面是新版本控制台前端应用程序的页面,对于前端来说调的都是新版本控制台前端应用程序的接口,前端开发只使用新版本控制台前端应用程序的接口,将新版本控制台应用程序的后端代码做一次升级,使新版本控制台前端应用程序可以操作老版本控制台后端应用程序。FIG. 3 is a schematic flowchart of another console version compatibility method provided by an embodiment of the present invention. In FIG. 3, the first console application is a new version of the console application applied in the VPC environment, and the second console application is The old version of the console application applied in the BASIC environment, the application environment is marked with the regional information represented by the name of the computer room. In order to ensure that users get a consistent experience, the new and old versions of the console application are integrated. After the integration, the external page of the console front end is the page of the new version of the console front end application. For the front end, the new version control is adjusted. The interface of the front-end application of the console, the front-end development only uses the interface of the front-end application of the new version of the console, and the back-end code of the new version of the console application is upgraded once, so that the front-end application of the new version of the console can operate the old version of the console. backend application.

如图3所示,以调用老版本控制台后端应用程序为例,该方法包括以下几个步骤:As shown in Figure 3, taking calling the old version console backend application as an example, the method includes the following steps:

步骤S302,接收新版本控制台前端应用程序发送的页面访问请求。Step S302, receiving a page access request sent by the new version of the console front-end application.

步骤S304,对上述页面访问请求进行解析,得到地域信息和请求内容。Step S304, parse the above page access request to obtain regional information and request content.

步骤S306,根据上述地域信息和预设对应关系,确定与该地域信息相匹配的是老版本控制台后端应用程序信息。Step S306, according to the above-mentioned regional information and the preset corresponding relationship, it is determined that the old version console back-end application program information matches the regional information.

其中,老版本控制台后端应用程序信息对应老版本控制台后端应用程序。Wherein, the old version console backend application information corresponds to the old version console backend application.

步骤S308,将上述请求内容发送至老版本控制台后端应用程序。Step S308, the above request content is sent to the console backend application of the old version.

图4为本发明实施例提供的另一种控制台版本兼容方法的流程示意图,图4是图2的后续流程,也由图1中的前置器执行。如图4所示,在图2的基础上,该方法还包括以下几个步骤:FIG. 4 is a schematic flowchart of another console version compatibility method provided by an embodiment of the present invention, and FIG. 4 is a subsequent process of FIG. 2 , which is also executed by the front end device in FIG. 1 . As shown in Figure 4, on the basis of Figure 2, the method further includes the following steps:

步骤S402,接收控制台后端应用程序返回的访问结果。Step S402, receiving the access result returned by the console backend application.

步骤S404,判断反馈上述访问结果的控制台后端应用程序与控制台前端应用程序的应用环境是否相同。如果相同,执行步骤S406;如果不相同,执行步骤S408。Step S404, it is judged whether the application environment of the console back-end application and the console front-end application that feeds back the access result are the same. If they are the same, go to step S406; if not, go to step S408.

具体地,访问结果中携带有控制台后端应用程序信息,因此通过对访问结果进行解析,可以得到控制台后端应用程序信息,进而基于上述预设对应关系,可以得到与该控制台后端应用程序信息相匹配的应用环境标志,最后将匹配到的应用环境标志与控制台前端应用程序的应用环境标志相对比,若一致则应用环境相同,若不一致则应用环境不相同。Specifically, the access result carries the console backend application information. Therefore, by parsing the access result, the console backend application information can be obtained, and then based on the above preset correspondence, the console backend application information can be obtained. The application environment flag that matches the application information, and finally the matched application environment flag is compared with the application environment flag of the console front-end application. If they are consistent, the application environment is the same; if they are inconsistent, the application environment is different.

步骤S406,将上述访问结果反馈至上述控制台前端应用程序。Step S406, the above-mentioned access result is fed back to the above-mentioned console front-end application.

步骤S408,将上述访问结果转换为与上述控制台前端应用程序相匹配的格式。Step S408: Convert the above access result into a format matching the above console front-end application.

由于前端仅保留一个控制台前端应用程序,后端有至少两个控制台后端应用程序,不同控制台后端应用程序是写在不同的类中的两套独立的程序(代码段),而这两套代码段的数据格式是有差异的,也即不同控制台后端应用程序返回的访问结果的数据格式不同,因此当反馈访问结果的控制台后端应用程序与控制台前端应用程序的应用环境不相同时,需要先对访问结果进行格式转换。Since the front-end only keeps one console front-end application, the back-end has at least two console back-end applications. Different console back-end applications are two independent programs (code segments) written in different classes, while The data formats of the two sets of code segments are different, that is, the data formats of the access results returned by different console back-end applications are different. When the application environment is different, the access result needs to be formatted first.

例如,当反馈访问结果的控制台后端应用程序为BASIC环境下应用的第二控制台后端应用程序,控制台前端应用程序为VPC环境下应用的第一控制台前端应用程序时,需要将访问结果转换为与VPC环境下应用的第一控制台前端应用程序相匹配的格式。For example, when the console back-end application that feeds back access results is the second console back-end application applied in the BASIC environment, and the console front-end application is the first console front-end application applied in the VPC environment, the The access result is converted into a format matching the first console front-end application applied in the VPC environment.

步骤S410,将转换后的访问结果发送至上述控制台前端应用程序。Step S410, sending the converted access result to the console front-end application.

上述实施例具有以下优点:(1)前端页面代码无需修改,不写任何的if/else,直接走现有的第一控制台前端应用程序接口;(2)VPC机房的代码逻辑无调整,这样不会引入新的bug,即不会改变现有代码的结构,对于现有业务不会产生影响;(3)代理接口(前置器)只是做第二控制台后端应用程序接口的调用和数据格式的转换,不涉及业务逻辑,改造成本低。The above embodiment has the following advantages: (1) the front-end page code does not need to be modified, no if/else is written, and the existing first console front-end application program interface is directly used; (2) the code logic of the VPC room is not adjusted, so No new bugs will be introduced, that is, the structure of the existing code will not be changed, and there will be no impact on the existing business; (3) The proxy interface (front-end) is only used for calling and calling the back-end application program interface of the second console. The conversion of data format does not involve business logic, and the transformation cost is low.

实施例二:Embodiment 2:

对应于上述实施例一的控制台版本兼容方法,本发明实施例还提供了一种控制台版本兼容装置。图5为本发明实施例提供的一种控制台版本兼容装置的结构示意图,如图5所示,该控制台版本兼容装置包括:Corresponding to the console version compatibility method in the first embodiment, the embodiment of the present invention further provides a console version compatibility device. FIG. 5 is a schematic structural diagram of a console version compatible device according to an embodiment of the present invention. As shown in FIG. 5 , the console version compatible device includes:

获取模块52,用于获取控制台前端应用程序发送的页面访问请求;an obtaining module 52, configured to obtain a page access request sent by the console front-end application;

解析模块54,用于对上述页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容;The parsing module 54 is used to parse the above-mentioned page access request, and obtain the application environment flag and the request content from the parsed data;

确定模块56,用于基于上述应用环境标志和预设对应关系,得到与该应用环境标志相匹配的控制台后端应用程序信息;其中,预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系;The determination module 56 is configured to obtain the console back-end application program information matching the application environment flag based on the above-mentioned application environment flag and the preset corresponding relationship; wherein, the preset corresponding relationship is the application environment flag and the console back-end application Correspondence of program information;

第一发送模块58,用于基于匹配到的控制台后端应用程序信息,将上述请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。The first sending module 58 is configured to send the above request content to the console backend application corresponding to the matched console backend application information based on the matched console backend application information.

可选地,上述预设对应关系包括:Optionally, the above-mentioned preset correspondence includes:

第一应用环境标志与第一控制台后端应用程序信息的对应关系;以及the correspondence between the first application environment flag and the first console backend application information; and

第二应用环境标志与第二控制台后端应用程序信息的对应关系;The correspondence between the second application environment flag and the second console back-end application program information;

其中,第一控制台后端应用程序信息对应第一控制台后端应用程序;第二控制台后端应用程序信息对应第二控制台后端应用程序。Wherein, the first console back-end application program information corresponds to the first console back-end application program; the second console back-end application program information corresponds to the second console back-end application program.

进一步可选地,若上述控制台前端应用程序为第一控制台前端应用程序,且上述应用环境标志为第一应用环境标志,则:Further optionally, if the above-mentioned console front-end application is the first console front-end application, and the above-mentioned application environment mark is the first application environment mark, then:

与上述应用环境标志相匹配的控制台后端应用程序信息为第一控制台后端应用程序信息。The console back-end application information matching the above application environment flag is the first console back-end application information.

进一步可选地,若上述控制台前端应用程序为第一控制台前端应用程序,且上述应用环境标志为第二应用环境标志,则:Further optionally, if the above-mentioned console front-end application is the first console front-end application, and the above-mentioned application environment mark is the second application environment mark, then:

与上述应用环境标志相匹配的控制台后端应用程序信息为第二控制台后端应用程序信息。The console back-end application information matching the above application environment flag is the second console back-end application information.

可选地,上述第一应用环境标志用于表示VPC环境,上述第一控制台后端应用程序为在VPC环境下应用的控制台后端应用程序;Optionally, the above-mentioned first application environment flag is used to indicate a VPC environment, and the above-mentioned first console back-end application is a console back-end application applied in the VPC environment;

上述第二应用环境标志表示BASIC环境,上述第二控制台后端应用程序为在BASIC环境下应用的控制台后端应用程序;The above-mentioned second application environment mark represents a BASIC environment, and the above-mentioned second console back-end application is a console back-end application applied in the BASIC environment;

上述控制台后端应用程序信息包括控制台后端应用程序的唯一识别号、端口和IP地址。The above console backend application information includes the unique identification number, port and IP address of the console backend application.

本发明实施例中,获取模块52获取控制台前端应用程序发送的页面访问请求;解析模块54对页面访问请求进行解析,从解析后的数据中获取应用环境标志和请求内容;确定模块56基于应用环境标志和预设对应关系,得到与应用环境标志相匹配的控制台后端应用程序信息;其中,预设对应关系为应用环境标志与控制台后端应用程序信息的对应关系;第一发送模块58基于匹配到的控制台后端应用程序信息,将请求内容发送至与匹配到的控制台后端应用程序信息相对应的控制台后端应用程序。通过在控制台的后端适配用户的请求,确定请求调用的控制台后端应用程序,从而实现了多个控制台版本的融合,这样既不影响现有业务,又可以节约成本,提高系统的运行速度;另外用户体验由前端决定,前端仅保留一个控制台前端应用程序,因此提高了用户在不同控制台版本上操作体验的一致性,从而提高了用户的体验度。In the embodiment of the present invention, the obtaining module 52 obtains the page access request sent by the console front-end application; the parsing module 54 parses the page access request, and obtains the application environment flag and the request content from the parsed data; the determination module 56 is based on the application The environment flag and the preset corresponding relationship are obtained, and the console back-end application program information matching the application environment flag is obtained; wherein, the preset corresponding relationship is the corresponding relationship between the application environment flag and the console back-end application program information; the first sending module 58 Based on the matched console backend application information, send the request content to the console backend application corresponding to the matched console backend application information. By adapting the user's request at the back-end of the console and determining the console back-end application called by the request, the integration of multiple console versions is realized, which will not affect the existing business, but also save costs and improve the system. In addition, the user experience is determined by the front-end, and the front-end only retains one console front-end application, thus improving the consistency of the user's operating experience on different console versions, thereby improving the user's experience.

图6为本发明实施例提供的另一种控制台版本兼容装置的结构示意图,如图6所示,在图5的基础上,上述装置还包括:FIG. 6 is a schematic structural diagram of another console version compatible device provided by an embodiment of the present invention. As shown in FIG. 6 , on the basis of FIG. 5 , the above device further includes:

接收模块62,用于接收控制台后端应用程序返回的访问结果;a receiving module 62, configured to receive the access result returned by the console backend application;

判断模块64,用于判断反馈上述访问结果的控制台后端应用程序与控制台前端应用程序的应用环境是否相同;Judging module 64, for judging whether the application environment of the console back-end application that feeds back the above-mentioned access result is the same as that of the console front-end application;

第二发送模块66,用于若判断模块64的判断结果为相同,则将上述访问结果反馈至控制台前端应用程序;若判断模块64的判断结果为不同,则将该访问结果转换为与控制台前端应用程序相匹配的格式,并将转换后的访问结果发送至该控制台前端应用程序。The second sending module 66 is used to feed back the access result to the console front-end application if the judgment result of the judgment module 64 is the same; if the judgment result of the judgment module 64 is different, then convert the access result to the control and send the converted access result to the console front-end application.

实施例三:Embodiment three:

参见图7,本发明实施例还提供一种电子设备100,包括:处理器70,存储器71,总线72和通信接口73,所述处理器70、通信接口73和存储器71通过总线72连接;处理器70用于执行存储器71中存储的可执行模块,例如计算机程序。7, an embodiment of the present invention further provides an electronic device 100, including: a processor 70, a memory 71, a bus 72 and a communication interface 73, the processor 70, the communication interface 73 and the memory 71 are connected through the bus 72; processing The processor 70 is used to execute executable modules, such as computer programs, stored in the memory 71 .

其中,存储器71可能包含高速随机存取存储器(RAM,RandomAccessMemory),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。通过至少一个通信接口73(可以是有线或者无线)实现该系统网元与至少一个其他网元之间的通信连接,可以使用互联网,广域网,本地网,城域网等。The memory 71 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 73 (which may be wired or wireless), and the Internet, wide area network, local network, metropolitan area network, etc. can be used.

总线72可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。The bus 72 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one bidirectional arrow is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.

其中,存储器71用于存储程序,所述处理器70在接收到执行指令后,执行所述程序,前述本发明实施例任一实施例揭示的流过程定义的装置所执行的方法可以应用于处理器70中,或者由处理器70实现。The memory 71 is used to store a program, and the processor 70 executes the program after receiving the execution instruction, and the method executed by the device defined by the stream process disclosed in any of the foregoing embodiments of the present invention can be applied to processing in the processor 70 , or implemented by the processor 70 .

处理器70可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器70中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器70可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital SignalProcessing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现成可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器71,处理器70读取存储器71中的信息,结合其硬件完成上述方法的步骤。The processor 70 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in the processor 70 or an instruction in the form of software. The above-mentioned processor 70 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (Digital Signal Processing, DSP for short) , Application Specific Integrated Circuit (ASIC for short), Field-Programmable Gate Array (FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory 71, and the processor 70 reads the information in the memory 71, and completes the steps of the above method in combination with its hardware.

本发明实施例提供的控制台版本兼容装置及电子设备,与上述实施例提供的控制台版本兼容方法具有相同的技术特征,所以也能解决相同的技术问题,达到相同的技术效果。The console version compatible device and electronic device provided by the embodiments of the present invention have the same technical features as the console version compatible method provided by the above embodiments, so they can also solve the same technical problems and achieve the same technical effects.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here.

除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对步骤、数字表达式和数值并不限制本发明的范围。The relative steps, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the invention unless specifically stated otherwise.

在这里示出和描述的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制,因此,示例性实施例的其他示例可以具有不同的值。In all examples shown and described herein, any specific value should be construed as merely exemplary and not as limiting, as other examples of exemplary embodiments may have different values.

附图中的流程图和框图显示了根据本发明的多个实施例的方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the indicated device or element must have a specific orientation or a specific orientation. construction and operation, and therefore should not be construed as limiting the invention. Furthermore, the terms "first", "second", and "third" are used for descriptive purposes only and should not be construed to indicate or imply relative importance.

本发明实施例所提供的进行控制台版本兼容方法的计算机程序产品,包括存储了处理器可执行的非易失的程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行前面方法实施例中所述的方法,具体实现可参见方法实施例,在此不再赘述。The computer program product for performing the console version compatibility method provided by the embodiment of the present invention includes a computer-readable storage medium storing non-volatile program code executable by the processor, and the program code includes instructions that can be used to execute the preceding For the specific implementation of the method described in the method embodiment, reference may be made to the method embodiment, which will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a processor-executable non-volatile computer-readable storage medium. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that the above-mentioned embodiments are only specific implementations of the present invention, and are used to illustrate the technical solutions of the present invention, but not to limit them. The protection scope of the present invention is not limited thereto, although referring to the foregoing The embodiment has been described in detail the present invention, and those of ordinary skill in the art should understand: any person skilled in the art who is familiar with the technical field of the present invention can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed by the present invention. Or can easily think of changes, or equivalently replace some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be covered in the present invention. within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (12)

1. A console version compatibility method, comprising:
acquiring a page access request sent by a console front-end application program; the console front-end application program is a first console front-end application program;
analyzing the page access request, and acquiring an application environment mark and request content from the analyzed data;
obtaining console back-end application program information matched with the application environment mark based on the application environment mark and a preset corresponding relation; the preset corresponding relation is the corresponding relation between the application environment mark and the console back-end application program information;
based on the matched console backend application program information, sending the request content to the console backend application program corresponding to the matched console backend application program information;
the preset corresponding relationship comprises:
the corresponding relation between the first application environment mark and the first console back-end application program information; and
the corresponding relation between the second application environment mark and the second console back-end application program information;
the first console back-end application program information corresponds to a first console back-end application program; the second console back-end application program information corresponds to a second console back-end application program, and the first console back-end application program and the second console back-end application program are console back-end application programs of different versions.
2. The method of claim 1, wherein if the application environment flag is a first application environment flag, then:
and the console back-end application program information matched with the application environment mark is first console back-end application program information.
3. The method of claim 2, wherein if the application environment flag is a second application environment flag:
and the console back-end application program information matched with the application environment mark is second console back-end application program information.
4. The method according to any one of claims 1 to 3,
the first application environment mark is used for representing a VPC environment, and the first console back-end application program is a console back-end application program applied in the VPC environment;
the second application environment flag represents a BASIC environment, and the second console back-end application program is a console back-end application program applied in the BASIC environment;
the console backend application information includes a unique identification number, a port, and an IP address of the console backend application.
5. The method of any of claims 1-3, wherein after sending the requested content to the console backend application corresponding to the matched console backend application information, the method further comprises:
receiving an access result returned by a console back-end application program;
judging whether the application environments of the console back-end application program and the console front-end application program which feed back the access result are the same or not;
if the access results are the same, the access results are fed back to the console front-end application program;
and if the access result is different from the access result, converting the access result into a format matched with the console front-end application program, and sending the converted access result to the console front-end application program.
6. A console version compatible device, comprising:
the acquisition module is used for acquiring a page access request sent by a console front-end application program; the console front-end application program is a first console front-end application program;
the analysis module is used for analyzing the page access request and acquiring an application environment mark and request content from the analyzed data;
the determining module is used for obtaining the console back-end application program information matched with the application environment mark based on the application environment mark and a preset corresponding relation; the preset corresponding relation is the corresponding relation between the application environment mark and the console back-end application program information;
the first sending module is used for sending the request content to the console back-end application program corresponding to the matched console back-end application program information based on the matched console back-end application program information;
the preset corresponding relationship comprises:
the corresponding relation between the first application environment mark and the first console back-end application program information; and
the corresponding relation between the second application environment mark and the second console back-end application program information;
the first console back-end application program information corresponds to a first console back-end application program; the second console back-end application program information corresponds to a second console back-end application program, and the first console back-end application program and the second console back-end application program are console back-end application programs of different versions.
7. The apparatus of claim 6, wherein if the application environment flag is a first application environment flag, then:
and the console back-end application program information matched with the application environment mark is first console back-end application program information.
8. The apparatus of claim 7, wherein if the application environment flag is a second application environment flag:
and the console back-end application program information matched with the application environment mark is second console back-end application program information.
9. The apparatus according to any one of claims 6-8,
the first application environment mark is used for representing a VPC environment, and the first console back-end application program is a console back-end application program applied in the VPC environment;
the second application environment flag represents a BASIC environment, and the second console back-end application program is a console back-end application program applied in the BASIC environment;
the console backend application information includes a unique identification number, a port, and an IP address of the console backend application.
10. The apparatus according to any one of claims 6-8, further comprising:
the receiving module is used for receiving an access result returned by the console back-end application program;
the judging module is used for judging whether the application environments of the console back-end application program and the console front-end application program which feed back the access result are the same or not;
the second sending module is used for feeding back the access result to the console front-end application program if the judgment results of the judgment modules are the same; and if the judgment results of the judgment modules are different, converting the access result into a format matched with the console front-end application program, and sending the converted access result to the console front-end application program.
11. An electronic device comprising a memory, a processor, a computer program being stored in the memory and being executable on the processor, wherein the processor realizes the method of any of claims 1-5 when executing the computer program.
12. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1-5.
CN201811364311.0A 2018-11-15 2018-11-15 Console version compatibility method and device and electronic equipment Active CN109240740B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811364311.0A CN109240740B (en) 2018-11-15 2018-11-15 Console version compatibility method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811364311.0A CN109240740B (en) 2018-11-15 2018-11-15 Console version compatibility method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109240740A CN109240740A (en) 2019-01-18
CN109240740B true CN109240740B (en) 2022-08-02

Family

ID=65074903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811364311.0A Active CN109240740B (en) 2018-11-15 2018-11-15 Console version compatibility method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109240740B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951336A (en) * 2015-05-27 2015-09-30 小米科技有限责任公司 Application program installation method and device
CN105677361A (en) * 2011-07-20 2016-06-15 谷歌公司 Distribution of multiple application versions
CN105704562A (en) * 2016-03-29 2016-06-22 Tcl集团股份有限公司 Multi-version compatible method and multi-version compatible device for Internet protocol television cloud service platform
CN106775754A (en) * 2016-12-30 2017-05-31 百度在线网络技术(北京)有限公司 The compatible processing method and processing device of application
CN107145347A (en) * 2017-04-27 2017-09-08 努比亚技术有限公司 One kind application gray scale dissemination method, equipment and storage medium
CN108279987A (en) * 2018-01-19 2018-07-13 口碑(上海)信息技术有限公司 The method for edition management and device of application program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7373633B2 (en) * 2003-06-03 2008-05-13 Sap Ag Analytical application framework
US9692837B2 (en) * 2015-01-09 2017-06-27 Facebook, Inc. Federated application services
CN106598673B (en) * 2016-12-16 2021-01-01 武汉斗鱼网络科技有限公司 Application program upgrading method and system
CN108521458B (en) * 2018-03-30 2021-01-01 新华三云计算技术有限公司 Application platform access method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677361A (en) * 2011-07-20 2016-06-15 谷歌公司 Distribution of multiple application versions
CN104951336A (en) * 2015-05-27 2015-09-30 小米科技有限责任公司 Application program installation method and device
CN105704562A (en) * 2016-03-29 2016-06-22 Tcl集团股份有限公司 Multi-version compatible method and multi-version compatible device for Internet protocol television cloud service platform
CN106775754A (en) * 2016-12-30 2017-05-31 百度在线网络技术(北京)有限公司 The compatible processing method and processing device of application
CN107145347A (en) * 2017-04-27 2017-09-08 努比亚技术有限公司 One kind application gray scale dissemination method, equipment and storage medium
CN108279987A (en) * 2018-01-19 2018-07-13 口碑(上海)信息技术有限公司 The method for edition management and device of application program

Also Published As

Publication number Publication date
CN109240740A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
US11151010B2 (en) Resource configuration method, mobile terminal and storage medium
WO2019228344A1 (en) Resource configuration method and apparatus, and terminal and storage medium
WO2022267428A1 (en) Kubernetes-based storage configuration method and system, and electronic device
CN105677335A (en) Method and device for increasing first starting speed of mobile terminal
US20190324930A1 (en) Method, device and computer program product for enabling sr-iov functions in endpoint device
WO2011038564A1 (en) Adaptive method and system for screen display of mobile terminal in network application
WO2024148833A1 (en) Container multi-network-interface-card network configuration method, apparatus, and device, and storage medium
CN107580011B (en) Data sharing method and desktop cloud server
CN110413418A (en) Cache synchronization device and method, cache synchronization system, electronic equipment
WO2021248788A1 (en) Methods for implementing multi-device compatibility testing, apparatuses for implementing multi-device compatibility testing, system for implementing multi-device compatibility testing, and electronic device
WO2014173268A1 (en) Method for achieving communication based on mbim interface and device therefor
WO2020088170A1 (en) Domain name system configuration method and related apparatus
CN111881044B (en) Automatic test case matching system according to configuration files
WO2019161691A1 (en) Method and apparatus for self-adaptively parsing touch data, and device and storage medium
CN111752916B (en) Data acquisition method and device, computer readable storage medium and electronic equipment
CN109240740B (en) Console version compatibility method and device and electronic equipment
CN113515395A (en) Application access method and device based on multi-cloud management platform
CN112099655A (en) Implementation method, device, computer equipment and storage medium for voice mouse mobile office
CN117172207A (en) System bus interconnection verification method, device, electronic equipment, storage medium
CN112910910B (en) Method, device, equipment and storage medium for processing OPCDA protocol message
CN112398870B (en) Cross-platform protocol generation method, apparatus, system, device and storage medium
CN115878512A (en) Memory mapping method, system, equipment and storage medium
CN115858282A (en) A front-end performance visualization monitoring method and system
CN109614359B (en) A kind of data transmission method, device and storage medium based on AXI bus
CN114827249A (en) Method and device for extending grid agent

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