Network information acquisition method and device, computer equipment, readable storage medium and program product

CN119109557APending Publication Date: 2024-12-10CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411296211.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-10

Smart Images

  • Figure CN119109557A_ABST
    Figure CN119109557A_ABST
Patent Text Reader

Abstract

The invention relates to a network information acquisition method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: sending a network information acquisition request to a vehicle-mounted information terminal based on a communication protocol stack; receiving a return value reported by the communication protocol stack, and receiving an abnormal state reported by the communication protocol stack based on the type of the abnormal state under the condition that the return value represents that the communication protocol stack does not receive network information returned by the vehicle-mounted information terminal within a first preset duration; and under the condition that the type of the abnormal state is not that the network connection between the communication protocol stack and the vehicle-mounted information terminal is abnormal, the network information acquisition request is sent to the vehicle-mounted information terminal again after a second preset duration. According to the method provided by the invention, the communication reliability can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle communication technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for acquiring network information. Background Art

[0002] In recent years, in order to make cars safer, smarter, and more environmentally friendly, a series of advanced driver assistance functions have emerged. In order to meet these needs, the traditional electronic and electrical architecture has been severely tested, and more and more electronic components are required to participate in information interaction, which has led to more stringent challenges in network transmission rate, stability, load rate, etc. For this reason, automotive Ethernet came into being. First of all, one of the primary advantages of Ethernet is that it supports a variety of network media, so it can be used in the automotive field; at the same time, since the physical medium is independent of the protocol, it can be adjusted and expanded accordingly in the automotive field to form a complete set of automotive Ethernet protocols, which will continue to develop and be used for a long time in the future. In automotive Ethernet, service-oriented communication is an important part of vehicle Ethernet communication. It combines Ethernet technology with service-oriented architecture (SOA) to provide more flexible, efficient and reliable data transmission services. This communication method emphasizes business demand orientation and realizes data exchange and sharing by defining and providing a series of services. The advantage of service-oriented Ethernet communication lies in its flexibility and scalability. By defining standardized service interfaces and communication protocols, services can be easily added, modified or deleted to adapt to changing business needs. In addition, the high speed and reliability of Ethernet communication also ensure the stability and performance of the service.

[0003] However, service-oriented Ethernet communication also faces some challenges and limitations. Take SOME / IP middleware (Scalable service-Oriented MiddlewarE over IP) as an example. It is located at the seventh layer, the application layer, in the OSI network model. Therefore, its communication reliability depends on the reliability of the underlying communication protocol of the system (such as TCP / IP). When the underlying system cannot guarantee reliable signal transmission due to network link interruption, high network load, and the use of UDP communication at the bottom layer, resulting in signal delay or loss, service-oriented communication will also have problems or fail. Summary of the invention

[0004] Based on this, it is necessary to provide a network information acquisition method, device, computer equipment, computer-readable storage medium and computer program product that can ensure communication reliability in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for obtaining network information, the method comprising:

[0006] Based on the communication protocol stack, a network information acquisition request is sent to the vehicle information terminal;

[0007] receiving a return value reported by the communication protocol stack, and receiving an abnormal state reported by the communication protocol stack based on the type of the abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period;

[0008] When the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal, the network information acquisition request is resent to the in-vehicle information terminal after a second preset time period.

[0009] In one embodiment, the upper layer of the communication protocol stack is an adaptation layer; the sending of a network information acquisition request to the vehicle information terminal based on the communication protocol stack includes:

[0010] Based on the adaptation layer, calling the request interface of the communication protocol stack;

[0011] Based on the request interface, the network information acquisition request is sent to the in-vehicle information terminal.

[0012] In one of the embodiments, the receiving the abnormal state reported by the communication protocol stack based on the type of the abnormal state includes:

[0013] When the type of the abnormal state is that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack;

[0014] When the type of the abnormal state is not that the network connection is abnormal, the abnormal state reported by the communication protocol stack is received by calling a callback interface.

[0015] In one embodiment, the method further comprises:

[0016] When the return value indicates that the communication protocol stack receives the network information returned by the in-vehicle information terminal within the first preset time period, the network information reported by the communication protocol stack is accepted and the current request process is terminated.

[0017] In one embodiment, the method further comprises:

[0018] If the return value does not represent that the communication protocol stack has not received the network information returned by the on-board information terminal within the first preset time period, and does not represent that the communication protocol stack has received the network information returned by the on-board information terminal within the first preset time period, the return value is determined to be an invalid return value and the current request process is terminated.

[0019] In one embodiment, the network information is attribute information of a local area network.

[0020] In a second aspect, the present application further provides a network information acquisition device, the device comprising:

[0021] A first sending module, used for sending a network information acquisition request to the vehicle information terminal based on the communication protocol stack;

[0022] a receiving module, configured to receive a return value reported by the communication protocol stack, and receive an abnormal state reported by the communication protocol stack based on the type of the abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period;

[0023] The second sending module is used to resend the network information acquisition request to the in-vehicle information terminal after a second preset time period when the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal.

[0024] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0025] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0026] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0027] The above-mentioned network information acquisition method, device, computer equipment, computer-readable storage medium and computer program product send a network information acquisition request to the vehicle information terminal based on the communication protocol stack; receive the return value reported by the communication protocol stack, and when the return value indicates that the communication protocol stack has not received the network information returned by the vehicle information terminal within the first preset time, receive the abnormal state reported by the communication protocol stack based on the type of abnormal state; when the type of abnormal state is not an abnormality in the network connection between the communication protocol stack and the vehicle information terminal, resend the network information acquisition request to the vehicle information terminal after the second preset time. The method provided by the present application can ensure communication reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0029] FIG1 is a flow chart of a normal vehicle-oriented service communication process in the prior art;

[0030] FIG2 is a flow chart of a vehicle-oriented service communication process in an abnormal state in the prior art;

[0031] FIG3 is an application environment diagram of a method for acquiring network information in one embodiment;

[0032] FIG4 is a schematic diagram of a flow chart of a method for acquiring network information in one embodiment;

[0033] FIG5 is a schematic diagram of a flow chart of a method for sending a network information acquisition request in one embodiment;

[0034] FIG6 is a schematic diagram of a flow chart of a method for acquiring network information in another embodiment;

[0035] FIG7 is a structural block diagram of a network information acquisition device in one embodiment;

[0036] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] In the prior art, taking the WIFI switch function as an example, a typical vehicle-wide service-oriented communication process is shown in Figure 1. Service-oriented communication represented by SOME / IP communication needs to rely on the underlying Ethernet communication protocol of the system, namely, UDP or TCP protocol. Among them, the characteristics of UDP communication are support for multicast and low protocol overhead, but no reliability guarantee for the transport layer is provided, which is in line with the usage scenario where the server sends messages to multiple subscribing clients. When there is a reliability requirement for data transmission, the application layer needs to handle it by itself. The characteristic of TCP communication is that it provides reliability guarantee for the transport layer, but does not support multicast, and the protocol overhead is larger than UDP, which is in line with the usage scenario where the business layer has requirements for transmission reliability.

[0039] Since the application scenarios of vehicle-oriented service communication generally have certain real-time requirements and inevitably involve multicast, the underlying protocol currently relied on by service-oriented communication is mainly UDP. Since UDP communication cannot guarantee communication reliability, when there are problems such as network fluctuations or system underlying errors, it is inevitable that the message transmission time is too long or even packet loss will occur, which may lead to functional failure, as shown in Figure 2, which shows a vehicle-oriented service communication process in an abnormal state.

[0040] In order to solve the above problems, the embodiment of the present application provides a network information acquisition method, which can be applied in the application environment shown in FIG3. Among them, the user terminal 302 communicates with the vehicle information terminal 304 through the network. The user terminal 302 can be various personal computers, laptops, smart phones, tablet computers and vehicle infotainment systems (IVI central control). The application layer of the user terminal 302 includes a communication protocol stack, which is used for communication between the user terminal 302 and the vehicle information terminal 304. For example, the communication protocol stack can be SOME / IP.

[0041] In an exemplary embodiment, as shown in FIG4 , a method for obtaining network information is provided, which is described by taking the method applied to the user terminal in FIG1 as an example, and includes the following steps 202 to 206. Among them:

[0042] S402: Send a network information acquisition request to the vehicle-mounted information terminal based on the communication protocol stack.

[0043] The network information acquisition request may be sent by calling a request interface of a communication protocol stack.

[0044] S404: Receive a return value reported by the communication protocol stack. When the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period, receive an abnormal state reported by the communication protocol stack based on the type of the abnormal state.

[0045] Among them, the return value reported by the communication protocol stack is identified by the adaptation layer, and the return value is reported to the application layer. The adaptation layer is located between the application layer and the communication protocol stack.

[0046] S406: When the abnormal state is not caused by an abnormality in the network connection between the communication protocol stack and the vehicle-mounted information terminal, a network information acquisition request is resent to the vehicle-mounted information terminal after a second preset time period.

[0047] Among them, in one embodiment, the network connection abnormality is at least one of the following abnormal situations: network link interruption, system network card unavailability, or service of the vehicle information terminal is not online. In other embodiments, the network connection abnormality may also be other situations, which are not specifically limited in the embodiments of the present application.

[0048] In the above network information acquisition method, based on the communication protocol stack, a network information acquisition request is sent to the vehicle information terminal; the return value reported by the communication protocol stack is received, and when the return value indicates that the communication protocol stack has not received the network information returned by the vehicle information terminal within the first preset time period, the abnormal state reported by the communication protocol stack based on the type of abnormal state is received; when the type of abnormal state is not an abnormality in the network connection between the communication protocol stack and the vehicle information terminal, a network information acquisition request is resent to the vehicle information terminal after a second preset time period. The method provided by the present application can ensure communication reliability.

[0049] In some embodiments, as shown in FIG5 , the upper layer of the communication protocol stack is an adaptation layer; based on the communication protocol stack, a network information acquisition request is sent to the vehicle information terminal, including:

[0050] S502: Based on the adaptation layer, call the request interface of the communication protocol stack.

[0051] S504: Based on the request interface, a network information acquisition request is sent to the vehicle-mounted information terminal.

[0052] Among them, the adaptation layer calls the request interface of the communication protocol stack.

[0053] In this embodiment, after the adaptation layer calls the request interface, a network information acquisition request is sent, so that the sent request is more accurate.

[0054] In some embodiments, receiving an abnormal state reported by the communication protocol stack based on the type of the abnormal state includes: when the type of the abnormal state is a network connection abnormality, receiving the abnormal state reported by the communication protocol stack; when the type of the abnormal state is not a network connection abnormality, receiving the abnormal state reported by the communication protocol stack by calling a callback interface.

[0055] Among them, in one embodiment, the abnormal state that is not caused by an abnormal network connection may be at least one of the following abnormal conditions: exceeding the upper limit of applications that someipd can connect to, invalid app id, no configuration information of this service in the configuration file, local service not started, memory overflow, or the number of subscriptions reaching the upper limit. In other embodiments, the abnormal state that is not caused by an abnormal network connection may also be other abnormal conditions, which are not specifically limited in the embodiments of the present application.

[0056] In this embodiment, different methods are used to report abnormal states for different abnormal state types, so that the reported abnormal states are more accurate.

[0057] In some embodiments, the method further includes: when the return value indicates that the communication protocol stack receives network information returned by the in-vehicle information terminal within a first preset time period, accepting the network information reported by the communication protocol stack and terminating the current request process.

[0058] Among them, the communication protocol stack receives the network information returned by the in-vehicle information terminal within the first preset time period, indicating that the network communication between the user terminal and the in-vehicle information terminal is normal.

[0059] In this embodiment, when the communication between the two ends is normal, the network information reported by the communication protocol stack is received, so that the process of receiving the network information is more reliable.

[0060] In some embodiments, the method also includes: when the return value does not represent that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within the first preset time period, and does not represent that the communication protocol stack has received the network information returned by the in-vehicle information terminal within the first preset time period, the return value is determined to be an invalid return value and the current request process is terminated.

[0061] Among them, when the return value is an invalid return value, it indicates that there are other abnormal situations other than communication abnormalities between the user terminal and the vehicle-mounted information terminal, and the abnormal state and cause can be determined based on the numerical value of the return value.

[0062] In this embodiment, the corresponding abnormal state and cause are determined based on the value of the invalid return value, which can effectively improve the reliability of communication between the two ends.

[0063] In some embodiments, the network information is attribute information of a local area network.

[0064] The attribute information may include an identifier and a signal strength of the local area network.

[0065] In this embodiment, by acquiring the attribute information of the local area network, the local area network can be used more effectively.

[0066] In one embodiment, another method for obtaining network information is provided, and a flowchart of the method is shown in FIG6 , where 0 is the return value when the communication interface is normal, and -2 is the return value when the detection timeout occurs. The method includes the following contents:

[0067] (1) Overall fault tolerance solution

[0068] The vehicle-wide service-oriented communication is implemented through the service-oriented communication component SOME / IP. As an application layer protocol, SOME / IP itself cannot guarantee the reliability of UDP transmission, nor can it perform fault tolerance for underlying timeouts or message losses. However, it can monitor the message timeout status and report the status to the upper-layer application truthfully, and the application side will perform fault tolerance through retries.

[0069] (2) Communication protocol stack processing method

[0070] Although the SOME / IP communication protocol stack cannot guarantee the reliability of UDP transmission, it can monitor Ethernet communication messages. After the protocol stack sends a request, if it exceeds the maximum waiting time (the maximum waiting time can be set by the application layer according to its actual needs) and does not receive a reply from the other end, it will report the timeout status to the application side through the interface return value.

[0071] (3) Application-side processing

[0072] When the application side identifies the timeout status reported by the protocol stack, it waits for 1 second and then calls the message request interface again to perform the request operation.

[0073] (4) Adaptation layer processing method

[0074] In some systems, there is an adaptation layer, which is located between the application layer and the SOME / IP communication protocol stack. The work of calling the SOME / IP interface is completed by it rather than the application layer. In this solution, the adaptation layer needs to identify the timeout status return value of the protocol stack and report it to the application layer truthfully.

[0075] (5) Error reporting method

[0076] In some cases, such as when the current network link is disconnected, the system network card is unavailable, or the peer service is not online, Ethernet communication can be determined to be unavailable, and retrying the operation is meaningless. Therefore, in this case, the communication protocol stack should identify the error status and cause and report it directly to the upper-layer application.

[0077] The protocol stack can obtain the current system network card status through the ioctl interface. When the network card is read as down, it directly reports that the network card is unavailable. For other states, it can be reported through the callback interface.

[0078] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0079] Based on the same inventive concept, the embodiment of the present application also provides a network information acquisition device for implementing the network information acquisition method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more network information acquisition device embodiments provided below can refer to the limitations of the network information acquisition method above, and will not be repeated here.

[0080] In an exemplary embodiment, as shown in FIG. 7 , a network information acquisition device 700 is provided, including: a first sending module 701, a receiving module 702, and a second sending module 703, wherein:

[0081] The first sending module 701 is used to send a network information acquisition request to the vehicle-mounted information terminal based on the communication protocol stack.

[0082] The receiving module 702 is used to receive the return value reported by the communication protocol stack. When the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period, the receiving module 702 is used to receive the abnormal state reported by the communication protocol stack based on the type of the abnormal state.

[0083] The second sending module 703 is used to resend the network information acquisition request to the in-vehicle information terminal after a second preset time period when the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal.

[0084] In some embodiments, the upper layer of the communication protocol stack is an adaptation layer; the first sending module 701 is also used to call the request interface of the communication protocol stack based on the adaptation layer; based on the request interface, send the network information acquisition request to the vehicle-mounted information terminal.

[0085] In some embodiments, the receiving module 702 is also used to receive the abnormal state reported by the communication protocol stack when the type of the abnormal state is an abnormality in the network connection; and to receive the abnormal state reported by the communication protocol stack by calling a callback interface when the type of the abnormal state is not an abnormality in the network connection.

[0086] In some embodiments, the network information acquisition device 700 is specifically used to accept the network information reported by the communication protocol stack and terminate the current request process when the return value indicates that the communication protocol stack has received the network information returned by the in-vehicle information terminal within the first preset time period.

[0087] In some embodiments, the network information acquisition device 700 is also used to determine the return value as an invalid return value and terminate the current request process when the return value does not represent that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period, and does not represent that the communication protocol stack has received the network information returned by the in-vehicle information terminal within the first preset time period.

[0088] In some embodiments, the network information acquisition device 700 is also used for network information that is attribute information of a local area network.

[0089] Each module in the above network information acquisition device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0090] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, a near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for acquiring network information is implemented.

[0091] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0092] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: based on a communication protocol stack, sending a network information acquisition request to an in-vehicle information terminal; receiving a return value reported by the communication protocol stack, and receiving an abnormal state reported by the communication protocol stack based on the type of abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period; and resending the network information acquisition request to the in-vehicle information terminal after a second preset time period when the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal.

[0093] In one embodiment, the upper layer of the communication protocol stack implemented when the processor executes a computer program is an adaptation layer; the method of sending a network information acquisition request to the vehicle-mounted information terminal based on the communication protocol stack includes: based on the adaptation layer, calling the request interface of the communication protocol stack; based on the request interface, sending the network information acquisition request to the vehicle-mounted information terminal.

[0094] In one embodiment, the receiving of the abnormal state reported by the communication protocol stack based on the type of the abnormal state implemented by the processor when executing a computer program includes: when the type of the abnormal state is that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack; when the type of the abnormal state is not that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack by calling a callback interface.

[0095] In one embodiment, the method implemented when the processor executes the computer program also includes: when the return value represents that the communication protocol stack receives the network information returned by the in-vehicle information terminal within the first preset time period, accepting the network information reported by the communication protocol stack and terminating the current request process.

[0096] In one embodiment, the method implemented when the processor executes a computer program also includes: when the return value does not represent that the communication protocol stack has not received the network information returned by the on-board information terminal within a first preset time period, and does not represent that the communication protocol stack has received the network information returned by the on-board information terminal within the first preset time period, the return value is determined to be an invalid return value and the current request process is terminated.

[0097] In one embodiment, the network information implemented when the processor executes the computer program is attribute information of the local area network.

[0098] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: based on a communication protocol stack, sending a network information acquisition request to an in-vehicle information terminal; receiving a return value reported by the communication protocol stack, and receiving an abnormal state reported by the communication protocol stack based on the type of abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period; and resending the network information acquisition request to the in-vehicle information terminal after a second preset time period when the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal.

[0099] In one embodiment, the upper layer of the communication protocol stack implemented when the computer program is executed by the processor is an adaptation layer; the sending of a network information acquisition request to the vehicle-mounted information terminal based on the communication protocol stack includes: based on the adaptation layer, calling the request interface of the communication protocol stack; based on the request interface, sending the network information acquisition request to the vehicle-mounted information terminal.

[0100] In one embodiment, the receiving of the abnormal state reported by the communication protocol stack based on the type of the abnormal state implemented by the computer program when executed by the processor includes: when the type of the abnormal state is that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack; when the type of the abnormal state is not that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack by calling a callback interface.

[0101] In one embodiment, the method implemented when the computer program is executed by the processor also includes: when the return value represents that the communication protocol stack receives the network information returned by the on-board information terminal within the first preset time period, accepting the network information reported by the communication protocol stack and terminating the current request process.

[0102] In one embodiment, the method implemented when the computer program is executed by the processor also includes: when the return value does not represent that the communication protocol stack has not received the network information returned by the on-board information terminal within a first preset time period, and does not represent that the communication protocol stack has received the network information returned by the on-board information terminal within the first preset time period, the return value is determined to be an invalid return value and the current request process is terminated.

[0103] In one embodiment, the network information implemented when the computer program is executed by the processor is attribute information of the local area network.

[0104] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: based on a communication protocol stack, sending a network information acquisition request to an in-vehicle information terminal; receiving a return value reported by the communication protocol stack, and receiving an abnormal state reported by the communication protocol stack based on the type of abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period; and resending the network information acquisition request to the in-vehicle information terminal after a second preset time period when the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal.

[0105] In one embodiment, the upper layer of the communication protocol stack implemented when the computer program is executed by the processor is an adaptation layer; the sending of a network information acquisition request to the vehicle-mounted information terminal based on the communication protocol stack includes: based on the adaptation layer, calling the request interface of the communication protocol stack; based on the request interface, sending the network information acquisition request to the vehicle-mounted information terminal.

[0106] In one embodiment, the receiving of the abnormal state reported by the communication protocol stack based on the type of the abnormal state implemented by the computer program when executed by the processor includes: when the type of the abnormal state is that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack; when the type of the abnormal state is not that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack by calling a callback interface.

[0107] In one embodiment, the method implemented when the computer program is executed by the processor also includes: when the return value represents that the communication protocol stack receives the network information returned by the on-board information terminal within the first preset time period, accepting the network information reported by the communication protocol stack and terminating the current request process.

[0108] In one embodiment, the method implemented when the computer program is executed by the processor also includes: when the return value does not represent that the communication protocol stack has not received the network information returned by the on-board information terminal within a first preset time period, and does not represent that the communication protocol stack has received the network information returned by the on-board information terminal within the first preset time period, the return value is determined to be an invalid return value and the current request process is terminated.

[0109] In one embodiment, the network information implemented when the computer program is executed by the processor is attribute information of the local area network.

[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0111] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0112] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0113] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A network information acquisition method, characterized in that: The method comprises: Based on the communication protocol stack, a network information acquisition request is sent to the vehicle information terminal; receiving a return value reported by the communication protocol stack, and receiving an abnormal state reported by the communication protocol stack based on the type of the abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period; When the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal, the network information acquisition request is resent to the in-vehicle information terminal after a second preset time period.

2. The method according to claim 1, characterized in that The upper layer of the communication protocol stack is an adaptation layer; the sending of a network information acquisition request to the vehicle information terminal based on the communication protocol stack includes: Based on the adaptation layer, calling the request interface of the communication protocol stack; Based on the request interface, the network information acquisition request is sent to the in-vehicle information terminal.

3. The method according to claim 1, characterized in that The receiving the abnormal state reported by the communication protocol stack based on the type of the abnormal state includes: When the type of the abnormal state is that the network connection is abnormal, receiving the abnormal state reported by the communication protocol stack; When the type of the abnormal state is not that the network connection is abnormal, the abnormal state reported by the communication protocol stack is received by calling a callback interface.

4. The method according to claim 1, characterized in that: The method further comprises: When the return value indicates that the communication protocol stack receives the network information returned by the in-vehicle information terminal within the first preset time period, the network information reported by the communication protocol stack is accepted and the current request process is terminated.

5. The method according to claim 1, characterized in that The method further comprises: If the return value does not represent that the communication protocol stack has not received the network information returned by the on-board information terminal within the first preset time period, and does not represent that the communication protocol stack has received the network information returned by the on-board information terminal within the first preset time period, the return value is determined to be an invalid return value and the current request process is terminated.

6. The method according to claim 1, characterized in that The network information is attribute information of the local area network.

7. A network information acquisition device, characterized in that: The device comprises: A first sending module, used for sending a network information acquisition request to the vehicle information terminal based on the communication protocol stack; a receiving module, configured to receive a return value reported by the communication protocol stack, and receive an abnormal state reported by the communication protocol stack based on the type of the abnormal state when the return value indicates that the communication protocol stack has not received the network information returned by the in-vehicle information terminal within a first preset time period; The second sending module is used to resend the network information acquisition request to the in-vehicle information terminal after a second preset time period when the type of the abnormal state is not an abnormality in the network connection between the communication protocol stack and the in-vehicle information terminal.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.